Skip to content

Do not warn about missing change ID in tarball builds #145780

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

Closed
wants to merge 1 commit into from

Conversation

Kobzol
Copy link
Member

@Kobzol Kobzol commented Aug 23, 2025

Fixes: #145778

r? @jieyouxu

@rustbot
Copy link
Collaborator

rustbot commented Aug 23, 2025

jieyouxu is currently at their maximum review capacity.
They may take a while to respond.

@rustbot rustbot added S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. T-bootstrap Relevant to the bootstrap subteam: Rust's build system (x.py and src/bootstrap) labels Aug 23, 2025
Copy link
Member

@lqd lqd left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Let's put the check as a guard like the other guard above, + some comment.

r=me with that

View changes since this review

@Kobzol
Copy link
Member Author

Kobzol commented Aug 23, 2025

👍

@bors r=lqd rollup

@bors
Copy link
Collaborator

bors commented Aug 23, 2025

📌 Commit ea07201 has been approved by lqd

It is now in the queue for this repository.

@bors bors added S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. and removed S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. labels Aug 23, 2025
samueltardieu added a commit to samueltardieu/rust that referenced this pull request Aug 23, 2025
Do not warn about missing change ID in tarball builds

Fixes: rust-lang#145778

r? `@jieyouxu`
bors added a commit that referenced this pull request Aug 23, 2025
Rollup of 7 pull requests

Successful merges:

 - #144452 (std/sys/fd: Relax `READ_LIMIT` on Darwin)
 - #145307 (Fix `LazyLock` poison panic message)
 - #145515 (Optimize `char::encode_utf8`)
 - #145540 (interpret/allocation: get_range on ProvenanceMap)
 - #145774 (Remove default opts from config)
 - #145780 (Do not warn about missing change ID in tarball builds)
 - #145781 (Remove profile section from Clippy)

r? `@ghost`
`@rustbot` modify labels: rollup
@@ -198,14 +198,16 @@ fn check_version(config: &Config) -> Option<String> {
Some(ChangeId::Id(id)) if id == latest_change_id => return None,
Some(ChangeId::Ignore) => return None,
Some(ChangeId::Id(id)) => id,
None => {
// The warning is only useful for development, not release tarballs
Copy link
Member

@Urgau Urgau Aug 23, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

That's a pretty strong assertion, which I'm not sure distros agree with, at least Archlinux uses the change-id in their build, and they do update it for every new version.

Same for debian, config.toml.in.

Furthermore users can just put ignore if they don't want it.

@jieyouxu
Copy link
Member

Hm, I think I agree with Urgau's assessment re. this is used by distros.

Maybe we should just print a warning or document this somewhere if someone wants to disable change-id for dist?

@bors r- (unsettled design question)

@bors bors added S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author. and removed S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. labels Aug 23, 2025
@Kobzol
Copy link
Member Author

Kobzol commented Aug 23, 2025

As I wrote here, I also think that distros do this, but I don't think it's common enough that we have to warn them if it's unset. So I would keep the implementation, and just update the source code comment. WDYT?

@jieyouxu
Copy link
Member

I don't feel too strongly about this, but I have a weak preference towards being more "upfront". I.e. for users trying to produce distributions, seeing the warning is arguably a good thing -- I think that if they don't want to care about change-id, they should indeed specify change-id = "ignore" in bootstrap.toml.

@jieyouxu
Copy link
Member

jieyouxu commented Aug 23, 2025

As in, my first reaction seeing the report in #145778 is apart from the fatal not a git repo error, seeing the change-id warning looks like a feature, not a bug.

@Kobzol
Copy link
Member Author

Kobzol commented Aug 23, 2025

I think that a "clean build" from sources should ideally produce as few warnings as possible. That being said, I also see your point.

I'll leave it up to you. If you don't find this worthy, then let's close both this PR and the original issue.

@jieyouxu
Copy link
Member

I have a weak preference towards "not-a-bug", though we can probably improve the docs around it.

@jieyouxu
Copy link
Member

I think that a "clean build" from sources should ideally produce as few warnings as possible.

I agree in the general sense, but change-id feels intentional.

@Kobzol
Copy link
Member Author

Kobzol commented Aug 23, 2025

Ok, fair enough!

@Kobzol Kobzol closed this Aug 23, 2025
@rustbot rustbot removed the S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author. label Aug 23, 2025
@Kobzol Kobzol deleted the change-id-warn branch August 23, 2025 12:42
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
T-bootstrap Relevant to the bootstrap subteam: Rust's build system (x.py and src/bootstrap)
Projects
None yet
Development

Successfully merging this pull request may close these issues.

When building from a released tarball, the build process should not complain about missing change-id= in bootstrap.toml
6 participants