Skip to content

feat(core): add den.lib.strict for disabling freeform types - #428

Merged
DylanRJohnston merged 8 commits into
denful:mainfrom
DylanRJohnston:dylan.johnston/strict-mode
Apr 13, 2026
Merged

DylanRJohnston merged 8 commits into
denful:mainfrom
DylanRJohnston:dylan.johnston/strict-mode

Conversation

@DylanRJohnston

Copy link
Copy Markdown
Collaborator

Summary

Adds new a new lib module den.lib.strict which when imported into a submodule type (usually via den.schema) disables the freeform type which is prone to subtle bugs with scoping and mistyping problems.

It works out of the box with den.schema.host and den.schema.user, but the types of aspects and flake didn't import a schema type so I added those too.

I've also added support for asserting errors with denTest

Comment thread nix/lib/aspects/types.nix Resolved
Comment thread nix/lib/strict.nix Resolved
Comment thread nix/lib/types.nix Resolved
Comment thread nix/denTest.nix Resolved
Comment thread nix/denTest.nix Resolved
Comment thread nix/flakeOutputs.nix Resolved
Comment thread nix/flakeOutputs.nix Resolved
Comment thread nix/flakeOutputs.nix Resolved
@DylanRJohnston DylanRJohnston changed the title [WIP] feat(core): add den.lib.strict for disabling freeform types feat(core): add den.lib.strict for disabling freeform types Apr 10, 2026
@vic

vic commented Apr 10, 2026

Copy link
Copy Markdown
Member

Wow! Absolute wonderful work, @DylanRJohnston. Please continue with this. Changes make sense to me.

@sini

sini commented Apr 12, 2026

Copy link
Copy Markdown
Collaborator

I, too, like this.

Comment thread modules/options.nix Resolved
Comment thread nix/lib/strict.nix Resolved
@DylanRJohnston
DylanRJohnston marked this pull request as ready for review April 13, 2026 03:28
@DylanRJohnston
DylanRJohnston requested review from theutz and vic April 13, 2026 03:29
@DylanRJohnston
DylanRJohnston force-pushed the dylan.johnston/strict-mode branch from 8d60a0e to abc83c6 Compare April 13, 2026 03:40
@vic vic added allow-ci allow all CI integration tests merge-approved Approved, merge yourself when ready labels Apr 13, 2026

@vic vic left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

feel free to merge on succeed

@DylanRJohnston
DylanRJohnston merged commit 2c16b8c into denful:main Apr 13, 2026
40 of 48 checks passed
@DylanRJohnston
DylanRJohnston deleted the dylan.johnston/strict-mode branch April 13, 2026 06:46
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 merge-approved Approved, merge yourself when ready

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants