Bugfix/atr 975 fix rename hanging 2 - #680
Conversation
There was a problem hiding this comment.
🟡 Changes recommended
The new async scheduling suppresses VSSDK007 instead of using the existing FileAndForget pattern, which risks masking failures and adds avoidable warning suppressions.
Once you've addressed the issues Copilot identified, you can request another Copilot review.
Pull request overview
This PR addresses a Visual Studio extension hang by removing synchronous tag refresh calls that could deadlock during document rename, and tightens tagger provider behavior by validating the requested tagger type before creating instances.
Changes:
- Replaced synchronous
JoinableTaskFactory.Run(...)refresh calls with non-blocking async scheduling to prevent deadlocks during workspace/document change events. - Added type-compatibility checks in tagger providers to ensure they only create taggers for supported
Ttag types. - Introduced VS Shell task extension usage to fire-and-forget scheduled work.
File summaries
| File | Description |
|---|---|
| src/Acuminator/Acuminator.Vsix/Coloriser/PXRoslynColorizerTagger.cs | Switches tag refresh on workspace changes from synchronous JTF blocking to async fire-and-forget to avoid deadlocks. |
| src/Acuminator/Acuminator.Vsix/Coloriser/PXColorizerTaggerProvider.cs | Adds a guard to only create the colorizer tagger when the requested T matches the tagger’s supported tag type. |
| src/Acuminator/Acuminator.Vsix/Coloriser/Outlining/PXOutliningTaggerProvider.cs | Adds a similar guard for outlining tagger creation based on the requested T type. |
Review details
Suppressed comments (1)
src/Acuminator/Acuminator.Vsix/Coloriser/PXRoslynColorizerTagger.cs:347
- Avoid suppressing VSSDK007 here; instead, keep the call non-blocking but explicitly observe/log failures using the same
FileAndForgetpattern used elsewhere (e.g.Commands/Formatter/FormatBqlCommand.cs:70-73). This reduces the chance of silent failures fromRaiseTagsChangedAsyncand eliminates the pragma suppression.
#pragma warning disable VSSDK007 // ThreadHelper.JoinableTaskFactory.RunAsync
ThreadHelper.JoinableTaskFactory.RunAsync(RaiseTagsChangedAsync)
.FireAndForget();
#pragma warning restore VSSDK007
- Files reviewed: 3/3 changed files
- Comments generated: 1
- Review effort level: Lite
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
… with FileAndForget that writes to the ActivityLog
… is recorded as an AI agent skill + extra link to the VS tasks libs description
… package in a safe way + added FileAndForget helper methods
…changes in raising tags changed event async
…r's own FileAndForget helper
…TF RunAsync scope
There was a problem hiding this comment.
🟡 Changes recommended
The new fire-and-forget helper has correctness issues around nullable faultEventName/thread-switching consistency, and the updated System.Runtime.Handles dependency version is likely invalid and would break restore.
Once you've addressed the issues Copilot identified, you can request another Copilot review.
Review details
- Files reviewed: 31/31 changed files
- Comments generated: 3
- Review effort level: Lite
e57936c to
998b457
Compare
There was a problem hiding this comment.
🔵 Needs a closer look
The test project references a nonexistent System.Runtime.Handles 4.1.0 package, preventing dependency restoration.
Review details
Suppressed comments (1)
Previously missed (1) — in code that hasn't changed since the last review.
src/Acuminator/Acuminator.Vsix/AcuminatorVSPackage.cs:381
- Add the missing space between these sentences.
- Files reviewed: 32/32 changed files
- Comments generated: 0 new
- Review effort level: Balanced
Changes Overview