Skip to content

Commit be54c59

Browse files
committed
Patch "HLS stuck (init then no progress) since multi home support"
haskell/haskell-language-server#4046
1 parent ff46fd1 commit be54c59

File tree

2 files changed

+22
-0
lines changed

2 files changed

+22
-0
lines changed

extra/ghcide-workaround.diff

+13
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
diff --git a/session-loader/Development/IDE/Session.hs b/session-loader/Development/IDE/Session.hs
2+
index bdd27f3d..2639631d 100644
3+
--- a/session-loader/Development/IDE/Session.hs
4+
+++ b/session-loader/Development/IDE/Session.hs
5+
@@ -880,7 +880,7 @@ newComponentCache recorder exts cradlePath _cfp hsc_env old_cis new_cis = do
6+
getSession
7+
#endif
8+
henv <- createHscEnvEq thisEnv (zip uids dfs)
9+
- let targetEnv = (if isBad ci then multi_errs else [], Just henv)
10+
+ let targetEnv = ([], Just henv)
11+
targetDepends = componentDependencyInfo ci
12+
res = ( targetEnv, targetDepends)
13+
logWith recorder Debug $ LogNewComponentCache res

tool-map.nix

+9
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,15 @@ compiler-nix-name: tool: {
4141
# `tool` normally ignores the `cabal.project` (if there is one in the hackage source).
4242
# We need to use the github one (since it has settings to make hls build).
4343
cabalProject = __readFile (src + "/cabal.project");
44+
configureArgs = "--disable-benchmarks --disable-tests";
45+
modules = [{
46+
packages.ghcide.patches =
47+
(if compiler-nix-name != "ghc8107" && compiler-nix-name != "ghc902" then [
48+
# The following patch only works with hls-2.6 ...
49+
# https://github.com/haskell/haskell-language-server/issues/4046#issuecomment-1926242056
50+
./extra/ghcide-workaround.diff
51+
] else []);
52+
}];
4453
};
4554
happy = { version = "1.20.1.1"; inherit cabalProjectLocal; };
4655
alex = { version = "3.2.7.3"; inherit cabalProjectLocal; };

0 commit comments

Comments
 (0)