lib: aliased options don't provide their options via getSubOptions
#355488
Labels
0.kind: bug
Something is broken
getSubOptions
#355488
Context
type.getSubOptions
is a reliable way to access the options that a submodule provides. Here's an example of its usage within a repl environment:nixd
relies on this function for providing completions for submodules.Example
lib
provides a functionmkAliasOptionModule
. I personally use this within my configuration to give quick access to home-manager settings (aliasinghome-manager.users.MYUSERNAME
tohm
. However, the buggy behavior comes from any alias, so I'll use the example of aliasingenvironment
toenv
.This alias could be created like this:
This works, and now this would be a valid use of the option:
The issue
When inspecting this alias via the repl,
getSubOptions
does not work as expected.:The Nixd completions should show something like this:
But instead, they show this:
I don't believe this is a fault of Nixd, but instead a fault of
mkAliasOptionModule
.getSubOptions
provides a unified experience in every other case, so it should be expected that it works the same for an aliased option.Additional context
See nix-community/nixd#615 where I first brought this issue up, and was recommended to create an issue here.
Add a 👍 reaction to issues you find important.
The text was updated successfully, but these errors were encountered: