-
Notifications
You must be signed in to change notification settings - Fork 112
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add module 'versioning' #247
Conversation
5851dee
to
8b1b6fb
Compare
Strong Concept ACK. I think this is pretty much the ideal fix for our release migration issues. Could we also throw alerts on new features that may interest a user who's forked off the |
home-manager implements news alerts like this. The date of the latest news that was read is stored inside In nix-bitcoin, the news items to be shown could be determined by |
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.
That's super helpful. ACK mod nit.
|
||
incompatibleChanges = optionals | ||
(version != null && versionOlder lastChange) | ||
(builtins.filter (change: versionOlder change && (change.condition or true)) changes); |
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 does this "or true" do?
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.
It returns true
if the change has no condition
attribute.
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 see. Hadn't noticed that construction before.
Needs rebase |
8b1b6fb
to
d3ece59
Compare
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.
ACK d3ece59
This PR adds option
nix-bitcoin.configVersion
to inform users about backwards-incompatible changes and to provide migration hints.Example
A notification about the recent lightning-loop update could have been implemented like this:
To see it in action, checkout this example branch and run
test/run-tests.sh eval
Example output:
Details
Note that
nix-bitcoin.configVersion
inexamples/configuration.nix
only needs tobe updated after adding new breaking changes.