Open lapkowski opened 1 month ago
Thanks for the bug report and digging possible root cause!
I am thinking maybe we can just trim the prexxx
part and pass the remaining part to Version::parse()
, then we treat pre-releases just like normal nix🤔
I think semver just treats -pre* as a boolean, so it wouldn't make any diffrence, and unix.rs just uses the version string to make sure it is above 2.21 so it should be fine.
I think semver just treats -pre* as a boolean, so it wouldn't make any difference
Get it.
Erroneous Behavior
Topgrade panics when trying to update nix packages on a pre-release version of nix (in this case
2.25.0pre20240920_ca3fc169
) with the following message:Expected Behavior
Topgrade should parse the version string with the pre(..) suffix and update the packages.
Steps to reproduce
Possible Cause (Optional)
The nix --version parser passes a version string with the pre(...) suffix to Version::parse, but it needs a x.x.x-pre(...) syntax to parse properly (according to Version::parse documentation)
Problem persists without calling from topgrade
Did you run topgrade through
Remote Execution
Additional Details
Debian 12 Bookworm
Nix package manager
topgrade -V
) 16.0.0Verbose Output (
topgrade -v
)