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

Improve error message when cargo build is used to build the compiler #120475

Merged
merged 1 commit into from
Jan 30, 2024

Conversation

Noratrieb
Copy link
Member

Inspired by #76446.

Doing it for core is probably higher value but also way harder because tools like cargo or rustc-build-sysroot would need to be fixed first, which I don't feel like doing.

@rustbot
Copy link
Collaborator

rustbot commented Jan 29, 2024

r? @michaelwoerister

(rustbot has picked a reviewer for you, use r? to override)

@rustbot rustbot added S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. T-compiler Relevant to the compiler team, which will review and decide on the PR/issue. labels Jan 29, 2024
@michaelwoerister
Copy link
Member

Thanks for the PR, @Nilstrieb!

Have you verified that this doesn't break rust-analyzer or build-std?

@Noratrieb
Copy link
Member Author

It's in the compiler, so it can't break build-std. ra doesn't use rustc_macros today.

rustc_macros = { path = "../rustc_macros", optional = true }
it's explicitly optional so ra doesnt need it.
If ra wanted to start using it in the future, we'd have to the script, which sounds fine.

@michaelwoerister
Copy link
Member

It's in the compiler, so it can't break build-std.

Sorry, I got confused while reading #76446 and thought this PR was about the standard library too 🤦

ra doesn't use rustc_macros today.

My question was more about whether ra will still work for people who are working on the compiler. If one goes through this setup it should be fine. But I don't know how many people know about that.

@michaelwoerister
Copy link
Member

OK, it looks like ra doesn't work very well without this setup to begin with. Let's merge this and see if it causes unforeseen trouble.

@bors r+

@bors
Copy link
Contributor

bors commented Jan 30, 2024

📌 Commit 6468d44 has been approved by michaelwoerister

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-review Status: Awaiting review from the assignee but also interested parties. labels Jan 30, 2024
bors added a commit to rust-lang-ci/rust that referenced this pull request Jan 30, 2024
…llaumeGomez

Rollup of 11 pull requests

Successful merges:

 - rust-lang#117906 (Improve display of crate name when hovered)
 - rust-lang#118533 (Suppress unhelpful diagnostics for unresolved top level attributes)
 - rust-lang#120293 (Deduplicate more sized errors on call exprs)
 - rust-lang#120295 (Remove `raw_os_nonzero` feature.)
 - rust-lang#120310 (adapt test for v0 symbol mangling)
 - rust-lang#120342 (Remove various `has_errors` or `err_count` uses)
 - rust-lang#120434 (Revert outdated version of "Add the wasm32-wasi-preview2 target")
 - rust-lang#120445 (Fix some `Arc` allocator leaks)
 - rust-lang#120475 (Improve error message when `cargo build` is used to build the compiler)
 - rust-lang#120476 (Remove some unnecessary check logic for lang items in HIR typeck)
 - rust-lang#120485 (add missing potential_query_instability for keys and values in hashmap)

r? `@ghost`
`@rustbot` modify labels: rollup
@bors bors merged commit 399b81f into rust-lang:master Jan 30, 2024
11 checks passed
@rustbot rustbot added this to the 1.77.0 milestone Jan 30, 2024
rust-timer added a commit to rust-lang-ci/rust that referenced this pull request Jan 30, 2024
Rollup merge of rust-lang#120475 - Nilstrieb:cargo-build-my-a-, r=michaelwoerister

Improve error message when `cargo build` is used to build the compiler

Inspired by rust-lang#76446.

Doing it for `core` is probably higher value but also way harder because tools like cargo or rustc-build-sysroot would need to be fixed first, which I don't feel like doing.
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-compiler Relevant to the compiler team, which will review and decide on the PR/issue.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants