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

GIT-based or "*" version #28

Open
peter-lyons-kehl opened this issue Jun 2, 2024 · 1 comment
Open

GIT-based or "*" version #28

peter-lyons-kehl opened this issue Jun 2, 2024 · 1 comment

Comments

@peter-lyons-kehl
Copy link
Contributor

https://rhai.rs/book/start/install.html#admonition-use-latest-release-version and https://rhai.rs/book/start/install.html#admonition-use-latest-development-version are unfortunate, at least.
Neither works when publishing a (depending) crate to crates.io. The GIT-based-only way is easy to spot, but the "*" is less obvious/known. However, see https://doc.rust-lang.org/nightly/cargo/reference/specifying-dependencies.html#wildcard-requirements > "Note: crates.io does not allow bare * versions.".

Even worse, top level "*" will lead to incompatible changes if (ever) there are higher major versions. And, it can currently lead to less-obvious incompatibilities (even worse, potentially in runtime, since it's scripting....) with any old crates referencing old "0.*.*" versions - but those would not be mixed up if the user would specify "1.*" or (less error-prone) "1.18.*".

Please

  1. replace "*" with (more flexible, but more incompatibility-prone) "1.*" and/or (more robust) "1.18.0" (in which case add this file to a list of tasks to do when you release a minor version), and
  2. add a note that with a GIT-only-based dependency it can't be published to crates.io.

If that sounds OK, I'm willing to provide a PR.
Thank you (indeed) for Rhai.

@schungx
Copy link
Contributor

schungx commented Jun 3, 2024

Thanks for bringing this up. We understand this. The * shortcut is for quick-n-dirty usage.

Users who publish crates will find out soon enough that they must use concrete version numbers. The shortcut is useful because not everyone publishes to crates.io if they work on a private project.

Personally I don't think it is a big deal, but you're welcome to provide a PR the puts in a caveat saying * version numbers cannot be published.

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