treewide: use mkTarget (batch 3)#1371
Conversation
a9c29da to
b0d8d3f
Compare
|
@MattSturgeon could you take a look? |
|
The infinite recursion here seems to be coming from setting |
I'll try to have a look a bit later |
It's a fundamental issue of having the |
b0d8d3f to
55edd69
Compare
configElements = [
(
{ fonts }:
{
xsession.windowManager.i3.config.fonts = {
names = [ fonts.sansSerif.name ];
size = fonts.size.desktop * 1.0;
};
lib.stylix.i3.bar.fonts = {
names = [ fonts.sansSerif.name ];
size = fonts.size.desktop * 1.0;
};
}
)
]I believe what makes this inf-rec (and why it wasn't before) is the fact that whether or not Nix should be able to support that kinda recursion, because In this case Caveat: this is just based on reading the diff and your comments, so I may be slightly off. Also: sorry I wasn't around to help identify the issue! Well done figuring it out. |
55edd69 to
67a3599
Compare
trueNAHO
left a comment
There was a problem hiding this comment.
The infinite recursion here seems to be coming from setting
config.lib.stylix, and it may be because setting it is based on an option inconfig.lib.stylix(colors). I'm not sure what could be done here.It's a fundamental issue of having the
config.lib.stylix.i3.bar, I'll drop i3 from this pr and look into fixing it in a separate pr.configElements = [ ( { fonts }: { xsession.windowManager.i3.config.fonts = { names = [ fonts.sansSerif.name ]; size = fonts.size.desktop * 1.0; }; lib.stylix.i3.bar.fonts = { names = [ fonts.sansSerif.name ]; size = fonts.size.desktop * 1.0; }; } ) ]I believe what makes this inf-rec (and why it wasn't before) is the fact that whether or not
lib.stylix.i3.bar.fonts.{name,size}are defined is now predicated on whetherlib.stylix.fontsis non-null.Nix should be able to support that kinda recursion, because
lib.stylix.i3should be able to depend onlib.stylix.fontslazily, however sometimes module-systemtypesintroduce additional strictness (i.e., the opposite of laziness).In this case
config.libis typelib.types.attrs, which likelib.types.attrsOfmay be strict. IIRC this is the reasonlib.types.lazyAttrsOfexists, however that has its own pitfalls.
Thanks for the great explanations. As always.
There have been brief discussions in the past of migrating these interfaces into readOnly options to prevent them from being undocumented outside of the brief source code comment and because it makes the code nicer.
For reference, here are the relevant rg '# Merge this with' matches:
Lines 67 to 68 in b69e9b7
stylix/modules/i3status-rust/hm.nix
Lines 3 to 4 in b69e9b7
Lines 72 to 73 in b69e9b7
It is possible that this pattern is used elsewhere without this comment.
ba19cdd to
e536830
Compare
trueNAHO
left a comment
There was a problem hiding this comment.
LGTM, except for one detail.
e536830 to
a492a7f
Compare
Co-authored-by: NAHO <90870942+trueNAHO@users.noreply.github.com>
ed4ed79 to
1117e86
Compare
Link: #1371 Reviewed-by: pancho horrillo <pancho@pancho.name> Reviewed-by: Matt Sturgeon <matt@sturgeon.me.uk> Co-authored-by: NAHO <90870942+trueNAHO@users.noreply.github.com> Reviewed-by: NAHO <90870942+trueNAHO@users.noreply.github.com> (cherry picked from commit aa5e3c0)
|
Successfully created backport PR for |
Link: #1371 Reviewed-by: pancho horrillo <pancho@pancho.name> Reviewed-by: Matt Sturgeon <matt@sturgeon.me.uk> Co-authored-by: NAHO <90870942+trueNAHO@users.noreply.github.com> Reviewed-by: NAHO <90870942+trueNAHO@users.noreply.github.com> (cherry picked from commit aa5e3c0)
Link: nix-community#1609 Fixes: aa5e3c0 ("treewide: use mkTarget (batch 3) (nix-community#1371)") Reviewed-by: awwpotato <awwpotato@voidq.com>
) Fixes: aa5e3c0 ("treewide: use mkTarget (batch 3) (nix-community#1371)") Link: nix-community#1670 Reviewed-by: NAHO <90870942+trueNAHO@users.noreply.github.com>
Things done
Notify maintainers