haskell / haskell-ide-engine

The engine for haskell ide-integration. Not an IDE
BSD 3-Clause "New" or "Revised" License
2.38k stars 210 forks source link

do not sent progress reports if not supported by the client #1503

Open alanz opened 4 years ago

alanz commented 4 years ago

They are a feature of LSP 3.15, and should only be sent if signalled by

    /**
     * Window specific client capabilities.
     */
    window?: {
        /**
         * Whether client supports handling progress notifications.
         */
        workDoneProgress?: boolean;
    }

Likewise, support should be signalled to the client.

Note: this may be a haskell-lsp feature. And is likely the cause of https://github.com/emacs-lsp/lsp-haskell/issues/59

alanz commented 4 years ago

And it seems emacs is advertising that it does support it, but is using the old behaviour. https://github.com/emacs-lsp/lsp-mode/issues/1277

lukel97 commented 4 years ago

I think we are using a helper function inside haskell-lsp for this, it should probably check inside there.

alanz commented 4 years ago

I suspect it is/may be doing the right thing, the emacs lsp-mode is setting the flag, but does not support the new behaviour.

alanz commented 4 years ago

Nope, just turned it off in my version of emacs, still getting progress reports.

lukel97 commented 4 years ago

@alanz can you dump a log of the messages up here to see what's happening? there's code in haskell-lsp that looks like it should check the capability. wether or not it actually is though is another story https://github.com/alanz/haskell-lsp/blob/5497e9fc975f47f54fd677fce0c2a8d675ce3aee/src/Language/Haskell/LSP/Core.hs#L790-L797