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

Release 0.1.7 includes Cargo.lock #22

Open
tamird opened this issue Dec 15, 2021 · 5 comments · May be fixed by #30
Open

Release 0.1.7 includes Cargo.lock #22

tamird opened this issue Dec 15, 2021 · 5 comments · May be fixed by #30

Comments

@tamird
Copy link
Contributor

tamird commented Dec 15, 2021

If you’re building a non-end product, such as a rust library that other rust packages will depend on, put Cargo.lock in your .gitignore.

https://doc.rust-lang.org/cargo/guide/cargo-toml-vs-cargo-lock.html

Your gitignore looks correct, but the latest release includes Cargo.lock, and it should not.

@stevedonovan
Copy link
Owner

I was puzzled, so I found this discussion on stackoverfow:

https://stackoverflow.com/questions/62861623/should-cargo-lock-be-committed-when-the-crate-is-both-a-rust-library-and-an-exec

A library is not only used by the library developers, but also any downstream consumers of the library. Users dependent on the library will not inspect the library’s Cargo.lock (even if it exists). This is precisely because a library should not be deterministically recompiled for all users of the library.

For binaries, true, not for libraries. Want to give the build system flexibility on what exact dependencies to provide, that still satisfy semver.

@stevedonovan
Copy link
Owner

@tamird I appreciate your work here - I have work responsibilities and (for the moment) I am no longer a professional Rust developer (we do what we have to do, at the time). So I am open to new ideas on this crate, as long as it fits that idea of 'few dependencies' and focus on parsing. Although English is a very strange language and trying to parse time expressions reliably with good diagnostics is not easy. I think , making it friendlier (explaining errors) and stricter (do not let ambiguous expressions get parsed) is the way forward.

@tamird
Copy link
Contributor Author

tamird commented Dec 16, 2021

@stevedonovan I'm happy to help maintain the crate, if that's what you're asking.

Regarding further ideas: can you say more? This issue is just about publishing a release that does not include Cargo.lock.

@stevedonovan
Copy link
Owner

Well, I checked my .gitignore, and it definitely has Cargo.lock in it, so we should be fine.

I would appreciate some help, yes @tamird .

@tamird
Copy link
Contributor Author

tamird commented Dec 16, 2021

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

Successfully merging a pull request may close this issue.

2 participants