-
Notifications
You must be signed in to change notification settings - Fork 259
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
When an open file is changed, also update diagnostics and other IDE state for dependent files #2328
Comments
I wonder if there's a way for us to do this but reduce the noise from resolution errors in other files. I worry that any change to a file that that breaks its own resolution will cause a flurry of resolution errors in other files (which, if we're not careful, will also invalidate their caches). Maybe it's possible to delay the checking of other files if the current one doesn't resolve, at least by a bit. |
It can be as simple as not resolving a module until all its dependencies resolve without errors, although I think that might be too strict. Maybe we can distinguish between internal and external module errors, and stop resolution of dependents if there are external module errors. I've marking this out of scope for this issue, since if this is an issue, it occurs on the CLI right now already so I think it's fine to also have it in the IDE. |
Indeed, for example if we rename a constructor it's nice to all files that use it
👍 |
Closing this issue because we won't do this. If no project file is used, editing a file will not update the diagnostics of files that depend on the edited file, even if they are also open in the IDE. |
Background
Currently the Dafny IDE considers each opened file separately, even when one open file depends on another one. The IDE keeps separate state and runs a separate compilation for each opened file.
Related issue: dafny-lang/ide-vscode#82
Change
When any file is changed in the IDE, any open files that depend on the changed file will be included in the compilation, so resolution and verification are updated not just for the changed file but also of those files.
Not in scope
Prerequisites
Implementation suggestions
The text was updated successfully, but these errors were encountered: