You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Auto merge of #12629 - Eh2406:WhyStringlyTyped, r=epage
Read/write the encoded `cargo update --precise` in the same place
### What does this PR try to resolve?
There's a stringly typed interface between https://github.com/rust-lang/cargo/blob/de7537e63296ee13cb78611a988bcc9a6ac26134/src/cargo/ops/cargo_generate_lockfile.rs#L105 and https://github.com/rust-lang/cargo/blob/de7537e63296ee13cb78611a988bcc9a6ac26134/src/cargo/sources/registry/index.rs#L587, the only reason I found it with by finding the original commit #5205
As far as I can tell, anyone could just create this internally meaningful ~structure~ string by passing it on the command line.
This should get cleaned up, for now by moving the encoding and decoding in to the same file.
### How should we test and review this PR?
Internal refactor and test still pass.
### Additional information
I am hoping that in the redesign of `cargo update` we can come up with a better design for smuggling this data from the API all the way to querying the registry. It seems like locking the dependency to the selected version would be conceptually simpler, or using the patch system, or something.
0 commit comments