diff --git a/ghcide.cabal b/ghcide.cabal
--- a/ghcide.cabal
+++ b/ghcide.cabal
@@ -2,7 +2,7 @@
 build-type:         Simple
 category:           Development
 name:               ghcide
-version:            2.3.0.0
+version:            2.4.0.0
 license:            Apache-2.0
 license-file:       LICENSE
 author:             Digital Asset and Ghcide contributors
@@ -59,7 +59,7 @@
         dependent-sum,
         dlist,
         exceptions,
-        extra >= 1.7.4,
+        extra >= 1.7.14,
         enummapset,
         filepath,
         fingertree,
@@ -69,7 +69,7 @@
         haddock-library >= 1.8 && < 1.12,
         hashable,
         hie-compat ^>= 0.3.0.0,
-        hls-plugin-api == 2.3.0.0,
+        hls-plugin-api == 2.4.0.0,
         lens,
         list-t,
         hiedb == 0.4.3.*,
@@ -85,7 +85,7 @@
         row-types,
         text-rope,
         safe-exceptions,
-        hls-graph == 2.3.0.0,
+        hls-graph == 2.4.0.0,
         sorted-list,
         sqlite-simple,
         stm,
diff --git a/session-loader/Development/IDE/Session.hs b/session-loader/Development/IDE/Session.hs
--- a/session-loader/Development/IDE/Session.hs
+++ b/session-loader/Development/IDE/Session.hs
@@ -40,6 +40,8 @@
 import           Data.Hashable                        hiding (hash)
 import qualified Data.HashMap.Strict                  as HM
 import           Data.List
+import qualified Data.List.NonEmpty                   as NE
+import           Data.List.NonEmpty                   (NonEmpty(..))
 import qualified Data.Map.Strict                      as Map
 import           Data.Maybe
 import           Data.Proxy
@@ -520,9 +522,9 @@
                   -- information.
 
                   new_deps = RawComponentInfo (homeUnitId_ df) df targets cfp opts dep_info
-                                : maybe [] snd oldDeps
+                                :| maybe [] snd oldDeps
                   -- Get all the unit-ids for things in this component
-                  inplace = map rawComponentUnitId new_deps
+                  inplace = map rawComponentUnitId $ NE.toList new_deps
 
               new_deps' <- forM new_deps $ \RawComponentInfo{..} -> do
                   -- Remove all inplace dependencies from package flags for
@@ -572,7 +574,7 @@
               -- . The information for the new component which caused this cache miss
               -- . The modified information (without -inplace flags) for
               --   existing packages
-              pure (Map.insert hieYaml (newHscEnv, new_deps) m, (newHscEnv, head new_deps', tail new_deps'))
+              pure (Map.insert hieYaml (newHscEnv, NE.toList new_deps) m, (newHscEnv, NE.head new_deps', NE.tail new_deps'))
 
 
     let session :: (Maybe FilePath, NormalizedFilePath, ComponentOptions, FilePath)
diff --git a/src/Development/IDE/Core/Compile.hs b/src/Development/IDE/Core/Compile.hs
--- a/src/Development/IDE/Core/Compile.hs
+++ b/src/Development/IDE/Core/Compile.hs
@@ -73,7 +73,7 @@
 import           Data.Tuple.Extra                  (dupe)
 import           Data.Unique                       as Unique
 import           Debug.Trace
-import           Development.IDE.Core.FileStore    (resetInterfaceStore, shareFilePath)
+import           Development.IDE.Core.FileStore    (resetInterfaceStore)
 import           Development.IDE.Core.Preprocessor
 import           Development.IDE.Core.RuleTypes
 import           Development.IDE.Core.Shake
@@ -147,6 +147,13 @@
 import           GHC.Core.Lint.Interactive
 #endif
 
+#if MIN_VERSION_ghc(9,7,0)
+import           Data.Foldable                     (toList)
+import           GHC.Unit.Module.Warnings
+#else
+import           Development.IDE.Core.FileStore    (shareFilePath)
+#endif
+
 --Simple constants to make sure the source is consistently named
 sourceTypecheck :: T.Text
 sourceTypecheck = "typecheck"
@@ -479,11 +486,16 @@
 -- Important to do this immediately after reading the unit before
 -- anything else has a chance to read `mi_usages`
 shareUsages :: ModIface -> ModIface
-shareUsages iface = iface {mi_usages = usages}
+shareUsages iface
+  = iface
+-- Fixed upstream in GHC 9.8
+#if !MIN_VERSION_ghc(9,7,0)
+      {mi_usages = usages}
   where usages = map go (mi_usages iface)
         go usg@UsageFile{} = usg {usg_file_path = fp}
           where !fp = shareFilePath (usg_file_path usg)
         go usg = usg
+#endif
 
 
 mkHiFileResultNoCompile :: HscEnv -> TcModuleResult -> IO HiFileResult
@@ -646,11 +658,24 @@
     fmap (either (, Nothing) (second Just)) $
         catchSrcErrors (hsc_dflags session) "compile" $ do
             (warnings,desugared_guts) <- withWarnings "compile" $ \tweak -> do
-               let session' = tweak (hscSetFlags (ms_hspp_opts ms) session)
+                 -- Breakpoints don't survive roundtripping from disk
+                 -- and this trips up the verify-core-files check
+                 -- They may also lead to other problems.
+                 -- We have to setBackend ghciBackend in 9.8 as otherwise
+                 -- non-exported definitions are stripped out.
+                 -- However, setting this means breakpoints are generated.
+                 -- Solution: prevent breakpoing generation by unsetting
+                 -- Opt_InsertBreakpoints
+               let session' = tweak $ flip hscSetFlags session
+#if MIN_VERSION_ghc(9,7,0)
+                                    $ flip gopt_unset Opt_InsertBreakpoints
+                                    $ setBackend ghciBackend
+#endif
+                                    $ ms_hspp_opts ms
                -- TODO: maybe settings ms_hspp_opts is unnecessary?
                -- MP: the flags in ModSummary should be right, if they are wrong then
                -- the correct place to fix this is when the ModSummary is created.
-               desugar <- hscDesugar session' (ms { ms_hspp_opts = hsc_dflags session' })  tcg
+               desugar <- hscDesugar session' (ms { ms_hspp_opts = hsc_dflags session' }) tcg
                if simplify
                then do
                  plugins <- readIORef (tcg_th_coreplugins tcg)
@@ -779,23 +804,41 @@
     , Opt_WarnUnusedForalls
     , Opt_WarnUnusedRecordWildcards
     , Opt_WarnInaccessibleCode
+#if !MIN_VERSION_ghc(9,7,0)
     , Opt_WarnWarningsDeprecations
+#endif
     ]
 
 -- | Add a unnecessary/deprecated tag to the required diagnostics.
 #if MIN_VERSION_ghc(9,3,0)
 tagDiag :: (Maybe DiagnosticReason, FileDiagnostic) -> (Maybe DiagnosticReason, FileDiagnostic)
-tagDiag (w@(Just (WarningWithFlag warning)), (nfp, sh, fd))
 #else
 tagDiag :: (WarnReason, FileDiagnostic) -> (WarnReason, FileDiagnostic)
-tagDiag (w@(Reason warning), (nfp, sh, fd))
 #endif
+
+#if MIN_VERSION_ghc(9,7,0)
+tagDiag (w@(Just (WarningWithCategory cat)), (nfp, sh, fd))
+  | cat == defaultWarningCategory -- default warning category is for deprecations
+  = (w, (nfp, sh, fd { _tags = Just $ DiagnosticTag_Deprecated : concat (_tags fd) }))
+tagDiag (w@(Just (WarningWithFlags warnings)), (nfp, sh, fd))
+  | tags <- mapMaybe requiresTag (toList warnings)
+  = (w, (nfp, sh, fd { _tags = Just $ tags ++ concat (_tags fd) }))
+#elif MIN_VERSION_ghc(9,3,0)
+tagDiag (w@(Just (WarningWithFlag warning)), (nfp, sh, fd))
   | Just tag <- requiresTag warning
   = (w, (nfp, sh, fd { _tags = Just $ tag : concat (_tags fd) }))
+#else
+tagDiag (w@(Reason warning), (nfp, sh, fd))
+  | Just tag <- requiresTag warning
+  = (w, (nfp, sh, fd { _tags = Just $ tag : concat (_tags fd) }))
+#endif
   where
     requiresTag :: WarningFlag -> Maybe DiagnosticTag
+#if !MIN_VERSION_ghc(9,7,0)
+    -- doesn't exist on 9.8, we use WarningWithCategory instead
     requiresTag Opt_WarnWarningsDeprecations
       = Just DiagnosticTag_Deprecated
+#endif
     requiresTag wflag  -- deprecation was already considered above
       | wflag `elem` unnecessaryDeprecationWarningFlags
       = Just DiagnosticTag_Unnecessary
diff --git a/src/Development/IDE/GHC/CPP.hs b/src/Development/IDE/GHC/CPP.hs
--- a/src/Development/IDE/GHC/CPP.hs
+++ b/src/Development/IDE/GHC/CPP.hs
@@ -52,8 +52,12 @@
 
 #if MIN_VERSION_ghc(9,5,0)
     let cpp_opts = Pipeline.CppOpts
-                 { cppUseCc = False
-                 , cppLinePragmas = True
+                 { cppLinePragmas = True
+# if MIN_VERSION_ghc(9,9,0)
+                 , useHsCpp = True
+# else
+                 , cppUseCc = False
+# endif
                  } in
 #else
     let cpp_opts = True in
diff --git a/src/Development/IDE/GHC/Compat.hs b/src/Development/IDE/GHC/Compat.hs
--- a/src/Development/IDE/GHC/Compat.hs
+++ b/src/Development/IDE/GHC/Compat.hs
@@ -41,6 +41,8 @@
 
     Usage(..),
 
+    liftZonkM,
+
     FastStringCompat,
     bytesFS,
     mkFastStringByteString,
@@ -55,6 +57,7 @@
     combineRealSrcSpans,
 
     nonDetOccEnvElts,
+    nonDetFoldOccEnv,
 
     isQualifiedImport,
     GhcVersion(..),
@@ -93,6 +96,7 @@
     simplifyExpr,
     tidyExpr,
     emptyTidyEnv,
+    tcInitTidyEnv,
     corePrepExpr,
     corePrepPgm,
     lintInteractiveExpr,
@@ -165,6 +169,9 @@
 
 -- See Note [Guidelines For Using CPP In GHCIDE Import Statements]
 
+#if MIN_VERSION_ghc(9,7,0)
+import           GHC.Tc.Zonk.TcType                    (tcInitTidyEnv)
+#endif
 import qualified GHC.Core.Opt.Pipeline                 as GHC
 import           GHC.Core.Tidy                         (tidyExpr)
 import           GHC.CoreToStg.Prep                    (corePrepPgm)
@@ -247,7 +254,16 @@
 import           GHC.Driver.Config.CoreToStg.Prep                    (initCorePrepConfig)
 #endif
 
+#if !MIN_VERSION_ghc(9,7,0)
+liftZonkM :: a -> a
+liftZonkM = id
+#endif
 
+#if !MIN_VERSION_ghc(9,7,0)
+nonDetFoldOccEnv :: (a -> b -> b) -> b -> OccEnv a -> b
+nonDetFoldOccEnv = foldOccEnv
+#endif
+
 #if !MIN_VERSION_ghc(9,3,0)
 nonDetOccEnvElts :: OccEnv a -> [a]
 nonDetOccEnvElts = occEnvElts
@@ -328,7 +344,9 @@
 #endif
              this_mod ml prepd_binds
 
-#if MIN_VERSION_ghc(9,4,2)
+#if MIN_VERSION_ghc(9,8,0)
+    (unzip -> (stg_binds2,_),_)
+#elif MIN_VERSION_ghc(9,4,2)
     (stg_binds2,_)
 #else
     stg_binds2
@@ -537,13 +555,16 @@
   | GHC92
   | GHC94
   | GHC96
+  | GHC98
   deriving (Eq, Ord, Show)
 
 ghcVersionStr :: String
 ghcVersionStr = VERSION_ghc
 
 ghcVersion :: GhcVersion
-#if MIN_VERSION_GLASGOW_HASKELL(9,6,0,0)
+#if MIN_VERSION_GLASGOW_HASKELL(9,8,0,0)
+ghcVersion = GHC98
+#elif MIN_VERSION_GLASGOW_HASKELL(9,6,0,0)
 ghcVersion = GHC96
 #elif MIN_VERSION_GLASGOW_HASKELL(9,4,0,0)
 ghcVersion = GHC94
diff --git a/src/Development/IDE/GHC/Compat/Core.hs b/src/Development/IDE/GHC/Compat/Core.hs
--- a/src/Development/IDE/GHC/Compat/Core.hs
+++ b/src/Development/IDE/GHC/Compat/Core.hs
@@ -152,7 +152,9 @@
     pattern AvailTC,
     Avail.availName,
     Avail.availNames,
+#if !MIN_VERSION_ghc(9,7,0)
     Avail.availNamesWithSelectors,
+#endif
     Avail.availsToNameSet,
     -- * TcGblEnv
     TcGblEnv(..),
@@ -376,7 +378,9 @@
     module GHC.Types.Name.Reader,
     module GHC.Utils.Error,
 #if MIN_VERSION_ghc(9,2,0)
+#if !MIN_VERSION_ghc(9,7,0)
     module GHC.Types.Avail,
+#endif
     module GHC.Types.SourceFile,
     module GHC.Types.SourceText,
     module GHC.Types.TyThing,
@@ -556,7 +560,9 @@
 import           GHC.Parser.Annotation        (EpAnn (..))
 import           GHC.Platform.Ways
 import           GHC.Runtime.Context          (InteractiveImport (..))
+#if !MIN_VERSION_ghc(9,7,0)
 import           GHC.Types.Avail              (greNamePrintableName)
+#endif
 import           GHC.Types.Fixity             (LexicalFixity (..), Fixity (..), defaultFixity)
 import           GHC.Types.Meta
 import           GHC.Types.Name.Set
@@ -631,7 +637,9 @@
 
 
 pattern AvailTC :: Name -> [Name] -> [FieldLabel] -> Avail.AvailInfo
-#if __GLASGOW_HASKELL__ >= 902
+#if __GLASGOW_HASKELL__ >= 907
+pattern AvailTC n names pieces <- Avail.AvailTC n ((,[]) -> (names,pieces))
+#elif __GLASGOW_HASKELL__ >= 902
 pattern AvailTC n names pieces <- Avail.AvailTC n ((\gres -> foldr (\gre (names, pieces) -> case gre of
       Avail.NormalGreName name -> (name: names, pieces)
       Avail.FieldGreName label -> (names, label:pieces)) ([], []) gres) -> (names, pieces))
@@ -640,14 +648,18 @@
 #endif
 
 pattern AvailName :: Name -> Avail.AvailInfo
-#if __GLASGOW_HASKELL__ >= 902
+#if __GLASGOW_HASKELL__ >= 907
+pattern AvailName n <- Avail.Avail n
+#elif __GLASGOW_HASKELL__ >= 902
 pattern AvailName n <- Avail.Avail (Avail.NormalGreName n)
 #else
 pattern AvailName n <- Avail.Avail n
 #endif
 
 pattern AvailFL :: FieldLabel -> Avail.AvailInfo
-#if __GLASGOW_HASKELL__ >= 902
+#if __GLASGOW_HASKELL__ >= 907
+pattern AvailFL fl <- (const Nothing -> Just fl) -- this pattern always fails as this field was removed in 9.7
+#elif __GLASGOW_HASKELL__ >= 902
 pattern AvailFL fl <- Avail.Avail (Avail.FieldGreName fl)
 #else
 -- pattern synonym that is never populated
@@ -835,7 +847,11 @@
 {-# COMPLETE GRE #-}
 #if MIN_VERSION_ghc(9,2,0)
 pattern GRE{gre_name, gre_par, gre_lcl, gre_imp} <- RdrName.GRE
+#if MIN_VERSION_ghc(9,7,0)
+    {gre_name = gre_name
+#else
     {gre_name = (greNamePrintableName -> gre_name)
+#endif
     ,gre_par, gre_lcl, gre_imp = (toList -> gre_imp)}
 #else
 pattern GRE{gre_name, gre_par, gre_lcl, gre_imp} = RdrName.GRE{..}
diff --git a/src/Development/IDE/GHC/Compat/Env.hs b/src/Development/IDE/GHC/Compat/Env.hs
--- a/src/Development/IDE/GHC/Compat/Env.hs
+++ b/src/Development/IDE/GHC/Compat/Env.hs
@@ -50,6 +50,7 @@
     -- * Backend, backwards compatible
     Backend,
     setBackend,
+    ghciBackend,
     Development.IDE.GHC.Compat.Env.platformDefaultBackend,
     ) where
 
@@ -272,6 +273,15 @@
 
 #if !MIN_VERSION_ghc(9,2,0)
 type Backend = HscTarget
+#endif
+
+ghciBackend  :: Backend
+#if MIN_VERSION_ghc(9,6,0)
+ghciBackend = interpreterBackend
+#elif MIN_VERSION_ghc(9,2,0)
+ghciBackend = Interpreter
+#else
+ghciBackend = HscInterpreted
 #endif
 
 platformDefaultBackend :: DynFlags -> Backend
diff --git a/src/Development/IDE/GHC/Compat/Iface.hs b/src/Development/IDE/GHC/Compat/Iface.hs
--- a/src/Development/IDE/GHC/Compat/Iface.hs
+++ b/src/Development/IDE/GHC/Compat/Iface.hs
@@ -12,6 +12,11 @@
 
 -- See Note [Guidelines For Using CPP In GHCIDE Import Statements]
 
+#if MIN_VERSION_ghc(9,7,0)
+import           GHC.Iface.Errors.Ppr                  (missingInterfaceErrorDiagnostic)
+import           GHC.Iface.Errors.Types                (IfaceMessage)
+#endif
+
 #if !MIN_VERSION_ghc(9,2,0)
 import qualified GHC.Driver.Finder                     as Finder
 import           GHC.Driver.Types                      (FindResult)
@@ -38,7 +43,9 @@
 
 cannotFindModule :: HscEnv -> ModuleName -> FindResult -> SDoc
 cannotFindModule env modname fr =
-#if MIN_VERSION_ghc(9,2,0)
+#if MIN_VERSION_ghc(9,7,0)
+    missingInterfaceErrorDiagnostic (defaultDiagnosticOpts @IfaceMessage) $ Iface.cannotFindModule env modname fr
+#elif MIN_VERSION_ghc(9,2,0)
     Iface.cannotFindModule env modname fr
 #else
     Finder.cannotFindModule (hsc_dflags env) modname fr
diff --git a/src/Development/IDE/GHC/Compat/Logger.hs b/src/Development/IDE/GHC/Compat/Logger.hs
--- a/src/Development/IDE/GHC/Compat/Logger.hs
+++ b/src/Development/IDE/GHC/Compat/Logger.hs
@@ -51,7 +51,9 @@
 
 -- alwaysQualify seems to still do the right thing here, according to the "unqualified warnings" test.
 logActionCompat :: LogActionCompat -> LogAction
-#if MIN_VERSION_ghc(9,5,0)
+#if MIN_VERSION_ghc(9,7,0)
+logActionCompat logAction logFlags (MCDiagnostic severity (ResolvedDiagnosticReason wr) _) loc = logAction logFlags (Just wr) (Just severity) loc alwaysQualify
+#elif MIN_VERSION_ghc(9,5,0)
 logActionCompat logAction logFlags (MCDiagnostic severity wr _) loc = logAction logFlags (Just wr) (Just severity) loc alwaysQualify
 #else
 logActionCompat logAction logFlags (MCDiagnostic severity wr) loc = logAction logFlags (Just wr) (Just severity) loc alwaysQualify
diff --git a/src/Development/IDE/GHC/Compat/Outputable.hs b/src/Development/IDE/GHC/Compat/Outputable.hs
--- a/src/Development/IDE/GHC/Compat/Outputable.hs
+++ b/src/Development/IDE/GHC/Compat/Outputable.hs
@@ -19,6 +19,10 @@
 #if MIN_VERSION_ghc(9,5,0)
     defaultDiagnosticOpts,
     GhcMessage,
+    DriverMessage,
+    Messages,
+    initDiagOpts,
+    pprMessages,
 #endif
 #if MIN_VERSION_ghc(9,3,0)
     DiagnosticReason(..),
@@ -67,6 +71,9 @@
 import           GHC.Driver.Ppr
 import           GHC.Driver.Session
 import qualified GHC.Types.Error              as Error
+#if MIN_VERSION_ghc(9,7,0)
+import           GHC.Types.Error                 (defaultDiagnosticOpts)
+#endif
 import           GHC.Types.Name.Ppr
 import           GHC.Types.Name.Reader
 import           GHC.Types.SourceError
@@ -89,7 +96,7 @@
 #endif
 
 #if MIN_VERSION_ghc(9,5,0)
-import           GHC.Driver.Errors.Types      (GhcMessage)
+import           GHC.Driver.Errors.Types      (GhcMessage, DriverMessage)
 #endif
 
 #if MIN_VERSION_ghc(9,5,0)
@@ -169,12 +176,14 @@
 #endif
 pprNoLocMsgEnvelope (MsgEnvelope { errMsgDiagnostic = e
                                  , errMsgContext   = unqual })
-  = sdocWithContext $ \ctx ->
+  = sdocWithContext $ \_ctx ->
     withErrStyle unqual $
-#if MIN_VERSION_ghc(9,3,0)
-      (formatBulleted ctx $ e)
+#if MIN_VERSION_ghc(9,7,0)
+      (formatBulleted e)
+#elif MIN_VERSION_ghc(9,3,0)
+      (formatBulleted _ctx $ e)
 #else
-      (formatBulleted ctx $ Error.renderDiagnostic e)
+      (formatBulleted _ctx $ Error.renderDiagnostic e)
 #endif
 
 #else
diff --git a/src/Development/IDE/GHC/Orphans.hs b/src/Development/IDE/GHC/Orphans.hs
--- a/src/Development/IDE/GHC/Orphans.hs
+++ b/src/Development/IDE/GHC/Orphans.hs
@@ -195,7 +195,13 @@
   rnf = rwhnf
 
 instance Show OccName where show = unpack . printOutputable
+
+
+#if MIN_VERSION_ghc(9,7,0)
+instance Hashable OccName where hashWithSalt s n = hashWithSalt s (getKey $ getUnique $ occNameFS n, getKey $ getUnique $ occNameSpace n)
+#else
 instance Hashable OccName where hashWithSalt s n = hashWithSalt s (getKey $ getUnique n)
+#endif
 
 instance Show HomeModInfo where show = show . mi_module . hm_iface
 
diff --git a/src/Development/IDE/Plugin/Completions/Logic.hs b/src/Development/IDE/Plugin/Completions/Logic.hs
--- a/src/Development/IDE/Plugin/Completions/Logic.hs
+++ b/src/Development/IDE/Plugin/Completions/Logic.hs
@@ -370,7 +370,11 @@
       fieldMap = Map.fromListWith (++) $ flip mapMaybe rdrElts $ \elt -> do
 #if MIN_VERSION_ghc(9,2,0)
         par <- greParent_maybe elt
+#if MIN_VERSION_ghc(9,7,0)
+        flbl <- greFieldLabel_maybe elt
+#else
         flbl <- greFieldLabel elt
+#endif
         Just (par,[flLabel flbl])
 #else
         case gre_par elt of
@@ -402,7 +406,11 @@
                 | is_qual spec = Map.singleton asMod compItem
                 | otherwise = Map.fromList [(asMod,compItem),(origMod,compItem)]
               asMod = showModName (is_as spec)
+#if MIN_VERSION_ghc(9,8,0)
+              origMod = showModName (moduleName $ is_mod spec)
+#else
               origMod = showModName (is_mod spec)
+#endif
           in (unqual,QualCompls qual)
 
       toCompItem :: Parent -> Module -> T.Text -> Name -> Maybe (LImportDecl GhcPs) -> [CompItem]
diff --git a/src/Development/IDE/Plugin/TypeLenses.hs b/src/Development/IDE/Plugin/TypeLenses.hs
--- a/src/Development/IDE/Plugin/TypeLenses.hs
+++ b/src/Development/IDE/Plugin/TypeLenses.hs
@@ -313,7 +313,7 @@
       showDoc = showDocRdrEnv hsc rdrEnv
       hasSig :: (Monad m) => Name -> m a -> m (Maybe a)
       hasSig name f = whenMaybe (name `elemNameSet` sigs) f
-      bindToSig identifier = do
+      bindToSig identifier = liftZonkM $ do
         let name = idName identifier
         hasSig name $ do
           env <- tcInitTidyEnv
diff --git a/src/Development/IDE/Types/Exports.hs b/src/Development/IDE/Types/Exports.hs
--- a/src/Development/IDE/Types/Exports.hs
+++ b/src/Development/IDE/Types/Exports.hs
@@ -43,7 +43,7 @@
     }
 
 instance NFData ExportsMap where
-  rnf (ExportsMap a b) = foldOccEnv (\c d -> rnf c `seq` d) (seqEltsUFM rnf b) a
+  rnf (ExportsMap a b) = nonDetFoldOccEnv (\c d -> rnf c `seq` d) (seqEltsUFM rnf b) a
 
 instance Show ExportsMap where
   show (ExportsMap occs mods) =
@@ -80,7 +80,7 @@
 mkTypeOcc t = mkTcOccFS $ mkFastStringByteString $ encodeUtf8 t
 
 exportsMapSize :: ExportsMap -> Int
-exportsMapSize = foldOccEnv (\_ x -> x+1) 0 . getExportsMap
+exportsMapSize = nonDetFoldOccEnv (\_ x -> x+1) 0 . getExportsMap
 
 instance Semigroup ExportsMap where
   ExportsMap a b <> ExportsMap c d = ExportsMap (plusOccEnv_C (<>) a c) (plusUFM_C (<>) b d)
diff --git a/test/exe/CompletionTests.hs b/test/exe/CompletionTests.hs
--- a/test/exe/CompletionTests.hs
+++ b/test/exe/CompletionTests.hs
@@ -261,7 +261,7 @@
       []
   ]
   where
-    brokenForWinGhc = knownBrokenFor (BrokenSpecific Windows [GHC90, GHC92, GHC94, GHC96]) "Windows has strange things in scope for some reason"
+    brokenForWinGhc = knownBrokenFor (BrokenSpecific Windows [GHC90, GHC92, GHC94, GHC96, GHC98]) "Windows has strange things in scope for some reason"
 
 otherCompletionTests :: [TestTree]
 otherCompletionTests = [
@@ -302,7 +302,7 @@
       _ <- waitForDiagnostics
       compls <- getCompletions docA $ Position 2 4
       let compls' = [txt | CompletionItem {_insertText = Just txt, ..} <- compls, _label == "member"]
-      liftIO $ take 2 compls' @?= ["member"],
+      liftIO $ take 1 compls' @?= ["member"],
 
     testSessionWait "maxCompletions" $ do
         doc <- createDoc "A.hs" "haskell" $ T.unlines
diff --git a/test/exe/HighlightTests.hs b/test/exe/HighlightTests.hs
--- a/test/exe/HighlightTests.hs
+++ b/test/exe/HighlightTests.hs
@@ -44,7 +44,7 @@
             , DocumentHighlight (R 6 10 6 13) (Just DocumentHighlightKind_Read)
             , DocumentHighlight (R 7 12 7 15) (Just DocumentHighlightKind_Read)
             ]
-  , knownBrokenForGhcVersions [GHC90, GHC92, GHC94, GHC96] "Ghc9 highlights the constructor and not just this field" $
+  , knownBrokenForGhcVersions [GHC90, GHC92, GHC94, GHC96, GHC98] "Ghc9 highlights the constructor and not just this field" $
         testSessionWait "record" $ do
         doc <- createDoc "A.hs" "haskell" recsource
         _ <- waitForDiagnostics
diff --git a/test/exe/PluginSimpleTests.hs b/test/exe/PluginSimpleTests.hs
--- a/test/exe/PluginSimpleTests.hs
+++ b/test/exe/PluginSimpleTests.hs
@@ -36,7 +36,7 @@
 
   -- Error: cabal: Failed to build ghc-typelits-natnormalise-0.7.7 (which is
   -- required by plugin-1.0.0). See the build log above for details.
-  ignoreFor (BrokenForGHC [GHC96]) "fragile, frequently times out" $
+  ignoreFor (BrokenForGHC [GHC96, GHC98]) "fragile, frequently times out" $
   ignoreFor (BrokenSpecific Windows [GHC94]) "ghc-typelist-natnormalise fails to build on GHC 9.4.2 for windows only" $
   testSessionWithExtraFiles "plugin-knownnat" "simple plugin" $ \dir -> do
     _ <- openDoc (dir </> "KnownNat.hs") "haskell"
diff --git a/test/exe/TestUtils.hs b/test/exe/TestUtils.hs
--- a/test/exe/TestUtils.hs
+++ b/test/exe/TestUtils.hs
@@ -167,7 +167,7 @@
 ignoreInWindowsBecause = ignoreFor (BrokenForOS Windows)
 
 ignoreForGHC92Plus :: String -> TestTree -> TestTree
-ignoreForGHC92Plus = ignoreFor (BrokenForGHC [GHC92, GHC94, GHC96])
+ignoreForGHC92Plus = ignoreFor (BrokenForGHC [GHC92, GHC94, GHC96, GHC98])
 
 knownBrokenForGhcVersions :: [GhcVersion] -> String -> TestTree -> TestTree
 knownBrokenForGhcVersions ghcVers = knownBrokenFor (BrokenForGHC ghcVers)
