Skip to content

Channel should not default to dev when built from a tarball #36690

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

Open
brson opened this issue Sep 24, 2016 · 2 comments
Open

Channel should not default to dev when built from a tarball #36690

brson opened this issue Sep 24, 2016 · 2 comments
Labels
C-bug Category: This is a bug. E-needs-design This issue needs exploration and design to see how and if we can fix/implement it P-medium Medium priority T-bootstrap Relevant to the bootstrap subteam: Rust's build system (x.py and src/bootstrap) T-dev-tools Relevant to the dev-tools subteam, which will review and decide on the PR/issue.

Comments

@brson
Copy link
Contributor

brson commented Sep 24, 2016

Today whenever Rust is built without a .git directory (approximately meaning "when it's built from a tarball") the configure script overrides the release channel to "stable", per this PR and this issue. Unfortunately, as I realized after a recent bug in which nightly distcheck thought it was a stable compiler this is not correct. Today, if somebody downloads a nightly tarball and builds it, they will receive a compiler that claims to be a stable release. This is just not true.

I'm not sure how best to fix this. The configure script is the source of truth for the release channel, and the configure script is not telling the truth.

Here's one thing we could do: the build process that produces the tarball also dumps a version file into the source tree, and the release channel can be derived from that file. So when the configure script sees that it is not in a git repo it opens that file and looks for "-nightly", "-beta", or "-dev" and sets the release channel as appropriate. If it sees none of those it sets the channel to "stable". If the version file does not exist it sets the channel to "dev".

cc @alexcrichton

@alexcrichton
Copy link
Member

Agreed that a nightly tarball should produce a nightly compiler (as should a beta tarball produce a beta compiler).

Also agree that we're gonna have to dump a version file in the source tree, and absence means "dev". I think we can emit it during the packaging steps, so shouldn't be too hard? Basically whenever we copy the license we can also copy a version file.

@Mark-Simulacrum Mark-Simulacrum added T-dev-tools Relevant to the dev-tools subteam, which will review and decide on the PR/issue. and removed T-tools labels May 24, 2017
@Mark-Simulacrum Mark-Simulacrum added C-bug Category: This is a bug. and removed I-wrong labels Jul 26, 2017
@jonas-schievink jonas-schievink added T-bootstrap Relevant to the bootstrap subteam: Rust's build system (x.py and src/bootstrap) and removed T-bootstrap Relevant to the bootstrap subteam: Rust's build system (x.py and src/bootstrap) A-build labels Apr 21, 2019
@jyn514
Copy link
Member

jyn514 commented Feb 3, 2023

That file exists today as src/ci/version. ./configure is no longer hard-coding stable; instead it doesn't configure the channel, so bootstrap uses the default of dev. Unfortunately that channel file also exists in the normal source tree, so using it unconditionally in bootstrap doesn't seem right. Maybe we can use it only for ./configure, though?

@jyn514 jyn514 changed the title Build should not always set --release-channel=stable when built from a tarball Channel should not default to dev when built from a tarball Feb 3, 2023
@jieyouxu jieyouxu added the E-needs-design This issue needs exploration and design to see how and if we can fix/implement it label Oct 13, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
C-bug Category: This is a bug. E-needs-design This issue needs exploration and design to see how and if we can fix/implement it P-medium Medium priority T-bootstrap Relevant to the bootstrap subteam: Rust's build system (x.py and src/bootstrap) T-dev-tools Relevant to the dev-tools subteam, which will review and decide on the PR/issue.
Projects
None yet
Development

No branches or pull requests

7 participants