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

Provide better documentation and help messages for x.py setup #77879

Merged
merged 5 commits into from
Oct 15, 2020

Conversation

ijackson
Copy link
Contributor

Closes: #77861

I have split this up into tiny comments because I find it clearer this way. Feel free to squash it.

@rust-highfive
Copy link
Collaborator

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

If any changes to this PR are deemed necessary, please add them as extra commits. This ensures that the reviewer can see what has changed since they last reviewed the code. Due to the way GitHub handles out-of-date commits, this should also make it reasonably obvious what issues have or haven't been addressed. Large or tricky changes may require several passes of review and changes.

Please see the contribution instructions for more information.

@rust-highfive rust-highfive added the S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. label Oct 12, 2020
@Mark-Simulacrum
Copy link
Member

r? @jyn514

@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 Oct 13, 2020
Copy link
Member

@jyn514 jyn514 left a comment

Choose a reason for hiding this comment

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

Thanks for working on this! Lots of little nits, but the approach looks good.

src/bootstrap/flags.rs Outdated Show resolved Hide resolved
src/bootstrap/flags.rs Outdated Show resolved Hide resolved
src/bootstrap/flags.rs Outdated Show resolved Hide resolved
src/bootstrap/flags.rs Outdated Show resolved Hide resolved
src/bootstrap/setup.rs Outdated Show resolved Hide resolved
src/bootstrap/setup.rs Show resolved Hide resolved
@jyn514 jyn514 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 Oct 13, 2020
@ijackson
Copy link
Contributor Author

Thanks for the review. I think I've addressed everything. I have only marked as "resolved" those comments where I did precisely what you suggested, so for the others you can decide for yourself if you agree with me.

Copy link
Member

@jyn514 jyn514 left a comment

Choose a reason for hiding this comment

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

Two other small nits, I agreed with the rest of your changes :)

src/bootstrap/flags.rs Outdated Show resolved Hide resolved
src/bootstrap/setup.rs Outdated Show resolved Hide resolved
@jyn514
Copy link
Member

jyn514 commented Oct 13, 2020

Can you squash the commits a little? r=me after that.

@jyn514
Copy link
Member

jyn514 commented Oct 13, 2020

Thanks for working on this!

@ijackson
Copy link
Contributor Author

I found another preexisting bug which I also fixed - see the final commit in the squashed series.

src/bootstrap/setup.rs Outdated Show resolved Hide resolved
@jyn514
Copy link
Member

jyn514 commented Oct 13, 2020

@bors r+

@bors
Copy link
Contributor

bors commented Oct 13, 2020

📌 Commit 9dd00168a593bbb8c55e621a937552fd51eb5824 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-author Status: This is awaiting some action (such as code changes or more information) from the author. labels Oct 13, 2020
@bors
Copy link
Contributor

bors commented Oct 14, 2020

☔ The latest upstream changes (presumably #77917) made this pull request unmergeable. Please resolve the merge conflicts.

Note that reviewers usually do not review pull requests until merge conflicts are resolved! Once you resolve the conflicts, you should change the labels applied by bors to indicate that your PR is ready for review. Post this as a comment to change the labels:

@rustbot modify labels: +S-waiting-on-review -S-waiting-on-author

@bors bors 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-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. labels Oct 14, 2020
bors added a commit to rust-lang-ci/rust that referenced this pull request Oct 14, 2020
Rollup of 8 pull requests

Successful merges:

 - rust-lang#77765 (Add LLVM flags to limit DWARF version to 2 on BSD)
 - rust-lang#77788 (BTreeMap: fix gdb provider on BTreeMap with ZST keys or values)
 - rust-lang#77795 (Codegen backend interface refactor)
 - rust-lang#77808 (Moved the main `impl` for FnCtxt to its own file.)
 - rust-lang#77817 (Switch rustdoc from `clean::Stability` to `rustc_attr::Stability`)
 - rust-lang#77829 (bootstrap: only use compiler-builtins-c if they exist)
 - rust-lang#77870 (Use intra-doc links for links to module-level docs)
 - rust-lang#77897 (Move `Strip` into a separate rustdoc pass)

Failed merges:

 - rust-lang#77879 (Provide better documentation and help messages for x.py setup)
 - rust-lang#77902 (Include aarch64-pc-windows-msvc in the dist manifests)

r? `@ghost`
@bors
Copy link
Contributor

bors commented Oct 14, 2020

🔒 Merge conflict

This pull request and the master branch diverged in a way that cannot be automatically merged. Please rebase on top of the latest master branch, and let the reviewer approve again.

How do I rebase?

Assuming self is your fork and upstream is this repository, you can resolve the conflict following these steps:

  1. git checkout x-py (switch to your branch)
  2. git fetch upstream master (retrieve the latest master)
  3. git rebase upstream/master -p (rebase on top of it)
  4. Follow the on-screen instruction to resolve conflicts (check git status if you got lost).
  5. git push self x-py --force-with-lease (update this PR)

You may also read Git Rebasing to Resolve Conflicts by Drew Blessing for a short tutorial.

Please avoid the "Resolve conflicts" button on GitHub. It uses git merge instead of git rebase which makes the PR commit history more difficult to read.

Sometimes step 4 will complete without asking for resolution. This is usually due to difference between how Cargo.lock conflict is handled during merge and rebase. This is normal, and you should still perform step 5 to update this PR.

Error message
Auto-merging src/bootstrap/setup.rs
CONFLICT (content): Merge conflict in src/bootstrap/setup.rs
Auto-merging src/bootstrap/flags.rs
Automatic merge failed; fix conflicts and then commit the result.

ijackson and others added 5 commits October 14, 2020 11:40
Put all()'s otuput in the order we want to print things in, and add a
comment about why they are in this order.  Provide purpose() and
all_for_help().  Use these things everywhere.

Move all the abbrev character ("a", "b", etc.) processing into
interactive_path.

No functional change.

Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
Co-authored-by: Joshua Nelson <joshua@yottadb.com>
We understand these profile names because we use .to_str().
Mention them in the question.

Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
We need a fresh input buffer each time, or we reuse the previous
data (since `read_line` appends).

Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
EOF is not an error; it just causes read_line to produce "".

Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
@ijackson
Copy link
Contributor Author

@jyn514 Would you mind re-reviewing? Thanks. (The merge conflicts were with 23c3356 "Mention rustdoc in x.py setup".)

@jyn514
Copy link
Member

jyn514 commented Oct 14, 2020

@bors r+

@bors
Copy link
Contributor

bors commented Oct 14, 2020

📌 Commit 636728e 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-author Status: This is awaiting some action (such as code changes or more information) from the author. labels Oct 14, 2020
@bors
Copy link
Contributor

bors commented Oct 14, 2020

⌛ Testing commit 636728e with merge 8d0cfd54d89abbac3a21d5121fda76fed10569df...

@bors
Copy link
Contributor

bors commented Oct 14, 2020

💔 Test failed - checks-actions

@bors bors added S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. and removed S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. labels Oct 14, 2020
@jyn514
Copy link
Member

jyn514 commented Oct 14, 2020

Spurious failure; it's the second time it's happened so I don't think there's much point in retrying. Opened https://rust-lang.zulipchat.com/#narrow/stream/242791-t-infra/topic/All.20apple.20builds.20are.20failing instead.

@jyn514
Copy link
Member

jyn514 commented Oct 14, 2020

@bors retry

#77940

@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 Oct 14, 2020
bors added a commit to rust-lang-ci/rust that referenced this pull request Oct 14, 2020
Rollup of 9 pull requests

Successful merges:

 - rust-lang#77570 (Allow ascii whitespace char for doc aliases )
 - rust-lang#77739 (Remove unused code)
 - rust-lang#77753 (Check html comments)
 - rust-lang#77879 (Provide better documentation and help messages for x.py setup)
 - rust-lang#77902 (Include aarch64-pc-windows-msvc in the dist manifests)
 - rust-lang#77934 (Document -Z codegen-backend in the unstable book)
 - rust-lang#77936 (Remove needless alloc_slice)
 - rust-lang#77946 (Validate references to source scopes)
 - rust-lang#77951 (Update books)

Failed merges:

r? `@ghost`
@bors bors merged commit c268cc0 into rust-lang:master Oct 15, 2020
@rustbot rustbot added this to the 1.49.0 milestone Oct 15, 2020
@ijackson ijackson deleted the x-py branch October 28, 2020 15:19
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.

x.py setup should have more descriptive usage info
7 participants