stevedonovan / chrono-english

Converting informal English dates (like `date` command) to chrono DateTime in Rust
MIT License
57 stars 14 forks source link

Release 0.1.7 includes Cargo.lock #22

Open tamird opened 2 years ago

tamird commented 2 years ago

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 commented 2 years ago

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 commented 2 years ago

@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 commented 2 years ago

@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 commented 2 years ago

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 commented 2 years ago

Would you like to grant me access to the repository?

https://docs.github.com/en/account-and-profile/setting-up-and-managing-your-github-user-account/managing-access-to-your-personal-repositories/inviting-collaborators-to-a-personal-repository

You'll also need to allow me to publish to crates.io.

https://doc.rust-lang.org/cargo/reference/publishing.html#cargo-owner

Happy to help.