File tree Expand file tree Collapse file tree 1 file changed +3
-3
lines changed
ghcide/session-loader/Development/IDE Expand file tree Collapse file tree 1 file changed +3
-3
lines changed Original file line number Diff line number Diff line change @@ -782,16 +782,16 @@ loadSessionWithOptions recorder SessionLoadingOptions{..} rootDir que = do
782782 -- what if the error to load file is one of old_files ?
783783 let attemptToLoadFiles = Set. delete cfp $ Set. fromList $ concatMap cradleErrorLoadingFiles err
784784 old_files <- readIORef (cradle_files sessionState)
785- let errorToLoadNewFiles = attemptToLoadFiles `Set.difference` old_files
786- if not ( null errorToLoadNewFiles)
785+ let errorToLoadNewFiles = cfp : Set. toList ( attemptToLoadFiles `Set.difference` old_files)
786+ if length errorToLoadNewFiles > 1
787787 then do
788788 -- we are loading more files and failed, we need to retry
789789 -- mark as less loaded files as failedLoadingFiles as possible
790790 -- limitation is that when we are loading files, and the dependencies of old_files
791791 -- are changed, and old_files are not valid anymore.
792792 -- but they will still be in the old_files, and will not move to error_loading_files.
793793 -- And make other files failed to load in batch mode.
794- addErrorLoadingFiles sessionState ( Set. toList errorToLoadNewFiles)
794+ addErrorLoadingFiles sessionState errorToLoadNewFiles
795795 -- retry without other files
796796 logWith recorder Info $ LogSessionReloadOnError cfp (Set. toList attemptToLoadFiles)
797797 consultCradle hieYaml cfp
You can’t perform that action at this time.
0 commit comments