Skip to content

fix(filegen): Stop committing the activation manifest#32

Closed
nikzen wants to merge 1 commit into
mainfrom
fix/filegen-system-independent-manifest
Closed

fix(filegen): Stop committing the activation manifest#32
nikzen wants to merge 1 commit into
mainfrom
fix/filegen-system-independent-manifest

Conversation

@nikzen

@nikzen nikzen commented Jun 24, 2026

Copy link
Copy Markdown
Contributor

Summary

.config/filegen-manifest.json recorded absolute /nix/store/<hash>-… source paths, which differ per system (e.g. x86_64-linux in CI vs aarch64-darwin locally). Committing it caused prek --all-files to report drift on any machine other than the one that last generated it — even though the generated file contents are identical.

This treats the manifest as local activation state instead of a committed artifact:

  • Untrack .config/filegen-manifest.json and add it to .gitignore
  • Remove its self-reference from the generated .gitattributes
  • The reviewable generated files (.pre-commit-config.yaml, the workflow, .gitattributes) stay committed and stable

Solved without introducing IFD, so consumer nix flake show/check is unaffected.

Test plan

  • nix develop .#standards --command prek --all-files passes all hooks (incl. filegen) on aarch64-darwin
  • nixfmt-rfc-style --check nix/modules/filegen.nix
  • flake still evaluates

Made with Cursor

The .config/filegen-manifest.json records absolute /nix/store source
paths, which differ per system (e.g. x86_64-linux in CI vs
aarch64-darwin locally). Committing it caused `prek --all-files` to
report drift on any system other than the one that last generated it,
even though the generated file contents are identical.

Treat the manifest as local activation state: gitignore it, drop it
from tracking, and remove its self-reference from the generated
.gitattributes.

Co-authored-by: Cursor <cursoragent@cursor.com>
@tlater-famedly

Copy link
Copy Markdown
Contributor

Nah, this is not the right fix, the entire point of the file is being committed. Excluding it means the entire module is pointless. Though the motivation is understood, we'll find a fix.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants