File tree 2 files changed +13
-5
lines changed
session-loader/Development/IDE
2 files changed +13
-5
lines changed Original file line number Diff line number Diff line change @@ -770,8 +770,17 @@ newComponentCache
770
770
-> IO ( [TargetDetails ], (IdeResult HscEnvEq , DependencyInfo ))
771
771
newComponentCache recorder exts cradlePath cfp hsc_env uids ci = do
772
772
let df = componentDynFlags ci
773
- let hscEnv' = hscSetFlags df hsc_env
774
- { hsc_IC = (hsc_IC hsc_env) { ic_dflags = df } }
773
+ hscEnv' <-
774
+ -- Add the options for the current component to the HscEnv
775
+ -- We want to call `setSessionDynFlags` instead of `hscSetFlags`
776
+ -- because `setSessionDynFlags` also initializes the package database,
777
+ -- which we need for any changes to the package flags in the dynflags
778
+ -- to be visible.
779
+ -- See #2693
780
+ evalGhcEnv hsc_env $ do
781
+ _ <- setSessionDynFlags $ df
782
+ getSession
783
+
775
784
776
785
let newFunc = maybe newHscEnvEqPreserveImportPaths newHscEnvEq cradlePath
777
786
henv <- newFunc hscEnv' uids
Original file line number Diff line number Diff line change @@ -5583,8 +5583,7 @@ simpleSubDirectoryTest =
5583
5583
expectNoMoreDiagnostics 0.5
5584
5584
5585
5585
simpleMultiTest :: TestTree
5586
- simpleMultiTest = knownBrokenForGhcVersions [GHC92 ] " #2693" $
5587
- testCase " simple-multi-test" $ withLongTimeout $ runWithExtraFiles " multi" $ \ dir -> do
5586
+ simpleMultiTest = testCase " simple-multi-test" $ withLongTimeout $ runWithExtraFiles " multi" $ \ dir -> do
5588
5587
let aPath = dir </> " a/A.hs"
5589
5588
bPath = dir </> " b/B.hs"
5590
5589
adoc <- openDoc aPath " haskell"
@@ -5614,7 +5613,7 @@ simpleMultiTest2 = testCase "simple-multi-test2" $ runWithExtraFiles "multi" $ \
5614
5613
5615
5614
-- Now with 3 components
5616
5615
simpleMultiTest3 :: TestTree
5617
- simpleMultiTest3 = knownBrokenForGhcVersions [ GHC92 ] " #2693 " $
5616
+ simpleMultiTest3 =
5618
5617
testCase " simple-multi-test3" $ runWithExtraFiles " multi" $ \ dir -> do
5619
5618
let aPath = dir </> " a/A.hs"
5620
5619
bPath = dir </> " b/B.hs"
You can’t perform that action at this time.
0 commit comments