ghcide 0.3.0 release! - Haskell

Welcome to the Functional Programming Zulip Chat Archive. You can join the chat here.

Torsten Schmits

looking pretty good so far for me, my nix project with 20 cradles seems to work better now

Sridhar Ratnakumar

how do you install ghcide normally? nixpkgs?

Torsten Schmits

I think it's a safe bet nowadays, though I track master in my projects' ghc overlays mostly

Georgi Lyubenov // googleson78

I do stack install from their git repo, with the appropriate yaml
it's "dirty" but I haven't had any issues

Torsten Schmits

dirty is maybe a bit harsh.

Torsten Schmits

though it means that you can only use one ghc version for all projects, right?

Georgi Lyubenov // googleson78

yup ;/ or rather I recompile it when I work on a project with a different ghc

Georgi Lyubenov // googleson78

you've set up your editor to call nix to get ghcide?

Torsten Schmits

yup, like this:

#!/usr/bin/env zsh

if [[ -f $PWD/default.nix ]]
then
  nix-shell --run "systemd-run --user --scope -p MemoryLimit=15G ghcide $@"
else
  exec ghcide $@
fi

never mind the systemd part :smile: I then put this executable into the language server config

Torsten Schmits

FTR, my ghcide derivation in my personal nix-project lib:

https://github.com/tek/tryp-hs/blob/master/ghcide.nix

Development utilities for Haskell projects with Nix build - tek/tryp-hs
Torsten Schmits

maybe I'm just so glad that it works at all again in my env, but the typechecking response seems to be much more immediate now. :heart:

Georgi Lyubenov // googleson78

there do seem to be some performance improvements, but I can't tell if they are supposed to make it much faster

Torsten Schmits

you mean that there are PRs included in the release with the express intent to improve performance?

Torsten Schmits

in any case, I just assume that the bad performance before was also an effect of my convoluted build setup

Georgi Lyubenov // googleson78
Performance improvements for GetSpanInfo (#681) - (Pepe Iborra)
Fix regression in getSpanInfoRule (#622) - (Pepe Iborra)
Torsten Schmits

ok, the greatest relief compared to when it kinda used to work for me is that code actions seem to be immediate now – before I had to wait for up to 15 seconds (the neovim lsc timing out twice) for it to act. after I did that once it used to become immediate (something like a cache warmup), but after a few changes it reset again.

now to check the memory footprint – it used to grow up to 30G resident on larger projects. so far it seems better, 5G for a while now

Sridhar Ratnakumar

HLS 0.4.0 was also released yesterday

Torsten Schmits

haven't tried it, does it make sense to switch?