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

Add experimental import proc macro #1127

Closed
wants to merge 56 commits into from

Commits on Dec 21, 2021

  1. Configuration menu
    Copy the full SHA
    0479a28 View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    7e9aa4c View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    5116fa4 View commit details
    Browse the repository at this point in the history
  4. Configuration menu
    Copy the full SHA
    a2ea5fb View commit details
    Browse the repository at this point in the history

Commits on Jan 28, 2022

  1. Configuration menu
    Copy the full SHA
    136faba View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    1d47d78 View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    ceee3a6 View commit details
    Browse the repository at this point in the history
  4. Configuration menu
    Copy the full SHA
    501ad53 View commit details
    Browse the repository at this point in the history

Commits on Feb 3, 2022

  1. Configuration menu
    Copy the full SHA
    0b069ed View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    f3bcbef View commit details
    Browse the repository at this point in the history

Commits on Feb 7, 2022

  1. Configuration menu
    Copy the full SHA
    f7bb612 View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    32043c2 View commit details
    Browse the repository at this point in the history
  3. Run buildifier.

    cfredric committed Feb 7, 2022
    Configuration menu
    Copy the full SHA
    af0786d View commit details
    Browse the repository at this point in the history
  4. Fix clippy problems.

    cfredric committed Feb 7, 2022
    Configuration menu
    Copy the full SHA
    50396b4 View commit details
    Browse the repository at this point in the history
  5. Fix rustfmt issues.

    cfredric committed Feb 7, 2022
    Configuration menu
    Copy the full SHA
    5cdb3fb View commit details
    Browse the repository at this point in the history
  6. Fix manual-stripping lint.

    cfredric committed Feb 7, 2022
    Configuration menu
    Copy the full SHA
    e4676e7 View commit details
    Browse the repository at this point in the history
  7. Configuration menu
    Copy the full SHA
    0c04b99 View commit details
    Browse the repository at this point in the history

Commits on Feb 16, 2022

  1. mix in label in crate hash computation (bazelbuild#1083)

    Consider the situation where we have two variants of the same crate:
    ```
    rust_library(
        name = "foo",
        srcs = ["foo.rs"],
    )
    
    rust_library(
        name = "foo2",
        crate_name = "foo",
        srcs = ["foo.rs"],
    )
    ```
    
    A use case for this is for example when we want to define different variants
    of a crate using different feature sets, e.g., define a rustc_private non-std
    variant of a vendored crate of the standard library together with a more
    standard version of the vendored crate that requires the standard library.
    
    Currently, this is a fragile definition since the output rlib filename of both
    of these is the same, e.g., `libfoo-$HASH.rlib`, where `$HASH` is
    derived from the crate root source filename, in this case `foo.rs`. So whenever
    we have a Bazel query that includes both of these, the build may fail with
    errors like:
    ```
    ERROR: file 'test/unit/crate_variants/libfoo-717083168.rlib' is generated by these conflicting actions:
    Label: //test/unit/crate_variants:foo2, //test/unit/crate_variants:foo
    ```
    
    This patch reduces the risk of such output filename collisions by mixing in
    the rule label in the output hash calculation.
    krasimirgg authored and cfredric committed Feb 16, 2022
    Configuration menu
    Copy the full SHA
    e4a5b8c View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    f5ab10b View commit details
    Browse the repository at this point in the history
  3. Updated tests (bazelbuild#1085)

    UebelAndre authored and cfredric committed Feb 16, 2022
    Configuration menu
    Copy the full SHA
    9bae0a8 View commit details
    Browse the repository at this point in the history
  4. Configuration menu
    Copy the full SHA
    45aba44 View commit details
    Browse the repository at this point in the history
  5. Configuration menu
    Copy the full SHA
    5178cf2 View commit details
    Browse the repository at this point in the history
  6. add support for targeting iOS simulator on Apple Silicon (bazelbuild#…

    …1073)
    
    When building on an Apple Silicon machine, a different target triple
    is required to target the simulator:
    https://doc.rust-lang.org/rustc/platform-support/aarch64-apple-ios-sim.html
    
    As rules_rust currently ignores abi in triples, listing device
    and simulator triples in a rust_repository_set() ends up always using
    the first one. Adding this constraint allows a build to be switched
    between targeting a device and targeting the simulator.
    dae authored and cfredric committed Feb 16, 2022
    Configuration menu
    Copy the full SHA
    0b8ad50 View commit details
    Browse the repository at this point in the history
  7. Configuration menu
    Copy the full SHA
    3d8f88e View commit details
    Browse the repository at this point in the history
  8. Configuration menu
    Copy the full SHA
    55649e7 View commit details
    Browse the repository at this point in the history
  9. Fix proc_macro_dylib_path when they are built in both opt and debug (b…

    …azelbuild#1089)
    
    * Fix proc_macro_dylib_path in cases where they are built in both opt and debug
    
    * Resolve rustfmt issues
    
    * Update test comment
    djmarcin authored and cfredric committed Feb 16, 2022
    Configuration menu
    Copy the full SHA
    8e77bdb View commit details
    Browse the repository at this point in the history
  10. optimization: switch fastbuild opt default to 1 from 0 (bazelbuild#1091)

    * optimization: switch fastbuild opt default to 1 from 0
    
    This will very slightly increase build times but applies basic
    optimizations that will do things like make iterators _much_
    faster. Since fastbuild is how people iterate most of the time, this
    seems like a sensible default value.
    
    * Regenerate documentation
    
    Co-authored-by: Augie Fackler <augie@google.com>
    2 people authored and cfredric committed Feb 16, 2022
    Configuration menu
    Copy the full SHA
    9a39709 View commit details
    Browse the repository at this point in the history
  11. Added Rust 1.58.0 (bazelbuild#1092)

    UebelAndre authored and cfredric committed Feb 16, 2022
    Configuration menu
    Copy the full SHA
    f94cc3e View commit details
    Browse the repository at this point in the history
  12. Configuration menu
    Copy the full SHA
    ceaf856 View commit details
    Browse the repository at this point in the history
  13. Configuration menu
    Copy the full SHA
    8fb0b78 View commit details
    Browse the repository at this point in the history
  14. Add DEBUG env var for running build scripts (bazelbuild#1096)

    This variable is set for the default profiles as described in https://doc.rust-lang.org/cargo/reference/profiles.html -- true for dev and false for release.
    
    This is an environment variable cargo sets for build scripts documented here https://doc.rust-lang.org/cargo/reference/environment-variables.html#environment-variables-cargo-sets-for-build-scripts
    djmarcin authored and cfredric committed Feb 16, 2022
    Configuration menu
    Copy the full SHA
    126d18b View commit details
    Browse the repository at this point in the history
  15. Added Rust 1.58.1 (bazelbuild#1097)

    * Added Rust 1.58.1
    
    * Regenerate documentation
    UebelAndre authored and cfredric committed Feb 16, 2022
    Configuration menu
    Copy the full SHA
    db2bcc9 View commit details
    Browse the repository at this point in the history
  16. Updated rust_test docs (bazelbuild#1098)

    * Updated rust_test docs
    
    * Regenerate documentation
    UebelAndre authored and cfredric committed Feb 16, 2022
    Configuration menu
    Copy the full SHA
    66b4d7b View commit details
    Browse the repository at this point in the history
  17. Configuration menu
    Copy the full SHA
    c16516b View commit details
    Browse the repository at this point in the history
  18. Configuration menu
    Copy the full SHA
    6d789f9 View commit details
    Browse the repository at this point in the history
  19. Configuration menu
    Copy the full SHA
    074bc60 View commit details
    Browse the repository at this point in the history
  20. Allow users to configure the timeout of cargo_bootstrap_repository. (

    …bazelbuild#1101)
    
    * Allow users to configure the timeout of `cargo_bootstrap_repository`.
    
    * Regenerate documentation
    UebelAndre authored and cfredric committed Feb 16, 2022
    Configuration menu
    Copy the full SHA
    e7b00b7 View commit details
    Browse the repository at this point in the history
  21. Made components of rustc bundles mandatory for rust_toolchain. (b…

    …azelbuild#1104)
    
    * Made components of `rustc` bundles mandatory for `rust_toolchain`.
    
    * Regenerate documentation
    UebelAndre authored and cfredric committed Feb 16, 2022
    Configuration menu
    Copy the full SHA
    e4fa16b View commit details
    Browse the repository at this point in the history
  22. Allow cargo_bootstrap_repository to specify rustc and cargo separately (

    bazelbuild#1100)
    
    * Allow cargo_bootstrap_repository to specify rustc and cargo separately
    
    * Regenerate documentation
    UebelAndre authored and cfredric committed Feb 16, 2022
    Configuration menu
    Copy the full SHA
    0e77c2e View commit details
    Browse the repository at this point in the history
  23. Configuration menu
    Copy the full SHA
    e2ebcb6 View commit details
    Browse the repository at this point in the history
  24. Configuration menu
    Copy the full SHA
    0bf2c2d View commit details
    Browse the repository at this point in the history
  25. Minor docs cleanup (bazelbuild#1108)

    UebelAndre authored and cfredric committed Feb 16, 2022
    Configuration menu
    Copy the full SHA
    444f2b3 View commit details
    Browse the repository at this point in the history
  26. Configuration menu
    Copy the full SHA
    739c98d View commit details
    Browse the repository at this point in the history
  27. Fixed typo in docs (bazelbuild#1110)

    * Fixed typo
    
    * Regenerate documentation
    UebelAndre authored and cfredric committed Feb 16, 2022
    Configuration menu
    Copy the full SHA
    b90d504 View commit details
    Browse the repository at this point in the history
  28. Configuration menu
    Copy the full SHA
    1d2971c View commit details
    Browse the repository at this point in the history
  29. Configuration menu
    Copy the full SHA
    444c696 View commit details
    Browse the repository at this point in the history
  30. Replace Targets and lists of files in rust_toolchain with depsets (b…

    …azelbuild#1109)
    
    * Replace lists of files and Targets in `rust_toolchain` with depsets
    
    * Use `find_sysroot` helper.
    
    * Simply use `rust_std` files directly
    
    * Revert "Use `find_sysroot` helper."
    
    This reverts commit 914d159.
    
    * files
    UebelAndre authored and cfredric committed Feb 16, 2022
    Configuration menu
    Copy the full SHA
    f9ef71c View commit details
    Browse the repository at this point in the history
  31. Configuration menu
    Copy the full SHA
    a0f678e View commit details
    Browse the repository at this point in the history
  32. Calculate path values in the rust_toolchain construction (bazelbuild#…

    …1115)
    
    * Calculate more things in the toolchain construction
    
    * Update sysroot logic
    UebelAndre authored and cfredric committed Feb 16, 2022
    Configuration menu
    Copy the full SHA
    a4a3fa9 View commit details
    Browse the repository at this point in the history
  33. Configuration menu
    Copy the full SHA
    4fcdeba View commit details
    Browse the repository at this point in the history
  34. Configuration menu
    Copy the full SHA
    f462643 View commit details
    Browse the repository at this point in the history
  35. Configuration menu
    Copy the full SHA
    3f6f0d9 View commit details
    Browse the repository at this point in the history
  36. Remove toolchain._crosstool field (bazelbuild#1125)

    We use the equivalent `toolchain._cc_toolchain` attribute instead
    scentini authored and cfredric committed Feb 16, 2022
    Configuration menu
    Copy the full SHA
    f1f3416 View commit details
    Browse the repository at this point in the history
  37. Configuration menu
    Copy the full SHA
    83803fd View commit details
    Browse the repository at this point in the history
  38. Configuration menu
    Copy the full SHA
    14ee068 View commit details
    Browse the repository at this point in the history
  39. Configuration menu
    Copy the full SHA
    ef189fb View commit details
    Browse the repository at this point in the history