-
Notifications
You must be signed in to change notification settings - Fork 12.9k
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
compiletest: Obtain timestamps for common inputs only once #66369
Conversation
Thanks for the pull request, and welcome! The Rust team is excited to review your changes, and you should hear from @nikomatsakis (or someone else) soon. If any changes to this PR are deemed necessary, please add them as extra commits. This ensures that the reviewer can see what has changed since they last reviewed the code. Due to the way GitHub handles out-of-date commits, this should also make it reasonably obvious what issues have or haven't been addressed. Large or tricky changes may require several passes of review and changes. Please see the contribution instructions for more information. |
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.
Is this purely an optimization, i.e., no functional changes intended?
src/tools/compiletest/src/main.rs
Outdated
@@ -1,5 +1,6 @@ | |||
#![crate_name = "compiletest"] | |||
#![feature(test)] | |||
#![feature(try_blocks)] |
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.
Please avoid introducing unstable features to compiletest, as it's intended to be largely "works on stable." The other two features here already cause us some level of pain and we should avoid increasing that :)
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.
Removed.
src/tools/compiletest/src/main.rs
Outdated
|| ((config.mode == DebugInfoGdbLldb || config.mode == DebugInfoCdb || | ||
config.mode == DebugInfoGdb || config.mode == DebugInfoLldb) | ||
&& config.target.contains("emscripten")) | ||
|| (config.mode == DebugInfoGdb && !early_props.ignore.can_run_gdb()) | ||
|| (config.mode == DebugInfoLldb && !early_props.ignore.can_run_lldb()); | ||
|| (config.mode == DebugInfoLldb && !early_props.ignore.can_run_lldb()) | ||
|| !is_outdated( |
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.
Can we add a comment here? Having a list of things we ignore contain a not is pretty confusing...
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.
Done. Also reversed what the function computes and removed the negation.
Obtain timestamps for common inputs (e.g., libraries in run-lib path, or sources in `src/tool/compiletest/`) only once and reuse the result, instead of repeating the work for each test case. No functional changes intended.
0128498
to
1ac470f
Compare
Yes, this is an optimization without functional changes. |
Thanks! @bors r+ |
📌 Commit 1ac470f has been approved by |
…imulacrum compiletest: Obtain timestamps for common inputs only once Obtain timestamps for common inputs (e.g., libraries in run-lib path, or sources in `src/tool/compiletest/`) only once and reuse the result, instead of repeating the work for each test case.
Rollup of 9 pull requests Successful merges: - #66253 (Improve errors after re rebalance coherence) - #66264 (fix an ICE in macro's diagnostic message) - #66349 (expand source_util macros with def-site context) - #66351 (Tweak non-char/numeric in range pattern diagnostic) - #66360 (Fix link to Exten in Vec::set_len) - #66361 (parser: don't use `unreachable!()` in `fn unexpected`.) - #66363 (Improve error message in make_tests) - #66369 (compiletest: Obtain timestamps for common inputs only once) - #66372 (Fix broken links in Ipv4Addr::is_benchmarking docs) Failed merges: r? @ghost
Obtain timestamps for common inputs (e.g., libraries in run-lib path, or
sources in
src/tool/compiletest/
) only once and reuse the result,instead of repeating the work for each test case.