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

Add --warnings warn flag to x.py #112089

Merged
merged 1 commit into from
May 31, 2023
Merged

Conversation

Kobzol
Copy link
Contributor

@Kobzol Kobzol commented May 29, 2023

So that bootstrap itself can be built with warnings not being treated as errors.

Fixes: #76805

r? @jyn514

@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 May 29, 2023
src/bootstrap/bootstrap.py Outdated Show resolved Hide resolved
src/bootstrap/bootstrap.py Outdated 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 May 29, 2023
@Kobzol Kobzol force-pushed the bootstrap-warnings branch from dd27f8d to baf335b Compare May 30, 2023 19:50
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.

r=me with the bug fixed

src/bootstrap/bootstrap.py Show resolved Hide resolved
So that bootstrap itself can be built with warnings not being treated as errors.
@Kobzol Kobzol force-pushed the bootstrap-warnings branch from baf335b to 023e6c4 Compare May 30, 2023 21:38
@Kobzol
Copy link
Contributor Author

Kobzol commented May 30, 2023

<at>bors r=jyn514

(I don't have r rights :) ).

@jyn514
Copy link
Member

jyn514 commented May 30, 2023

ah, we should fix that - I'll see if I can talk to t-infra about inviting you :)

oh, I just remembered this should probably have a test - I don't think we have an easy test suite for the arguments we pass to cargo in bootstrap though, so I'll add it at the same time I fix #111979 (comment).

@bors r+ rollup

@bors
Copy link
Contributor

bors commented May 30, 2023

📌 Commit 023e6c4 has been approved by jyn514

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 May 30, 2023
matthiaskrgr added a commit to matthiaskrgr/rust that referenced this pull request May 31, 2023
Add `--warnings warn` flag to `x.py`

So that bootstrap itself can be built with warnings not being treated as errors.

Fixes: rust-lang#76805

r? `@jyn514`
matthiaskrgr added a commit to matthiaskrgr/rust that referenced this pull request May 31, 2023
Add `--warnings warn` flag to `x.py`

So that bootstrap itself can be built with warnings not being treated as errors.

Fixes: rust-lang#76805

r? ``@jyn514``
bors added a commit to rust-lang-ci/rust that referenced this pull request May 31, 2023
…iaskrgr

Rollup of 5 pull requests

Successful merges:

 - rust-lang#111772 (Fix linkage for large binaries on mips64 platforms)
 - rust-lang#111975 (Stop normalizing so many different prefixes)
 - rust-lang#111979 (Respect CARGOFLAGS in bootstrap.py)
 - rust-lang#112089 (Add `--warnings warn` flag to `x.py`)
 - rust-lang#112103 (Bootstrap update to 1.71 beta)

r? `@ghost`
`@rustbot` modify labels: rollup
@bors bors merged commit 9e108f8 into rust-lang:master May 31, 2023
@rustbot rustbot added this to the 1.72.0 milestone May 31, 2023
@Kobzol Kobzol deleted the bootstrap-warnings branch May 31, 2023 13:58
TaKO8Ki added a commit to TaKO8Ki/rust that referenced this pull request Jun 25, 2023
…larsan68

Test the cargo args generated by bootstrap.py

I recommend reviewing this commit-by-commit using the instructions in https://rustc-dev-guide.rust-lang.org/git.html#moving-large-sections-of-code.

- Test cargo arguments passed by bootstrap.py

  This moves a lot of code around, but the logic itself is not too terribly complicated.

    - Move almost all logic in `def bootstrap` to the `RustBuild` class, to avoid mixing setting configuration with running commands
    - Update various doctests to the new (more complete) RustBuild config. In particular, don't pretend that `bin_root` supports `build` being unset.
    - Change `parse_args` not to use a global, to allow testing it
    - Set BUILD_DIR appropriately so bootstrap.py doesn't panic because cargo isn't found

- Allow passing arguments to `bootstrap_test.py`

    Previous, it used the built-in test runner, which doesn't support options unless they're manually passed in the script.

- Fix progress messages for configure in bootstrap_test.py

    Before it would unconditionally print `configure-args = []`.

r? `@albertlarsan68` cc rust-lang#112089 rust-lang#111979 (comment)
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.

bootstrap: --warnings warn doesn't apply to bootstrap itself
4 participants