!RbXGJhHMsnQcNIDFWN:nixos.org

Haskell in Nixpkgs/NixOS

729 Members
For discussions and questions about Haskell with Nix, cabal2nix and haskellPackages in nixpkgs | Current Docs: https://haskell4nix.readthedocs.io/ | More Nix: #community:nixos.org | More Haskell: #haskell-space:matrix.org146 Servers

Load older messages


SenderMessageTime
31 Dec 2024
@mangoiv.:matrix.orgMangoIV Then it should be all good 14:38:34
@siraben:matrix.org@siraben:matrix.org left the room.14:51:26
@megmug:matrix.org@megmug:matrix.orgHello there, is anyone experiencing issues with vscode + HLS on nixos 24.11? I am using a nix-shell for my project and trying to use HLS provided by nix along with vscode provided by ubuntu snap. HLS often hangs and does nothing, bottom left corner "processing 1/x", leading to broken Haskell extension functionality in vscode. Sometimes it works, but most often it doesn't, and even if it works it starts to break soon after. I have tried starting vscode from a nix-shell (direnv disabled) as well as with direnv plugin. Both exhibit same behaviour16:55:35
@alexfmpe:matrix.orgalexfmpeTry running "haskell-language-server" on the nix shell and see if there's any obvious error in logs17:01:52
@alexfmpe:matrix.orgalexfmpeAre you getting HLS from haskellPackages or haskell.packages.${compiler} ?17:02:19
@alexfmpe:matrix.orgalexfmpeMight want to add a manual hie.yaml to narrow things down, especially if using a multi component project17:03:01
@megmug:matrix.org@megmug:matrix.orgRunning it on the terminal, it outputs a lot of stuff, then "Completed (6 files worked, 0 files failed)" which checks out, since the project has 6 files as of now17:04:46
@megmug:matrix.org@megmug:matrix.orgIt is haskellPackages.haskell-language-server17:05:21
@alexfmpe:matrix.orgalexfmpeMake sure your extension is loading HLS from $PATH17:06:12
@megmug:matrix.org@megmug:matrix.orgHm, the project has 2 executables and 1 library folder and is built using stack. The manual stack build also succeeds17:06:33
@megmug:matrix.org@megmug:matrix.orgYes, it does that - already stumbled over that in the past 😅17:07:03
@alexfmpe:matrix.orgalexfmpeAh I dunno about stack, but if it worked on the terminal it's probably the extension that's borked17:07:05
@megmug:matrix.org@megmug:matrix.orgHm, yes it would make sense. Is there anything that could be incompatible there?17:08:12
@megmug:matrix.org@megmug:matrix.orgSince the vscode extension is not tied to the nix version of HLS17:08:33
@alexfmpe:matrix.orgalexfmpeIf the extension loads it from PATH *and* you launch vscode from that same shell it should find it17:09:12
@alexfmpe:matrix.orgalexfmpeI've heard mixed reports from direnv vscode extension17:09:28
@alexfmpe:matrix.orgalexfmpeI'd say disable everything until it works reliably, then try adding things back17:09:46
@alexfmpe:matrix.orgalexfmpeProbably should also set haskell.sessionLoading to multipleComponents 17:10:01
@alexfmpe:matrix.orgalexfmpeNot sure what the UI names are17:10:07
@alexfmpe:matrix.orgalexfmpehttps://github.com/haskell/vscode-haskell/pull/1077/files17:10:41
@megmug:matrix.org@megmug:matrix.orgHm yeah, I get that, I meant more if it was possible that the nix provided 2.9.0.0 HLS could be incompatible with the extension. But there doesnt seem to be much info about that that i can find17:12:11
@megmug:matrix.org@megmug:matrix.orgyup, thats also why i tried launching vscode with disabled direnv and directly from nix-shell to circumvent these problems hopefully17:12:53
@alexfmpe:matrix.orgalexfmpeNah, I've been using 2.9 for months 17:12:55
@alexfmpe:matrix.orgalexfmpeAnd my extension is like a year behind or something17:13:08
@alexfmpe:matrix.orgalexfmpeThe major issue is now and then it decides every instance declaration is duplicated and I get red squigglies and need to kill it. sessionLoading fixes that IIUC17:13:58
@alexfmpe:matrix.orgalexfmpe* The major issue is now and then it decides every instance declaration is duplicated and I get red squigglies and need to restart vscode. sessionLoading fixes that IIUC17:14:13
@megmug:matrix.org@megmug:matrix.orgHm, i don't really understand what that is supposed to do though. I am not deep enough in the technical details i guess, but i can try17:15:23
@alexfmpe:matrix.orgalexfmpe(really need to compile these answers into a troubleshooting self serve thing, someone new runs into these issues every other week)17:15:34
@alexfmpe:matrix.orgalexfmpe
In reply to @megmug:matrix.org
Hm, i don't really understand what that is supposed to do though. I am not deep enough in the technical details i guess, but i can try
The long story is the HLS story for more than a single component just recently stopped being bad
17:16:10
@alexfmpe:matrix.orgalexfmpe* The TLDR is the HLS story for more than a single component just recently stopped being bad17:16:19

Show newer messages


Back to Room ListRoom Version: 6