rust/compiler
bors 0d7b2fb797 Auto merge of #123441 - saethlin:fixed-len-file-names, r=oli-obk
Stabilize the size of incr comp object file names

The current implementation does not produce stable-length paths, and we create the paths in a way that makes our allocation behavior is nondeterministic. I think `@eddyb` fixed a number of other cases like this in the past, and this PR fixes another one. Whether that actually matters I have no idea, but we still have bimodal behavior in rustc-perf and the non-uniformity in `find` and `ls` was bothering me.

I've also removed the truncation of the mangled CGU names. Before this PR incr comp paths look like this:
```
target/debug/incremental/scratch-38izrrq90cex7/s-gux6gz0ow8-1ph76gg-ewe1xj434l26w9up5bedsojpd/261xgo1oqnd90ry5.o
```
And after, they look like this:
```
target/debug/incremental/scratch-035omutqbfkbw/s-gux6borni0-16r3v1j-6n64tmwqzchtgqzwwim5amuga/55v2re42sztc8je9bva6g8ft3.o
```

On the one hand, I'm sure this will break some people's builds because they're on Windows and only a few bytes from the path length limit. But if we're that seriously worried about the length of our file names, I have some other ideas on how to make them smaller. And last time I deleted some hash truncations from the compiler, there was a huge drop in the number if incremental compilation ICEs that were reported: https://github.com/rust-lang/rust/pull/110367https://github.com/rust-lang/rust/pull/110367

---

Upon further reading, this PR actually fixes a bug. This comment says the CGU names are supposed to be a fixed-length hash, and before this PR they aren't: ca7d34efa9/compiler/rustc_monomorphize/src/partitioning.rs (L445-L448)
2024-05-03 17:41:48 +00:00
..
rustc
rustc_abi Align: add bytes_usize and bits_usize 2024-05-01 15:57:33 +02:00
rustc_arena
rustc_ast AST pretty: Use builtin_syntax for type ascription 2024-05-03 01:10:22 +02:00
rustc_ast_ir Remove extern crate rustc_macros from numerous crates. 2024-04-29 10:21:54 +10:00
rustc_ast_lowering Rollup merge of #124511 - nnethercote:rm-extern-crates, r=fee1-dead 2024-04-30 15:04:08 +02:00
rustc_ast_passes Replace item names containing an error code with something more meaningful 2024-04-30 22:27:19 +02:00
rustc_ast_pretty AST pretty: Use builtin_syntax for type ascription 2024-05-03 01:10:22 +02:00
rustc_attr Remove extern crate rustc_macros from numerous crates. 2024-04-29 10:21:54 +10:00
rustc_baked_icu_data
rustc_borrowck Step bootstrap cfgs 2024-05-01 22:19:11 -04:00
rustc_builtin_macros Remove extern crate tracing from numerous crates. 2024-04-30 16:47:49 +10:00
rustc_codegen_cranelift
rustc_codegen_gcc Auto merge of #123441 - saethlin:fixed-len-file-names, r=oli-obk 2024-05-03 17:41:48 +00:00
rustc_codegen_llvm Auto merge of #123441 - saethlin:fixed-len-file-names, r=oli-obk 2024-05-03 17:41:48 +00:00
rustc_codegen_ssa Rollup merge of #124414 - lqd:subdiagnostics, r=davidtwco 2024-05-02 19:42:48 +02:00
rustc_const_eval interpret: hide some reexports in rustdoc 2024-05-02 18:47:36 +02:00
rustc_data_structures Auto merge of #123441 - saethlin:fixed-len-file-names, r=oli-obk 2024-05-03 17:41:48 +00:00
rustc_driver
rustc_driver_impl Rollup merge of #124511 - nnethercote:rm-extern-crates, r=fee1-dead 2024-04-30 15:04:08 +02:00
rustc_error_codes Rollup merge of #123247 - veera-sivarajan:fix-error-code-E0637-example-code, r=fmease 2024-04-30 15:04:08 +02:00
rustc_error_messages
rustc_errors Rollup merge of #124511 - nnethercote:rm-extern-crates, r=fee1-dead 2024-04-30 15:04:08 +02:00
rustc_expand Refactor Frame. 2024-05-03 09:06:26 +10:00
rustc_feature Replace version placeholders for 1.79 2024-05-01 21:01:51 -04:00
rustc_fluent_macro
rustc_fs_util
rustc_graphviz
rustc_hir Remove extern crate tracing from numerous crates. 2024-04-30 16:47:49 +10:00
rustc_hir_analysis Take ocx by move for pending obligations 2024-05-02 22:03:01 -04:00
rustc_hir_pretty
rustc_hir_typeck Take ocx by move for pending obligations 2024-05-02 22:03:01 -04:00
rustc_incremental Auto merge of #123441 - saethlin:fixed-len-file-names, r=oli-obk 2024-05-03 17:41:48 +00:00
rustc_index
rustc_index_macros
rustc_infer Use ObligationCtxt in favor of TraitEngine in many places 2024-05-02 22:03:01 -04:00
rustc_interface coverage: Replace boolean options with a CoverageLevel enum 2024-04-29 20:04:22 +10:00
rustc_lexer
rustc_lint Rollup merge of #124624 - WaffleLapkin:old_unit, r=fmease 2024-05-02 19:42:50 +02:00
rustc_lint_defs Add an explanation about never type fallback 2024-05-02 03:47:32 +02:00
rustc_llvm
rustc_log
rustc_macros
rustc_metadata Rollup merge of #124582 - RalfJung:std-not-found, r=Nilstrieb 2024-05-02 15:11:22 +02:00
rustc_middle Auto merge of #123441 - saethlin:fixed-len-file-names, r=oli-obk 2024-05-03 17:41:48 +00:00
rustc_mir_build Rollup merge of #124624 - WaffleLapkin:old_unit, r=fmease 2024-05-02 19:42:50 +02:00
rustc_mir_dataflow Inline & delete Ty::new_unit, since it's just a field access 2024-05-02 17:49:23 +02:00
rustc_mir_transform Rollup merge of #124624 - WaffleLapkin:old_unit, r=fmease 2024-05-02 19:42:50 +02:00
rustc_monomorphize Remove extern crate rustc_middle from numerous crates. 2024-04-29 14:50:45 +10:00
rustc_next_trait_solver
rustc_parse Add StaticForeignItem and use it on ForeignItemKind 2024-04-29 13:15:51 -03:00
rustc_parse_format
rustc_passes Remove extern crate rustc_middle from numerous crates. 2024-04-29 14:50:45 +10:00
rustc_pattern_analysis Remove extern crate tracing from numerous crates. 2024-04-30 16:47:49 +10:00
rustc_privacy Remove extern crate tracing from numerous crates. 2024-04-30 16:47:49 +10:00
rustc_query_impl
rustc_query_system Remove extern crate tracing from numerous crates. 2024-04-30 16:47:49 +10:00
rustc_resolve Add StaticForeignItem and use it on ForeignItemKind 2024-04-29 13:15:51 -03:00
rustc_sanitizers
rustc_serialize Step bootstrap cfgs 2024-05-01 22:19:11 -04:00
rustc_session Rollup merge of #124511 - nnethercote:rm-extern-crates, r=fee1-dead 2024-04-30 15:04:08 +02:00
rustc_smir
rustc_span Rollup merge of #124542 - CBSpeir:diagnostic-item-enumerate-method, r=scottmcm 2024-05-01 20:05:26 +02:00
rustc_symbol_mangling Auto merge of #123441 - saethlin:fixed-len-file-names, r=oli-obk 2024-05-03 17:41:48 +00:00
rustc_target Remove extern crate tracing from numerous crates. 2024-04-30 16:47:49 +10:00
rustc_trait_selection Take ocx by move for pending obligations 2024-05-02 22:03:01 -04:00
rustc_traits Use ObligationCtxt in favor of TraitEngine in many places 2024-05-02 22:03:01 -04:00
rustc_transmute Align: add bytes_usize and bits_usize 2024-05-01 15:57:33 +02:00
rustc_ty_utils Inline & delete Ty::new_unit, since it's just a field access 2024-05-02 17:49:23 +02:00
rustc_type_ir Remove extern crate bitflags from a couple of crates. 2024-04-29 18:47:54 +10:00
stable_mir Remove extern crate scoped_tls from stable_mir. 2024-04-30 16:47:49 +10:00