Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

EXPERIMENT: build jujutsu with buck2 #1997

Draft
wants to merge 21 commits into
base: main
Choose a base branch
from
Draft

Commits on Oct 11, 2024

  1. editor: initialize .vscode settings directory

    These are basically always useful in vscode; turn them on. Note that there is an
    editorconfig plugin for vscode and we do have a `.editorconfig` file but these
    options aren't set due to an old intellj-rust bug.
    
    Signed-off-by: Austin Seipp <[email protected]>
    thoughtpolice committed Oct 11, 2024
    Configuration menu
    Copy the full SHA
    5780d43 View commit details
    Browse the repository at this point in the history
  2. tools: initialize useful dotslash tools

    Signed-off-by: Austin Seipp <[email protected]>
    thoughtpolice committed Oct 11, 2024
    Configuration menu
    Copy the full SHA
    654e709 View commit details
    Browse the repository at this point in the history
  3. buck: repository prep work

    This lays the basic groundwork to invoke buck2 in a way that barely works and
    builds nothing.
    
    The `jj.bzl` code will be used in some upcoming diffs to add `BUCK` files to the
    various crates.
    
    Signed-off-by: Austin Seipp <[email protected]>
    thoughtpolice committed Oct 11, 2024
    Configuration menu
    Copy the full SHA
    a0ae3b0 View commit details
    Browse the repository at this point in the history
  4. buck: build zstd

    Signed-off-by: Austin Seipp <[email protected]>
    thoughtpolice committed Oct 11, 2024
    Configuration menu
    Copy the full SHA
    0d4d28e View commit details
    Browse the repository at this point in the history
  5. buck: build libz

    Signed-off-by: Austin Seipp <[email protected]>
    thoughtpolice committed Oct 11, 2024
    Configuration menu
    Copy the full SHA
    0c857ad View commit details
    Browse the repository at this point in the history
  6. buck: build boringssl

    `libgit2` requires `libssh2`, which in turn requires `openssl-sys`. OpenSSL is
    notoriously hard to vendor for a number of reasons including its build system.
    In contrast, while BoringSSL does not make compatibility guarantees, it is easy
    to vendor and is designed to be used with Bazel.
    
    The goal is that we can substitute BoringSSL for OpenSSL in `openssl-sys` as the
    underlying library, and `libssh2` will still work.
    
    Signed-off-by: Austin Seipp <[email protected]>
    thoughtpolice committed Oct 11, 2024
    Configuration menu
    Copy the full SHA
    b9cc44d View commit details
    Browse the repository at this point in the history
  7. buck: build libssh2

    Signed-off-by: Austin Seipp <[email protected]>
    thoughtpolice committed Oct 11, 2024
    Configuration menu
    Copy the full SHA
    35635f3 View commit details
    Browse the repository at this point in the history
  8. buck: build libgit2

    Signed-off-by: Austin Seipp <[email protected]>
    thoughtpolice committed Oct 11, 2024
    Configuration menu
    Copy the full SHA
    a901830 View commit details
    Browse the repository at this point in the history
  9. buck: add initial reindeer scaffold

    Summary: `buck2 build third-party//rust` works fine here.
    
    Signed-off-by: Austin Seipp <[email protected]>
    thoughtpolice committed Oct 11, 2024
    Configuration menu
    Copy the full SHA
    447b0b8 View commit details
    Browse the repository at this point in the history
  10. buck: add many reindeer fixups

    Summary: These will be needed for a lot of upcoming dependencies as the Reindeer
    dependencies and Cargo dependencies are unified.
    
    Signed-off-by: Austin Seipp <[email protected]>
    thoughtpolice committed Oct 11, 2024
    Configuration menu
    Copy the full SHA
    58c573a View commit details
    Browse the repository at this point in the history
  11. buck: unify cargo deps with reindeer deps

    This includes a very simple script to do the synchronization between the
    workspace Cargo file and the Buck2-specific Cargo file, automatically.
    
    Signed-off-by: Austin Seipp <[email protected]>
    thoughtpolice committed Oct 11, 2024
    Configuration menu
    Copy the full SHA
    fbf73de View commit details
    Browse the repository at this point in the history
  12. cargo: suppress warnings for cfg(buck_build)

    This cfg value isn't understood by Cargo, so it needs to have the warning
    suppressed by default. We could also add an entry to `build.rs` too, but not
    every package has one.
    
    To be used by upcoming diffs.
    
    Signed-off-by: Austin Seipp <[email protected]>
    thoughtpolice committed Oct 11, 2024
    Configuration menu
    Copy the full SHA
    caee1a0 View commit details
    Browse the repository at this point in the history
  13. tools: add a script for checking workspace dependencies

        buck run -v0 tools/scripts:unused_workspace_deps
    
    Signed-off-by: Austin Seipp <[email protected]>
    thoughtpolice committed Oct 11, 2024
    Configuration menu
    Copy the full SHA
    47842c9 View commit details
    Browse the repository at this point in the history
  14. buck: cargo<->buck sync tool

    This adds a new step to the `synchronize.py` script that synchronizes
    dependencies between `Cargo.toml` and `BUCK` files. In this model, Cargo remains
    the source of truth.
    
    Signed-off-by: Austin Seipp <[email protected]>
    thoughtpolice committed Oct 11, 2024
    Configuration menu
    Copy the full SHA
    3a38f0b View commit details
    Browse the repository at this point in the history
  15. gen-protos: add BUILD files

    This is needed to emit the `.rs` files into the right build directory in a
    follow up diff to add `BUCK` files.
    
    Signed-off-by: Austin Seipp <[email protected]>
    thoughtpolice committed Oct 11, 2024
    Configuration menu
    Copy the full SHA
    6974f05 View commit details
    Browse the repository at this point in the history
  16. proc-macros: add BUILD files

    Signed-off-by: Austin Seipp <[email protected]>
    thoughtpolice committed Oct 11, 2024
    Configuration menu
    Copy the full SHA
    4b65fe4 View commit details
    Browse the repository at this point in the history
  17. lib: add BUILD files

    The `grammar` macro from `pest_derive` doesn't actually interpret the given file
    as relative in our case, so we have to give it the fully qualified relative path
    which exists in the `buck-out/` dir.
    
    Signed-off-by: Austin Seipp <[email protected]>
    thoughtpolice committed Oct 11, 2024
    Configuration menu
    Copy the full SHA
    11e05e1 View commit details
    Browse the repository at this point in the history
  18. cli: add BUILD files

    The `grammar` macro from `pest_derive` doesn't actually interpret the given file
    as relative in our case, so we have to give it the fully qualified relative path
    which exists in the `buck-out/` dir.
    
    Signed-off-by: Austin Seipp <[email protected]>
    thoughtpolice committed Oct 11, 2024
    Configuration menu
    Copy the full SHA
    f76f729 View commit details
    Browse the repository at this point in the history
  19. github: add buck2 ci build

    Signed-off-by: Austin Seipp <[email protected]>
    thoughtpolice committed Oct 11, 2024
    Configuration menu
    Copy the full SHA
    a42d45d View commit details
    Browse the repository at this point in the history
  20. Configuration menu
    Copy the full SHA
    c2c8b8d View commit details
    Browse the repository at this point in the history
  21. docs: add buck2 docs

    Signed-off-by: Austin Seipp <[email protected]>
    thoughtpolice committed Oct 11, 2024
    Configuration menu
    Copy the full SHA
    2d292ca View commit details
    Browse the repository at this point in the history