Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Lock around access to s_dynamicSymbols - #52887

#52887
Merged
baronfel merged 3 commits into
dotnet:release/10.0.3xxdotnet/sdk:release/10.0.3xxfrom
tmat:DynamicCommandsLocktmat/sdk:DynamicCommandsLockCopy head branch name to clipboard
Feb 6, 2026
Merged

Lock around access to s_dynamicSymbols#52887
baronfel merged 3 commits into
dotnet:release/10.0.3xxdotnet/sdk:release/10.0.3xxfrom
tmat:DynamicCommandsLocktmat/sdk:DynamicCommandsLockCopy head branch name to clipboard

Conversation

@tmat

@tmat tmat commented Feb 6, 2026

Copy link
Copy Markdown
Member

Alternative to #52883

Copilot AI review requested due to automatic review settings February 6, 2026 21:15
@tmat

tmat commented Feb 6, 2026

Copy link
Copy Markdown
Member Author

@baronfel Alternative fix

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.

Pull request overview

This PR addresses thread-safety around the dynamic-completions metadata stored in DynamicSymbolExtensions by synchronizing access to the shared s_dynamicSymbols dictionary.

Changes:

  • Add a static lock to guard reads/writes to s_dynamicSymbols.
  • Consolidate the extension receiver to Symbol (instead of separate Option/Argument extension blocks), keeping IsDynamic functionality in one place.

Comment thread src/System.CommandLine.StaticCompletions/DynamicSymbolExtensions.cs
@baronfel

baronfel commented Feb 6, 2026

Copy link
Copy Markdown
Member

Thanks, this is more like what I was thinking based on how the other extensibility points solved concurrency.

@baronfel
baronfel merged commit 1eac263 into dotnet:release/10.0.3xx Feb 6, 2026
24 of 26 checks passed
@tmat
tmat deleted the DynamicCommandsLock branch February 7, 2026 01:53
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

Morty Proxy This is a proxified and sanitized view of the page, visit original site.