-
Notifications
You must be signed in to change notification settings - Fork 2.4k
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
fix(doctest): warn only once if doctest xcompile is skipped #14920
base: master
Are you sure you want to change the base?
fix(doctest): warn only once if doctest xcompile is skipped #14920
Conversation
…ipping doctest on xcompiling even when not under verbose flag
Thanks for the pull request, and welcome! The Rust team is excited to review your changes, and you should hear from @epage (or someone else) some time within the next two weeks. Please see the contribution instructions for more information. Namely, in order to ensure the minimum review times lag, PR authors and assigned reviewers should ensure that the review label (
|
@@ -194,6 +194,10 @@ fn run_doc_tests( | |||
CompileKind::Host => {} | |||
CompileKind::Target(target) => { | |||
if target.short_name() != compilation.host { | |||
|
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.
Thanks for the contribution.
We need a test for this warning to make sure it doesn't emit excessive warnings.
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.
currently it will show every time a doctest is passed over (i.e skipped)
else we are gonna need to use something like,
pub static ref WARNONCE: Mutex<bool> = Mutex::new(false);
(btw i really like lazy_static crate but i kinda admire low package count of a self hosted compiler)
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.
This part of cargo is single-threaded, so perhaps a simple variable here serves the purpose.
cargo/src/cargo/ops/cargo_test.rs
Line 181 in 94d274d
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, pushed it with without locally building.... man as someone working with very slow computer gotta say i just 💖 your CI/CD set up.
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, all tests have passed
I just want to mildly push back on this, since the original warning was hidden for a reason. It is difficult or impossible for the user to remove the warning. I suspect this will show up for everyone who runs |
•)it will only warn only once on the first doctest, not for each doctest, |
@epage any update ? |
as per issue/comment #12118 (comment) added warning about skipping doctest on xcompiling even when not under verbose flag
#this pr is an attempt at solving #12118. i tested them myself still might need a little work as concise waring shows every time we skip a test instead of once.