Skip to content
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

Document non-interaction of mkRenamedOptionModule and freeformType or attrsOf #242288

Open
roberth opened this issue Jul 8, 2023 · 0 comments
Open
Labels
6.topic: documentation Meta-discussion about documentation and its workflow 6.topic: module system About "NixOS" module system internals

Comments

@roberth
Copy link
Member

roberth commented Jul 8, 2023

          I would guess that `mkRenamedOptionModule` doesn't work because the paths involved aren't actually options. Are you referring to this?

error: evaluation aborted with the following error message: 'cannot find attribute `services.kubo.settings.Experimental.AcceleratedDHTClient''

If it's not a true option, it's not guaranteed to exist, and mkRenamedOptionModule wouldn't be designed to deal with such a situation. Maybe we should have a mkRenamedSettingModule that works for attributes that may not exist? It won't be able to remove the attribute at the old location though (something mkRenamedOptionModule can't do either). So then it may have to be mkRemovedSettingModule? That way we force the user to remove or rename it. It'd be little more than an assertion though.

cc @infinisil

Originally posted by @roberth in #241481 (comment)

@roberth roberth added 6.topic: documentation Meta-discussion about documentation and its workflow 6.topic: module system About "NixOS" module system internals labels Jul 8, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
6.topic: documentation Meta-discussion about documentation and its workflow 6.topic: module system About "NixOS" module system internals
Projects
None yet
Development

No branches or pull requests

1 participant