| 31 Dec 2024 |
MangoIV | Then it should be all good | 14:38:34 |
| @siraben:matrix.org left the room. | 14:51:26 |
@megmug:matrix.org | Hello 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 behaviour | 16:55:35 |
alexfmpe | Try running "haskell-language-server" on the nix shell and see if there's any obvious error in logs | 17:01:52 |
alexfmpe | Are you getting HLS from haskellPackages or haskell.packages.${compiler} ? | 17:02:19 |
alexfmpe | Might want to add a manual hie.yaml to narrow things down, especially if using a multi component project | 17:03:01 |
@megmug:matrix.org | Running 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 now | 17:04:46 |
@megmug:matrix.org | It is haskellPackages.haskell-language-server | 17:05:21 |
alexfmpe | Make sure your extension is loading HLS from $PATH | 17:06:12 |
@megmug:matrix.org | Hm, the project has 2 executables and 1 library folder and is built using stack. The manual stack build also succeeds | 17:06:33 |
@megmug:matrix.org | Yes, it does that - already stumbled over that in the past 😅 | 17:07:03 |
alexfmpe | Ah I dunno about stack, but if it worked on the terminal it's probably the extension that's borked | 17:07:05 |
@megmug:matrix.org | Hm, yes it would make sense. Is there anything that could be incompatible there? | 17:08:12 |
@megmug:matrix.org | Since the vscode extension is not tied to the nix version of HLS | 17:08:33 |
alexfmpe | If the extension loads it from PATH *and* you launch vscode from that same shell it should find it | 17:09:12 |
alexfmpe | I've heard mixed reports from direnv vscode extension | 17:09:28 |
alexfmpe | I'd say disable everything until it works reliably, then try adding things back | 17:09:46 |
alexfmpe | Probably should also set
haskell.sessionLoading to multipleComponents | 17:10:01 |
alexfmpe | Not sure what the UI names are | 17:10:07 |
alexfmpe | https://github.com/haskell/vscode-haskell/pull/1077/files | 17:10:41 |
@megmug:matrix.org | Hm 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 find | 17:12:11 |
@megmug:matrix.org | yup, thats also why i tried launching vscode with disabled direnv and directly from nix-shell to circumvent these problems hopefully | 17:12:53 |
alexfmpe | Nah, I've been using 2.9 for months | 17:12:55 |
alexfmpe | And my extension is like a year behind or something | 17:13:08 |
alexfmpe | The 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 IIUC | 17:13:58 |
alexfmpe | * 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 IIUC | 17:14:13 |
@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 | 17:15:23 |
alexfmpe | (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 | 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 | * The TLDR is the HLS story for more than a single component just recently stopped being bad | 17:16:19 |