Unload module from GHC session after a source file is renamed/moved/deleted
Opened this issue · 4 comments
pepeiborra commented
Steps to repro:
- Create a project with two modules:
module Numeric where
-- shadows the Numeric module in base
module A where
import Numeric (showInt) -- error: Numeric doesn't export showInt
- Delete the
Numericmodule Astill refuses to typecheck as it doesn't see the realNumericmodule
pepeiborra commented
Diagnostics may need to be cleaned forcefully as well
ndmitchell commented
Cleaning diagnostics should be done by garbage collection, so I think that's a separate issue. Note that the DAML IDE has garbage collection, but it hasn't yet been ported over.
jneira commented
Cleaning diagnostics should be done by garbage collection, so I think that's a separate issue
That issue would be #713
jneira commented
@wz1000 commented in the related issue, originally in hls:
Another issue is that the knownFiles introduced in haskell/ghcide#688 (merged in the branch ghcide used by hls) are a grow only set. To fix this, known files would probably have to be stored per component, so the set of files for each component can be updated individually.