Conversation
d035c0d to
945a241
Compare
Member
|
thanks, LGTM but just needs a rebase |
945a241 to
a22d6c4
Compare
Contributor
Author
|
Rebased |
zimbatm
reviewed
Jan 16, 2024
modules/modules-docs.nix
Outdated
| # TODO: handle opt.relatedPackages. What is it for? | ||
| optToMd = opt: | ||
| let heading = lib.showOption opt.loc; in | ||
| let heading = (lib.showOption (filter isString opt.loc)) + (concatStrings (filter (x: !(isString x)) opt.loc)); in |
Member
There was a problem hiding this comment.
nit: the surrounding parenthesis is not needed
Comment on lines
+46
to
+48
| ```console | ||
| (package or string convertible to it) or (list with two elements of types: [ string (package or string convertible to it) ]) or (flatOptions) | ||
| ``` |
Member
There was a problem hiding this comment.
For flake-parts users, this mix of types would make it hard to merge commands coming from different places. I would rather keep either the list, or the attrset of commands, but not both.
Let's keep things simple.
Contributor
Author
There was a problem hiding this comment.
flake-parts
I had no problems with flake-parts. See repro. May require nix flake update.
type of commands
I couldn't invent a new option name so I made commands either a list or an attrset.
I prefer attrsets with attrNames as command group names.
I think it should be the first-class feature and should be documented and type checked.
So, I see these approaches:
- Allow
commandsonly as anattrset - Create a new option for commands as an attrset, leave commands as a
list- What should be the name?
- Allow
commandsto be either alistor anattrset, do something about merging lists and attrsets for flake-parts users.- What in particular can make it hard to merge?
- I need a concrete example of a devshell setup with flake-parts
- I find it nice to have a simpler representation that can be used to explain the nested options.
- Provide just a function that converts a
commandsattrset to a list- I don't like this idea because then
commandsattrset won't be the first-class feature and can't naturally go into docs.
- I don't like this idea because then
a22d6c4 to
4b4d7ca
Compare
4b4d7ca to
ffa33c6
Compare
Contributor
Author
This file contains hidden or 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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.