rust-lang / rust-lang/rust-analyzer
Cached offline use regression since lock file copying was implemented
Nobody has claimed this yet.
- Dominant language
- Rust
- Stars
- 16.9k
- Forks
- 2.2k
- Avg merge
- 1d 12h
- Merged PRs (30d)
- 72
Description
With Rust analyzer version 0.3.2509 for VSCode I was unable to use my typical workflow for working offline.
Before #20018 was merged I was able to connect to the internet, run
cargo metadata, and as long as my crate versions didn't change I was able to continue using it offline.I'm on a restricted machine where the main GUI desktop can't connect to the internet, but I can open up a shell that has internet access and I tend to run
cargo fetchin that shell to get everything downloaded before using the GUI offline.The issue now is that rust-analzyer is creating a new folder at
target/rust-analyzer/metadataand since I haven't runcargo metadatain that folder ( since it doesn't exist until running the GUI with an internet connection ) the metadata isn't cached and rust-analyzer can't startup.I realize that this is a little bit of a special case, but it still feels like maybe I should be able to have an option to run rust-analyzer against the normal
cargo metadatalocation.
Originally posted by @zicklag in #12499
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Reproduce the offline workflow described in the issue: run cargo fetch and cargo metadata, then compare the normal metadata location with target/rust-analyzer/metadata. Trace how rust-analyzer chooses that metadata directory. Done means the cached offline workflow can start without requiring metadata to be generated in the newly created directory.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- rust, vscode
- Domain
- developer-experience, tooling
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100