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 it possible to use cargo test, not just x.py test #95854

Closed
jyn514 opened this issue Apr 9, 2022 · 7 comments
Closed

Make it possible to use cargo test, not just x.py test #95854

jyn514 opened this issue Apr 9, 2022 · 7 comments
Labels
C-enhancement Category: An issue proposing an enhancement or a PR with one. E-help-wanted Call for participation: Help is requested to fix this issue. E-medium Call for participation: Medium difficulty. Experience needed to fix: Intermediate. 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)

Comments

@jyn514
Copy link
Member

jyn514 commented Apr 9, 2022

This sounds harder than it actually is, I think. We already have default-members = ["bootstrap"] in the root Cargo.toml, so we can implement this by adding an integration test in src/bootstrap/tests which calls builder.ensure(test::X) for all possible values of X; ideally we would reuse the logic from x.py test exactly so that cargo test runs all tests, cargo test src/test/ui runs UI tests, etc.

cc #95253 (comment), #94829
@rustbot label +A-rustbuild +C-enhancement

@rustbot rustbot added T-bootstrap Relevant to the bootstrap subteam: Rust's build system (x.py and src/bootstrap) C-enhancement Category: An issue proposing an enhancement or a PR with one. labels Apr 9, 2022
@jyn514
Copy link
Member Author

jyn514 commented Apr 9, 2022

@rustbot label +E-mentor +E-medium +E-help-wanted

@rustbot rustbot added E-help-wanted Call for participation: Help is requested to fix this issue. E-medium Call for participation: Medium difficulty. Experience needed to fix: Intermediate. E-mentor Call for participation: This issue has a mentor. Use #t-compiler/help on Zulip for discussion. labels Apr 9, 2022
@bjorn3
Copy link
Member

bjorn3 commented Apr 9, 2022

If this isn't possible you could put an alias from cargo x to cargo run -- in .cargo/config.toml.

@jyn514
Copy link
Member Author

jyn514 commented Apr 9, 2022

@bjorn3 we should do that either way I think :) doesn't hurt and there's other commands we definitely can't support, like cargo doc.

@jihiggins
Copy link
Contributor

@rustbot claim

@jyn514
Copy link
Member Author

jyn514 commented May 25, 2022

Given the new entrypoints we're planning in https://rust-lang.zulipchat.com/#narrow/stream/122651-general/topic/bootstrap.20user.20survey/near/283897117, I am not sure this still makes sense. cargo test will be the only command that goes through cargo, and it will make it seem like build is happening through cargo when it's still really using bootstrap under the hood.

@estebank I saw you left a ❤️ reaction - do you want to give feedback before I close the issue?

@estebank
Copy link
Contributor

@jyn514 I'm ok with the current direction. Familiarity for new contributors with the normal tooling would be useful, but maybe what is needed is to make cargo flexible enough for rustc, and not the other way around.

@jyn514
Copy link
Member Author

jyn514 commented May 26, 2022

maybe what is needed is to make cargo flexible enough for rustc, and not the other way around.

I don't have a lot of confidence this is possible :( there's a thread in https://rust-lang.zulipchat.com/#narrow/stream/122651-general/topic/why.20not.20.60cargo.20build.60.20in.20rust-lang.2Frust.3F where I explain some fundamental limitations cargo has.

Anyway, I think having a mismatch between test and the rest of the subcommands isn't great so I'm going to close this.

@jyn514 jyn514 closed this as not planned Won't fix, can't repro, duplicate, stale May 26, 2022
@jihiggins jihiggins removed their assignment May 27, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
C-enhancement Category: An issue proposing an enhancement or a PR with one. E-help-wanted Call for participation: Help is requested to fix this issue. E-medium Call for participation: Medium difficulty. Experience needed to fix: Intermediate. 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)
Projects
None yet
Development

No branches or pull requests

5 participants