lix-project/lix and lix-project/nixos-module flakes disagree about lix prerelease version formatting #585
Labels
No labels
Affects/CppNix
Affects/Nightly
Affects/Only nightly
Affects/Stable
Area/build-packaging
Area/cli
Area/evaluator
Area/fetching
Area/flakes
Area/language
Area/lix ci
Area/nix-eval-jobs
Area/profiles
Area/protocol
Area/releng
Area/remote-builds
Area/repl
Area/repl/debugger
Area/store
bug
Context
contributors
Context
drive-by
Context
maintainers
Context
RFD
crash 💥
Cross Compilation
devx
docs
Downstream Dependents
E/easy
E/hard
E/help wanted
E/reproducible
E/requires rearchitecture
imported
Language/Bash
Language/C++
Language/NixLang
Language/Python
Language/Rust
Needs Langver
OS/Linux
OS/macOS
performance
regression
release-blocker
stability
Status
blocked
Status
invalid
Status
postponed
Status
wontfix
testing
testing/flakey
Topic/Large Scale Installations
ux
No milestone
No project
No assignees
2 participants
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference: lix-project/lix#585
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Describe the bug
The lix-project/lix flake produces a package with a version formatted like
2.92.0-devpre20241120_66f6dbd
. Meanwhile the lix-project/nixos-module flake configures the package to have a version formatted like2.92.0-dev-pre20241120-66f6dbd
. They're almost identical, the difference is the nixos-module one puts a dash at the start of the suffix that the lix flake doesn't. They also differ in the punctuation used to separate the git hash at the end, though that's less likely to interfere with anything.This is a problem for code that wants to do version comparisons that include prerelease versions, for example nix-darwin is using a version comparison to disable
auto-optimise-store
unless the nix package includes the relevant fix. That code is comparing against the version2.92.0-devpre20241107
, meaning it will work for anyone getting Lix from the lix flake directly, but won't work for anyone getting it from the nixos-module flake.Steps To Reproduce
Expected behavior
Both of those
nix eval
s should produce versions that are formatted the same.woooops. this should be really easy to fix though.
It should, the question is just which format to standardize on.
Hmm, here's a wrinkle:
We should probably not standardize on either format but instead change the format to start with "pre" since that's treated specially by version comparison. Here's my suggestion for a new format:
2.92.0-pre-20241120_gabc123
(wheregabc123
is the hash we're sticking on the end). We could also optionally have the lix flake append-dev
to the end (before the hash) if we want to try and identify versions from local development, ideally only doing this when built with devShell.With the optional
-dev
bit that would make the lix module emit2.92.0-pre-20241120_gabc123
and the lix flake emit2.92.0-pre-20241120-dev_gabc123
. The idea of putting-dev
there is that it shouldn't interfere with version comparisons.I think this means changing the
version.json
file to list the version as"2.92.0-pre"
, but also changing both flakes to change theversionSuffix
.Seems reasonable. Feel free to submit the change and I'll stamp it.,