Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

debugger_visualizer: files not tracked in dep-info #111226

Closed
ehuss opened this issue May 5, 2023 · 1 comment · Fixed by #111641
Closed

debugger_visualizer: files not tracked in dep-info #111226

ehuss opened this issue May 5, 2023 · 1 comment · Fixed by #111641
Assignees
Labels
C-bug Category: This is a bug. F-debugger_visualizer `#![feature(debugger_visualizer)]` WG-debugging Working group: Bad Rust debugging experiences

Comments

@ehuss
Copy link
Contributor

ehuss commented May 5, 2023

I tried this code:

#![debugger_visualizer(natvis_file = "foo.xml")]

along with a file named foo.xml in the same directory.

Compile this with cargo. Modify foo.xml. Try running a build again.

I expected to see this happen: Cargo rebuilds the project.

Instead, this happened: Nothing happens

The problem is that the debugger_visualizer file does not get added to the dep-info file.

Meta

rustc --version --verbose:

rustc 1.71.0-nightly (473f916d8 2023-05-03)
binary: rustc
commit-hash: 473f916d836cc662c5bdbb0d40af9fb4678fab9e
commit-date: 2023-05-03
host: x86_64-pc-windows-msvc
release: 1.71.0-nightly
LLVM version: 16.0.2
@ehuss ehuss added C-bug Category: This is a bug. F-debugger_visualizer `#![feature(debugger_visualizer)]` WG-debugging Working group: Bad Rust debugging experiences labels May 5, 2023
@ehuss ehuss changed the title debugger_visuazlier: files not tracked in dep-info debugger_visualizer: files not tracked in dep-info May 5, 2023
@michaelwoerister michaelwoerister self-assigned this May 11, 2023
@michaelwoerister
Copy link
Member

The visualizer file does not get loaded into the SourceMap during parsing, so write_out_deps does not pick up on it. It's not clear yet what's the cleanest way to fix this.

@bors bors closed this as completed in 17a6810 May 19, 2023
oli-obk pushed a commit to oli-obk/miri that referenced this issue May 23, 2023
…=cjgillot

Fix dependency tracking for debugger visualizers

This PR fixes dependency tracking for debugger visualizer files by changing the `debugger_visualizers` query to an `eval_always` query that scans the AST while it is still available. This way the set of visualizer files is already available when dep-info is emitted. Since the query is turned into an `eval_always` query, dependency tracking will now reliably detect changes to the visualizer script files themselves.

TODO:
 - [x] perf.rlo
 - [x] Needs a bit more documentation in some places
 - [x] Needs regression test for the incr. comp. case

Fixes rust-lang/rust#111226
Fixes rust-lang/rust#111227
Fixes rust-lang/rust#111295

r? `@wesleywiser`
cc `@gibbyfree`
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
C-bug Category: This is a bug. F-debugger_visualizer `#![feature(debugger_visualizer)]` WG-debugging Working group: Bad Rust debugging experiences
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants