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

Improve the error message when a file hasn't been type checked #643

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

WhatisRT
Copy link
Collaborator

Description

Just a minor wording improvement so that it becomes clear what to do when the script that checks if files have been checked fails.

Checklist

  • Commit sequence broadly makes sense and commits have useful messages
  • Any semantic changes to the specifications are documented in CHANGELOG.md
  • Code is formatted according to CONTRIBUTING.md
  • Self-reviewed the diff

@WhatisRT WhatisRT requested a review from williamdemeo January 14, 2025 14:10
Copy link
Contributor

@williamdemeo williamdemeo left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks fine, assuming my understanding of the way this script is meant to work is wrong.

@@ -4,8 +4,8 @@ echo "Checking that all Agda files have been typechecked..."
for agdaFn in $(find . -name '*.*agda'); do
agdaiFn="_build/2.7.0/agda/${agdaFn%.*agda}.agdai"
if [ "$(( $(stat -c "%Y" $agdaiFn) - $(stat -c "%Y" $agdaFn) ))" -lt "0" ]; then
echo " FAIL: $agdaiFn is not up-to-date"
echo " FAIL: $agdaiFn does not exist. Please remove the corresponding agda file or import it somewhere."
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I had the impression that if the script doesn't find an agdai file then it exits and then the corresponding agda file will be type-checked, so the agdai file will be there on the next pass. If that's true, then this error message isn't really what we want. If that's wrong, then I'm fine with the change.

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I need to double check, but I think the first pass of this script is probably pointless and can be removed. If it does something we should add a flag to this script to give the old error message on the first run and the new one on the second run. IIRC the first run of this script only prevents a call to agda if all the interface files are there, but then that call would be very quick anyway (and this would only ever happen locally anyway).

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