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 dist says it uses src/bootstrap/defaults/config.dist.toml, which does not exist #112846

Closed
pnkfelix opened this issue Jun 20, 2023 · 4 comments · Fixed by #112886
Closed
Labels
T-bootstrap Relevant to the bootstrap subteam: Rust's build system (x.py and src/bootstrap)

Comments

@pnkfelix
Copy link
Member

Just like the title says, I did x.py setup and selected "dist", which claims it inherits its settings from a file that does not actually exist.

@pnkfelix pnkfelix added the T-bootstrap Relevant to the bootstrap subteam: Rust's build system (x.py and src/bootstrap) label Jun 20, 2023
@pnkfelix
Copy link
Member Author

pnkfelix commented Jun 20, 2023

Oh and even better, when you then do x.py dist in the resulting directory that has that config.toml generated via x.py setup dist, you get this error:

% ../x.py  dist
Traceback (most recent call last):
  File "/media/pnkfelix/Rust/rust.git/objdir-beta/../x.py", line 50, in <module>
    bootstrap.main()
  File "/media/pnkfelix/Rust/rust.git/src/bootstrap/bootstrap.py", line 1094, in main
    bootstrap(args)
  File "/media/pnkfelix/Rust/rust.git/src/bootstrap/bootstrap.py", line 1030, in bootstrap
    with open(include_path) as included_toml:
FileNotFoundError: [Errno 2] No such file or directory: '/media/pnkfelix/Rust/rust.git/src/bootstrap/defaults/config.dist.toml'

and it seems like all subseqent calls to x.py, including one to x.py setup itself, will cause that same failure (which is not surprising).

@pnkfelix
Copy link
Member Author

(Should we have a check at the time when we generate the config.toml ensuring that the referenced settings file exists? And if it doesn't ... abort the attempt to generate config.toml in the first place? This seems like a somewhat unfortunate scneario to get into. The main other options I can imagine are 1. to issue an error when the file denoted by profile = "xxx" doesn't exist, at the time when we are invoking x.pywith an incoherentconfig.toml, or 2. to "just" issue a warning when the file denoted by profile = "xxx"doesn't exist, but otherwise continue with the givenconfig.toml` as it stands.)

@clubby789
Copy link
Contributor

Might be related to the issues raisesd in #112166 (comment)

@albertlarsan68
Copy link
Member

Yep, it is a direct consequence. I think we should revert this PR, it seems to be causing more harm than good.

GuillaumeGomez added a commit to GuillaumeGomez/rust that referenced this issue Jun 21, 2023
…rtlarsan68

Revert 'Rename profile=user to profile=dist'

This reverts commit a45fc94 (rust-lang#112166)
Reverted as it didn't meet the requirements (rust-lang#112166 (comment)) and is causing issues (closes rust-lang#112846)

cc `@AnakinSkywalkeer`
@bors bors closed this as completed in a687a96 Jun 21, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
T-bootstrap Relevant to the bootstrap subteam: Rust's build system (x.py and src/bootstrap)
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants