ryym/textris

Please publish Cargo.lock with the crate

polyzen opened this issue · 6 comments

error: the lock file needs to be updated but --locked was passed to prevent this

I see the lock file isn't shipped with the crate.

Looks like this would be needed:
rust-lang/cargo#5654

ryym commented

Thanks for reporting.
So did you build from the source code downloaded by cargo install?
I'm not sure it is a common practice, but I agree it is better if the downloaded crate contains a lock file.

It seems that the error only occurs in textris-0.1.0. The latest version is 0.2.0 and it can be built with cargo build --locked without the error in my environment, even if the lock file does not exist.
I confirmed this by doing:

  • cargo install textris
  • cd to the source directory .cargo/registry/src/github.com-hash/textris-0.2.0
  • cargo build --locked

I download crates manually, actually:
https://aur.archlinux.org/cgit/aur.git/tree/PKGBUILD?h=textris#n12

I believe the cargo install generated Cargo.lock for you. Perhaps it wouldn't have worked with cargo install --locked textris.

I've learned unstable Cargo features require Cargo nightly. Will bump this once it's stabilized.

ryym commented

I've learned unstable Cargo features require Cargo nightly.

Yeah, that makes me hesitate to use the publish-lockfile feature.
Thanks any way.