-
Notifications
You must be signed in to change notification settings - Fork 14
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
Pre-release naming convention #261
Comments
@Stargateur Hi! Thank for looking so deep into this! Let me explain why we do this, and then maybe you will find that approach feasible. Or if not, let's discuss the best approach here. So, our goal is to be able to quickly switch to a version of a
e.g. the following orders are all OK for us, since
or
or even
Does that make sense? Is it a problem that we flood crates.io with a lot of releases? If yes, then how can we be more ecological RE rust infrastructure? Thanks again for starting this discussion! This matters a lot. |
Make more sense. Are you aware you can do
I have no idea what is the policy of crates.io about this. I think they may not like that. To be clear I'm not related to crates.io staff and do not speak for them. |
Yeah, I know about git dependencies, but for this specific crate, we have to build it and release because it is distributed as a |
Sorry, I'm not aware of wasm technology for Rust yet, I don't understand cause crates.io will simply host source file like a git repository, so write |
Yeah sure. So take a look at this step https://github.com/fluencelabs/aquavm/blob/master/.github/workflows/publish_interpreter.yml#L116-L118 It compiles Rust code, and produces a We distribute that .wasm file to crates.io and npmjs.org so that fluencelabs/fluence and fluencelabs/fluence-js projects can use it and run on their built-in WASM runtimes. It is meant to be distributed as a binary so that both cloud Fluence peer and browser Fluence peer run the very same binary. |
Pardon me If I said ask stupid question, do you think you could make your I think none restriction on the doc for crates.io rules. It's only say:
I think it's allowed to upload binary if needed like a dependence. And since there is no limit to version number you are currently fine. If you want you could reach Carol she often answer quickly on discord. But I think if you can make build.rs build the file instead it would be better. That the first time I see a project do what you do. Fun fact I discover your project making stats on pre-release tag usage for a RFC I work and was surprise that a crates has so many unique pre-release tag. |
That's a good question, actually. We've been considering such a design, but there are few considerations that drew us to the current approach:
|
|
Our tool basically does
That's a good point, yeah.
We build |
The naming convention of this crate can be non obvious to user of SemVer 2.0. Indeed your use of pre-release tag will lead https://crates.io/crates/air-interpreter-wasm/versions order to differ than https://crates.io/crates/air-interpreter-wasm/versions?sort=semver in a way you may not expect. For example, I take only 0.24.0 pre-release:
precedence rule, what Cargo do to order them, from higher to lower:
0.24.0-update-readme.9
0.24.0-update-readme.8
0.24.0-update-readme.7
0.24.0-update-readme.6
0.24.0-update-readme.5
0.24.0-update-readme.4
0.24.0-update-readme.3
0.24.0-update-readme.2
0.24.0-update-readme.1
0.24.0-update-readme.0
0.24.0-update-faas-again.0
0.24.0-update-faas.1
0.24.0-update-faas.0
0.24.0-ttl-in-js.0
0.24.0-misc-add-developer-notes.1
0.24.0-misc-add-developer-notes.0
0.24.0-hotfix.0
0.24.0-feat-improve-scope-error-handling.0
0.24.0-feat-252-add-support-of-ttl.0
and date order more recent to more old
0.24.0-update-readme.9
0.24.0-update-readme.8
0.24.0-update-readme.7
0.24.0-update-readme.6
0.24.0-update-readme.5
0.24.0-update-readme.4
0.24.0-update-readme.3
0.24.0-update-readme.2
0.24.0-update-readme.1
0.24.0-update-readme.0
0.24.0-update-faas-again.0
0.24.0-hotfix.0
0.24.0-update-faas.1
0.24.0-update-faas.0
0.24.0-ttl-in-js.0
0.24.0-misc-add-developer-notes.1
0.24.0-misc-add-developer-notes.0
0.24.0-feat-improve-scope-error-handling.0
0.24.0-feat-252-add-support-of-ttl.0
As you can see their differ. You must be aware that most use case of pre-release will not work with your system. I would strongly advice you to not use descriptive identifier separator as first identifier of a pre-release:
0.24.0-update-readme.2
should be0.24.0-rc.2.update_readme
,0.24.0-update-faas.0
should be0.24.0-rc.3.update_faas
, etc... notice that if you want your pre-release to be logically considerate breaking change you should do0.24.0-hotfix.0
=>0.24.0-rc3.hotfix.0
. The first identifier of a pre-release tag is often considerate as PREMAJOR like.Thus I would still recommand to reduce your usage of pre-release, I'm not sure "update-readme" make a lot of sense for a programming user of your crate. Most other Rust crate use
alpha.0
,beta.0
,beta.1
orrc0.0
,rc1.0
orrc1.1
convention. And your version page in crates.io are already very long to load. You release a LOT of version. It's unexpected any user will be able to follow this.The text was updated successfully, but these errors were encountered: