-
-
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
nixos/doc: dedocbookify #237557
nixos/doc: dedocbookify #237557
Changes from all commits
0997ae1
7542a1a
5f35ae1
c012443
34eeac5
af1f07f
1418c98
20152b4
d36f950
f52f531
426903d
6fcb6ee
b9756b4
3e7649f
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
This file was deleted.
This file was deleted.
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -134,11 +134,6 @@ let | |
${if prefix == [] | ||
then null # unset => visible | ||
else "internal"} = true; | ||
# TODO: hidden during the markdown transition to not expose downstream | ||
# users of the docs infra to markdown if they're not ready for it. | ||
# we don't make this visible conditionally because it can impact | ||
# performance (https://github.com/NixOS/nixpkgs/pull/208407#issuecomment-1368246192) | ||
visible = false; | ||
# TODO: Change the type of this option to a submodule with a | ||
# freeformType, so that individual arguments can be documented | ||
# separately | ||
|
@@ -1146,14 +1141,11 @@ let | |
use = id; | ||
}; | ||
|
||
/* Transitional version of mkAliasOptionModule that uses MD docs. */ | ||
mkAliasOptionModuleMD = from: to: doRename { | ||
inherit from to; | ||
visible = true; | ||
warn = false; | ||
use = id; | ||
markdown = true; | ||
}; | ||
/* Transitional version of mkAliasOptionModule that uses MD docs. | ||
|
||
This function is no longer necessary and merely an alias of `mkAliasOptionModule`. | ||
*/ | ||
mkAliasOptionModuleMD = mkAliasOptionModule; | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Should Ditto for the other no-op aliases. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. that would be a bit too soon. deprecating those would require another round through the entire modules tree to remove them again, or folks would get unhelpful deprecation warnings they cannot act upon. once that's done we can deprecate them. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. There's only ~10 calls to There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. there may be uses out of tree we don't know about. keeping the alias doesn't hurt while we're not sure whether it's used anywhere else, and we'd really rather keep this pr focused on removing docbook instead of tacking on refactorings that removing docbook allows to happen. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
I wasn't suggesting removing the alias in this PR, just calling There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. we can't add loud deprecation warnings to any of these public apis before all supported nixos versions agree on what the documentation language is, otherwise we'll risk breaking out-of-tree modules, backports (official in nixpkgs and unofficial by users), and who knows what else. this applies to all functions that are now aliases or no-ops. refactorings in nixpkgs modules are less critical, but we're not going to do any. out-of-tree modules wouldn't be affected by this, but backports would be, and we're frankly sick of refactoring docs. if you want to see this done you're totally free to open a follow-up pr once this is done, but we won't be doing it. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
I think something must've been lost in translation, because my latest comment had nothing to do with deprecation. Basically just
Fair enough. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
this does turn backports of newly aliased options into a trap though because 23.05 uses a different language to render the non-MD variant text, potentially causing the docs build on 23.05 to fail as a result. the manual isn't checked by CI on stable branches, so this has the potential to create channel blockers. refactoring shouldn't come with that risk.
yes, but the point is that deprecation is a ways out still. worrying about how it might go now may not be the wisest use of resources, especially if the changes aren't even finalized yet. |
||
|
||
/* mkDerivedConfig : Option a -> (a -> Definition b) -> Definition b | ||
|
||
|
@@ -1175,7 +1167,7 @@ let | |
(opt.highestPrio or defaultOverridePriority) | ||
(f opt.value); | ||
|
||
doRename = { from, to, visible, warn, use, withPriority ? true, markdown ? false }: | ||
doRename = { from, to, visible, warn, use, withPriority ? true }: | ||
{ config, options, ... }: | ||
let | ||
fromOpt = getAttrFromPath from options; | ||
|
@@ -1186,9 +1178,7 @@ let | |
{ | ||
options = setAttrByPath from (mkOption { | ||
inherit visible; | ||
description = if markdown | ||
then lib.mdDoc "Alias of {option}`${showOption to}`." | ||
else "Alias of <option>${showOption to}</option>."; | ||
description = "Alias of {option}`${showOption to}`."; | ||
apply = x: use (toOf config); | ||
} // optionalAttrs (toType != null) { | ||
type = toType; | ||
|
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.
Home Manager is still not ready to properly render Markdown.
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.
we're a bit less inclined to hide it again this time since the issue has been known for months (and, as nix-darwin has found, disabling the docs build is sufficient to unbreak everything). if you want it hidden again we'd merge it, but we'd much prefer HM fixed its docs system :(
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'd also much prefer that, but I'm not sure exactly what needs to happen and I don't have the energy to figure it out. You made suggestions in nix-community/home-manager#3680 (comment) , do you want to try to open a MR at https://gitlab.com/rycee/nmd/ so that we can check if it resolves the breakage, now that we have a reproducer?
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.
Looks like it's been taken care of :)