Skip to content

fix: correct flake output include to flake-system schema kind - #587

Merged
sini merged 1 commit into
denful:mainfrom
sini:docs/fix-flake-output-schema-kind
Jun 1, 2026
Merged

sini merged 1 commit into
denful:mainfrom
sini:docs/fix-flake-output-schema-kind

Conversation

@sini

@sini sini commented Jun 1, 2026 •

Copy link
Copy Markdown
Collaborator

Problem

The reference page for flake outputs (docs/src/content/docs/reference/output.mdx) instructs:

den.schema.flake-packages.includes = [ den.aspects.foo ];

But flake-packages is not a registered schema kind. The registered routing kinds are flake, flake-system, flake-parts, and default. Because den.schema is a freeform lazyAttrsOf schemaEntryType, the bad kind is silently accepted and nothing ever resolves to it, so its includes are never walked. It does nothing.

This is what #586 hit. The aspect's package only appeared in nix flake show when a host happened to include the aspect, pulling it into a real instantiation path. Removing that host made the package vanish, because the documented flake-packages line was doing nothing.

Fix

Point the example at flake-system, the kind that is actually instantiated (one scope per system, via the to-systems fan-out). Aspects included there resolve at each per-system scope, and the to-packages/to-apps/to-checks/to-devShells routes, also registered on flake-system, carry the class output to the flake.

Verification

Against a minimal repro (aspect with a packages class key, no host):

  • den.schema.flake-packages.includes gives no packages output at all
  • den.schema.flake-system.includes exports hello for every system, no host required

Matches the workaround the reporter found.

Fixes #586.

The packages/checks/devShells reference example told users to write
den.schema.flake-packages.includes, but flake-packages is not a
registered schema kind. den.schema is freeform, so the entry is
silently accepted and its includes are never walked — a no-op with no
error or warning. The aspect only reached flake outputs if some host
happened to include it.

The correct kind is flake-system: aspects included there resolve at
each per-system scope, and the packages/apps/checks/devShells routes
(also registered on flake-system) carry the class output to the flake.

Fixes denful#586.
@github-actions github-actions Bot added the allow-ci allow all CI integration tests label Jun 1, 2026
@sini sini changed the title docs: correct flake output include to flake-system schema kind fix: correct flake output include to flake-system schema kind Jun 1, 2026
@sini
sini merged commit 73f2af9 into denful:main Jun 1, 2026
19 of 21 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

allow-ci allow all CI integration tests

Projects

None yet

Development

Successfully merging this pull request may close these issues.

flake-packages are not exported unless they are included.

2 participants