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

./x.py setup using option "d" (maintainer) is broken in 1.48.0 #79933

Closed
maruel opened this issue Dec 11, 2020 · 10 comments
Closed

./x.py setup using option "d" (maintainer) is broken in 1.48.0 #79933

maruel opened this issue Dec 11, 2020 · 10 comments
Labels
C-bug Category: This is a bug. T-bootstrap Relevant to the bootstrap subteam: Rust's build system (x.py and src/bootstrap) T-release Relevant to the release subteam, which will review and decide on the PR/issue.

Comments

@maruel
Copy link

maruel commented Dec 11, 2020

Code

Following https://rustc-dev-guide.rust-lang.org/getting-started.html

git clone --recurse -b 1.48.0 https://github.com/rust-lang/rust.git
cd rust
./x.py setup
# Choose "d) Install Rust from source"
./x.py check

I expected to see this happen: works

Instead, this happened:

$ cat config.toml
# Includes one of the default files in src/bootstrap/defaults
profile = "maintainer"

$ ./x.py check
Updating only changed submodules
Submodules updated in 0.06 seconds
    Finished dev [unoptimized + debuginfo] target(s) in 0.13s
thread 'main' panicked at 'fs::read_to_string(file) failed with No such file or directory (os error 2) ("`include` config not found")', src/bootstrap/config.rs:563:28
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace
failed to run: /usr/local/google/home/maruel/src-oth/rust/build/bootstrap/debug/bootstrap check
Build completed unsuccessfully in 0:00:00

$ ls src/bootstrap/defaults
config.toml.codegen  config.toml.compiler  config.toml.library  config.toml.user  README.md

It's because src/bootstrap/defaults/ doesn't contain config.toml.maintainer

Version it worked on

1.47.0 doesn't have x.py setup.

Version with regression

1.48.0

@maruel
Copy link
Author

maruel commented Dec 11, 2020

@jyn514 created the directory.

@maruel
Copy link
Author

maruel commented Dec 11, 2020

The fix seems to be

git move src/bootstrap/defaults/config.toml.user to src/bootstrap/defaults/config.toml.maintainer.

Workaround:

touch src/bootstrap/defaults/config.toml.maintainer

as in my case, I wanted to build from scratch, so config.toml.user were not defaults I wanted to use.

@jyn514
Copy link
Member

jyn514 commented Dec 11, 2020

@maruel your workaround is the same as not running x.py setup at all (which works fine, setup is just meant to be a convenience).

Can you explain why you didn't like the defaults in .user? They were meant for exactly that use case, building from source.

@jyn514 jyn514 added T-bootstrap Relevant to the bootstrap subteam: Rust's build system (x.py and src/bootstrap) C-bug Category: This is a bug. labels Dec 11, 2020
@jyn514
Copy link
Member

jyn514 commented Dec 11, 2020

This does work on master, I think it was fixed in #77400 but never backported.

@Mark-Simulacrum what's the policy for source-only backports? Backporting #77400 to 1.48 wouldn't need a point release, just a cherry-pick on the stable branch.

@Mark-Simulacrum
Copy link
Member

We do not usually land things onto the stable branch unless we are intending to do a point release (though there's no particular reason why, beyond the fact that the branch is not really meaningful since people should be using the tags for stable checkouts).

@jyn514 jyn514 added the T-release Relevant to the release subteam, which will review and decide on the PR/issue. label Dec 11, 2020
@maruel
Copy link
Author

maruel commented Dec 11, 2020

@jyn514 sorry I guess I shouldn't have put my workaround in my comment. I explicitly wanted to build from scratch, and config.toml.user doesn't do that. That's irrelevant to the issue here.

re point release: I'm fine with a WontFix here since it was fixed on tip of tree.

@jyn514
Copy link
Member

jyn514 commented Dec 11, 2020

@maruel config.toml.user does do that, I'm confused why you think it doesn't.

@jyn514
Copy link
Member

jyn514 commented Dec 11, 2020

I'm not trying to berate you, just see how I can improve the defaults in .user if they don't match your needs. I think you're the first person to try to use it.

@maruel
Copy link
Author

maruel commented Dec 11, 2020

@jyn514
Copy link
Member

jyn514 commented Jan 1, 2021

Since this is fixed in 1.49 and there's no plan to backport a fix to 1.48, I'm going to close this. Feel free to give feedback about the 'maintainer' defaults, but I think belongs in a separate issue.

@jyn514 jyn514 closed this as completed Jan 1, 2021
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. T-bootstrap Relevant to the bootstrap subteam: Rust's build system (x.py and src/bootstrap) T-release Relevant to the release subteam, which will review and decide on the PR/issue.
Projects
None yet
Development

No branches or pull requests

3 participants