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

Linting vanishes on warnings with no errors on reload with no change. #1758

Open
sirlensalot opened this issue Aug 14, 2021 · 2 comments
Open

Comments

@sirlensalot
Copy link
Contributor

To reproduce, load code that has warnings and no errors. Warning lint will work. Reload the code with no changes; warning lints will vanish.

It appears that the cause is the warning code does not disappear from the interactive window so presumably the starting point of the search is not reset.

@purcell
Copy link
Member

purcell commented Aug 14, 2021

IIRC this is a GHCi issue, in that warnings are only displayed the first time the file is loaded. The next time it is loaded successfully, GHCi doesn't report the warnings. I seem to remember some code in Intero and/or Dante which worked around this.

@sirlensalot
Copy link
Contributor Author

Hmm that's tough. It also looks like a workaround like "touch the loaded file" doesn't do the trick either.

@purcell is there maybe a way to interact with the logic for clearing warnings in the interactive buffer? It seems to do the right thing in this case, where the warning remains (if ignored by the linter), but still gets cleared properly when a reload gives new information.

Can we leverage this somehow to lint, and only for haskell-process-reload? I'm thinking something like leveraging whatever markers might remain in the interactive buffer to lint on a reload.

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

No branches or pull requests

2 participants