-
Notifications
You must be signed in to change notification settings - Fork 2.6k
Panic when depending on a package with artifact dependencies #11260
New issue
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
Comments
AFAICT the panic occurs when a package has a transitive artifact dependency whose target isn't in the list of targets that the package directly interacts with. More specifically, the Example
[dependencies.bar]
path = "../bar"
[dependencies.baz]
artifact = "bin"
path = "../baz"
target = "x86_64-unknown-uefi"
|
It's a bit tricky to provide a detailed message, narrowing down to which crate requires the specific target. If that's feasible, Cargo should give such a message:
However, this is the line called by To achieve that, we could teach the dependency resolver to check target platform availability. Yet it sounds like a bad idea to me since there are already too many works inside the resolver. Instead, the second approach is relatively easy, by giving a message telling people which target platform info is missing, as well as how to check and how to fix it. Take this failure for instance,
Could copy I am able to guide through the second easy approach. If anyone wants to try the first one, it is probably beyond my knowledge. Suit up and good luck! |
Hi @weihanglo with some guidance I'd like to implement the second approach. @rustbot claim |
Edited: the error message doesn't real resolve the issue. We need to figure out a way to really solve the problem.
|
Error message for transitive artifact dependencies with targets the package doesn't directly interact with Address #11260. Produces an error message like described by `@weihanglo` [here](#11260 (comment)): ``` error: could not find specification for target "x86_64-windows-msvc" Dependency `bar v0.1.0` requires to build for target "x86_64-windows-msvc". ``` Note that this is not a complete fix for #11260.
Error message for transitive artifact dependencies with targets the package doesn't directly interact with Address #11260. Produces an error message like described by `@weihanglo` [here](#11260 (comment)): ``` error: could not find specification for target "x86_64-windows-msvc" Dependency `bar v0.1.0` requires to build for target "x86_64-windows-msvc". ``` Note that this is not a complete fix for #11260.
Problem
We hit a
thread 'main' panicked at 'no entry found for key'
error in our project. We're testing the use of various build artifacts (wasm/staticlib) in our setup. We have a project-wideconfig.toml
withbindeps = true
.error from cargo check
Notes
possibly related to #10444
Version
The text was updated successfully, but these errors were encountered: