Skip to content

Unload module from GHC session after a source file is renamed/moved/deleted #792

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
pepeiborra opened this issue Mar 21, 2020 · 4 comments
Labels
component: ghcide type: bug Something isn't right: doesn't work as intended, documentation is missing/outdated, etc..

Comments

@pepeiborra
Copy link
Collaborator

Steps to repro:

  1. 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
  1. Delete the Numeric module
  2. A still refuses to typecheck as it doesn't see the real Numeric module
@pepeiborra
Copy link
Collaborator Author

Diagnostics may need to be cleaned forcefully as well

@ndmitchell
Copy link
Collaborator

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.

@pepeiborra pepeiborra transferred this issue from haskell/ghcide Jan 1, 2021
@jneira
Copy link
Member

jneira commented Jan 13, 2021

Cleaning diagnostics should be done by garbage collection, so I think that's a separate issue

That issue would be #713

@jneira
Copy link
Member

jneira commented Jan 19, 2021

@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.

@hasufell hasufell added type: bug Something isn't right: doesn't work as intended, documentation is missing/outdated, etc.. and removed type: enhancement New feature or request labels Jul 13, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
component: ghcide type: bug Something isn't right: doesn't work as intended, documentation is missing/outdated, etc..
Projects
None yet
Development

No branches or pull requests

4 participants