Skip to content
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

Set channel = nightly in dist profile #113185

Merged
merged 1 commit into from
Jul 1, 2023
Merged

Conversation

jyn514
Copy link
Member

@jyn514 jyn514 commented Jun 30, 2023

This avoids some channel-specific defaults leaking into local installs. It also makes it easier to set options for compiler/library/codegen profiles in the future, since they can be gated off channel instead of being duplicated between all three files.

Here are the exact things channel controls today:

rust/src/bootstrap/llvm.rs

Lines 466 to 470 in 68d458b

} else if builder.config.channel == "dev" {
// Changes to a version suffix require a complete rebuild of the LLVM.
// To avoid rebuilds during a time of version bump, don't include rustc
// release number on the dev channel.
Some("-rust-dev".to_string())

rust/src/bootstrap/config.rs

Lines 1374 to 1375 in 85c4ea0

let default = config.channel == "dev";
config.omit_git_hash = omit_git_hash.unwrap_or(default);

rust/src/bootstrap/config.rs

Lines 1464 to 1465 in 85c4ea0

config.llvm_from_ci =
config.channel == "dev" && crate::llvm::is_ci_llvm_available(&config, false);

@cuviper i expect you don't want any of those to be set in distro builds, right?

@rustbot
Copy link
Collaborator

rustbot commented Jun 30, 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 Jun 30, 2023
@cuviper
Copy link
Member

cuviper commented Jun 30, 2023

@cuviper i expect you don't want any of those to be set in distro builds, right?

I set channel = stable for my distro builds, because they're always stable releases. :)

Up to this point, I don't think the profiles have affected me at all, because I use ./configure with all the options I care about. But now I see that #110541 is coming and that does force a profile instead of leaving it "none". I'm not sure about that, honestly, because there aren't going to be one-size-fits-all settings here.

That said, I think you're right that I don't want those 3 dev-enabled settings.

@jyn514
Copy link
Member Author

jyn514 commented Jun 30, 2023

Up to this point, I don't think the profiles have affected me at all, because I use ./configure with all the options I care about. But now I see that #110541 is coming and that does force a profile instead of leaving it "none". I'm not sure about that, honestly, because there aren't going to be one-size-fits-all settings here.

I agree - not having one-size-fits-all settings is exactly the problem that profiles try to solve :) the idea is that if the global defaults change in the future, the dist profile will set them back to the default you actually want. You can always override them with configure if they aren't a good fit. Here's all the existing dist defaults for reference:

# These defaults are meant for users and distro maintainers building from source, without intending to make multiple changes.
[build]
# When compiling from source, you almost always want a full stage 2 build,
# which has all the latest optimizations from nightly.
build-stage = 2
test-stage = 2
doc-stage = 2
# When compiling from source, you usually want all tools.
extended = true
# Most users installing from source want to build all parts of the project from source.
[llvm]
download-ci-llvm = false
[rust]
download-rustc = false
[dist]
# Use better compression when preparing tarballs.
compression-profile = "balanced"

Copy link
Member

@onur-ozkan onur-ozkan left a comment

Choose a reason for hiding this comment

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

This avoids some channel-specific defaults leaking into local installs. It also makes it easier to set options for compiler/library/codegen profiles in the future, since they can be gated off channel instead of being duplicated between all three files.

Sounds and looks good to me. If you want another opinion/review on this, feel free to re-assign. r=me otherwise.

@jyn514
Copy link
Member Author

jyn514 commented Jun 30, 2023

That said, I think you're right that I don't want those 3 dev-enabled settings.

👍

@bors r=ozkanonur rollup

@bors
Copy link
Contributor

bors commented Jun 30, 2023

📌 Commit 368f517 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 Jun 30, 2023
Dylan-DPC added a commit to Dylan-DPC/rust that referenced this pull request Jun 30, 2023
Set `channel = nightly` in dist profile

This avoids some channel-specific defaults leaking into local installs. It also makes it easier to set options for compiler/library/codegen profiles in the future, since they can be gated off `channel` instead of being duplicated between all three files.

Here are the exact things `channel` controls today:
https://github.com/rust-lang/rust/blob/68d458bb402b873b9ae80423710c2672967479df/src/bootstrap/llvm.rs#L466-L470
https://github.com/rust-lang/rust/blob/85c4ea0138fcca2e8cf4515a063cd3b762d64aec/src/bootstrap/config.rs#L1374-L1375
https://github.com/rust-lang/rust/blob/85c4ea0138fcca2e8cf4515a063cd3b762d64aec/src/bootstrap/config.rs#L1464-L1465
`@cuviper` i expect you don't want any of those to be set in distro builds, right?
bors added a commit to rust-lang-ci/rust that referenced this pull request Jun 30, 2023
…iaskrgr

Rollup of 8 pull requests

Successful merges:

 - rust-lang#113072 (str docs: remove "Basic usage" text where not useful)
 - rust-lang#113153 (make HashMap::or_insert_with example more simple)
 - rust-lang#113185 (Set `channel = nightly` in dist profile)
 - rust-lang#113186 (document that the panic in collect_intra_doc_links is load-bearing)
 - rust-lang#113187 (No need to distinguish `LocalTy` from `Ty`)
 - rust-lang#113189 (compiletest: Only trim the end of process output)
 - rust-lang#113191 (Update browser-ui-test version and improve GUI test)
 - rust-lang#113206 (User may want to skip tidy check sometimes)

r? `@ghost`
`@rustbot` modify labels: rollup
@bors bors merged commit a2c1861 into rust-lang:master Jul 1, 2023
@rustbot rustbot added this to the 1.72.0 milestone Jul 1, 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.

5 participants