BUG: Class forwarder breaks when imported from mutual provider
Reproduction: https://github.com/musjj/forward-bug
Proof of regression: https://github.com/musjj/forward-bug/actions/runs/26342181368
Description
When a class forwarder is imported from a mutual provider aspect, it will fail to forward certain classes. This is a regression from how it behaved in v0.16.0.
{ den, lib, ... }:
let
nixClass =
{ class, aspect-chain }:
den._.forward {
each = [
"nixos"
"homeManager"
];
fromClass = _: "nix";
intoClass = lib.id;
intoPath = _: [ "nix" ];
fromAspect = _: lib.head aspect-chain;
adaptArgs = lib.id;
};
in
{
den.hosts.x86_64-linux.igloo.users.tux = { };
den.default.includes = [ den._.mutual-provider ];
den.aspects.tux.provides.igloo = {
includes = [ nixClass ];
nix.settings.core = 64;
};
}
Here, nix.settings.core will be forwarded to nixos but not homeManager.
Related:
- https://github.com/denful/den/discussions/566
@musjj can you confirm this is fixed? If not, we can re-open it and explore further
Thank you, the test seems to pass but I still can't test it on my main config yet due to several other forwarding bugs. I'll try to make a reproduction of each one of them.
We can re-use this issue.
If you can help me understand the specific edge cases that would be super helpful. Sorry for the regressions.
Whoops, I've already opened an issue here: https://github.com/denful/den/issues/575
Should I copy it here and close that?
No, you're good.