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

minicore: use the host's core when available #134652

Open
tgross35 opened this issue Dec 22, 2024 · 6 comments
Open

minicore: use the host's core when available #134652

tgross35 opened this issue Dec 22, 2024 · 6 comments
Assignees
Labels
A-compiletest Area: The compiletest test runner A-testsuite Area: The testsuite used to check the correctness of rustc C-enhancement Category: An issue proposing an enhancement or a PR with one. T-bootstrap Relevant to the bootstrap subteam: Rust's build system (x.py and src/bootstrap)

Comments

@tgross35
Copy link
Contributor

From discussion at https://rust-lang.zulipchat.com/#narrow/channel/131828-t-compiler/topic/Using.20.60minicore.60.20for.20more.20compiletests, it would be ideal to replace minicore with the host's core if that is built. @jieyouxu pointed out that this did exist for the ABI compatibility test at some point adb6d47#diff-55f122dec36f78625c830ef254174f8ac89b16959557e11dff4d33ef9fd12438L70.

The main advantage here is it gives us a better chance of catching (unlikely) deviations between core and minicore, as opposed to always using minicore.

@rustbot rustbot added the needs-triage This issue may need triage. Remove it if it has been sufficiently triaged. label Dec 22, 2024
@tgross35 tgross35 added A-testsuite Area: The testsuite used to check the correctness of rustc T-bootstrap Relevant to the bootstrap subteam: Rust's build system (x.py and src/bootstrap) A-compiletest Area: The compiletest test runner labels Dec 22, 2024
@jieyouxu jieyouxu added C-enhancement Category: An issue proposing an enhancement or a PR with one. A-testsuite Area: The testsuite used to check the correctness of rustc T-bootstrap Relevant to the bootstrap subteam: Rust's build system (x.py and src/bootstrap) A-compiletest Area: The compiletest test runner E-medium Call for participation: Medium difficulty. Experience needed to fix: Intermediate. E-hard Call for participation: Hard difficulty. Experience needed to fix: A lot. and removed A-testsuite Area: The testsuite used to check the correctness of rustc T-bootstrap Relevant to the bootstrap subteam: Rust's build system (x.py and src/bootstrap) A-compiletest Area: The compiletest test runner needs-triage This issue may need triage. Remove it if it has been sufficiently triaged. E-medium Call for participation: Medium difficulty. Experience needed to fix: Intermediate. labels Dec 22, 2024
@jieyouxu

This comment has been minimized.

@jieyouxu jieyouxu self-assigned this Dec 22, 2024
@jieyouxu jieyouxu removed the E-hard Call for participation: Hard difficulty. Experience needed to fix: A lot. label Dec 22, 2024
@nikic
Copy link
Contributor

nikic commented Dec 22, 2024

I feel like this would introduce a larger danger of writing a test that uses something that's not part of minicore (but is part of core). We'd still catch it eventually in a full bors run on a different arch, but this seems like an unnecessary footgun for the otherwise very reliable no_core tests.

@tgross35
Copy link
Contributor Author

Something else loosely discussed on Zulip is that maybe minicore could be a file or module within library/core that can be built as a standalone crate. Then compiletest would use this directly and the real core just reexports things in the right place, so we'll always be using the same API regardless of whether or not all of core is available.

@jieyouxu
Copy link
Member

I'm going to unassign myself for the time being because I don't know how to best approach this, since if a test is no_core... Does the test actually want a host core?

@jieyouxu
Copy link
Member

Also opened #137531 to track how to check deviations between minicore / real core specifically

@Noratrieb
Copy link
Member

I think I agree with nikic that using two different configurations seems more error-prone than just one.
Core deviating from minicore is definitely a concern, but I'm not sure it's that worrisome in practice, since significant deviations should hopefully be caught by tests suddenly failing.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-compiletest Area: The compiletest test runner A-testsuite Area: The testsuite used to check the correctness of rustc C-enhancement Category: An issue proposing an enhancement or a PR with one. T-bootstrap Relevant to the bootstrap subteam: Rust's build system (x.py and src/bootstrap)
Projects
Development

No branches or pull requests

5 participants