Skip to content

Commit 98ae446

Browse files
committed
add doc about limitation
1 parent 67aebc4 commit 98ae446

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

ghcide/session-loader/Development/IDE/Session.hs

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -669,6 +669,10 @@ loadSessionWithOptions recorder SessionLoadingOptions{..} rootDir que = do
669669
if (not $ null extraToLoads)
670670
then do
671671
-- mark as less loaded files as failedLoadingFiles as possible
672+
-- limitation is that when we are loading files, and the dependencies of old_files
673+
-- are changed, and old_files are not valid anymore.
674+
-- but they will still be in the old_files, and will not move to error_loading_files.
675+
-- And make other files failed to load in batch mode.
672676
let failedLoadingFiles = (Set.insert cfp extraToLoads) `Set.difference` old_files
673677
atomicModifyIORef' error_loading_files (\xs -> (failedLoadingFiles <> xs,()))
674678
-- retry without other files
@@ -726,7 +730,6 @@ loadSessionWithOptions recorder SessionLoadingOptions{..} rootDir que = do
726730
deps_ok <- checkDependencyInfo old_di
727731
if not deps_ok
728732
then do
729-
-- todo invoke the action to recompile the file
730733
-- if deps are old, we can try to load the error files again
731734
atomicModifyIORef' error_loading_files (\xs -> (Set.delete file xs,()))
732735
atomicModifyIORef' cradle_files (\xs -> (Set.delete file xs,()))

0 commit comments

Comments
 (0)