fix(filegen): Stop committing the activation manifest#32
Closed
nikzen wants to merge 1 commit into
Closed
Conversation
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>
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. |
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
.config/filegen-manifest.jsonrecorded absolute/nix/store/<hash>-…source paths, which differ per system (e.g.x86_64-linuxin CI vsaarch64-darwinlocally). Committing it causedprek --all-filesto 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:
.config/filegen-manifest.jsonand add it to.gitignore.gitattributes.pre-commit-config.yaml, the workflow,.gitattributes) stay committed and stableSolved without introducing IFD, so consumer
nix flake show/checkis unaffected.Test plan
nix develop .#standards --command prek --all-filespasses all hooks (incl.filegen) on aarch64-darwinnixfmt-rfc-style --check nix/modules/filegen.nixMade with Cursor