Skip to content

Commit ccf6b56

Browse files
authored
Merge branch 'master' into gha-skip-ci
2 parents ea68ad4 + 2474e7c commit ccf6b56

File tree

2 files changed

+16
-2
lines changed

2 files changed

+16
-2
lines changed

.github/workflows/test.yml

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -142,6 +142,16 @@ jobs:
142142
sed -i.bak -e 's/Paths_haskell_language_server/Paths_hls/g' \
143143
src/**/*.hs exe/*.hs
144144
145+
- if: needs.pre_job.outputs.should_skip != 'true' && needs.pre_job.outputs.should_skip_pr != 'true'
146+
# this is only safe if the test environment is isolated
147+
- name: setup ide cache
148+
run: |
149+
export XDG_CACHE_HOME=$RUNNER_TEMP/cache
150+
rm -rf ~/.cache/ghcide
151+
rm -rf ~/.cache/hie-bios
152+
rm -rf $XDG_CACHE_HOME/ghcide
153+
rm -rf $XDG_CACHE_HOME/hie-bios
154+
145155
- if: needs.pre_job.outputs.should_skip != 'true' && needs.pre_job.outputs.should_skip_pr != 'true'
146156
name: Build
147157
# Retry it three times to workaround compiler segfaults in windows

ghcide/src/Development/IDE/Main.hs

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -86,7 +86,8 @@ import GHC.IO.Handle (hDuplicate)
8686
import HIE.Bios.Cradle (findCradle)
8787
import qualified HieDb.Run as HieDb
8888
import Ide.Plugin.Config (CheckParents (NeverCheck),
89-
Config,
89+
Config, checkParents,
90+
checkProject,
9091
getConfigFromNotification)
9192
import Ide.Plugin.ConfigUtils (pluginsToDefaultConfig,
9293
pluginsToVSCodeExtensionSchema)
@@ -193,7 +194,10 @@ defaultArguments priority = Arguments
193194
, argsGhcidePlugin = mempty
194195
, argsHlsPlugins = pluginDescToIdePlugins Ghcide.descriptors
195196
, argsSessionLoadingOptions = def
196-
, argsIdeOptions = const defaultIdeOptions
197+
, argsIdeOptions = \config ghcSession -> (defaultIdeOptions ghcSession)
198+
{ optCheckProject = pure $ checkProject config
199+
, optCheckParents = pure $ checkParents config
200+
}
197201
, argsLspOptions = def {LSP.completionTriggerCharacters = Just "."}
198202
, argsDefaultHlsConfig = def
199203
, argsGetHieDbLoc = getHieDbLoc

0 commit comments

Comments
 (0)