Skip to content

Deprecated child options appear in manual when renaming submodule #82862

@roberth

Description

@roberth

Describe the bug

When renaming a submodule, the mkRenamedOptionModule makes the child options reappear in the docs at the old location.
This did not happen before #78135 (ping @infinisil)

I've encountered the problem in the arion docs when upgrading its tooling to nixpkgs 20.03. The move is docker-compose.services -> services. The regression makes the docs start with a mountain of legacy options comprising just under half of all options.
Reverting #78135 fixes the problem.

To Reproduce
Steps to reproduce the behavior:

  1. Have an option legacy.services.<name>.enable
  2. Move legacy.services to services
  3. legacy.services.<name>.enable is in the docs, despite legacy.services.visible = false

Expected behavior

The option docs should have at most one entry per renamed option. Any suboptions should be omitted.

Screenshots
If applicable, add screenshots to help explain your problem.

Additional context
Add any other context about the problem here.

Metadata
Please run nix-shell -p nix-info --run "nix-info -m" and paste the result.

Maintainer information:

# a list of nixpkgs attributes affected by the problem
attribute: nixosOptionDoc
# a list of nixos modules affected by the problem
module: system.build.manual

Metadata

Metadata

Assignees

No one assigned

    Labels

    0.kind: bugSomething is broken0.kind: regressionSomething that worked before working no longer6.topic: module systemAbout "NixOS" module system internals6.topic: nixosIssues or PRs affecting NixOS modules, or package usability issues specific to NixOS
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions