Skip to content

Migrate change-type-signature-plugin to use structured diagnostics #4632

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

Merged
merged 4 commits into from
Jun 23, 2025

Conversation

sgillespie
Copy link
Contributor

@sgillespie sgillespie commented Jun 11, 2025

This addresses using structured diagnostics from GHC (rather than regular expressions) for hls-change-type-signature-plugin.

A couple of notes:

  • I reworked the regexp tests a little bit. Since I don't know how the original were created, I found it easier to generate them from the diagnostics of the existing golden test inputs. Happy to restore the old ones if that's better.
  • I added some Traversals/Lenses in the plugin. Would it be more useful to put thim in Development.IDE.GHC.Compat.Error?

@sgillespie sgillespie force-pushed the master branch 4 times, most recently from 5556c3e to be06dc8 Compare June 18, 2025 13:41
@sgillespie sgillespie changed the title WIP: Migrate change-type-signature-plugin to use structured diagnostics Migrate change-type-signature-plugin to use structured diagnostics Jun 19, 2025
@sgillespie sgillespie marked this pull request as ready for review June 19, 2025 13:22
@sgillespie sgillespie requested a review from fendor as a code owner June 19, 2025 13:22
Copy link
Collaborator

@fendor fendor left a comment

Choose a reason for hiding this comment

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

LGTM, thank you for taking the time and modernising the whole plugin!

Small comments, otherwise good to go, imo

Comment on lines +211 to +171
matchingDiagnostic :: ErrInfo -> Maybe DeclName
matchingDiagnostic ErrInfo{errInfoContext} =
Copy link
Collaborator

Choose a reason for hiding this comment

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

We still need that? Should we open a GHC issue for adding the DeclName context to the error message?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

We still need that?

Sadly, I think we do

Should we open a GHC issue for adding the DeclName context to the error message?

That would be awesome

@sgillespie sgillespie requested a review from wz1000 as a code owner June 21, 2025 02:42
Copy link
Collaborator

@fendor fendor left a comment

Choose a reason for hiding this comment

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

LGTM!

@fendor
Copy link
Collaborator

fendor commented Jun 21, 2025

Stack CI test failure is genuine, otherwise, let's merge!

@sgillespie sgillespie force-pushed the master branch 3 times, most recently from 92bbd8e to e25716f Compare June 22, 2025 01:34
@fendor fendor added the merge me Label to trigger pull request merge label Jun 22, 2025
Copy link
Contributor

mergify bot commented Jun 22, 2025

This pull request has been removed from the queue for the following reason: checks failed.

The merge conditions cannot be satisfied due to failing checks:

You may have to fix your CI before adding the pull request to the queue again.
If you update this pull request, to fix the CI, it will automatically be requeued once the queue conditions match again.
If you think this was a flaky issue instead, you can requeue the pull request, without updating it, by posting a @mergifyio requeue comment.

@sgillespie
Copy link
Contributor Author

@Mergifyio requeue

Copy link
Contributor

mergify bot commented Jun 23, 2025

requeue

❌ Command disallowed due to command restrictions in the Mergify configuration.

  • sender-permission >= write

@mergify mergify bot merged commit 8d96270 into haskell:master Jun 23, 2025
21 of 23 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
merge me Label to trigger pull request merge
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants