Skip to content

Comments

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

Merged
WhatisRT merged 1 commit intomasterfrom
andre/improve-ci-error
Feb 17, 2025
Merged

Improve the error message when a file hasn't been type checked#643
WhatisRT merged 1 commit intomasterfrom
andre/improve-ci-error

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
Member

@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.

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
Member

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).

@WhatisRT WhatisRT force-pushed the andre/improve-ci-error branch from 8cbbd0d to 064413f Compare February 17, 2025 14:02
@WhatisRT WhatisRT force-pushed the andre/improve-ci-error branch from 064413f to e5df2d1 Compare February 17, 2025 16:02
@WhatisRT WhatisRT merged commit aefe4ca into master Feb 17, 2025
8 checks passed
@WhatisRT WhatisRT deleted the andre/improve-ci-error branch February 17, 2025 16:58
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