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

Infinite recursion encountered when using Stylix #502

Open
robertodr opened this issue Mar 2, 2023 · 1 comment
Open

Infinite recursion encountered when using Stylix #502

robertodr opened this issue Mar 2, 2023 · 1 comment
Labels
bug Something isn't working

Comments

@robertodr
Copy link

I've been trying to update my flake setup to use the latest version of stylix, but I keep hitting an infinite recursion:

error: infinite recursion encountered

       at /nix/store/f6jk9gi6i92ngcbkcz8z2d7gvkksciw1-source/lib/modules.nix:728:9:

          727|     in warnDeprecation opt //
          728|       { value = builtins.addErrorContext "while evaluating the option `${showOption loc}':" value;
             |         ^
          729|         inherit (res.defsFinal') highestPrio;
(use '--show-trace' to show detailed location information)

Using --show-trace doesn't help much in finding the reason unfortunately.
This is the latest revision of stylix that works for me: d7536947a7fc3f9b60ba3c8f19c2530ca00110a9. I'm using digga to structure my configuration (you can find it here) I define the theme in this file which I then import in the definition of the user

The Stylix maintainers did some investigations: danth/stylix#43 (comment) I'm not sure whether this is something that should be fixed in stylix or in digga though.

@robertodr robertodr added the bug Something isn't working label Mar 2, 2023
@dwarfmaster
Copy link

My hypothesis is that the lib argument you use in the module system comes from the pkgs argument that is created from the nixpkgs.pkgs and nixpkgs.overlays options. As such, setting nixpkgs.overlays under a mkIf that is taken from lib will always result in an infinite recursion. I think it would be better if lib wasn't included in this fixpoint, but if it isn't that would means that overlays can't extend it.

danth pushed a commit to danth/stylix that referenced this issue Mar 13, 2024
This was a workaround for divnix/digga#502, but digga is now
discontinued, and the workaround is causing a bug.

Fixes: #282
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants