Skip to content

SessionLoader: batch load #6711

SessionLoader: batch load

SessionLoader: batch load #6711

Triggered via pull request November 4, 2024 13:24
Status Success
Total duration 51s
Artifacts

hlint.yml

on: pull_request
Hlint check run
44s
Hlint check run
Fit to window
Zoom out
Zoom in

Annotations

15 warnings
Hlint check run
The following actions uses node12 which is deprecated and will be forced to run on node16: rwe/actions-hlint-setup@v1, rwe/actions-hlint-run@v2. For more info: https://github.blog/changelog/2023-06-13-github-actions-all-actions-will-run-on-node16-instead-of-node12-by-default/
Hlint check run
The following actions use a deprecated Node.js version and will be forced to run on node20: actions/checkout@v3, rwe/actions-hlint-setup@v1, rwe/actions-hlint-run@v2. For more info: https://github.blog/changelog/2024-03-07-github-actions-all-actions-will-run-on-node20-instead-of-node16-by-default/
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#L609
Suggestion in loadSessionWithOptions in module Development.IDE.Session: Redundant $ ▫︎ Found: "return\n $ (second Map.keys this_options, \n Set.fromList $ fromNormalizedFilePath <$> newLoaded)" ▫︎ Perhaps: "return\n (second Map.keys this_options, \n Set.fromList $ fromNormalizedFilePath <$> newLoaded)"
Hlint check run: ghcide/session-loader/Development/IDE/Session.hs#L659
Warning in loadSessionWithOptions in module Development.IDE.Session: Use atomicModifyIORef'_ ▫︎ Found: "atomicModifyIORef' cradle_files (\\ xs -> (newLoadedT <> xs, ()))" ▫︎ Perhaps: "atomicModifyIORef'_ cradle_files ((<>) newLoadedT)"
Hlint check run: ghcide/session-loader/Development/IDE/Session.hs#L665
Suggestion in loadSessionWithOptions in module Development.IDE.Session: Redundant bracket ▫︎ Found: "if (length toLoads > 1) then\n do succLoaded_files <- readIORef cradle_files\n let failedLoadingFiles\n = (Set.insert cfp toLoads) `Set.difference` succLoaded_files\n atomicModifyIORef'\n error_loading_files (\\ xs -> (failedLoadingFiles <> xs, ()))\n atomically $ forM_ pendingFiles (writeTQueue pendingFilesTQueue)\n consultCradle hieYaml cfp\nelse\n do dep_info <- getDependencyInfo (maybeToList hieYaml)\n let ncfp = toNormalizedFilePath' cfp\n let res\n = (map (\\ err' -> renderCradleError err' cradle ncfp) err, Nothing)\n void\n $ modifyVar' fileToFlags\n $ Map.insertWith\n HM.union hieYaml (HM.singleton ncfp (res, dep_info))\n void $ modifyVar' filesMap $ HM.insert ncfp hieYaml\n return\n (res, \n maybe [] pure hieYaml ++ concatMap cradleErrorDependencies err)" ▫︎ Perhaps: "if length toLoads > 1 then\n do succLoaded_files <- readIORef cradle_files\n let failedLoadingFiles\n = (Set.insert cfp toLoads) `Set.difference` succLoaded_files\n atomicModifyIORef'\n error_loading_files (\\ xs -> (failedLoadingFiles <> xs, ()))\n atomically $ forM_ pendingFiles (writeTQueue pendingFilesTQueue)\n consultCradle hieYaml cfp\nelse\n do dep_info <- getDependencyInfo (maybeToList hieYaml)\n let ncfp = toNormalizedFilePath' cfp\n let res\n = (map (\\ err' -> renderCradleError err' cradle ncfp) err, Nothing)\n void\n $ modifyVar' fileToFlags\n $ Map.insertWith\n HM.union hieYaml (HM.singleton ncfp (res, dep_info))\n void $ modifyVar' filesMap $ HM.insert ncfp hieYaml\n return\n (res, \n maybe [] pure hieYaml ++ concatMap cradleErrorDependencies err)"
Hlint check run: ghcide/session-loader/Development/IDE/Session.hs#L669
Suggestion in loadSessionWithOptions in module Development.IDE.Session: Redundant bracket ▫︎ Found: "(Set.insert cfp toLoads) `Set.difference` succLoaded_files" ▫︎ Perhaps: "Set.insert cfp toLoads `Set.difference` succLoaded_files"
Hlint check run: ghcide/session-loader/Development/IDE/Session.hs#L670
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#L724
Warning in loadSessionWithOptions in module Development.IDE.Session: Use atomicModifyIORef'_ ▫︎ Found: "atomicModifyIORef'\n error_loading_files (\\ xs -> (Set.delete file xs, ()))" ▫︎ Perhaps: "atomicModifyIORef'_ error_loading_files (Set.delete file)"
Hlint check run: ghcide/session-loader/Development/IDE/Session.hs#L725
Warning in loadSessionWithOptions in module Development.IDE.Session: Use atomicModifyIORef'_ ▫︎ Found: "atomicModifyIORef' cradle_files (\\ xs -> (Set.delete file xs, ()))" ▫︎ Perhaps: "atomicModifyIORef'_ cradle_files (Set.delete file)"
Hlint check run: ghcide/session-loader/Development/IDE/Session.hs#L923
Suggestion in newComponentCache in module Development.IDE.Session: Redundant bracket ▫︎ Found: "(homeUnitId_ (componentDynFlags ci)) `OS.member` bad_units" ▫︎ Perhaps: "homeUnitId_ (componentDynFlags ci) `OS.member` bad_units"
Hlint check run: ghcide/session-loader/Development/IDE/Session/Diagnostics.hs#L1
Warning in module Development.IDE.Session.Diagnostics: Use module export list ▫︎ Found: "module Development.IDE.Session.Diagnostics where" ▫︎ Perhaps: "module Development.IDE.Session.Diagnostics (\n module Development.IDE.Session.Diagnostics\n ) where" ▫︎ Note: an explicit list is usually better
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/