fix(cli): map SemVer prereleases to legal native package versions - #5797
Open
nikuda wants to merge 5 commits into
Open
fix(cli): map SemVer prereleases to legal native package versions#5797nikuda wants to merge 5 commits into
nikuda wants to merge 5 commits into
Conversation
VIProductVersion still uses the numeric projection; filenames and version string keys keep the raw Cargo version so prereleases stay distinct.
Explicit [bundle.windows.wix] version still strips prerelease suffixes, but build metadata is rejected so the field stays major.minor.patch[.build]. Cargo SemVer continues to go through wix().
Validate components against u8::MAX / u16::MAX instead of a WiX-only index table so NSIS can accept 256.x.x and reject 16-bit overflow.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Dioxus passes the Cargo package version directly to
rpm::PackageBuilder. Therpmcrate validates the RPMVersionfield duringbuild()and rejects SemVer prereleases that contain-, such as1.2.3-rc.1.This projects Cargo
semver::Versionper format instead of using the raw string:1.2.3-rc.1→1.2.3~rc.1(-is illegal in RPMVersion, and in Debian without a revision;~sorts before the final release). Build metadata is dropped so it cannot invert upgrades.major.minor.patchwith MSI limits (u8/u8/u16). Explicit[bundle.windows.wix] versionstaysmajor.minor.patch[.build].VIProductVersionis numeric (u16components); installer names and version-key strings keep the raw Cargo version so prereleases stay distinct.CFBundleShortVersionString/ defaultCFBundleVersionuse the numeric core.Format-specific exports (
rpm/deb/wix/nsis/macos) share private helpers. AppImage and other unconstrained artifact names are unchanged.