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
[RFC] Add lifecycle stages to nixpkgs #22096
Conversation
I like it, but hard 👎 on actually preventing evaluation. |
We could try to get some logging primitive into nix (see NixOS/nix#1197) |
You could block evaluation by default but have it allowed with setting some option |
I don't like Nix evaluation to print huge messages (or in fact any messages) because these end up spamming my console every time I run a Nix command. (In fact, commands like As to the implementation, why not just put the check in It may also be more appropriate to put the check in the NixOS evaluation (where we already have an |
I also disagree with aborting evaluation of and old release, but warning people about it is great! |
@edolstra I can be on board with not Nix evals printing messages. Wouldn't moving it to default.nix do the same thing? Do you have a different suggestion on how to get the word out? Example: we could make nixos-rebuild itself do this. |
bcea685
to
063f7a8
Compare
I've looked into the (which is followed by many pages of build output) I do like the suggestion to put it in the nixos module system. |
This reverts commit 766adc0ab7b71920775bcb4cf85e59be8d2accc6.
063f7a8
to
cc749df
Compare
The previous few commits implement a new approach. The warnings are now collected into both a I've added the We probably should make |
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.
LGTM, can you show an example of what this looks like during a rebuild?
I also wonder what it'll take to backport this to ancient versions of NixOS, but this isn't any reason to not do this.
in the root of the git repository. | ||
</para> | ||
<para> | ||
Wether or not the old stable should be marked deprecated or unsupported depends on |
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.
Whether
</para> | ||
<para> | ||
Wether or not the old stable should be marked deprecated or unsupported depends on | ||
which commitments the security team is willing to make. |
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.
👍
One suggestion I have, is that any message which tells the user that something is wrong should also provide enough information such that the user can fix the issue such as a link to some documentation. |
Each NixOS branch will have a .version-state.nix file, which will have an attribute "state" that is either set to "supported", "deprecated" or "unsupported". If the state is not equal to "supported", a warning will be generated. Optionally, it can include a "description" attribute that can be used to communicate to the end user. E.g. how to upgrade to the newer release.
@nbp a very valid point. I've incorporated that. I'll split the PR in two separate ones; one containing the NixOS state part, and the other will contain the change in reporting warnings. |
Ah, I guess then I can scrap the code I started writing a few days ago. :) |
This morning, we chatted a bit in the IRC channel about how we could inform users that the channel that they are using is out of date. @grahamc offered to maintain 16.09 one more month after 17.03 is released, to provide some time for people to upgrade to the new stable release, before it becomes unsupported.
Adding lifecycles to nixpkgs
The idea is that a
nix-channel
evolves over time:It is branched of master, undergoes stabilization after which it will be maintained until
$NEXT_RELEASE_DATE
. Then it becomes deprecated for one month (whilst we still maintain it). After$NEXT_RELEASE_DATE + 1 month
it will be unsupported.Once a channel becomes
deprecated
, users should be shown a warning telling them to upgrade, and inform them when the channel will become unsupported.Once a channel is unsupported, evaluation should be prevented by an
builtins.abort
. The abort message should include pointers on how to get the latest version of that release working.I understand that aborting is quite a heavy tool to use. I'm open to alternative suggestions. My main problem with
builtins.trace
is that it's quite hard to discover when you go for a cup of coffee and don't bother to scroll back up to the nix evaluation part.