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

Bug | Option Documents Break Nix Build #42

Merged
merged 7 commits into from
Feb 17, 2024
Merged

Conversation

ReedClanton
Copy link
Contributor

@ReedClanton ReedClanton commented Feb 12, 2024

Description

Two issue existed with the options documentation that caused build failures when documentation.nixos.enable and documentation.nixos.includeAllModules are set to true.

The first issue was that mkDoc was used rather than lib.mdDoc in two locations. mkDoc isn't valid, so I replaced both instances of it with lib.mdDoc.

The second issue was that not all options of nix-flatpak had descriptions. This also causes a build failure.

In addition to fixing the two issues above that cause build failures, I also:

  • Fixed a typo in README.md.
  • Made minor additions and corrections to existing option docs.
  • Added spaces so option docs would be rendered correctly:
    • The way multi-line string blocks work in Nix is that the indent is determined by the line that's indented the least.
    • Thus all lines should be indented the same, even blank lines.

Why Wasn't it Noticed Sooner

By default documentation.nixos.enable is true and documentation.nixos.includeAllModules is false. The latter value used to default to true, but was changed due to build performance concerns for NixOps users. Having said that, there has been discussion of turning the default back to true for non NixOps users. If this is done, then everyone who uses this module will end up with broken system builds.

In short, I noticed first because I was the first person to use this module and set documentation.nixos.includeAllModules to true.

Currently `documentation.nixos.includeAllModules` fails because of the
two lines fixed, hopfully, by this change.
The last commit fixed a bug in the option docs, this one is testing out
a fix to the next bug encountered in the doc build.
I'm also testing out if indentation does in fact need to be consistent.
@gmodena
Copy link
Owner

gmodena commented Feb 14, 2024

Hey @ReedClanton. Thanks for this.

Could be a leftover of some early experiments with doc generation.
Annoying that it was only caught at runtime.

@gmodena
Copy link
Owner

gmodena commented Feb 15, 2024

I have not been able to reproduce (all my dev/testing systems build with documentation.nixos.includeAllModules=true).

Regardless, I like that you streamlined documentation functions. Will merge.

@ReedClanton
Copy link
Contributor Author

I have not been able to reproduce (all my dev/testing systems build with documentation.nixos.includeAllModules=true).

That's baffling. I can reproduce it on 3 machines. Given they all use the same base configuration.

@gmodena gmodena merged commit e23d1d1 into gmodena:main Feb 17, 2024
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants