Skip to content

Class plugin fails to parse Command Arguments #2993

Closed
@drsooch

Description

@drsooch

Your environment

Steps to reproduce

In Development.IDE.Types.Logger adding:

instance Pretty ResponseError where

And attempting to generate the class method (with no signature) results in:

(error "error while parsing args for classplugin.codeaction in plugin class: expected Bool, but encountered Null
arg = Object (fromList [(\"methodGroup\",Array [Array [String \"pretty\",String \"pretty :: ResponseError -> Doc ann\"]]),(\"range\",Object (fromList [(\"end\",Object (fromList [(\"character\",Number 29.0),(\"line\",Number 371.0)])),(\"start\",Object (fromList [(\"character\",Number 9.0),(\"line\",Number 371.0)]))])),(\"uri\",String \"file://~/redacted/haskell-language-server/ghcide/src/Development/IDE/Types/Logger.hs\"),(\"withSig\",Null)])")

FYI: this is part of log-response-errors branch so it is not in master so this will not be seen.

Expected behaviour

The generated class method to be shown

Include debug information

GHC-9.0.2 - HLS built from master (with minor changes to log messages)

Metadata

Metadata

Assignees

No one assigned

    Labels

    component: hls-class-plugintype: bugSomething isn't right: doesn't work as intended, documentation is missing/outdated, etc..

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions