-
-
Notifications
You must be signed in to change notification settings - Fork 401
Fix #3095: disabling default flags in the cradle is not propagated to hlint properly #3096
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
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
So I think the problem is that hlint
enables lots of extensions by default in order to maximise its chances of success when used from the command line.
But in our setting, where we know with full precision the set of extensions that need to be enabled for parsing, this is completely unnecessary.
Have you considered telling hlint
not to enable any extensions by default? There should be some config for that.
-- XXX: we just assume that all not-enabled flags are disabled. this is | ||
-- Kinda Sketchy! |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can you extend the comment to clarify why we need to assume? Maybe reference the GHC MR with the fix?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
done :)
It seems that we would have to hack up hlint upstream to achieve that. Currently there is no way of passing "exactly these flags" into The bug on the hlint side is that We aren't hitting the "many default extensions" trouble, because we wholesale replace the |
This comment was marked as outdated.
This comment was marked as outdated.
There is a build error with ghc 8.10.7: https://github.com/haskell/haskell-language-server/runs/7814129905?check_suite_focus=true#step:5:373 |
Yeah, it's odd. I'll look at it on Monday. |
There is a lot of detail of the exact issue in #3095.
I assume that all the flags that are not enabled are disabled (the default flags have already been applied at this point; so this is probably actually true).
It seems to fix the issue but it is kind of a hack.