-
-
Notifications
You must be signed in to change notification settings - Fork 13.9k
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/modules: add attrArgName
#177576
lib/modules: add attrArgName
#177576
Conversation
ee992e1
to
d06f5fa
Compare
I don't like this fix. The fact that a duplicate definition error occurs is an implementation detail, so it shouldn't have a user-facing fix. However, the capability of being able to specify the attribute name for "name" seems useful in itself. In fact, this is very similar to this PR and relates to that discussion: #97378 (comment) |
I think I framed this solution wrong. The root of the problem is that it's currently impossible to differentiate the This PR isn't so much about solving the error message, as it is about being able to differentiate those names and use both their values in the resulting nested submodules.
I agree. Renaming or qualifying the I did think about your
|
Not terrible, not great, but not needed, so closing. Fwiw, I also looked into making So if
for all "type contexts" A type context would be the same as, or convertible to module args. This also enables currying; perhaps a working principled behind an alternative solution to #97378
We can now also give descriptive types to other functions:
I would really like such semantics to back the feature and it seems quite feasible to implement it. However, I'm dealing with plenty of more practical matters now, so I'll close it. |
Description of changes
Make the
name
module parameter configurable, so thatextendModules
/moduleType
can be reused as a submodule type more than once, and so that the parameter can be domain-specific.Closes #177564.
Things done
sandbox = true
set innix.conf
? (See Nix manual)nix-shell -p nixpkgs-review --run "nixpkgs-review rev HEAD"
. Note: all changes have to be committed, also see nixpkgs-review usage./result/bin/
)nixos/doc/manual/md-to-db.sh
to update generated release notes