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

Move comments to the code #38

Open
teto opened this issue Mar 10, 2024 · 1 comment
Open

Move comments to the code #38

teto opened this issue Mar 10, 2024 · 1 comment

Comments

@teto
Copy link

teto commented Mar 10, 2024

I feel similarly to https://discourse.nixos.org/t/haumea-filesystem-based-module-system-for-nix/26902/15, aka I have trouble making sense of the documentation. I find the readme great but the git book useless.
I had to look at @figsoda 's dotfiles to see how to use it.

I cloned the repo to get a better understanding and was surprised to see that the comments exist in the doc book but not in the code. Moving the doc to src/load.nix the doc for the load function with what it expects as input would help greatly IMO.

@teto
Copy link
Author

teto commented Mar 27, 2024

while I like the idea of the project I find that it generates obscure error messages and it's hard to track down where it goes wrong: for instance

unionOfDisjoint: collision on programs; complete list: programs

       … while calling 'pushDownProperties'
         at /nix/store/5w6rhfakgdj3ydq7h0divdrxa7x0hr1b-source/lib/modules.nix:876:24:
          875|   */
          876|   pushDownProperties = cfg:
             |                        ^
          877|     if cfg._type or "" == "merge" then

       … from call site
         at /nix/store/5w6rhfakgdj3ydq7h0divdrxa7x0hr1b-source/lib/modules.nix:877:8:
          876|   pushDownProperties = cfg:
          877|     if cfg._type or "" == "merge" then
             |        ^
          878|       concatMap pushDownProperties cfg.contents

       … while calling anonymous lambda
         at /nix/store/5w6rhfakgdj3ydq7h0divdrxa7x0hr1b-source/lib/attrsets.nix:1197:39:
         1196|       collisions = lib.concatStringsSep " " (builtins.attrNames intersection);
         1197|       mask = builtins.mapAttrs (name: value: builtins.throw
             |                                       ^
         1198|         "unionOfDisjoint: collision on ${name}; complete list: ${collisions}")

       error: unionOfDisjoint: collision on programs; complete list: programs

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

No branches or pull requests

1 participant