Git Product home page Git Product logo

Comments (8)

Rhywun avatar Rhywun commented on June 14, 2024

I see something similar in which hlint problems appear in the list and then immediately disappear. When I close and re-open the file, the problems are back in the list, until I start typing again and then they disappear.

v0.0.23

from vscode-haskell.

alanz avatar alanz commented on June 14, 2024

By default we turn off hlint warnings if there are ghc-mod errors, so it does not clutter.

But hlint gives results first, and they get passed through. This gives the flicker, I guess.

from vscode-haskell.

Rhywun avatar Rhywun commented on June 14, 2024

I don't have any visible ghc-mod issues, only hlint problems:

screencast

from vscode-haskell.

Rhywun avatar Rhywun commented on June 14, 2024

Update: I think I have narrowed down the issue by playing around with VSCode's autosave feature. With autosave of files on, it behaves as shown above. When I turned autosave off, the behavior changed as follows:

  1. Open file - hlint problems are highlighted
  2. Type some characters in the file - no change, hlint problems are still highlighted
  3. Save file - hlint problems disappear
  4. Continue typing - hlint problems appear again

So basically, for some reason saving the file is making the hlint problems disappear.

from vscode-haskell.

alanz avatar alanz commented on June 14, 2024

Ok, we recently reworked the diagnostics generation, and there is a difference between the on-save and on-change behaviour, I will take a look.

from vscode-haskell.

sonowz avatar sonowz commented on June 14, 2024

Hello,
I found a way to workaround the annoying flickering problem.

  1. Go to Open user settings in Command Palette (Ctrl+Shift+p).
  2. Remove the line "languageServerHaskell.hlintOn": true, if any.
  3. Save the setting.
  4. Add the line "languageServerHaskell.hlintOn": true.
  5. Save the setting.
  6. hlint appears!

But, if I type some code and save it, hlint disappears again. (only that file)
So this is just a hotfix for those who desperately needs linting feature now. Maybe this has to do with actual cause?

from vscode-haskell.

sonowz avatar sonowz commented on June 14, 2024

By the way, this issue seems like a duplicate of #59 .

from vscode-haskell.

jneira avatar jneira commented on June 14, 2024

hlint should be fixed in latest hie and hie does not use ghcmod anymore
@dnsdhrj @AurevoirXavier feel free to reopen if you continue experiencing it with the latest version of hie

from vscode-haskell.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    πŸ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. πŸ“ŠπŸ“ˆπŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❀️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.