Repository navigation
Added Rust 1.62.0 - #1427
Merged
Merged
Added Rust 1.62.0#1427
Conversation
Collaborator
Author
|
This is blocked by the following error on windows: https://buildkite.com/bazel/rules-rust-rustlang/builds/6678#0181b81d-22e9-42be-92fe-ec6401ed53a2 Input from anyone with any windows experience would be welcomed 🙏 |
UebelAndre
force-pushed
the
rustup
branch
2 times, most recently
from
July 1, 2022 15:47
7c22a98 to
5c18ea4
Compare
Collaborator
Author
|
#1427 (comment) appeared to be a flaky failure on windows 😞 |
UebelAndre
enabled auto-merge (squash)
July 1, 2022 15:51
UebelAndre
disabled auto-merge
July 1, 2022 15:51
UebelAndre
enabled auto-merge (squash)
July 4, 2022 15:30
Collaborator
Author
|
@illicitonion friendly ping 😅 |
Collaborator
|
I just spent the better part of my day hunting that flake, tl;dr I believe the issue comes from rust_doc_test overwriting the outputs of the underlying crate. I managed to consistently reproduce the failure with Will send a PR tomorrow. |
scentini
self-requested a review
July 4, 2022 18:12
scentini
approved these changes
Jul 4, 2022
This was referenced Jul 5, 2022
scentini
added a commit
that referenced
this pull request
Jul 7, 2022
This is supposed to fix the long standing Windows flakiness as described in #1427 (comment) Initially I thought it's an issue with `rustdoc_test`, however the actual issue is that `rust_binary` and its `rust_test` have the same crate name and generate the same intermediary `.o` files. For sandboxed builds this is not an issue, as the actions are isolated, however, we have a race condition in non-sandboxed builds (Windows): Let's consider the following build: ``` bazel build --spawn_strategy=standalone \ //test/unit/rustdoc:bin_with_transitive_proc_macro \ //test/unit/rustdoc:bin_with_transitive_proc_macro_test ``` The `bin_with_transitive_proc_macro` compile action will create the following intermediate file: `bazel-out/k8-fastbuild/bin/test/unit/rustdoc/bin_with_transitive_proc_macro.bin_with_transitive_proc_macro.573369dc-cgu.2.rcgu.o`, as will the `bin_with_transitive_proc_macro_test` action. These two files differ slightly (as the second action is for a test), namely the `bin_with_transitive_proc_macro` output has the following symbols: ``` 0000000000000000 T main 0000000000000000 t _ZN30bin_with_transitive_proc_macro4main17hfc292cc42314e131E U _ZN3std2rt10lang_start17h1dbc829c47cd61d9E ``` while the `bin_with_transitive_proc_macro_test` `.o` output looks like this: ``` 0000000000000000 T main 0000000000000000 t _ZN30bin_with_transitive_proc_macro4main17h28726504dc060f8dE U _ZN3std2rt10lang_start17h1dbc829c47cd61d9E U _ZN4test16test_main_static17h37e3d88407f5b40fE ``` Now, when the two actions run in parallel, it can happen that `bin_with_transitive_proc_macro` creates the output, and `bin_with_transitive_proc_macro_test` overwrites it. Then, at linking time for `bin_with_transitive_proc_macro`, `rustc` will complain: ``` note: ld.lld: error: undefined symbol: test::test_main_static::h37e3d88407f5b40f ``` This is because `bin_with_transitive_proc_macro` is not a test and as such is not linked against `libtest`. This PR fixes the issue by directing the compilation outputs of `rust_test` to be under a `test-{hash}` directory.
github-merge-queue Bot
pushed a commit
that referenced
this pull request
Aug 22, 2024
…lying lib (#2803) This PR also makes `rust_test` put its compilation outputs in the same directory as the `rust_library` rule (i.e. not in a `test-{hash}` subdirectory anymore). After this change both the `rust_library` and `rust_test` rules will put all its compilation outputs in the same directory, but there won't be any name collisions in non-sandboxed environments (see #1427 for more context). This is a partial rollback of 1018533 and 26344d4.
felipeamp
added a commit
to felipeamp/rules_rust
that referenced
this pull request
Sep 2, 2024
underlying lib This is a rollforward of bazelbuild#2803, but behind a feature flag. This PR also makes `rust_test` put its compilation outputs in the same directory as the `rust_library` rule (i.e. not in a `test-{hash}` subdirectory anymore). After this change both the `rust_library` and `rust_test` rules will put all its compilation outputs in the same directory, but there won't be any name collisions in non-sandboxed environments (see bazelbuild#1427 for more context). Issue: bazelbuild#2827
felipeamp
added a commit
to felipeamp/rules_rust
that referenced
this pull request
Sep 2, 2024
underlying lib This is a rollforward of bazelbuild#2803, but behind a feature flag. This PR also makes `rust_test` put its compilation outputs in the same directory as the `rust_library` rule (i.e. not in a `test-{hash}` subdirectory anymore). After this change both the `rust_library` and `rust_test` rules will put all its compilation outputs in the same directory, but there won't be any name collisions in non-sandboxed environments (see bazelbuild#1427 for more context). Issue: bazelbuild#2827
felipeamp
added a commit
to felipeamp/rules_rust
that referenced
this pull request
Sep 2, 2024
underlying lib This is a rollforward of bazelbuild#2803, but behind a feature flag. This PR also makes `rust_test` put its compilation outputs in the same directory as the `rust_library` rule (i.e. not in a `test-{hash}` subdirectory anymore). After this change both the `rust_library` and `rust_test` rules will put all its compilation outputs in the same directory, but there won't be any name collisions in non-sandboxed environments (see bazelbuild#1427 for more context). Issue: bazelbuild#2827
github-merge-queue Bot
pushed a commit
that referenced
this pull request
Sep 12, 2024
…lying lib (#2828) This is a rollforward of #2803, but behind the `incompatible_change_rust_test_compilation_output_directory` incompatible flag. This PR also makes `rust_test` put its compilation outputs in the same directory as the `rust_library` rule (i.e. not in a `test-{hash}` subdirectory anymore). After this change both the `rust_library` and `rust_test` rules will put all its compilation outputs in the same directory, but there won't be any name collisions in non-sandboxed environments (see #1427 for more context). Issue with context: #2827
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
https://blog.rust-lang.org/2022/06/30/Rust-1.62.0.html