Skip to content

Bugfix/atr 975 fix rename hanging 2 - #680

Merged
SENya1990 merged 17 commits into
devfrom
bugfix/ATR-975-fix-rename-hanging-2
Sep 10, 2026
Merged

Bugfix/atr 975 fix rename hanging 2#680
SENya1990 merged 17 commits into
devfrom
bugfix/ATR-975-fix-rename-hanging-2

Conversation

@SENya1990

@SENya1990 SENya1990 commented Sep 8, 2026

Copy link
Copy Markdown
Collaborator

Changes Overview

  • Resolved deadlock in syntax coloring that appeared on attempts to synchronously refresh coloring tags on renaming of the document
  • Added check of the requested tagger's type
  • Fixed handling of JoinableTaskFactory in the VS integration, added custom FileAndForget helper method
  • optimization - return only tags intersecting with the requested spans

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

🟡 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 T tag 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 FileAndForget pattern used elsewhere (e.g. Commands/Formatter/FormatBqlCommand.cs:70-73). This reduces the chance of silent failures from RaiseTagsChangedAsync and 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.

Comment thread src/Acuminator/Acuminator.Vsix/Coloriser/PXRoslynColorizerTagger.cs Outdated
… with FileAndForget that writes to the ActivityLog

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

🟡 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

Comment thread src/Acuminator/Acuminator.Vsix/AcuminatorVSPackage.cs
Comment thread src/Acuminator/Acuminator.Vsix/Utils/Tasks/VsTasksUtils.cs Outdated
Comment thread src/Acuminator/Acuminator.Vsix/Utils/Tasks/VsTasksUtils.cs
@SENya1990
SENya1990 force-pushed the bugfix/ATR-975-fix-rename-hanging-2 branch from e57936c to 998b457 Compare September 10, 2026 01:38
@SENya1990
SENya1990 requested a balanced review from Copilot September 10, 2026 01:40

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

🔵 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

@SENya1990
SENya1990 merged commit eac2f99 into dev Sep 10, 2026
1 check passed
@SENya1990
SENya1990 deleted the bugfix/ATR-975-fix-rename-hanging-2 branch September 10, 2026 16:20
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.

3 participants