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

test rustc-dev dist component on CI #138646

Open
Kobzol opened this issue Mar 18, 2025 · 10 comments
Open

test rustc-dev dist component on CI #138646

Kobzol opened this issue Mar 18, 2025 · 10 comments
Labels
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) T-compiler Relevant to the compiler team, which will review and decide on the PR/issue. T-infra Relevant to the infrastructure team, which will review and decide on the PR/issue.

Comments

@Kobzol
Copy link
Contributor

Kobzol commented Mar 18, 2025

Recently, the rustc-dev component was broken several times in a row (#138304, #138647).

It would be nice if we had some CI check that would at least run cargo metadata on the extracted rustc-src component.

CC @RalfJung - Would running cargo metadata be enough as a smoke test?

@Kobzol Kobzol added C-bug Category: This is a bug. T-bootstrap Relevant to the bootstrap subteam: Rust's build system (x.py and src/bootstrap) labels Mar 18, 2025
@rustbot rustbot added the needs-triage This issue may need triage. Remove it if it has been sufficiently triaged. label Mar 18, 2025
@Kobzol Kobzol added A-compiletest Area: The compiletest test runner and removed needs-triage This issue may need triage. Remove it if it has been sufficiently triaged. C-bug Category: This is a bug. labels Mar 18, 2025
@jieyouxu
Copy link
Member

(Related to #136822)

@jieyouxu
Copy link
Member

jieyouxu commented Mar 18, 2025

I also don't think this is really compiletest, it probably needs to be its own test suite post-dist doing some basic checks.

@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-compiler Relevant to the compiler team, which will review and decide on the PR/issue. and removed A-compiletest Area: The compiletest test runner labels Mar 18, 2025
@RalfJung
Copy link
Member

Would running cargo metadata be enough as a smoke test?

Yes, at least for these two recent issues that would have been enough.
I was about to open an issue asking @rust-lang/infra for what is the best way to test this. :)

@RalfJung
Copy link
Member

(Related to #136822)

Maybe let's make this issue here specific for rustc-src, and use the other one to track more potential tests.

@RalfJung RalfJung changed the title Add a way to test dist components test rustc-src dist component on CI Mar 18, 2025
@jieyouxu jieyouxu added the T-infra Relevant to the infrastructure team, which will review and decide on the PR/issue. label Mar 18, 2025
@jieyouxu
Copy link
Member

jieyouxu commented Mar 18, 2025

I wonder if it makes sense to have something like citool, but post-dist build, which actually exercises the final dist artifacts (literally unpacking from a dist archive, for instance) that the users would actually receive.

(Testing rustc-src dist component may be one of its jobs)

@Kobzol
Copy link
Contributor Author

Kobzol commented Mar 18, 2025

I mean, in the ideal world we should do all (or almost all) of our testing on the dist artifacts, but that woud be too costly CI wise at the moment (apart from other problems).

The rustc-src component should IMO have its own separate job, rather than being a part of the x64 dist builder. Then we could add specific smoke tests to it.

@jieyouxu
Copy link
Member

Wait, wouldn't we still have to produce the rustc-src dist component in the first place? Or as in a fast custom dist component (say at stage 1 or sth)?

@Kobzol
Copy link
Contributor Author

Kobzol commented Mar 18, 2025

Yeah I meant to create a new CI job that would create the dist rustc-src component. It doesn't require almost anything and should be very fast to build.

@Kobzol
Copy link
Contributor Author

Kobzol commented Mar 18, 2025

Just a note that this problem occurred in the rustc-dev component, not rustc-src.

@RalfJung
Copy link
Member

Ah, the folder is called rustc-src but the component rustc-dev.

@RalfJung RalfJung changed the title test rustc-src dist component on CI test rustc-dev dist component on CI Mar 18, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
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) T-compiler Relevant to the compiler team, which will review and decide on the PR/issue. 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

4 participants