Skip to content
New issue

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

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

Already on GitHub? # to your account

[🐛 | Bug]: Releaser incorrectly uses +dev when bumping version instead of .dev #9797

Open
touilleMan opened this issue Feb 24, 2025 · 2 comments
Labels
B-Triage Blocker: The issue is awaiting triage C-Bug Issue related to a bug

Comments

@touilleMan
Copy link
Member

Parsec version tested on:

master

Platforms tested on:

Any

Bug description:

$ python ./misc/releaser.py build --version 3.3.0-rc.12
Traceback (most recent call last):
  File "/home/emmanuel/projects/parsec-cloud/./misc/releaser.py", line 1088, in <module>
    args.func(args)
  File "/home/emmanuel/projects/parsec-cloud/./misc/releaser.py", line 773, in build_main
    raise ReleaseError(
ReleaseError: Current version is greater or equal that the new version (3.3.0-rc.12+dev >= 3.3.0-rc.12).
If you want to create a new release using the current version, use the `--current` flag instead of `--version <VERSION>`.

We used to rely on a custom semantic for versioning where X.Y.Z+dev means "the development version following the release of version X.Y.Z"
However we now follow PEP440 semantic where everything after a + sign correspond to the local part (e.g. 1.0.1+ubuntu.1), so X.Y.Z+dev now means "version X.Y.Z build for dev local"

In a nutshell, we should replace +dev by .dev

Relevant output:

No response

@touilleMan touilleMan added B-Triage Blocker: The issue is awaiting triage C-Bug Issue related to a bug labels Feb 24, 2025
@FirelightFlagboy
Copy link
Contributor

FirelightFlagboy commented Feb 24, 2025

We are more following semver that pep440 (because only python follow that semantic and is not supported by other tools that use semver instead like rust, npm, docker).

We found a middle ground where we can have a version that is compatible between semver and pep440 by putting dev in the build metadata instead of the pre-release part and having new version start at alpha.0 stage.

Using dev in the pre-release part would cause issues with ordering semver version for alpha , beta & dev versions causing the following 1.0.0-alpha.1 < 1.0.0-beta.1 < 1.0.0-dev.1

That also allow us to release dev version of release-candidate in the nightly build:

Nightly build of 3.3.0-rc.12.dev.xxxx

That nightly release as the following version 3.3.0-rc.12.dev.20142+f0a3e31 with the PEP440 formatted version 3.3.0rc12.dev20142+f0a3e31

@mmmarcos
Copy link
Contributor

See also:

### Why do we use the `dev` identifier for a nightly build ?
We need to have a version that is compatible with [semver] and [pep440], that indicate that it's a nightly build.
On [semver], we could use any verb like `nightly`, so the choice come from [pep440].
Pep440 only allows the verb `dev` at the end of the version before the local identifiers ([Specify a development release in pep440])
[semver]: https://semver.org/
[pep440]: https://peps.python.org/pep-0440/
[Specify a development release in pep440]: https://peps.python.org/pep-0440/#developmental-releases

# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
B-Triage Blocker: The issue is awaiting triage C-Bug Issue related to a bug
Projects
None yet
Development

No branches or pull requests

3 participants