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

Fix x not to quit after x prints settings.json #118606

Conversation

long-long-float
Copy link
Contributor

I fixed the x not to quit after the x prints .vscode/settings.json.

The command x setup ask as following:

x.py can automatically install the recommended `.vscode/settings.json` file for rustc development
Would you like to create/update `settings.json`, or only print suggested settings?: [y/p/N]

When user types p, the x prints the contents and quit the program.
It is a hassle to start the command again, so I fixed the x to ask what to do again.

@rustbot
Copy link
Collaborator

rustbot commented Dec 4, 2023

Thanks for the pull request, and welcome! The Rust team is excited to review your changes, and you should hear from @onur-ozkan (or someone else) soon.

Please see the contribution instructions for more information. Namely, in order to ensure the minimum review times lag, PR authors and assigned reviewers should ensure that the review label (S-waiting-on-review and S-waiting-on-author) stays updated, invoking these commands when appropriate:

  • @rustbot author: the review is finished, PR author should check the comments and take action accordingly
  • @rustbot review: the author is ready for a review, this PR will be queued again in the reviewer's queue

@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 Dec 4, 2023
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.

"Would you like to create/update `settings.json`, or only print suggested settings?: [y/p/N]",

This message needs to be updated too

src/bootstrap/src/core/build_steps/setup.rs Outdated Show resolved Hide resolved
@onur-ozkan
Copy link
Member

This message needs to be updated too

Something like "Would you like to create/update settings.json? (Press 'p' to preview values): [y/N]" would be enough.

@onur-ozkan onur-ozkan added S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author. and removed S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. labels Dec 4, 2023
@long-long-float
Copy link
Contributor Author

@onur-ozkan Thank you for your review. I applied your suggestions.

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.

LGTM.

Could you please squash commits into single one?

Use `while` instead of `loop`

Co-authored-by: Onur Özkan <onurozkan.dev@outlook.com>

Update prompt message
@long-long-float long-long-float force-pushed the x-do-not-quit-when-x-prints-settings-json branch from 162be7c to 15a8e9d Compare December 5, 2023 10:40
@long-long-float
Copy link
Contributor Author

@onur-ozkan I did it.

@onur-ozkan
Copy link
Member

@bors r+ rollup

@bors
Copy link
Contributor

bors commented Dec 5, 2023

📌 Commit 15a8e9d has been approved by onur-ozkan

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-author Status: This is awaiting some action (such as code changes or more information) from the author. labels Dec 5, 2023
bors added a commit to rust-lang-ci/rust that referenced this pull request Dec 5, 2023
…iaskrgr

Rollup of 8 pull requests

Successful merges:

 - rust-lang#117922 (Tweak unclosed generics errors)
 - rust-lang#118471 (Fix typos in README.md)
 - rust-lang#118594 (Remove mention of rust to make the error message generic.)
 - rust-lang#118598 (Remove the `precise_pointer_size_matching` feature gate)
 - rust-lang#118606 (Fix `x` not to quit after `x` prints `settings.json`)
 - rust-lang#118608 (Use default params until effects in desugaring)
 - rust-lang#118614 (Update books)
 - rust-lang#118637 (rustc_symbol_mangling,rustc_interface,rustc_driver_impl: Enforce `rustc::potential_query_instability` lint)

r? `@ghost`
`@rustbot` modify labels: rollup
@bors bors merged commit a260acc into rust-lang:master Dec 5, 2023
11 checks passed
@rustbot rustbot added this to the 1.76.0 milestone Dec 5, 2023
rust-timer added a commit to rust-lang-ci/rust that referenced this pull request Dec 5, 2023
Rollup merge of rust-lang#118606 - long-long-float:x-do-not-quit-when-x-prints-settings-json, r=onur-ozkan

Fix `x` not to quit after `x` prints `settings.json`

I fixed the `x` not to quit after the `x` prints `.vscode/settings.json`.

The command `x setup` ask as following:

```
x.py can automatically install the recommended `.vscode/settings.json` file for rustc development
Would you like to create/update `settings.json`, or only print suggested settings?: [y/p/N]
```

When user types `p`, the `x` prints the contents and quit the program.
It is a hassle to start the command again, so I fixed the `x` to ask what to do again.
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.

4 participants