ryym / textris

Tetris on terminal, written in Rust!
8 stars 2 forks source link

Please publish Cargo.lock with the crate #2

Closed polyzen closed 5 years ago

polyzen commented 6 years ago

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

polyzen commented 6 years ago

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

Looks like this would be needed: https://github.com/rust-lang/cargo/issues/5654

ryym commented 6 years ago

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:

polyzen commented 6 years ago

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.

polyzen commented 5 years ago

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

ryym commented 5 years ago

I've learned unstable Cargo features require Cargo nightly.

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

polyzen commented 5 years ago

Cargo will be changed to always include Cargo.lock in the .crate file if the package has binaries or examples.