Skip to content

file briefly existing continues to produce reported problem in vs code #3027

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

Closed
andrewufrank opened this issue Jul 9, 2022 · 1 comment
Closed
Labels
status: needs triage type: bug Something isn't right: doesn't work as intended, documentation is missing/outdated, etc..

Comments

@andrewufrank
Copy link

Your environment

Which OS do you use: Debian 11

Which LSP client (editor/plugin) do you use: vs-code haskell haskell-syntax highlight

Describe your project (alternative: link to the project): minimal cabal project with hpack one main, one library with 2 modules

Steps to reproduce

project compiles cleanly (cabal build) no error reported
copy one of the modules in the library to new.hs in the library and edit it to cause an error
hpack; cabal build -> error is reported. problems show it.
rename the file to new2.hs and fix the error
hpack; cabal build -> no error is reported but the 'problem' shows 1 error in file New1.hs
clicking on the error in the 'problem' - file New1.hs cannot be opened because it does not exist.

the count of problems remain 1
note: the fiel new1.hs or ew2.hs are not mentioned in the cabal file (because lower case and thus not seen by hpack)

Expected behaviour

after renaming New1.hs to New2.hs and fixing the error, the count of problems should go back to 0

Actual behaviour

problem count remains 1

I have the impression that a hie file was produced automatically and is cached and not replace somewhere (I have observed other strange behaviour, e.g. files in a non-source directory ('do not use' dir) are included in the error count and errors reported) in reporting problems with cradle or inexisting files which disappear sometimes later as by magic. is there a reliable method to force a reconstruction of the hie file?

the issue is a minor annoyance but it is nice when just checking the problem count confirms that no errors are in the code.

Include debug information

@andrewufrank andrewufrank added status: needs triage type: bug Something isn't right: doesn't work as intended, documentation is missing/outdated, etc.. labels Jul 9, 2022
@michaelpj
Copy link
Collaborator

I think this is a duplicate of #713: we don't garbage collect diagnostics, so if a file disappears we will never update the diagnostics for it.

@michaelpj michaelpj closed this as not planned Won't fix, can't repro, duplicate, stale Aug 10, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
status: needs triage 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

2 participants