-
Notifications
You must be signed in to change notification settings - Fork 1.8k
Unresolved import error for "ed25519_dalek::Keypair" #7243
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
The problem is this line https://docs.rs/ed25519-dalek/1.0.1/src/ed25519_dalek/lib.rs.html#238 I believe. Rust analyzer checks with |
CC #7225 |
I guess what we actually want is to disable No idea if/how this would make sense to the user though. |
I suppose there's no chance of having something like "assume |
That would actually be my preferred solution. Not sure how feasible it is to implement though. |
I think both things you wrote are basically the same 😄 I.e. we need to have each crate (or at least each leaf crate) in a test and non-test version in the crate graph. Then hopefully the "assume |
Adding a datapoint that I'm getting the exact same error:
|
Fixes crates which vanish when the 'test' cfg atom is set. Fix rust-lang#7243. Fix rust-lang#9203. Fix rust-lang#7225.
dalek_ed25519 issue: dalek-cryptography/ed25519-dalek#173 |
We should make this work by default |
Hm, but why do we enable |
Presumably to make IDE work when you browse unit tests |
You rarely need to browse unit tests of a crates.io dependency. |
… and even then RA could only load the crate with |
If you want a quick fix that works right now you can add this to your VSCode settings file: "rust-analyzer.cargo.unsetTest": [
"core",
"ed25519-dalek"
], This removes the |
Did anybody figure out the fix for neovim? I tried this but it doesn't work: require'lspconfig'.rust_analyzer.setup({
settings = {
["rust-analyzer"] = {
cargo = {
unsetTest = {
"core", "ed25519-dalek", "curve25519-dalek"
}
}
}
}
}) |
This works now (unless you have |
Uh oh!
There was an error while loading. Please reload this page.
First of all: Thanks for creating
rust-analyzer
.I'm using the VSCode extension version 0.2.449 and I'm running into the "rust-analyzer(unresolved-import)" issue which was already reported before.
I followed the advice to enable the following settings to no avail:
Here's my full
settings.json
file (I've restarted VSCode as prompted after changing the extension settings):Here's the code snippets which causes the error to pop up:
Let me know if you need anything else and thanks in advance for looking into this 👍
The text was updated successfully, but these errors were encountered: