Skip to content

Support for Lean language build errors #21

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

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

Conversation

Vierkantor
Copy link

This PR adds a file with support for Lean error message syntax.

We use the problem-matcher-wrap action in CI for projects in the Lean language, especially https://github.com/leanprover-community/mathlib4. Lean changed its error message syntax a while back, and so the nice error messages stopped appearing. With the new lean problem matcher regex added in this PR, everything should work again with the latest versions of Lean.

Example of the annotated output:

Screenshot 2025-04-23 at 13 26 32 Screenshot 2025-04-23 at 14 07 16

(Screenshots from https://github.com/leanprover-community/mathlib4/actions/runs/14617507898/job/41009027153).

Vierkantor added a commit to leanprover-community/mathlib4 that referenced this pull request Apr 23, 2025
This PR fixes the missing build error message annotations in GitHub. Lean switched to a different syntax for error messages, and the action we used to annotate the commit/PR with those errors did not have support for that format. I made a fork of the action that does know how to parse Lean error messages, and use that to wrap the builds.

I also opened [a PR to the original repo](liskin/gh-problem-matcher-wrap#21). If that gets merged, we can switch back to the upstream repo for this action.

We do not need to change the format for linter/shake steps: those still fit the previous GCC-compatible syntax.

Zulip discussion: https://leanprover.zulipchat.com/#narrow/channel/287929-mathlib4/topic/gh-problem-matcher-wrap

Fixes: #12946
mathlib-bors bot pushed a commit to leanprover-community/mathlib4 that referenced this pull request Apr 24, 2025
This PR fixes the missing build error message annotations in GitHub. Lean switched to a different syntax for error messages, and the action we used to annotate the commit/PR with those errors did not have support for that format. I made a fork of the action that does know how to parse Lean error messages, and use that to wrap the builds.

For example, see the output of [this build](https://github.com/leanprover-community/mathlib4/actions/runs/14617507898/job/41009027153):

<img width="1078" alt="Screenshot 2025-04-23 at 13 26 32" src="https://github.com/user-attachments/assets/944da832-6089-43e4-a7cf-9e073f18c79e" />
<img width="1162" alt="Screenshot 2025-04-23 at 14 07 16" src="https://github.com/user-attachments/assets/26aebffc-ea32-45ed-8f07-b3f0e1cad4de" />

I also opened [a PR to the original repo](liskin/gh-problem-matcher-wrap#21). If that gets merged, we can switch back to the upstream repo for this action.

We do not need to change the format for linter/shake steps: those still fit the previous GCC-compatible syntax.

Zulip discussion: https://leanprover.zulipchat.com/#narrow/channel/287929-mathlib4/topic/gh-problem-matcher-wrap

Fixes: #12946
tannerduve pushed a commit to leanprover-community/mathlib4 that referenced this pull request May 13, 2025
This PR fixes the missing build error message annotations in GitHub. Lean switched to a different syntax for error messages, and the action we used to annotate the commit/PR with those errors did not have support for that format. I made a fork of the action that does know how to parse Lean error messages, and use that to wrap the builds.

For example, see the output of [this build](https://github.com/leanprover-community/mathlib4/actions/runs/14617507898/job/41009027153):

<img width="1078" alt="Screenshot 2025-04-23 at 13 26 32" src="https://github.com/user-attachments/assets/944da832-6089-43e4-a7cf-9e073f18c79e" />
<img width="1162" alt="Screenshot 2025-04-23 at 14 07 16" src="https://github.com/user-attachments/assets/26aebffc-ea32-45ed-8f07-b3f0e1cad4de" />

I also opened [a PR to the original repo](liskin/gh-problem-matcher-wrap#21). If that gets merged, we can switch back to the upstream repo for this action.

We do not need to change the format for linter/shake steps: those still fit the previous GCC-compatible syntax.

Zulip discussion: https://leanprover.zulipchat.com/#narrow/channel/287929-mathlib4/topic/gh-problem-matcher-wrap

Fixes: #12946
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.

1 participant