Conversation
…tilities Agent-Logs-Url: https://github.com/Tyrrrz/CliFx/sessions/b16d4520-5927-4078-9af1-e04c31b8f36d Co-authored-by: Tyrrrz <1935960+Tyrrrz@users.noreply.github.com>
Agent-Logs-Url: https://github.com/Tyrrrz/CliFx/sessions/b16d4520-5927-4078-9af1-e04c31b8f36d Co-authored-by: Tyrrrz <1935960+Tyrrrz@users.noreply.github.com>
@copilot what do you mean by that? |
Sorry, that description was imprecise. The PolyShim 2.10.0 detects |
|
Please update PowerKit, we should be able to replace even more extensions now. @copilot |
…tensions Agent-Logs-Url: https://github.com/Tyrrrz/CliFx/sessions/4e83173d-53b8-4668-adca-09860e93222b Co-authored-by: Tyrrrz <1935960+Tyrrrz@users.noreply.github.com>
Done in fa635bd. Updated PowerKit to |
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## prime #185 +/- ##
==========================================
+ Coverage 91.78% 91.92% +0.14%
==========================================
Files 74 65 -9
Lines 2374 2329 -45
Branches 300 282 -18
==========================================
- Hits 2179 2141 -38
+ Misses 134 129 -5
+ Partials 61 59 -2 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
There was a problem hiding this comment.
Pull request overview
Integrates the source-only PowerKit utilities into CliFx to replace local utility implementations, upgrades PolyShim to 2.10.0, and adds an MSBuild workaround to ensure correct PolyShim feature detection on netstandard2.0.
Changes:
- Add
PowerKitdependency and migrate call sites fromCliFx.Utils.*helpers toPowerKitequivalents. - Remove now-redundant hand-written utility/extension files in CliFx, generators, and tests.
- Bump PolyShim to 2.10.0 and add
Directory.Build.targetsto clear an incorrectly detected feature constant onnetstandard2.0.
Reviewed changes
Copilot reviewed 30 out of 30 changed files in this pull request and generated 1 comment.
Show a summary per file
| File | Description |
|---|---|
| Directory.Packages.props | Bumps PolyShim and adds centralized PowerKit version. |
| Directory.Build.targets | Adds netstandard2.0 PolyShim feature-detection workaround by modifying DefineConstants. |
| CliFx/CliFx.csproj | Adds PowerKit reference to main library project. |
| CliFx.Tests/CliFx.Tests.csproj | Adds PowerKit reference for tests. |
| CliFx.Generators/CliFx.Generators.csproj | Adds PowerKit reference for source generator project. |
| CliFx/CommandLineApplication.cs | Switches env-var bool parsing to PowerKit (ParseOrNull). |
| CliFx/CommandLineApplicationBuilder.cs | Switches version formatting extension to PowerKit (ToSemanticString). |
| CliFx/Infrastructure/ConsoleWriter.cs | Switches encoding helper (WithoutPreamble) to PowerKit. |
| CliFx/Infrastructure/ConsoleExtensions.cs | Switches Disposable helper to PowerKit. |
| CliFx/Binding/CommandRootDescriptor.cs | Switches collection/string helpers (WhereNotNullOrWhiteSpace, RemoveRange) to PowerKit. |
| CliFx/Activation/CommandActivator.cs | Switches collection helper (RemoveRange) to PowerKit. |
| CliFx/Parsing/ParsedCommandLine.cs | Inlines char→string conversion (ToString) after removing local AsString. |
| CliFx/Utils/StackTraces/StackFrame.cs | Switches string helper (NullIfWhiteSpace) to PowerKit. |
| CliFx.Tests/Utils/CommandCompiler.cs | Switches WhereNotNull helper to PowerKit. |
| CliFx.Generators/* (Binding/Emitters/Generator) | Switches WhereNotNull, NullIfWhiteSpace, ToKebabCase helpers to PowerKit. |
| CliFx/Utils/* deleted utility files | Removes local equivalents now covered by PowerKit (Disposable, encoding wrapper, extension helpers, etc.). |
| CliFx.Generators/Utils/Extensions/* deleted | Removes generator-local equivalents now covered by PowerKit. |
| CliFx.Tests/Utils/Extensions/* deleted | Removes test-local equivalents now covered by PowerKit. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
|
@copilot Update PolyShim and see if the ValueTask-related issue is solved upstream. |
…round Agent-Logs-Url: https://github.com/Tyrrrz/CliFx/sessions/7d5c3dfa-3a13-4bd6-8a7e-adb8bd486ba9 Co-authored-by: Tyrrrz <1935960+Tyrrrz@users.noreply.github.com>
Done in b51a875. PolyShim 2.10.1 includes the fix ("Fix ManualResetValueTaskSourceCore polyfill missing on netstandard2.0" — the |
Integrates PowerKit (source-only) as a shared utilities library, replaces hand-written code it now covers, and bumps PolyShim from 2.7.0 → 2.10.1.
Deleted files (fully covered by PowerKit)
CliFx/Utils/Disposable.cs→PowerKit.DisposableCliFx/Utils/NoPreambleEncoding.cs→ internal to PowerKit'sEncodingExtensionsCliFx/Utils/Extensions/EncodingExtensions.cs→PowerKit.Extensions.EncodingExtensionsCliFx/Utils/Extensions/PrimitiveExtensions.cs→PowerKit.Extensions.BoolExtensions(ParseOrNull)CliFx/Utils/Extensions/CollectionExtensions.cs→PowerKit.Extensions.CollectionExtensions(RemoveRange) +PowerKit.Extensions.DictionaryExtensions(ToDictionary)CliFx/Utils/Extensions/StringExtensions.cs→PowerKit.Extensions.CharExtensions(Repeat);AsStringinlined aschar.ToString()CliFx/Utils/Extensions/VersionExtensions.cs→PowerKit.Extensions.VersionExtensions(ToSemanticString)CliFx.Generators/Utils/Extensions/CollectionExtensions.cs→PowerKit.Extensions.EnumerableExtensionsCliFx.Generators/Utils/Extensions/StringExtensions.cs→PowerKit.Extensions(ToKebabCase,NullIfWhiteSpace)CliFx.Tests/Utils/Extensions/CollectionExtensions.cs→PowerKit.Extensions.EnumerableExtensionsTrimmed files (partial overlap)
CollectionExtensions.cs(CliFx): removedWhereNotNull/WhereNotNullOrWhiteSpace(covered earlier);RemoveRangeandToDictionarynow fully covered by PowerKit 0.0.0-a.6 → file deletedStringExtensions.cs(CliFx): removedNullIfWhiteSpace(covered earlier);Repeatnow covered by PowerKit 0.0.0-a.6 → file deletedPolyShim 2.10.1
PolyShim 2.10.1 fixes the
ManualResetValueTaskSourceCore<T>detection bug onnetstandard2.0that was present in 2.10.0 — the incorrectFEATURE_VALUETASK_SOURCES_MANUALRESETconstant was removed entirely from its feature-detection targets. NoDirectory.Build.targetsworkaround is needed.