Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Check for dirty-files post-build #116

Merged
merged 6 commits into from
Aug 28, 2024
Merged

Check for dirty-files post-build #116

merged 6 commits into from
Aug 28, 2024

Conversation

pbrisbin
Copy link
Member

@pbrisbin pbrisbin commented Aug 27, 2024

If the .cabal or .yaml.lock files are checked into git, and the
build produces changes to them, that is an error. It means the user made
a change to package.yaml or stack.yaml and forgot to commit the
resulting change in the related file.

We'd like stack-action to catch this error when run on the PRs that
introduce it, since it's easy to miss and can result in bigger problems
later (e.g. when that lands on main and/or is released). To start,
we'll warn, but we may shift the default to error in the future.

Closes #2

If the `.cabal` or `.yaml.lock` files are checked into git, and the
build produces changes to them, that is an error. It means the user made
a change to `package.yaml` or `stack.yaml` and forgot to commit the
resulting change in the related file.

We'd like `stack-action` to catch this error when run on the PRs that
introduce it, since it's easy to miss and can result in bigger problems
later (e.g. when that lands on `main` and/or is released). To start,
we'll `warn`, but we may shift the default to `error` in the future.
Users may be choosing to not commit generated files, in which case
they'd be expected here and we should not warn (or error) about them.
@pbrisbin pbrisbin changed the title pb/check dirty Check for dirty-files post-build Aug 27, 2024
@pbrisbin pbrisbin requested a review from stackptr August 27, 2024 19:10
@pbrisbin pbrisbin marked this pull request as ready for review August 27, 2024 19:10
@pbrisbin pbrisbin merged commit 972521d into main Aug 28, 2024
20 checks passed
@pbrisbin pbrisbin deleted the pb/check-dirty branch August 28, 2024 12:46
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.

Check for cabal file update?
2 participants