-
-
Notifications
You must be signed in to change notification settings - Fork 0
Limit polyfill to only lock type #86
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
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull request overview
Adds an explicit configuration in the shared MSBuild props to restrict Meziantou.Polyfill usage to only the System.Threading.Lock polyfill across the solution.
Changes:
- Introduces an “Enabled Polyfills” property group in
Directory.Build.props. - Sets
MeziantouPolyfill_IncludedPolyfillsto targetT:System.Threading.Lock.
| <Polyfill></Polyfill> | ||
| <Polyfill>$(Polyfill)|T:System.Threading.Lock</Polyfill> | ||
| <MeziantouPolyfill_IncludedPolyfills>$(Polyfill)</MeziantouPolyfill_IncludedPolyfills> | ||
| </PropertyGroup> | ||
|
|
||
| <PropertyGroup Condition="'$(GITHUB_ACTIONS)' == 'true'"> |
Copilot
AI
Feb 9, 2026
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
<Polyfill></Polyfill> followed by <Polyfill>$(Polyfill)|T:System.Threading.Lock</Polyfill> expands to a value that starts with a leading | (because $(Polyfill) is empty). If MeziantouPolyfill_IncludedPolyfills doesn’t tolerate empty entries, this can prevent the Lock polyfill from being applied (and break net8 builds). Prefer setting MeziantouPolyfill_IncludedPolyfills directly to T:System.Threading.Lock, or append conditionally only when the existing value is non-empty (and avoid the extra Polyfill property altogether).
| <Polyfill></Polyfill> | |
| <Polyfill>$(Polyfill)|T:System.Threading.Lock</Polyfill> | |
| <MeziantouPolyfill_IncludedPolyfills>$(Polyfill)</MeziantouPolyfill_IncludedPolyfills> | |
| </PropertyGroup> | |
| <PropertyGroup Condition="'$(GITHUB_ACTIONS)' == 'true'"> | |
| <MeziantouPolyfill_IncludedPolyfills>T:System.Threading.Lock</MeziantouPolyfill_IncludedPolyfills> | |
| </PropertyGroup> | |
| <PropertyGroup Condition="'$(GITHUB_ACTIONS)' == 'true'"> | |
| <PropertyGroup Condition="'$(GITHUB_ACTIONS)' == 'true'"> |
| </PropertyGroup> | ||
|
|
||
| <PropertyGroup Label="Enabled Polyfills"> | ||
| <!--https://github.com/meziantou/Meziantou.Polyfill?tab=readme-ov-file#supported-polyfills--> |
Copilot
AI
Feb 9, 2026
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
XML comment formatting: add a space after <!-- for readability/consistency (e.g., <!-- https://... -->).
| <!--https://github.com/meziantou/Meziantou.Polyfill?tab=readme-ov-file#supported-polyfills--> | |
| <!-- https://github.com/meziantou/Meziantou.Polyfill?tab=readme-ov-file#supported-polyfills--> |
No description provided.