dhovart / cargo-local-registry

A cargo subcommand to manage local registries
Apache License 2.0
150 stars 18 forks source link

Running sync causes lockfile parsing error #159

Closed Algirdyz closed 3 years ago

Algirdyz commented 4 years ago

Hi,

I've tried running this crate on several popular crates and it works for some of them, but I also had issues.

For some crates, serde_json.1.0.48 for example or the latest tokio I get this error:


Caused by:
  failed to load pkg lockfile

Caused by:
  failed to parse lock file at: /home/algirdas/crate_data/serde_json/serde_json-1.0.48/Cargo.lock

Caused by:
  invalid serialized PackageId for key `package.dependencies`

Any ideas?

ChrisGreenaway commented 4 years ago

I'd expect those errors if the version of cargo that we depend on isn't up to date, but I checked and we are requiring 0.42.0 which is the latest version.

Are you running the latest version of cargo-local-registry?

ChrisGreenaway commented 4 years ago

You can use the following to see the version:

cargo install cargo-update
cargo install-update --list
Algirdyz commented 4 years ago

Thanks for the fast reply. I've run these command just now and yes I am up to date. 0.2.0

ChrisGreenaway commented 4 years ago

Looks like we had a merge about 1 month ago to upgrade the cargo dependency to 0.42.0, but we haven't had a release yet.

I will have to do a release - that could solve it.

Not sure when I'll fit that in though - not today for sure.

saltduck commented 4 years ago

Is it fixed now? I got the same error. My cargo version is 1.42.0.

ChrisGreenaway commented 4 years ago

No - I still need to do a release. Perhaps I will find time this long Easter weekend. I will report back on this issue when it is completed.

ChrisGreenaway commented 4 years ago

Release is done. Please confirm that this resolves the issue.