Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Please publish Cargo.lock with the crate #2

Closed
polyzen opened this issue Nov 5, 2018 · 6 comments
Closed

Please publish Cargo.lock with the crate #2

polyzen opened this issue Nov 5, 2018 · 6 comments

Comments

@polyzen
Copy link

polyzen commented Nov 5, 2018

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

@polyzen
Copy link
Author

polyzen commented Nov 5, 2018

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

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

@polyzen polyzen changed the title Please update the lock file Please publish the lock file with the crate Nov 5, 2018
@polyzen polyzen changed the title Please publish the lock file with the crate Please publish Cargo.lock with the crate Nov 5, 2018
@ryym
Copy link
Owner

ryym commented Nov 6, 2018

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

@polyzen
Copy link
Author

polyzen commented Nov 6, 2018

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
Copy link
Author

polyzen commented Nov 8, 2018

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

@ryym
Copy link
Owner

ryym commented Nov 10, 2018

I've learned unstable Cargo features require Cargo nightly.

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

@polyzen polyzen closed this as completed Jun 3, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants