-
Notifications
You must be signed in to change notification settings - Fork 13.3k
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
-Z dump-dep-graph does not generate output #106736
Comments
You need to pass |
OK, now it works with but, now I have below codes, the generated dep-graph does not have any info about fn foo() {
let x = "foo";
println!("{}", x);
}
fn main() {
foo();
} |
The generated graph only records dependencies between queries. It used to have both the query name and its argument. I removed that a few months back to have much terser dumps, easier to use. |
I see, thanks! Why not let -Zdump-dep-graph implicitly enable query-dep-graph? |
For the silliest reason: nobody implemented it 😄. |
@cjgillot after reading the codes, it seems would be better to hint the missing flag if query-dep-graph is not given. In build_dep_graph(), pub fn build_dep_graph(...) {
....
Some(DepGraph::new(
&sess.prof,
prev_graph,
prev_work_products,
encoder,
sess.opts.unstable_opts.query_dep_graph,
sess.opts.unstable_opts.incremental_info,
)) In assert_dep_graph(), would be good to hint to user if missing query-dep-graph flag. pub fn assert_dep_graph(tcx: TyCtxt<'_>) {
tcx.dep_graph.with_ignore(|| {
if tcx.sess.opts.unstable_opts.dump_dep_graph {
tcx.dep_graph.with_query(dump_graph);
}
if !tcx.sess.opts.unstable_opts.query_dep_graph {
// --> Hint about the missing option ?
return;
} and maybe better to have early error before runninig compiler? fn run_compiler(
at_args: &[String],
callbacks: &mut (dyn Callbacks + Send),
file_loader: Option<Box<dyn FileLoader + Send + Sync>>,
make_codegen_backend: Option<
Box<dyn FnOnce(&config::Options) -> Box<dyn CodegenBackend> + Send>,
>,
) -> interface::Result<()> {
let args = args::arg_expand_all(at_args);
let Some(matches) = handle_options(&args) else { return Ok(()) };
let sopts = config::build_session_options(&matches);
// check dump-dep-graph and query-dep-graph here? |
Inside |
check -Z query-dep-graph is enabled if -Z dump-dep-graph (rust-lang#106736) PR to solve rust-lang#106736, r? `@cjgillot`
…iaskrgr Rollup of 5 pull requests Successful merges: - rust-lang#105954 (Update instrument-coverage.md) - rust-lang#106835 (new trait solver: rebase impl substs for gats correctly) - rust-lang#106912 (check -Z query-dep-graph is enabled if -Z dump-dep-graph (rust-lang#106736)) - rust-lang#106940 (Improve a TAIT error and add an error code plus documentation) - rust-lang#106942 (Update books) Failed merges: r? `@ghost` `@rustbot` modify labels: rollup
A simple test setup, run on WSL2 on windows 11.
There is no file generated in current directory, nor in the /tmp folder
The text was updated successfully, but these errors were encountered: