Repository navigation
fix(ci): close the partial/covering escape; a failed rev-parse fails the Agda receipt #520
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
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -134,6 +134,20 @@ jobs: | |
| exit 1 | ||
| fi | ||
|
|
||
| - name: No partial or covering escape in the ABI | ||
| # %default total is only a default: a `partial` or `covering` annotation, or | ||
| # a module-wide `%default partial|covering`, turns the totality check off for | ||
| # what follows and the package still builds. Runs on every event: cheap. | ||
| run: | | ||
| set -euo pipefail | ||
| hits=$({ grep -rnE '^[[:space:]]*(partial|covering)\b|^%default[[:space:]]+(partial|covering)\b' src/abi/ --include="*.idr" || true; }) | ||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Because this grep scans raw source, a valid Idris block comment containing a line whose prose begins with Useful? React with 👍 / 👎. |
||
| if [ -n "$hits" ]; then | ||
| printf '%s\n' "$hits" | ||
| echo "::error::src/abi/ declares a partial or covering definition or default" | ||
| exit 1 | ||
| fi | ||
| echo "no partial or covering escape under src/abi/" | ||
|
|
||
| - name: Count modules and report | ||
| if: steps.detect.outputs.relevant == 'true' | ||
| run: | | ||
|
|
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
%defaultescape directivesWhen
%default partialor%default coveringis nested under an indented construct such asnamespace N, the second regex alternative does not match because it requires%defaultat column zero. A module can therefore retain the required top-level%default total, add%default partialbefore a divergent definition, and still pass this gate; the identical regex in.github/workflows/idris2-abi-ci.ymlhas the same bypass. Allow leading whitespace before%defaultin both checks.Useful? React with 👍 / 👎.