Experiment: Move natvis files from src/etc/natvis to debugger_visualizer attributes#154027
Open
clarfonthey wants to merge 1 commit intorust-lang:mainfrom
Open
Experiment: Move natvis files from src/etc/natvis to debugger_visualizer attributes#154027clarfonthey wants to merge 1 commit intorust-lang:mainfrom
src/etc/natvis to debugger_visualizer attributes#154027clarfonthey wants to merge 1 commit intorust-lang:mainfrom
Conversation
Collaborator
|
r? @clubby789 rustbot has assigned @clubby789. Use Why was this reviewer chosen?The reviewer was selected based on:
|
This comment has been minimized.
This comment has been minimized.
Collaborator
|
Some changes occurred in src/tools/compiletest cc @jieyouxu |
bjorn3
reviewed
Mar 18, 2026
| "library/core/core.natvis", | ||
| "library/core/intrinsic.natvis", | ||
| "library/alloc/alloc.natvis", | ||
| "library/std/std.natvis", |
Member
There was a problem hiding this comment.
Why is this necessary? Shouldn't changing them trigger a rebuild of the standard library already and in turn cause all test results to be invalidated?
Contributor
Author
There was a problem hiding this comment.
I'm actually not sure, but I wasn't even sure this would work at first, so, I was being cautious
Member
|
rust/compiler/rustc_codegen_ssa/src/back/linker.rs Lines 1087 to 1105 in a3903b1 |
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.
This is the "easy part" of a massive rabbit hole that I fell into trying to figure out how the current debug visualizers for hashmaps could potentially be moved into the
hashbrowncrate, while still being able to leverage them for libstd.For natvis, it's pretty easy to separate out what belongs where, and we basically already do this. This just takes it a slight step further and attempts to move them into their relevant crates, and we'll see if it breaks everything in CI. For lack of a better place, this moves the "intrinsic" (should probably be renamed to "primitive") natvis file into the libcore crate, since
no_coreis unstable anyway.The Python scripts are an absolute mess, and that's going to take some asking around. So, instead of stalling this part on that being done, I decided to just offer this PR and we'll see if it can work and hopefully make it easier for people to modify the debug visualizers in the standard library, at least for Windows.
Worth also mentioning right now that I don't have a copy of Windows proper to test this on, so, I'm mostly relying on CI/others to verify that this actually doesn't break anything.