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 c library/std not supported #77603

Closed
tesuji opened this issue Oct 6, 2020 · 7 comments
Closed

./x.py c library/std not supported #77603

tesuji opened this issue Oct 6, 2020 · 7 comments
Labels
C-bug Category: This is a bug. E-easy Call for participation: Easy difficulty. Experience needed to fix: Not much. Good first issue. E-mentor Call for participation: This issue has a mentor. Use #t-compiler/help on Zulip for discussion. T-bootstrap Relevant to the bootstrap subteam: Rust's build system (x.py and src/bootstrap) T-infra Relevant to the infrastructure team, which will review and decide on the PR/issue.

Comments

@tesuji
Copy link
Contributor

tesuji commented Oct 6, 2020

./x.py check library/std works but ./x.py c library/std doesn't.
The latter command give the following errors:

thread 'main' panicked at 'No option 'all-targets' defined', /home/lzutao/.cargo/registry/src/github.com-1ecc6299db9ec823/getopts-0.2.21/src/lib.rs:799:21

The commit I use is a1dfd24,
which is latest upstream commit at this time.

Meta

Backtrace

stack backtrace:
   0: rust_begin_unwind
             at /rustc/25c8c53dd994acb3f4f7c02fe6bb46076393f8b0/library/std/src/panicking.rs:483
   1: std::panicking::begin_panic_fmt
             at /rustc/25c8c53dd994acb3f4f7c02fe6bb46076393f8b0/library/std/src/panicking.rs:437
   2: getopts::Matches::opt_vals
             at /home/lzutao/.cargo/registry/src/github.com-1ecc6299db9ec823/getopts-0.2.21/src/lib.rs:799
   3: getopts::Matches::opt_present
             at /home/lzutao/.cargo/registry/src/github.com-1ecc6299db9ec823/getopts-0.2.21/src/lib.rs:813
   4: bootstrap::flags::Flags::parse
             at ./src/bootstrap/flags.rs:494
   5: bootstrap::config::Config::parse
             at ./src/bootstrap/config.rs:531
   6: bootstrap::main
             at ./src/bootstrap/bin/main.rs:14
   7: core::ops::function::FnOnce::call_once
             at /home/lzutao/.rustup/toolchains/nightly-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/core/src/ops/function.rs:227
note: Some details are omitted, run with `RUST_BACKTRACE=full` for a verbose backtrace.

cc @Mark-Simulacrum

@rustbot modify labels: A-rustbuild

@tesuji tesuji added the C-bug Category: This is a bug. label Oct 6, 2020
@rustbot rustbot added T-infra Relevant to the infrastructure team, which will review and decide on the PR/issue. T-bootstrap Relevant to the bootstrap subteam: Rust's build system (x.py and src/bootstrap) labels Oct 6, 2020
@Mark-Simulacrum
Copy link
Member

It is unclear to me -- did this work in the past? I wouldn't personally want it to be a thing but I guess maybe Cargo has already created the expectation for this alias?

@tesuji
Copy link
Contributor Author

tesuji commented Oct 6, 2020

Yeah, it worked in the past. However I am fine with using check if that reduces maintenance burden.

@jyn514
Copy link
Member

jyn514 commented Oct 6, 2020

Mentoring instructions: Change

"check" => {

to "check" | "c".

@jyn514 jyn514 added E-easy Call for participation: Easy difficulty. Experience needed to fix: Not much. Good first issue. E-mentor Call for participation: This issue has a mentor. Use #t-compiler/help on Zulip for discussion. labels Oct 6, 2020
@jyn514
Copy link
Member

jyn514 commented Oct 6, 2020

It would be nice to have all those matches use Subcommand instead of strings, but that's a larger refactor.

@akoptelov
Copy link
Contributor

It would be nice to have all those matches use Subcommand instead of strings, but that's a larger refactor.

Subcommands are created too late to be used here. But I think it should be possible to add a new enum SubcommandTerm { Build, Check, ... } that would be created as a subcommand arg is processed and used then in the rest of the code. @jyn514 is that what you meant?

@jyn514
Copy link
Member

jyn514 commented Oct 6, 2020

Hmm, I think there are existing Kinds you could use. I don't know if they're constructed early enough to be used here.

Dylan-DPC-zz pushed a commit to Dylan-DPC-zz/rust that referenced this issue Oct 6, 2020
Add c as a shorthand check alternative for new options rust-lang#77603

There is a missing "c" that is a shorthand for "check" in newly added match arm for handling check-specific options.
bors added a commit to rust-lang-ci/rust that referenced this issue Oct 6, 2020
Rollup of 11 pull requests

Successful merges:

 - rust-lang#76784 (Add some docs to rustdoc::clean::inline and def_id functions)
 - rust-lang#76911 (fix VecDeque::iter_mut aliasing issues)
 - rust-lang#77400 (Fix suggestions for x.py setup)
 - rust-lang#77515 (Update to chalk 0.31)
 - rust-lang#77568 (inliner: use caller param_env)
 - rust-lang#77571 (Use matches! for core::char methods)
 - rust-lang#77582 (Move `EarlyOtherwiseBranch` to mir-opt-level 2)
 - rust-lang#77590 (Update RLS and Rustfmt)
 - rust-lang#77605 (Fix rustc_def_path to show the full path and not the trimmed one)
 - rust-lang#77614 (Let backends access span information)
 - rust-lang#77624 (Add c as a shorthand check alternative for new options rust-lang#77603)

Failed merges:

r? `@ghost`
@LeSeulArtichaut
Copy link
Contributor

Should we close this as #77624 got merged?

@jyn514 jyn514 closed this as completed Oct 7, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
C-bug Category: This is a bug. E-easy Call for participation: Easy difficulty. Experience needed to fix: Not much. Good first issue. E-mentor Call for participation: This issue has a mentor. Use #t-compiler/help on Zulip for discussion. T-bootstrap Relevant to the bootstrap subteam: Rust's build system (x.py and src/bootstrap) T-infra Relevant to the infrastructure team, which will review and decide on the PR/issue.
Projects
None yet
Development

No branches or pull requests

6 participants