den icon indicating copy to clipboard operation
den copied to clipboard

BUG: Nested included aspects not work in mutual provider

Open HPCesia opened this issue 7 months ago • 4 comments

Description

Reproduction with bogus:

# modules/bug.nix
{ denTest, ... }:
{
  flake.tests.bogus = {
    test-something = denTest (
      {
        den,
        lib,
        igloo, # igloo = nixosConfigurations.igloo.config
        tuxHm, # tuxHm = igloo.home-manager.users.tux
        ...
      }:
      {
        den.ctx.user.includes = [ den._.mutual-provider ];

        # replace <system> if you are reporting a bug in MacOS
        den.hosts.x86_64-linux.igloo.users.tux = { };

        # do something for testing
        den.aspects.tux.provides.to-hosts.includes = [
          (
            { host, ... }:
            {
              includes = [
                den.aspects.test
                # den.aspects.test._.nested # This will pass test
              ];
            }
          )
        ];

        den.aspects.test.includes = [ den.aspects.test._.nested ];
        den.aspects.test.provides.nested.nixos.programs.git.enable = true;

        expr = igloo.programs.git.enable;
        expected = true;
      }
    );
  };
}

And check failed:

$ nix flake check
warning: unknown flake output 'tests'
error: builder for '/nix/store/crgn2g1grj1d79cb0n2irv5jhmwwvpr3-nix-unit-check.drv' failed with exit code 1;
       last 25 log lines:
       >   → 'path:/nix/store/5h04w3j11yh4g8yqaglmr0kyn8mpqn9k-source?lastModified=1&narHash=sha256-q4WXIX2E3w9Ld3MZ1Pl8Lh5SgrEFdEuzvY1Lj/Wo2kY%3D' (1970-01-01)
       > • Updated input 'flake-parts':
       >     'github:hercules-ci/flake-parts/57928607ea566b5db3ad13af0e57e921e6b12381?narHash=sha256-AnYjnFWgS49RlqX7LrC4uA%2BsCCDBj0Ry/WOJ5XWAsa0%3D' (2026-02-02)
       >   → 'path:/nix/store/j5qcw5x2dm0jlffwwymp6yav62l3pdqm-source?lastModified=1&narHash=sha256-AnYjnFWgS49RlqX7LrC4uA%2BsCCDBj0Ry/WOJ5XWAsa0%3D' (1970-01-01)
       > • Updated input 'home-manager':
       >     'github:nix-community/home-manager/0acbd1180697de56724821184ad2c3e6e7202cd7?narHash=sha256-DYS4jIRpRoKOzJjnR/QqEd/MlT4OZZpt8CrBLv%2BcjsE%3D' (2026-02-11)
       >   → 'path:/nix/store/jxpkipflszwa627rb4fj3h2qph6b7f98-source?lastModified=1&narHash=sha256-DYS4jIRpRoKOzJjnR/QqEd/MlT4OZZpt8CrBLv%2BcjsE%3D' (1970-01-01)
       > • Updated input 'import-tree':
       >     'github:vic/import-tree/3c23749d8013ec6daa1d7255057590e9ca726646?narHash=sha256-ZvYKbFib3AEwiNMLsejb/CWs/OL/srFQ8AogkebEPF0%3D' (2025-11-21)
       >   → 'path:/nix/store/057vv882g8mc42r5p8212v0k9vzh1im5-source?lastModified=1&narHash=sha256-ZvYKbFib3AEwiNMLsejb/CWs/OL/srFQ8AogkebEPF0%3D' (1970-01-01)
       > • Updated input 'nix-unit':
       >     'github:nix-community/nix-unit/1c9ab50554eed0b768f9e5b6f646d63c9673f0f7?narHash=sha256-hRADkHjNt41%2BJUHw2EiSkMaL4owL83g5ZppjYUdF/Dc%3D' (2025-11-10)
       >   → 'path:/nix/store/dvh4lxrh9j6n9n6fphwp4mbdpjvvk205-source?lastModified=1&narHash=sha256-hRADkHjNt41%2BJUHw2EiSkMaL4owL83g5ZppjYUdF/Dc%3D' (1970-01-01)
       > • Updated input 'nixpkgs':
       >     'https://releases.nixos.org/nixos/unstable/nixos-26.05pre980183.4bd9165a9165/nixexprs.tar.xz?narHash=sha256-Gk2T0tDDDAs319hp/ak%2BbAIUG5bPMvnNEjPV8CS86Fg%3D' (2026-04-14)
       >   → 'path:/nix/store/m9k87k3yi7z8mmrnvnyajqc28i0mqgg2-source?lastModified=0&narHash=sha256-Gk2T0tDDDAs319hp/ak%2BbAIUG5bPMvnNEjPV8CS86Fg%3D' (1970-01-01)
       > unpacking 'https://github.com/vic/nix-effects/archive/592d18521b2f12c23c3f2d189bba5b752ef0c4c4.zip' into the Git cache...
       > ❌ system-agnostic.bogus.test-something
       > /build/nix-8-2634737027/expected.nix --- Nix
       > 1 false                      1 true
       >
       >
       >
       > 😢 0/1 successful
       > error: Tests failed
       For full logs, run:
              nix log /nix/store/crgn2g1grj1d79cb0n2irv5jhmwwvpr3-nix-unit-check.drv

HPCesia avatar Apr 27 '26 09:04 HPCesia

Hello,

The Den project is currently undergoing a major refactoring, and the main developers are working hard on a complete rewrite of Den’s core. You can follow their work here: https://github.com/denful/den/pull/475.

To help with this effort, could you please test whether this bug still occurs on the upcoming feat/fx-pipeline branch?

Thanks!

drupol avatar Apr 27 '26 09:04 drupol

Hello,

The Den project is currently undergoing a major refactoring, and the main developers are working hard on a complete rewrite of Den’s core. You can follow their work here: #475.

To help with this effort, could you please test whether this bug still occurs on the upcoming feat/fx-pipeline branch?

Thanks!

This bug not occurs on feat/fx-pipeline branch. Should I close this issue?

HPCesia avatar Apr 27 '26 09:04 HPCesia

Perhaps it would be better to keep it open until it gets merged in main branch ?

drupol avatar Apr 27 '26 09:04 drupol

feat/fx-pipeline is now merged, re-open if this reproduces again

sini avatar May 09 '26 14:05 sini