Skip to content

Read beta version from the version file if building from a source tarball #111770

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

Merged
merged 2 commits into from
May 21, 2023

Conversation

liushuyu
Copy link
Contributor

This pull request changes the bootstrap behaviour so that when building rustc from a source tarball, the beta revision number is correctly read from the version file instead of erroring out by invoking git.

The version file is observed to only exist in the official source tarball and has the following format:

1.70.0-beta.4 (2013813b6 2023-05-07)

@rustbot
Copy link
Collaborator

rustbot commented May 19, 2023

r? @ozkanonur

(rustbot has picked a reviewer for you, use r? to override)

@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 May 19, 2023
Copy link
Member

@jyn514 jyn514 left a comment

Choose a reason for hiding this comment

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

Could you also please make the change I suggested on Zulip, to change Build::release to call beta_prerelease_version even when building from a source tarball?

@liushuyu liushuyu force-pushed the ubuntu/beta-rev-no-git branch 2 times, most recently from 86a80e3 to 5069d40 Compare May 20, 2023 03:15
@liushuyu
Copy link
Contributor Author

Could you also please make the change I suggested on Zulip, to change Build::release to call beta_prerelease_version even when building from a source tarball?

Done. Changed the condition to use beta_prerelease_version.

@liushuyu liushuyu requested a review from jyn514 May 20, 2023 03:16
@rust-log-analyzer

This comment has been minimized.

@liushuyu liushuyu force-pushed the ubuntu/beta-rev-no-git branch from 5069d40 to 2f042ca Compare May 20, 2023 03:35
@liushuyu liushuyu force-pushed the ubuntu/beta-rev-no-git branch from 2f042ca to 2bd3515 Compare May 20, 2023 23:25
@rust-log-analyzer

This comment has been minimized.

... if building from a source tarball
@liushuyu liushuyu force-pushed the ubuntu/beta-rev-no-git branch from 2bd3515 to 6013d92 Compare May 20, 2023 23:43
@onur-ozkan
Copy link
Member

This LGTM.

Could you also please make the change I suggested on Zulip

r=me once this is resolved by @jyn514

@rust-log-analyzer

This comment has been minimized.

@liushuyu liushuyu force-pushed the ubuntu/beta-rev-no-git branch from 6013d92 to 343a0bf Compare May 21, 2023 00:33
@jyn514
Copy link
Member

jyn514 commented May 21, 2023

This looks great, thanks!

@bors r=ozkanonur rollup

@bors
Copy link
Collaborator

bors commented May 21, 2023

📌 Commit 343a0bf has been approved by ozkanonur

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 May 21, 2023
matthiaskrgr added a commit to matthiaskrgr/rust that referenced this pull request May 21, 2023
…=ozkanonur

Read beta version from the version file if building from a source tarball

This pull request changes the `bootstrap` behaviour so that when building `rustc` from a source tarball, the beta revision number is correctly read from the `version` file instead of erroring out by invoking `git`.

The `version` file is observed to only exist in the official source tarball and has the following format:

```
1.70.0-beta.4 (2013813 2023-05-07)
```
bors added a commit to rust-lang-ci/rust that referenced this pull request May 21, 2023
…iaskrgr

Rollup of 5 pull requests

Successful merges:

 - rust-lang#111745 (Fix overflow in error emitter)
 - rust-lang#111770 (Read beta version from the version file if building from a source tarball)
 - rust-lang#111797 (Migrate GUI colors test to original CSS color format)
 - rust-lang#111809 (Unset MIRI_BLESS for mir-opt-level 4 miri tests)
 - rust-lang#111817 (Migrate GUI colors test to original CSS color format)

r? `@ghost`
`@rustbot` modify labels: rollup
@bors bors merged commit 6ccc3de into rust-lang:master May 21, 2023
@rustbot rustbot added this to the 1.71.0 milestone May 21, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. 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.

6 participants