feat: diff preview, structured renderers, dag template, test coverage#2
Merged
Conversation
Diff app (nix run .#diff-files) shows what the writer would change without writing. Supports --verbose for full diffs via difftastic. Structured data options on files.file: json, toml, yaml serialize Nix values directly — no pkgs.writers.* boilerplate needed.
Shows how multiple flake-parts modules can each contribute sections to a README with ordering constraints (entryBefore, entryAfter, entryBetween), then wire the dag-rendered output into files.file.
- Remove unused psArgs binding (deadnix) - Use inherit instead of assignment (statix W04) - Group repeated keys into attrsets (statix W20) - Fix dag template URL to denful/dag - Format all files with treefmt
a24f6e9 to
268ec05
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
files.diff.drv): shows what the writer would change without writing. Supports--verbosefor full diffs. Exits 1 on changes, 0 when synced. Exposed viagenerateAppasnix run .#diff-files.json,toml,yamloptions onfiles.fileserialize Nix values directly — nopkgs.writers.*boilerplate. Mutual exclusivity enforced via assertion (only one oftext/json/toml/yamlmay be set per file).templates/dag/): composing a single file from sections across multiple flake-parts modules using dag for topological ordering. Zero coupling between libraries.inherit, simplifiedifchains withor.diff.drvanddiff.exeFilenamein Other options table.Test plan
nix run .#diff-filesreports "All files up to date" when syncednix run .#diff-filesexits 1 when files are stale or missingdiff-filesandwrite-filesapps both exposed viagenerateAppflake-parts,bare-flake,dagdemo templates evaluatestatix check,deadnix,treefmt --ciall pass cleanrecursive-nix)