question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Prelude is not resolved after toolchain override

See original GitHub issue

I noticed that the general name resolution is broken when there are too many changes (for example when rebasing and moving around in history a lot) and I had to delete the contents of lib.rs to fix the issue. Now the prelude is not resolved, which is making it very hard to work even after trying to disable then re-enable the Rust Plugin.

Environment

  • IntelliJ Rust plugin version: 0.2.115.2157-193
  • Rust toolchain version: 1.40
  • IDE name and version: PyCharm 2019.3 (#PY-193.5233.109)
  • Operating system: Linux 5.4.0-3-amd6

Steps to reproduce

I’m not sure when it started.

If you want the state I’m in:

hg clone https://foss.heptapod.net/octobus/mercurial-devel
hg up b561fdbcc60
cd rust/hg-cpython/
cargo c (to make sure that it compiles)

EDIT: it seems that the real issue is setting a toolchain override with rustup. It confuses the plugin.

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Reactions:3
  • Comments:12 (2 by maintainers)

github_iconTop GitHub Comments

3reactions
Alpharecommented, May 22, 2020

Another, less brutal solution is to use rustup which cargo inside the folder with the local override and use the bin/ folder where this toolchain’s cargo is located as the toolchain location, and lib/rustlib/src/rust/src as the stdlib location.

That way you can still have the default version be whatever you want, but this is a bit cumbersome.

0reactions
Alpharecommented, Sep 28, 2020

For those using relatively recent versions of Rust (this comment was prompted by Debian stable’s upgrade to 1.41.1), you need to install the rust-src component in your rustup toolchain to have the src folder in rustlib.

rustup component add rust-src, then (re)install your toolchain.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Bountysource
Prelude is not resolved after toolchain override.
Read more >
Installing the Rust compiler and toolchain
You can change to the nightly toolchain easily with rustup. ... the recommended way to install the toolchain is to run the following...
Read more >
Overrides - The rustup book
A relative path is resolved relative to the location of the rust-toolchain.toml file. Default toolchain. If no other overrides are set, the global...
Read more >
Pedantic Clippy | Yury Zhauniarovich
If you do not want to change source code, you can run clippy with special command line arguments that would enable (or disable)...
Read more >
Bug listing with status RESOLVED with resolution INVALID as ...
status:RESOLVED resolution:INVALID severity:major · Bug:19358 - "rhide can not be emerged becose of setedit, it has different MD5 and if a change MD5...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found