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

make suggest_setup help messages better #82211

Merged
merged 1 commit into from
Feb 18, 2021

Conversation

henryboisdequin
Copy link
Contributor

When I first built the compiler and didn't create a config.toml.example, the following was emitted:

help: consider running `x.py setup` or copying `config.toml.example`

I ran x.py setup but got an error so in this PR I made the help messages a little clearer.

@rust-highfive
Copy link
Collaborator

r? @Mark-Simulacrum

(rust-highfive has picked a reviewer for you, use r? to override)

@rust-highfive rust-highfive added the S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. label Feb 17, 2021
@henryboisdequin henryboisdequin changed the title make suggest_setup help messages better make suggest_setup help messages better Feb 17, 2021
@jyn514
Copy link
Member

jyn514 commented Feb 18, 2021

Hmm, I intentionally left out ./ originally because I think it breaks on Windows. I guess windows users are used to seeing that and ignoring it though? We do use it in a bunch of the other documentation. @rylev @scottmcm you use windows, right, what do you think?

@jyn514 jyn514 added A-contributor-roadblock Area: Makes things more difficult for new contributors to rust itself T-bootstrap Relevant to the bootstrap subteam: Rust's build system (x.py and src/bootstrap) labels Feb 18, 2021
@scottmcm
Copy link
Member

I used to have an x.bat that ran things low-priority, but now that the toml for that works, I haven't bothered, and just do

C:\src\rust>python x.py test --stage 1 --keep-stage 0 library\core --test-args sum
Updating only changed submodules
Submodules updated in 0.15 seconds
...

Because neither just x.py nor .\x.py work. python ./x.py test does work, though, so I don't think having the ./ in the docs is a problem.

@jyn514
Copy link
Member

jyn514 commented Feb 18, 2021

Thanks, sounds like we could improve the Windows experience but this change won't hurt anything.

@bors r+ rollup

@bors
Copy link
Contributor

bors commented Feb 18, 2021

📌 Commit e13f25c has been approved by jyn514

@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 Feb 18, 2021
@henryboisdequin
Copy link
Contributor Author

@jyn514 just an idea: couldn't we detect which OS the user was on and give a message based on that (that's for another PR though)

@jyn514
Copy link
Member

jyn514 commented Feb 18, 2021

@jyn514 just an idea: couldn't we detect which OS the user was on and give a message based on that (that's for another PR though)

For something this small I don't think it's worth it. I would rather try to get x.py build (without python first) working on Windows.

bors added a commit to rust-lang-ci/rust that referenced this pull request Feb 18, 2021
Rollup of 8 pull requests

Successful merges:

 - rust-lang#82055 (Add diagnostics for specific cases for const/type mismatch err)
 - rust-lang#82155 (Use !Sync std::lazy::OnceCell in usefulness checking)
 - rust-lang#82202 (add specs for riscv32/riscv64 musl targets)
 - rust-lang#82203 (Move some tests to more reasonable directories - 4)
 - rust-lang#82211 (make `suggest_setup` help messages better)
 - rust-lang#82212 (Remove redundant rustc_data_structures path component)
 - rust-lang#82240 (remove useless ?s (clippy::needless_question_marks))
 - rust-lang#82243 (Add more intra-doc links to std::io)

Failed merges:

r? `@ghost`
`@rustbot` modify labels: rollup
@bors bors merged commit 9e60e7e into rust-lang:master Feb 18, 2021
@rustbot rustbot added this to the 1.52.0 milestone Feb 18, 2021
@henryboisdequin henryboisdequin deleted the make-setup-msgs-better branch February 18, 2021 10:18
@rylev
Copy link
Member

rylev commented Feb 18, 2021

@scottmcm @jyn514 I'm not sure why, but x.py works for me in cmd.exe. In PowerShell (which I normally use) I get an error, but PowerShell 7 helpfully recognizes that there is a command called x.py in my current directory and prompts me to try .\x.py which does work. I'm not sure if I have a different python setup than @scottmcm that makes this work.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-contributor-roadblock Area: Makes things more difficult for new contributors to rust itself 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.

8 participants