-
Notifications
You must be signed in to change notification settings - Fork 13k
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
improve bootstrap change-tracking system #117815
improve bootstrap change-tracking system #117815
Conversation
(rustbot has picked a reviewer for you, use r? to override) |
I have a few questions:
|
I think a problem with this system is that there are several audiences. First, there are rust-lang/rust developers. Then there are distros packaging Rust. These two audiences have very different needs. I would think that distros want to know about the all the breakage, while rust-lang/rust devs don't really care. |
// PR ID(to provide PR link for more input), log prefix, change summary
pub const CONFIG_CHANGE_HISTORY: &[(usize, &str, &str)] = &[
(115898, "NOTE", "Implementation of this change-tracking system. Ignore this."),
(116998, "INFO", "Removed android-ndk r15 support in favor of android-ndk r25b."),
(117435, "INFO", "New option `rust.parallel-compiler` added to config.toml."),
(116881, "WARNING", "Default value of `download-ci-llvm` was changed for `codegen` profile.")
]; Any thoughts on this(ignore the ugliness of the code)? This approach can automatically force PR authors to add change summaries. @RalfJung in your use case, you will be able find what you are looking for directly on your terminal without needing to explore PR changes/descriptions. And if you need more input, you will be able to visit PR links still. |
Would be good if the severity was an Enum, so that different actions could be taken based on if it should be fatal or not (really breaking or just an information, show just once (at the end of the build preferably), or always) |
I would expect distros to check the changelog. So the changelog should have a section on
Yeah, that seems nice! |
6684b44
to
1903c98
Compare
msg.push_str(&format!(" [{}] {}\n", change.severity.to_string(), change.summary)); | ||
msg.push_str(&format!( | ||
" - PR Link https://github.com/rust-lang/rust/pull/{}\n", | ||
change.change_id | ||
)); |
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 change results this format:
Building bootstrap
Compiling bootstrap v0.0.0 (/home/nimda/devspace/onur-ozkan/rust/src/bootstrap)
Finished dev [unoptimized] target(s) in 4.85s
There have been changes to x.py since you last updated:
[INFO] New option `rust.parallel-compiler` added to config.toml.
- PR Link https://github.com/rust-lang/rust/pull/117435
[INFO] Default value of `download-ci-llvm` was changed for `codegen` profile.
- PR Link https://github.com/rust-lang/rust/pull/116881
note: to silence this warning, update `config.toml` to use `change-id = 116881` instead
Building stage0 tool tidy (x86_64-unknown-linux-gnu)
f479034
to
de2bc42
Compare
Signed-off-by: onur-ozkan <work@onurozkan.dev>
a4f05c6
to
426a2f8
Compare
This comment has been minimized.
This comment has been minimized.
Yes it does clear the file.
We print these logs twice (2nd print is at the end of bootstrap) to ensure devs will see them.
As this option doesn't exists in bootstrap for old branches, builds will fail on recent-to-old checkouts. Printing these logs once for per initialization (after |
Signed-off-by: onur-ozkan <work@onurozkan.dev>
Signed-off-by: onur-ozkan <work@onurozkan.dev>
89829bb
to
009e165
Compare
Signed-off-by: onur-ozkan <work@onurozkan.dev>
As the .last-warned-change-id is only used for change tracking, we don't need to generate/write it outside of the tty. Otherwise, rust-analyzer could create this file, and developers wouldn't be able to see the bootstrap change alerts, assuming that they have already seen them. Signed-off-by: onur-ozkan <work@onurozkan.dev>
009e165
to
9a6afd0
Compare
-kindly reminder ping- @albertlarsan68 |
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.
LGTM, sorry for the delay
Thanks for the PR! |
☀️ Test successful - checks-actions |
Finished benchmarking commit (91f7f26): comparison URL. Overall result: no relevant changes - no action needed@rustbot label: -perf-regression Instruction countThis benchmark run did not return any relevant results for this metric. Max RSS (memory usage)ResultsThis 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.
CyclesThis benchmark run did not return any relevant results for this metric. Binary sizeThis benchmark run did not return any relevant results for this metric. Bootstrap: 676.441s -> 677.025s (0.09%) |
…mulacrum Fix build on Solaris after rust-lang#117815.
…ertlarsan68 improve bootstrap change-tracking system This PR aims to improve how change-tracking system works for bootstrap changes by doing the followings: - Enforce embedding directive informations about the changes on `bootstrap/src/lib.rs`. - Give more informative change inputs on the terminal (rust-lang/rust#117815 (comment)). - Avoid spamming the change informations(by reading and creating `.last-warned-change-id` under build output dir). see the zulip conversation for more details: https://rust-lang.zulipchat.com/#narrow/stream/326414-t-infra.2Fbootstrap/topic/config.2Etoml.20change.20tracking cc `@RalfJung`
…ertlarsan68 improve bootstrap change-tracking system This PR aims to improve how change-tracking system works for bootstrap changes by doing the followings: - Enforce embedding directive informations about the changes on `bootstrap/src/lib.rs`. - Give more informative change inputs on the terminal (rust-lang/rust#117815 (comment)). - Avoid spamming the change informations(by reading and creating `.last-warned-change-id` under build output dir). see the zulip conversation for more details: https://rust-lang.zulipchat.com/#narrow/stream/326414-t-infra.2Fbootstrap/topic/config.2Etoml.20change.20tracking cc `@RalfJung`
…ertlarsan68 improve bootstrap change-tracking system This PR aims to improve how change-tracking system works for bootstrap changes by doing the followings: - Enforce embedding directive informations about the changes on `bootstrap/src/lib.rs`. - Give more informative change inputs on the terminal (rust-lang/rust#117815 (comment)). - Avoid spamming the change informations(by reading and creating `.last-warned-change-id` under build output dir). see the zulip conversation for more details: https://rust-lang.zulipchat.com/#narrow/stream/326414-t-infra.2Fbootstrap/topic/config.2Etoml.20change.20tracking cc `@RalfJung`
This PR aims to improve how change-tracking system works for bootstrap changes by doing the followings:
bootstrap/src/lib.rs
..last-warned-change-id
under build output dir).see the zulip conversation for more details: https://rust-lang.zulipchat.com/#narrow/stream/326414-t-infra.2Fbootstrap/topic/config.2Etoml.20change.20tracking
cc @RalfJung