Does the vscode extension perform any actions that may automatically update Cargo.lock
?
#15563
Replies: 3 comments
-
The extension may cause a lock file update whenever it invokes cargo, which should only happen on:
|
Beta Was this translation helpful? Give feedback.
-
While I was not rebasing, this is also happening to me and is particularly annoying as I don't want it to update my dependencies without having touched my Cargo.toml. Is there a way to force it to use |
Beta Was this translation helpful? Give feedback.
-
Unfortunately we can't use This is a short coming of how cargo-metadata currently works (it should be a pure readonly action, yet it tries to modify things), there is an issue regarding that on the cargo issue tracker somewhere. |
Beta Was this translation helpful? Give feedback.
-
I think it may be possible the vscode extension needs to pause the analyzer and/or any other it actions it takes upon seeing file changes if it also sees that git is in the middle of a rebase. I believe what happened a few times to me is that the
Cargo.lock
file was updated on me when git was in the middle of applying a rebase operation (slowly). Does the vscode extension, particularly in its default settings, perform any actions to automatically updateCargo.lock
upon file changes?I suspect that is what happened to me since I could have thought my rebase was clean, but the
Cargo.lock
was updated without any conflict markers in it, and so the rebase halted. I'll see if I can reproduce the issue again next time I need to do a rebase, but thought I'd ask if something like this possible was happening.rust-analyzer version:
0.3.1649-standalone (2df30e1e0 2023-09-03)
rustc version:
rustc 1.72.0 (5680fa18f 2023-08-23)
relevant settings: no changed rust-analyzer vscode settings
Beta Was this translation helpful? Give feedback.
All reactions