-
-
Notifications
You must be signed in to change notification settings - Fork 39
Automatically update the cargo registry #81
Comments
Hi, const cargoHome = process.env.CARGO_HOME || path.resolve(os.homedir(), ".cargo/");
const gitDir = path.resolve(cargoHome, "registry/index/git.luolix.top-1ecc6299db9ec823/.git/"); Since it is a git repo , I think we can trigger a pull |
It's a bare clone, so I think we need But it might be better to let |
It is just a version index. I think it will be ok but we can ask to the collaborators . |
The cargo local index is refreshed on every command: |
|
Thanks for the idea.So if it is already updated on every command do we really have to call update ? |
I don't think it's updated on every command:
|
For the performance it has a big impact I think. What do you think ? |
Ideally it would run it in the background and refresh the display when it finishes (or when you open a Cargo.toml file). This way you'd see possibly stale results when opening the projects, but they would update after a couple of seconds. |
I read the long history of "not doing that" in Cargo and the index stability "not guaranteed" story. |
+1 for running this on the first .toml open in the current editor session. Currently I need to |
Since there are many issues going related with this, we have our own index server now. No more local checks with v0.6.0 |
Is your feature request related to a problem? Please describe.
When querying GitHub,
crates
would return fresh results every time, but with the disk registry we might show up old information.Describe the solution you'd like
We should try to update the cargo registry on startup and possible on user request (in case a user keeps open the editor for days or weeks).
Describe alternatives you've considered
Do nothing.
Additional context
It looks like there's no way to force cargo to update its registry. A workaround is to run
cargo install lazy_static
.I'm not sure how the cargo path is picked now, but
cargo
might not be inPATH
.The text was updated successfully, but these errors were encountered: