-
-
Notifications
You must be signed in to change notification settings - Fork 14.5k
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
lib: add mdDoc back in to provide proper warning; set explicit timeline for removal #304277
Conversation
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 think this is directionally the right way to deprecate a symbol from lib
. There's a whole file of these in lib/deprecated.nix
. I wonder how to make this one not just be a one-off.
Does that mean we should move the impl from |
I think so? After that, pulling that impl into options.nix through Personally I'm fine to merge as-is, just putting the thought out there about the general "how do things in |
That's fair. https://github.com/search?q=lang%3Anix+%22lib.options.mdDoc%22&type=code |
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.
OK, this PR:
- Moves the deprecation warning from
lib/options.nix
tolib/deprecated.nix
. - Re-introduces the symbol
mdDoc
exported fromlib
. - Removes the symbol from
lib.options
.
The final step is the only one that I think might want to be changed, by adding a inherit (lib.misc) mdDoc
in lib/options.nix
. But I'm fine if it doesn't.
Done, added a comment there as well. |
I've done many |
Okay, thanks for the note; I'll just drop the last commit then. |
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 still wonder about a coherent deprecation policy for lib
. As originally noted, I'm fine deprecating in place.
Can't quite remove it anytime soon, but this should help: |
This is all I could find after co-maintaining lib for a long time. I've had the fortune of basically not really noticing this file, because it has had very few interactions until the confusion in #304277 It seems to be a state of limbo, which would be nice to resolve (with great care), but this is not urgent, and first we should document its status.
This is all I could find after co-maintaining lib for a long time. I've had the fortune of basically not really noticing this file, because it has had very few interactions until the confusion in NixOS/nixpkgs#304277 It seems to be a state of limbo, which would be nice to resolve (with great care), but this is not urgent, and first we should document its status.
This is all I could find after co-maintaining lib for a long time. I've had the fortune of basically not really noticing this file, because it has had very few interactions until the confusion in NixOS/nixpkgs#304277 It seems to be a state of limbo, which would be nice to resolve (with great care), but this is not urgent, and first we should document its status.
Given that the explicit timeline ( The only consumer of |
Description of changes
Ref. #300735 (comment)
Most uses of
mdDoc
would be vialib.mdDoc
, notlib.options.mdDoc
, so we want to keeplib.mdDoc
available for consumers to actually receive a useful warning and have enough time to remove usages.Also, we should provide an explicit timeline for full removal, which I've done in the warning message.
Things done
nix.conf
? (See Nix manual)sandbox = relaxed
sandbox = true
nix-shell -p nixpkgs-review --run "nixpkgs-review rev HEAD"
. Note: all changes have to be committed, also see nixpkgs-review usage./result/bin/
)Add a 👍 reaction to pull requests you find important.