Decouple the session loader into reader and writer over the cache #6772
Annotations
14 warnings
Hlint check run
ubuntu-latest pipelines will use ubuntu-24.04 soon. For more details, see https://github.com/actions/runner-images/issues/10636
|
Hlint check run:
exe/Wrapper.hs#L1
Warning in module Main: Use module export list ▫︎ Found: "module Main where" ▫︎ Perhaps: "module Main (\n module Main\n ) where" ▫︎ Note: an explicit list is usually better
|
Hlint check run:
ghcide/session-loader/Development/IDE/Session.hs#L677
Warning in loadSessionWithOptions in module Development.IDE.Session: Use atomicModifyIORef'_ ▫︎ Found: "atomicModifyIORef' cradle_files (\\ xs -> (newLoaded <> xs, ()))" ▫︎ Perhaps: "atomicModifyIORef'_ cradle_files ((<>) newLoaded)"
|
Hlint check run:
ghcide/session-loader/Development/IDE/Session.hs#L691
Suggestion in loadSessionWithOptions in module Development.IDE.Session: Redundant bracket ▫︎ Found: "if (not $ null attemptToLoadFiles) then\n do let failedLoadingFiles = (Set.insert cfp attemptToLoadFiles)\n atomicModifyIORef'\n error_loading_files (\\ xs -> (failedLoadingFiles <> xs, ()))\n logWith recorder Info\n $ LogSessionReloadOnError cfp (Set.toList attemptToLoadFiles)\n consultCradle hieYaml cfp\nelse\n do dep_info <- getDependencyInfo\n ((maybeToList hieYaml) ++ concatMap cradleErrorDependencies err)\n let ncfp = toNormalizedFilePath' cfp\n let res\n = (map (\\ err' -> renderCradleError err' cradle ncfp) err, Nothing)\n atomicModifyIORef'\n error_loading_files (\\ xs -> (Set.insert cfp xs, ()))\n atomically\n $ do STM.focus\n (Focus.insertOrMerge HM.union (HM.singleton ncfp (res, dep_info)))\n hieYaml fileToFlags\n STM.insert hieYaml ncfp filesMap\n S.delete cfp pendingFileSet" ▫︎ Perhaps: "if not $ null attemptToLoadFiles then\n do let failedLoadingFiles = (Set.insert cfp attemptToLoadFiles)\n atomicModifyIORef'\n error_loading_files (\\ xs -> (failedLoadingFiles <> xs, ()))\n logWith recorder Info\n $ LogSessionReloadOnError cfp (Set.toList attemptToLoadFiles)\n consultCradle hieYaml cfp\nelse\n do dep_info <- getDependencyInfo\n ((maybeToList hieYaml) ++ concatMap cradleErrorDependencies err)\n let ncfp = toNormalizedFilePath' cfp\n let res\n = (map (\\ err' -> renderCradleError err' cradle ncfp) err, Nothing)\n atomicModifyIORef'\n error_loading_files (\\ xs -> (Set.insert cfp xs, ()))\n atomically\n $ do STM.focus\n (Focus.insertOrMerge HM.union (HM.singleton ncfp (res, dep_info)))\n hieYaml fileToFlags\n STM.insert hieYaml ncfp filesMap\n S.delete cfp pendingFileSet"
|
Hlint check run:
ghcide/session-loader/Development/IDE/Session.hs#L701
Suggestion in loadSessionWithOptions in module Development.IDE.Session: Redundant bracket ▫︎ Found: "do let failedLoadingFiles = (Set.insert cfp attemptToLoadFiles)\n atomicModifyIORef'\n error_loading_files (\\ xs -> (failedLoadingFiles <> xs, ()))\n logWith recorder Info\n $ LogSessionReloadOnError cfp (Set.toList attemptToLoadFiles)\n consultCradle hieYaml cfp" ▫︎ Perhaps: "do let failedLoadingFiles = Set.insert cfp attemptToLoadFiles\n atomicModifyIORef'\n error_loading_files (\\ xs -> (failedLoadingFiles <> xs, ()))\n logWith recorder Info\n $ LogSessionReloadOnError cfp (Set.toList attemptToLoadFiles)\n consultCradle hieYaml cfp"
|
Hlint check run:
ghcide/session-loader/Development/IDE/Session.hs#L702
Warning in loadSessionWithOptions in module Development.IDE.Session: Use atomicModifyIORef'_ ▫︎ Found: "atomicModifyIORef'\n error_loading_files (\\ xs -> (failedLoadingFiles <> xs, ()))" ▫︎ Perhaps: "atomicModifyIORef'_ error_loading_files ((<>) failedLoadingFiles)"
|
Hlint check run:
ghcide/session-loader/Development/IDE/Session.hs#L708
Suggestion in loadSessionWithOptions in module Development.IDE.Session: Redundant bracket ▫︎ Found: "(maybeToList hieYaml) ++ concatMap cradleErrorDependencies err" ▫︎ Perhaps: "maybeToList hieYaml ++ concatMap cradleErrorDependencies err"
|
Hlint check run:
ghcide/session-loader/Development/IDE/Session.hs#L712
Warning in loadSessionWithOptions in module Development.IDE.Session: Use atomicModifyIORef'_ ▫︎ Found: "atomicModifyIORef'\n error_loading_files (\\ xs -> (Set.insert cfp xs, ()))" ▫︎ Perhaps: "atomicModifyIORef'_ error_loading_files (Set.insert cfp)"
|
Hlint check run:
ghcide/session-loader/Development/IDE/Session.hs#L751
Suggestion in loadSessionWithOptions in module Development.IDE.Session: Use const ▫︎ Found: "\\ _ -> (Set.empty, ())" ▫︎ Perhaps: "const (Set.empty, ())"
|
Hlint check run:
ghcide/session-loader/Development/IDE/Session.hs#L752
Suggestion in loadSessionWithOptions in module Development.IDE.Session: Use const ▫︎ Found: "\\ _ -> (Set.empty, ())" ▫︎ Perhaps: "const (Set.empty, ())"
|
Hlint check run:
ghcide/session-loader/Development/IDE/Session.hs#L758
Suggestion in loadSessionWithOptions in module Development.IDE.Session: Redundant bracket ▫︎ Found: "if (not deps_ok) then\n do atomicModifyIORef'\n error_loading_files (\\ xs -> (Set.delete file xs, ()))\n atomicModifyIORef' cradle_files (\\ xs -> (Set.delete file xs, ()))\n atomically\n $ do STM.reset filesMap\n STM.reset fileToFlags\n modifyVar_ hscEnvs (return . Map.adjust (const []) hieYaml)\n consultCradle hieYaml file\nelse\n atomically $ S.delete file pendingFileSet" ▫︎ Perhaps: "if not deps_ok then\n do atomicModifyIORef'\n error_loading_files (\\ xs -> (Set.delete file xs, ()))\n atomicModifyIORef' cradle_files (\\ xs -> (Set.delete file xs, ()))\n atomically\n $ do STM.reset filesMap\n STM.reset fileToFlags\n modifyVar_ hscEnvs (return . Map.adjust (const []) hieYaml)\n consultCradle hieYaml file\nelse\n atomically $ S.delete file pendingFileSet"
|
Hlint check run
The `set-output` command is deprecated and will be disabled soon. Please upgrade to using Environment Files. For more information see: https://github.blog/changelog/2022-10-11-github-actions-deprecating-save-state-and-set-output-commands/
|
Hlint check run
The `set-output` command is deprecated and will be disabled soon. Please upgrade to using Environment Files. For more information see: https://github.blog/changelog/2022-10-11-github-actions-deprecating-save-state-and-set-output-commands/
|
Hlint check run
The `set-output` command is deprecated and will be disabled soon. Please upgrade to using Environment Files. For more information see: https://github.blog/changelog/2022-10-11-github-actions-deprecating-save-state-and-set-output-commands/
|