You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Currently the compilation outputs of a rust_library are put in that specific directory. For example, one of the compilation outputs of my/package:my_library will be the my_library file in my/package.
However, the compilation outputs of rust_test rules are put in a specific test subdirectory containing a hash in its name. For example, the compilation output of my/package:my_test, which tests my/package:my_library, will contain the my_library file in my/package/test-<hash_id>.
This was done as a way to unblock the flaky/failing tests of #1427.
In order to have all compilation outputs in the same directory (i.e. without the test-<hash_id> subdirectory for test rules) we will add a _test suffix to the crate name of rust_test targets. This is a backward-incompatible change, since if the crate_name attribute is set in code (e.g. #![crate_name = "my_crate"]), we need to set the crate_name attribute in the rust_test rule to match it.
Therefore this change will be done behind a feature flag named incompatible_change_rust_test_compilation_output_directory.
changed the title [-]Put compilation outputs of `rust_library` and `rust_test` rules in same directory without conflicts[/-][+]`incompatible_change_rust_test_compilation_output_directory`[/+]on Mar 14, 2026
Activity
Build `rust_test` targets using a crate name different from the
Build `rust_test` targets using a crate name different from the
Build `rust_test` targets using a crate name different from the
Build `rust_test` targets using a crate name different from the under…
[-]Put compilation outputs of `rust_library` and `rust_test` rules in same directory without conflicts[/-][+]`incompatible_change_rust_test_compilation_output_directory`[/+]Make test binary names predictable (#3899)