Skip to content

Use ghcide master head (d76fbf9) - #530

Merged
jneira merged 8 commits into
haskell:masterfrom
jneira:ghcide-master
Nov 3, 2020
Merged

jneira merged 8 commits into
haskell:masterfrom
jneira:ghcide-master

Conversation

@jneira

@jneira jneira commented Oct 23, 2020

Copy link
Copy Markdown
Member

@jneira

jneira commented Oct 23, 2020 •

Copy link
Copy Markdown
Member Author

One test failing:

    local imports:                                                                                      FAIL
      Exception: Timed out waiting to receive a message from the server.
      Last message received:
      {
          "tag": "RspExecuteCommand",
          "contents": {
              "error": {
                  "code": -32603,
                  "message": "tried to look at linkable for GetModIfaceWithoutLinkable for NormalizedFilePath \"/home/runner/work/haskell-language-server/haskell-language-server/test/testdata/eval/T25.hs\"\nCallStack (from HasCallStack):\n  error, called at src/Development/IDE/Core/Rules.hs:836:79 in ghcide-0.4.0-inplace:Development.IDE.Core.Rules"
              },
              "jsonrpc": "2.0",
              "id": 2
          }
      }

The code to adapt the import plugin looks straightforwardIt is the eval plugin as noted below
//cc @wz1000

@wz1000

wz1000 commented Oct 23, 2020

Copy link
Copy Markdown
Collaborator

hmm...

This is because the eval plugin uses GHC.load, which runs the compilation pipeline entirely in GHC, bypassing all our ghcide rules. It should ideally be using the bytecode we generate via ghcide rules. I think the NeedsCompilation logic in ghcide would also need to be somehow modified, in order to compile all files that use the eval plugin, or are dependencies of such a file.

/cc @pepeiborra

@wz1000

wz1000 commented Oct 23, 2020

Copy link
Copy Markdown
Collaborator

Workaround for now would be to enable TemplateHaskell in any file that uses the eval plugin.

@jneira

jneira commented Oct 23, 2020

Copy link
Copy Markdown
Member Author

Let me know if you prefer merge this marking the test as knownBroken or we should wait to the eval plugin (and ghcide?) fix.

@wz1000

wz1000 commented Oct 23, 2020

Copy link
Copy Markdown
Collaborator

I don't know, it completely breaks the eval plugin.

Lets wait for @pepeiborra to chime in.

@pepeiborra

Copy link
Copy Markdown
Collaborator

You can try to change the Eval plugin to use GhcSession instead of GhcSessionDeps. If that works, then merge this PR and look at converting it to use bytecode produced by ghcide later on.

@wz1000

wz1000 commented Oct 31, 2020

Copy link
Copy Markdown
Collaborator

@jneira did you try changing GhcSessionDeps to GhcSession in the Eval plugin?

@jneira

jneira commented Oct 31, 2020

Copy link
Copy Markdown
Member Author

It is my next todo, but I have no time to start yet

@jneira

jneira commented Nov 3, 2020

Copy link
Copy Markdown
Member Author

@wz1000 i didnt expect it was so easy 😝
What are the actual implications of replace one for another?

@wz1000

wz1000 commented Nov 3, 2020

Copy link
Copy Markdown
Collaborator

The Eval plugin will run a parallel compilation pipeline, loading all the modules independently of ghcide/hls.

@wz1000 wz1000 mentioned this pull request Nov 3, 2020
@jneira
jneira merged commit d0f02b5 into haskell:master Nov 3, 2020
@expipiplus1

Copy link
Copy Markdown
Contributor

Would it be possible to get a release with this change?

@jneira

jneira commented Nov 4, 2020 •

Copy link
Copy Markdown
Member Author

@expipiplus1 yeah, it will be included in the incoming monthly release: #567
does it resolves some issue for you?

@jneira
jneira deleted the ghcide-master branch November 4, 2020 06:24
@expipiplus1

Copy link
Copy Markdown
Contributor

Yeah, I had some weird issue with GHC throwing in initDs. Was talking about it with @wz1000 on IRC, this seemed to solve it.

@tittoassini

Copy link
Copy Markdown
Contributor

Could this also be included?

haskell/ghcide@e922a16

It is a minimal change and is required to support CPP/LHS preprocessing in the Eval plugin.

@jneira

jneira commented Nov 4, 2020

Copy link
Copy Markdown
Member Author

@tittoassini the support is included simply updating ghcide? if it is the case i can give a try later at night, feel free to open a new pr updating ghcide again to get it sooner

@tittoassini

tittoassini commented Nov 4, 2020 via email

Copy link
Copy Markdown
Contributor

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 this pull request may close these issues.

Use ghcide version with last TemplateHaskell improvements

6 participants