-
Notifications
You must be signed in to change notification settings - Fork 12.8k
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
Various refactorings to rustc_interface #126834
Conversation
rustbot has assigned @michaelwoerister. Use |
b1e8447
to
5518265
Compare
This PR modifies cc @jieyouxu |
&sess.opts.unstable_opts.crate_attr, | ||
); | ||
|
||
// FIXME modify krate.attrs in place once #65860 is a hard error. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I disagree with this and would like to see everything expanded as a part of the regular expansion phase (that's why I introduced the current setup in #108221), that will allow to expand crate-level macro attributes correctly.
If some crate attribute has to be used before that, then it is an exception that should be clearly visible, such attributes need to have some restrictions (e.g. cannot be macro-generated).
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Reverted
5518265
to
1559962
Compare
This comment has been minimized.
This comment has been minimized.
Seems like |
1559962
to
afd267b
Compare
This comment has been minimized.
This comment has been minimized.
Before if the closure passed to run_compiler emitted an error without calling abort_if_errors and no diagnostics have been stashed, run_compiler would return normally as if no error had occured.
afd267b
to
8d1f5b3
Compare
I can't reproduce the bug locally. I've dropped the offending commit for now. |
…woerister Various refactorings to rustc_interface This should make it easier to move the driver interface away from queries in the future. Many custom drivers call queries like `queries.global_ctxt()` before they are supposed to be called, breaking some things like certain `--print` and `-Zunpretty` options, `-Zparse-only` and emitting the dep info at the wrong point in time. They are also not actually necessary at all. Passing around the query output manually would avoid recomputation too and would be just as easy. Removing driver queries would also reduce the amount of global mutable state of the compiler. I'm not removing driver queries in this PR to avoid breaking the aforementioned custom drivers.
💔 Test failed - checks-actions |
@bors retry spurious network issue |
☀️ Test successful - checks-actions |
Finished benchmarking commit (c2d2bb3): comparison URL. Overall result: ❌✅ regressions and improvements - no action needed@rustbot label: -perf-regression Instruction countThis is a highly reliable metric that was used to determine the overall result at the top of this comment.
Max RSS (memory usage)Results (primary -4.2%, secondary -3.5%)This is a less reliable metric that may be of interest but was not used to determine the overall result at the top of this comment.
CyclesResults (secondary 2.8%)This is a less reliable metric that may be of interest but was not used to determine the overall result at the top of this comment.
Binary sizeThis benchmark run did not return any relevant results for this metric. Bootstrap: 693.956s -> 693.71s (-0.04%) |
…ieril More refactorings to rustc_interface Follow up to rust-lang#126834
…ieril More refactorings to rustc_interface Follow up to rust-lang#126834
Rollup merge of rust-lang#127184 - bjorn3:interface_refactor2, r=Nadrieril More refactorings to rustc_interface Follow up to rust-lang#126834
This should make it easier to move the driver interface away from queries in the future. Many custom drivers call queries like
queries.global_ctxt()
before they are supposed to be called, breaking some things like certain--print
and-Zunpretty
options,-Zparse-only
and emitting the dep info at the wrong point in time. They are also not actually necessary at all. Passing around the query output manually would avoid recomputation too and would be just as easy. Removing driver queries would also reduce the amount of global mutable state of the compiler. I'm not removing driver queries in this PR to avoid breaking the aforementioned custom drivers.