-
Notifications
You must be signed in to change notification settings - Fork 1.7k
Build targets of workspace crates do not appear to be honoured #11268
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
Comments
I made some progress by running my own RA build and printing out the cargo.toml's within that were being used to determine the various targets. My eprintln was in
... Perhaps |
I've come to the conclusion that RA is working as intended. When it performs a I have since removed workspaces from situations where there are no common targets between crates. |
rust-analyzer version:
rust-analyzer version: 54782428a 2022-01-12 dev
rustc version:
rustc 1.59.0-nightly (c5ecc1570 2021-12-15)
Further to the "Respect .cargo/config.toml" PR, the
config.toml
file of a crate within a workspace does not appear to be honoured. For example, if I have a project namedclient
and it has two crates,app
andembedded-app
, andembedded-app
has a.cargo/config.toml
, then the latter does not appear to be considered when determining build targets.To reproduce this issue:
rustup target add thumbv7em-none-eabihf
if you don't have that targetembassy-start.code-workspace
) in VSCclient/embedded-app/src/boards/nrf52840_dk.rs
interrupt::take!
on L18 is able to be resolved"rust-analyzer.cargo.target": "thumbv7em-none-eabihf"
from the workspace fileinterrupt::take!
can no longer be resolvedMy expectation is that the build target of
client/.embedded-app/.cargo/config.toml
should be honoured, and that I should not have to declare arust-analyzer.cargo.target
.Related? #8521
The text was updated successfully, but these errors were encountered: