Skip to content

Fix bugs that could lead to an unresponsive IDE when working with project files - #5444

Merged
keyboardDrummer merged 25 commits into
dafny-lang:masterfrom
keyboardDrummer:nonResponsiveProjectManager
May 19, 2024
Merged

keyboardDrummer merged 25 commits into
dafny-lang:masterfrom
keyboardDrummer:nonResponsiveProjectManager

Conversation

@keyboardDrummer

@keyboardDrummer keyboardDrummer commented May 15, 2024 •

Copy link
Copy Markdown
Member

Description

  • Add option ProjectManagerDatabase.ProjectFileCacheExpiry that allows test to not wait for the cache to expire, something which is otherwise easily forgotten
  • Fix a bug that could lead to a non-responsive IDE when a project file was opened and closed
  • Fix a bug that could lead to a non-responsive IDE when project file changes were made and undone
  • Add defensive coding to prevent disposed project manager from being used (something that occurred in the above two bugs)
  • [No test added] Fix a concurrency bug that could lead to incorrect IDE behavior

How has this been tested?

  • Added an IDE test for each fixed bug

By submitting this pull request, I confirm that my contribution is made under the terms of the MIT license.

@keyboardDrummer
keyboardDrummer enabled auto-merge (squash) May 15, 2024 09:22

if (projectManagerForFile is { IsDisposed: true }) {
// Defensive coding
logger.LogError("Found disposed project manager through managersBySourceFile.");

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good. At least this will avoid a whole class of issues.

MikaelMayer
MikaelMayer previously approved these changes May 15, 2024
MikaelMayer
MikaelMayer previously approved these changes May 16, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants