-
-
Notifications
You must be signed in to change notification settings - Fork 13.7k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
This option requests compatibility with older NixOS releases with respect to stateful data, in cases where new releases have defaults that might be incompatible with system state of existing NixOS deployments. For instance, if we change the default version of PostgreSQL, existing deployments will break if the new version can't read databases created by the old version. So for example, setting system.stateVersion = "15.07"; requests that options like services.postgresql.package use defaults corresponding to the 15.07 release branch. Note that nixos-generate-config emits this option. (In the future, NixOps may set system.stateVersion to the NixOS release in use when the machine was created.) See also #7939 for another motivating example.
- Loading branch information
Showing
3 changed files
with
28 additions
and
2 deletions.
There are no files selected for viewing
This file contains 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
This file contains 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
This file contains 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
d166c85
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Maybe we shouldn't base this on year.month in case we have slippage like 15.06 -> 15.07? I suppose as long as you don't ever compare to an unreleased version things will stay consistent, it just makes it hard when you are nearing a cut off point if you want to add changes that come after the release.
d166c85
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What's the alternative?
d166c85
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Crazy idea: switch to semantic versioning instead of YEAR.MONTH?
d166c85
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Or forget the "semantic" part, just plain integers. Release 1, release 2....
d166c85
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yeah I would be okay with an integer that corresponds with the year.month or just switch to integers entirely.
Ex.
13.10 -> 1
14.04 -> 2
14.12 -> 3
15.07 -> 4
d166c85
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
But why, really? This is only a problem if you want to make something conditional on a future release. Which seems a hypothetical problem to me.
d166c85
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Plain integers (incremented whenever we do an incompatible change) are relatively simple/easy, but it isn't obvious to which date was number
X
changed. YY.MM or YY.MM.DD have the additional advantage that they can be added on the moment the change happens, i.e. if we were doing changes on master now, we could compare to 15.07 regardless of when the real release happens – just signifying the date of introduction on master (which is linearly ordered).d166c85
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I suppose either way works I just don't really want to commit to something which won't work nicely into the future. If we always use versionOlder / versionAtLeast for all comparisons then we could switch to a plain integer fairly trivially as long as it is larger than the year.