Repository navigation
Build rust_test targets using a crate name different from the underlying lib - #2828
Conversation
65363ab to
25d9133
Compare
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
25d9133 to
a99f026
Compare
UebelAndre
left a comment
There was a problem hiding this comment.
Thanks! Had a few questions.
There was a problem hiding this comment.
Thanks! Could I also get you to make (or modify an existing) issue ticket to track the new incompatibility flag? We have some guidance on https://github.com/bazelbuild/rules_rust/blob/0.49.3/COMPATIBILITY.md#how-to-make-a-backwards-incompatible-change but since this could be a breaking change we try to give users a chance to raise concerns during the rollout. I've been writing mine to look like #2082
|
I have filed an issue for this, see #2827. Is there anything specific that's missing there? |
61662e9 to
7e498f3
Compare
7e498f3 to
0656abd
Compare
|
I've also fixed the windows tests (that weren't working due to the toolchain binary extension) and added an assert on the directory name as well. |
|
Just gotta resolve the conflicts! |
5c98d7a to
69e493c
Compare
…nd-change-rust-test-compilation-output-dir
69e493c to
3986b3b
Compare
|
All done. |
This is a rollforward of
#2803, but behind the
incompatible_change_rust_test_compilation_output_directoryincompatible flag.This PR also makes
rust_testput its compilation outputs in the same directory as therust_libraryrule (i.e. not in atest-{hash}subdirectory anymore).After this change both the
rust_libraryandrust_testrules 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