Skip to content

fix: Fix release channel detection #14598

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 1 commit into from
Apr 17, 2023

Conversation

lowr
Copy link
Contributor

@lowr lowr commented Apr 17, 2023

We detect toolchain's release channel by looking at pre-release identifier of cargo/rustc's version string. It's empty for stable, "beta" or "beta.x" for beta, and "nightly" for nightly.

See rust-lang/rust's bootstrap code for how the version string is determined.

@rustbot rustbot added the S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. label Apr 17, 2023
@lowr
Copy link
Contributor Author

lowr commented Apr 17, 2023

It'd be great if someone can test whether #14549 works as intended with this patch.

@@ -779,7 +779,7 @@ fn project_json_to_crate_graph(
CrateOrigin::Local { repo: None, name: None }
},
target_layout.clone(),
None,
channel,
);
Copy link
Contributor Author

Choose a reason for hiding this comment

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

I assumed not passing channel here is an oversight, or is it intentional?

Copy link
Member

Choose a reason for hiding this comment

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

looks like an oversight to me

@lnicola
Copy link
Member

lnicola commented Apr 17, 2023

Looks fine on stable:

image

@lowr lowr force-pushed the fix/release-channel-from-str branch from 2b5b0a4 to eb5fea0 Compare April 17, 2023 17:07
@lowr lowr force-pushed the fix/release-channel-from-str branch from eb5fea0 to 4db87f9 Compare April 17, 2023 17:12
@Veykril
Copy link
Member

Veykril commented Apr 17, 2023

@bors r=lnicola

@bors
Copy link
Contributor

bors commented Apr 17, 2023

📌 Commit 4db87f9 has been approved by lnicola

It is now in the queue for this repository.

@bors
Copy link
Contributor

bors commented Apr 17, 2023

⌛ Testing commit 4db87f9 with merge b92b7c0...

@bors
Copy link
Contributor

bors commented Apr 17, 2023

☀️ Test successful - checks-actions
Approved by: lnicola
Pushing b92b7c0 to master...

@bors bors merged commit b92b7c0 into rust-lang:master Apr 17, 2023
@lnicola lnicola changed the title Fix release channel detection fix: Fix release channel detection Apr 24, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
S-waiting-on-review Status: Awaiting review from the assignee but also interested parties.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants