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

Fix #1834: remove bad regex that was supposed to recognize a LANGUAGE suggestion #1835

Merged
merged 2 commits into from
Jan 16, 2024

Conversation

andreasabel
Copy link
Member

Remove bad regex that was supposed to recognize a LANGUAGE suggestion.

This regex fires unfortunately on GHC 9.8's new x-partial warning,
destroying the UX with obnoxious questions whether to "add LANGUAGE Data".

Closes #1834.

… suggestion

Remove bad regex that was supposed to recognize a LANGUAGE suggestion.

This regex fires unfortunately on GHC 9.8's new `x-partial` warning,
destroying the UX with obnoxious questions whether to "add LANGUAGE Data".

Closes #1834.
@purcell
Copy link
Member

purcell commented Jan 10, 2024

Thanks. Better to remove this code completely: the comment in the commit message is sufficient. Even better would be to extend the existing message so that it matches its original targets but not the new "refactor" message. The tricky thing is finding examples of the former!

haskell-load.el Outdated Show resolved Hide resolved
@Bodigrim
Copy link

(Just passing by) Is it difficult for haskell-mode to filter anything remotely suspicious to be a language extension through ghc --supported-extensions? This would be a more robust solution than adjusting regexps here and there.

@andreasabel
Copy link
Member Author

@purcell : Thanks for the quick review.
I will leave the decision to you how to fix the problem.
@Bodigrim 's advice is good; the current heuristics is just too brittle.

@purcell
Copy link
Member

purcell commented Jan 11, 2024

Sounds reasonable. I think there may even be a list of supported extensions in the code which gets updated periodically — using that would be better than a fresh process invocation if so. I'm unlikely to work on this myself though, sorry.

@andreasabel
Copy link
Member Author

@purcell : You may at least merge my hotfix...

@purcell
Copy link
Member

purcell commented Jan 16, 2024

You may at least merge my hotfix...

Thanks! 😉

Alright, have applied my suggestion above and will merge once CI passes. Might have to close and re-open this PR briefly to trigger a rebase on top of changes I just made in master to fix CI.

@purcell purcell closed this Jan 16, 2024
@purcell purcell reopened this Jan 16, 2024
@purcell purcell merged commit 43b4036 into master Jan 16, 2024
10 of 20 checks passed
@purcell purcell deleted the issue-1834 branch January 16, 2024 17:18
@andreasabel
Copy link
Member Author

Thanks Steve @purcell!

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.

Add {-# LANGUAGE Data #-} to the top of the file? (y or n)
3 participants