Repository navigation
Conversation
|
Thanks for the pull request, and welcome! The Rust Project has assigned @petrochenkov (or someone else) to review your changes, you should hear from them (or someone else) within the next two weeks. Please see the contribution instructions and our LLM policy for more information. Why was this reviewer chosen?The reviewer was selected based on:
|
|
@bors try @rust-timer queue |
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
codegen: avoid CGU invalidation in path dependent debugger visualizer lookup
This comment has been minimized.
This comment has been minimized.
|
Finished benchmarking commit (1fe7323): comparison URL. Overall result: ❌ regressions - no action neededBenchmarking means the PR may be perf-sensitive. Consider adding rollup=never if this change is not fit for rolling up. @rustbot label: -S-waiting-on-perf -perf-regression Instruction countOur most reliable metric. Used to determine the overall result above. However, even this metric can be noisy.
Max RSS (memory usage)Results (primary -2.5%)A less reliable metric. May be of interest, but not used to determine the overall result above.
CyclesThis perf run didn't have relevant results for this metric. Binary sizeThis perf run didn't have relevant results for this metric. Bootstrap: 484.187s -> 483.785s (-0.08%) |
|
It would generally more useful to add a structure like struct CrateSourceFlags {
dylib: bool,
rlib: bool,
rmeta: bool,
sdylib_interface: bool,
}and a query that returns it. Then most uses of The query or the struct also need to have a comment explaining that it is used to avoid introducing dependency on specific absolute paths. |
|
Reminder, once the PR becomes ready for a review, use |
|
Thanks for reviewing, i'll add comments in the test file and throughout the broader impl. However, I'm also curious about the proposed impl, would directly returning this query have some edge cases on invalidation? I would assume that cases where this actually happens would be very rare, but maybe some combination of i'll start work on this tomorrow, but i'll probably look more into going down the route of querying with the desired bitflags and keeping the returned value a single bool. Thoughts on going this way? |
|
I suggest not to over-complicate things, the scenario that the change intends to address is avoiding rebuilds when moving the project between directories, not avoiding rebuilds after some exceedingly rare changes in compiler flags. |
|
These commits modify the If this was unintentional then you should revert the changes before this PR is merged. |
|
I think all relevant callers of @rustbot ready |
|
r=me after addressing #165837 (comment) and squashing commits. |
…nathanBrouwer Rollup of 6 pull requests Successful merges: - rust-lang#165805 (Replace `match_span_kind` macro with `SpanKind`) - rust-lang#165746 (std: don't overflow when rounding up huge thread stack sizes on unix) - rust-lang#165807 (Fix 'simga' typo in char.to_lowercase documentation) - rust-lang#165809 (Update to ar_archive_writer 0.5.5) - rust-lang#165812 (Remove `-Z stack-protector=basic`) - rust-lang#165815 (Adjust `unsized.rs` debuginfo test expected output for cdb `10.0.28000.2957`) codegen: avoid CGU invalidation in path dependent debugger visualizer lookup
debugger visualizer lookups executed a query to
used_crate_sourceas an rlib or rmeta spot check, creating a path dependent fingerprint that would invalidate CGUs if the artifacts were moved to different canonical paths. (frequently occurring during sandboxed build runs)Instead, we return bitflags describing the presence of source fields from a
CrateSourceand update other relevant callers ofused_crate_sourceto instead consumeCrateSourceFlags.LLM disclosure: I used an LLM to find the cause of this bug while debugging sandboxed builds. Commits are handwritten and LLM reviewed.