-
Notifications
You must be signed in to change notification settings - Fork 721
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
IntelliJ Rust plugin can't build runtime #6247
Comments
Have the same problem |
Is that enabling all features by any chance? Enabling the RISCV feature will cause it to fail compiling, since you probably dont have that toolchain. |
I do have the toolchain though, see |
which runtime are you trying to build, this should only build if you specify riscv? This should merge soon, does it fix your error #6266 |
Just opening project in IDE, it tries to build and analyze everything and fails. Have not tried the mentioned PR and working on something else at the moment. |
#6266 will fix this. What exactly are you trying to do? The custom toolchain is only required for developing the |
As said above, I try to open a project in IDE. During this IDE will build and expand macros in the whole codebase to build whatever information it needs about the project to enable various IDE features like refactoring, etc. So |
Ah okay, my web UI didn't reload above comments 😅 Yeah this used to work but broke for some reason. I can repro locally, but #6266 will fix it. |
Did intellij worked for you properly before? In my experience it never worked really well on that repo. Not saying we should not resolve this issue. But probably something else will pop up after fixing it. |
It worked in the past and other than this still works. At the same time there are some annoying things about how this repo is maintained, so I have to use environment variables to set one toolchain version for checking the code and another for formatting purposes. And #5317 that would fix at least one half of that is yet to be merged. |
Should be fixed by #6305 Can you confirm? |
Actually no, at very least it complains about |
This is why we setting this:
Building this with cargo works. It seems that intellij is ignoring this somehow. Or it prefilters the CLI args and comes to the conclusion that it won't work when in fact it actually does. I suggest setting a nightly toolchain in intellij to fix that. Or file a bug with them. The alternative would be to have the build script use |
That is a dirty hack, no one except Rustc itself should really use
I wish I could, but then I get lots of false-positive from additional clippy lints triggered on Substrate codebase all over the place and when I run It is really a huge pain to work with for contributors without Here is what IDE spits out:
|
So is using a nightly toolchain. We are using an unstable feature. Of course it doesn't get stable by using a stable toolchain. However, it improves the experience as people don't need to install an additional toolchain.
This rust-toolchain.toml would need to contain a nightly toolchain, though. |
@nazar-pc
|
Nahh. We are building with the toolchain used to build the crate now. So the |
As I wrote in the very first message, it was already installed |
Are you sure? You only state the rve-nightly toolchain is installed. What we ask you to do is to install |
I do have |
On latest
Two problems here. Wrong lock file path: -.rustup/toolchains/stable-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/Cargo.lock
+.rustup/toolchains/stable-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/Cargo.lock The path used is actually correct for 1.81.0, but not for 1.82.0 (current stable). The reason it has the wrong path is likely related to the fact that if you look closely it is |
So you think what is going wrong is that the build.rs is selecting stable instead of 1.81 as it should? If this is true it should be fixed by adding |
I am trying to reproduce and fix that. |
I was able to reproduce. Should be fixed by: #6365 |
Can you confirm if your problem if fixed? |
Building with CLI is fixed indeed, but IDE is still broken. Here is full log with everything IDE does and how (note it runs with 1.82.0 stable, which is my default): |
As said before: We can't fix it on our end. Intellij seems to ignore |
Tried to reproduce in the terminal and wasn't able, reported upstream: https://youtrack.jetbrains.com/issue/RUST-16254/Building-polkadot-sdk-in-IDEA-fails |
Is there an existing issue?
Experiencing problems? Have you tried our Stack Exchange first?
Description of bug
I'm getting the following confusing error:
The lock file exists for me, but at
/home/nazar-pc/.rustup/toolchains/rve-nightly/lib/rustlib/src/rust/Cargo.lock
instead. Not sure why it is searching for lock file at the wrong location.I have
rve-nightly
1.1.0 installed.Steps to reproduce
No response
The text was updated successfully, but these errors were encountered: