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

Configuration parse error #56

Closed
asheshambasta opened this issue Nov 15, 2019 · 9 comments · Fixed by #60
Closed

Configuration parse error #56

asheshambasta opened this issue Nov 15, 2019 · 9 comments · Fixed by #60

Comments

@asheshambasta
Copy link

I see the following logs in the *lsp-log* buffer:

haskell-lsp:configuration parse error. RequestMessage {_jsonrpc = "2.0", _id = IdInt 233, _method = Initialize, _params = InitializeParams {_processId = Just 24529, _rootPath = Just "/home/ashesh/code/centralapp/transactor/", _rootUri = Just (Uri {getUri = "file:///home/ashesh/code/centralapp/transactor/"}), _initializationOptions = Just (String "lsp-haskell--make-init-options"), _capabilities = ClientCapabilities {_workspace = Just (WorkspaceClientCapabilities {_applyEdit = Just True, _workspaceEdit = Just (WorkspaceEditClientCapabilities {_documentChanges = Just True}), _didChangeConfiguration = Nothing, _didChangeWatchedFiles = Just (DidChangeWatchedFilesClientCapabilities {_dynamicRegistration = Just True}), _symbol = Just (SymbolClientCapabilities {_dynamicRegistration = Nothing, _symbolKind = Just (SymbolKindClientCapabilities {_valueSet = Just (List [SkFile,SkModule,SkNamespace,SkPackage,SkClass,SkMethod,SkProperty,SkField,SkConstructor,SkEnum,SkInterface,SkFunction,SkVariable,SkConstant,SkString,SkNumber,SkBoolean,SkArray,SkObject,SkKey,SkNull,SkEnumMember,SkStruct,SkEvent,SkOperator,SkTypeParameter])})}), _executeCommand = Just (ExecuteClientCapabilities {_dynamicRegistration = Just False}), _workspaceFolders = Just True, _configuration = Just True}), _textDocument = Just (TextDocumentClientCapabilities {_synchronization = Just (SynchronizationTextDocumentClientCapabilities {_dynamicRegistration = Nothing, _willSave = Just True, _willSaveWaitUntil = Just True, _didSave = Just True}), _completion = Just (CompletionClientCapabilities {_dynamicRegistration = Nothing, _completionItem = Just (CompletionItemClientCapabilities {_snippetSupport = Just True, _commitCharactersSupport = Nothing, _documentationFormat = Just (List [MkMarkdown]), _deprecatedSupport = Nothing, _preselectSupport = Nothing}), _completionItemKind = Nothing, _contextSupport = Just True}), _hover = Just (HoverClientCapabilities {_dynamicRegistration = Nothing, _contentFormat = Just (List [MkMarkdown,MkPlainText])}), _signatureHelp = Just (SignatureHelpClientCapabilities {_dynamicRegistration = Nothing, _signatureInformation = Just (SignatureInformationClientCapabilities {documentationFormat = Nothing})}), _references = Nothing, _documentHighlight = Nothing, _documentSymbol = Just (DocumentSymbolClientCapabilities {_dynamicRegistration = Nothing, _symbolKind = Just (DocumentSymbolKindClientCapabilities {_valueSet = Just (List [SkFile,SkModule,SkNamespace,SkPackage,SkClass,SkMethod,SkProperty,SkField,SkConstructor,SkEnum,SkInterface,SkFunction,SkVariable,SkConstant,SkString,SkNumber,SkBoolean,SkArray,SkObject,SkKey,SkNull,SkEnumMember,SkStruct,SkEvent,SkOperator,SkTypeParameter])}), _hierarchicalDocumentSymbolSupport = Just True}), _formatting = Just (FormattingClientCapabilities {_dynamicRegistration = Just True}), _rangeFormatting = Nothing, _onTypeFormatting = Nothing, _definition = Just (DefinitionClientCapabilities {_dynamicRegistration = Nothing}), _typeDefinition = Just (TypeDefinitionClientCapabilities {_dynamicRegistration = Nothing}), _implementation = Just (ImplementationClientCapabilities {_dynamicRegistration = Nothing}), _codeAction = Just (CodeActionClientCapabilities {_dynamicRegistration = Just True, _codeActionLiteralSupport = Just (CodeActionLiteralSupport {_codeActionKind = CodeActionKindClientCapabilities {_valueSet = List [CodeActionUnknown "",CodeActionQuickFix,CodeActionRefactor,CodeActionRefactorExtract,CodeActionRefactorInline,CodeActionRefactorRewrite,CodeActionSource,CodeActionSourceOrganizeImports]}})}), _codeLens = Nothing, _documentLink = Just (DocumentLinkClientCapabilities {_dynamicRegistration = Just True}), _colorProvider = Nothing, _rename = Nothing, _publishDiagnostics = Nothing, _foldingRange = Just (FoldingRangeClientCapabilities {_dynamicRegistration = Just True, _rangeLimit = Nothing, _lineFoldingOnly = Just False})}), _window = Nothing, _experimental = Nothing}, _trace = Nothing, _workspaceFolders = Nothing}} "expected Config, encountered String"

Following which lsp-ui completely stops working for me: code warnings / type information etc. stops working.


PS:
What I also see is that I'm hitting the hie process pretty hard after every keystroke. This overall makes typing really laggy.


What could be going on here?


System information:

GNU Emacs 26.1 (build 1, x86_64-pc-linux-gnu, GTK+ Version 3.24.5) of 2019-09-13

Emacs lsp related packages:

lsp-mode           6.1           
lsp-ui             20191030.1350
lsp-haskell        20190602.825  dependency            Haskell support for lsp-mode

@alanz
Copy link
Contributor

alanz commented Nov 15, 2019

Which hie version are you using?

@asheshambasta
Copy link
Author

asheshambasta commented Nov 16, 2019

@alanz do you mean the HIE version? If so, this is hie-8.4.4.


Edit:

Version 0.13.0.0 x86_64 ghc-8.4.4
(my apologies for the incomplete information above)

@ncihnegn
Copy link

Same issue here. Using hie 0.13.0.0.

@ashkan-leo
Copy link

ashkan-leo commented Dec 26, 2019

Same issue here.
Using Version 1.0.0.0, Git revision 2c51b612d4f584e7f543961cf2a231139df8930b (3507 commits) x86_64 ghc-8.6.5 on macOS Catalina

@dalvescb
Copy link

Same issue here, using version 1.0.0.0, ghc-8.6.5 on arch linux

@d12frosted
Copy link

The same issue if I compile on top of hie master. If I compile from 0.14.0.0 branch - everything is fine.

@alanz
Copy link
Contributor

alanz commented Dec 29, 2019

My initial investigations show that this is a longstanding bug in haskell-lsp, we are just being more proactive with showing problems back in the client.

@alanz
Copy link
Contributor

alanz commented Dec 30, 2019

Looking into this more deeply, I see the emacs lsp-haskell is now providing a value of

  , _initializationOptions = Just (String "lsp-haskell--make-init-options")

which indicates that the lsp-haskell--make-init-options must exist and return something that prevents the field from being populated.

@d12frosted
Copy link

I confirm, this helps! Thanks a lot!

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 a pull request may close this issue.

6 participants