Add polyfill for ProcessStartInfo.ArgumentList#125
Conversation
Agent-Logs-Url: https://github.com/Tyrrrz/PolyShim/sessions/73ea323c-ae3a-48b2-9134-2d04d9d871e2 Co-authored-by: Tyrrrz <1935960+Tyrrrz@users.noreply.github.com>
…tion Agent-Logs-Url: https://github.com/Tyrrrz/PolyShim/sessions/5d20c12d-d0ef-43d6-ad8b-f6b508f80085 Co-authored-by: Tyrrrz <1935960+Tyrrrz@users.noreply.github.com>
Agent-Logs-Url: https://github.com/Tyrrrz/PolyShim/sessions/3aa77282-ca0f-4189-9371-9a0117a5eb0d Co-authored-by: Tyrrrz <1935960+Tyrrrz@users.noreply.github.com>
There was a problem hiding this comment.
Pull request overview
Adds a PolyShim member polyfill for System.Diagnostics.ProcessStartInfo.ArgumentList to enable argument-list based process invocation on TFMs where the BCL property isn’t available (e.g., .NET Framework and older .NET Core).
Changes:
- Introduces an extension
ArgumentListproperty backed by aConditionalWeakTable, rebuildingProcessStartInfo.Argumentson collection mutations. - Implements Windows-style command-line argument escaping when materializing
Arguments. - Adds end-to-end tests that spawn
cmd/shto validate multi-arg and space-containing argument behavior.
Reviewed changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated 2 comments.
| File | Description |
|---|---|
| PolyShim/NetCore30/ProcessStartInfo.cs | Adds the ProcessStartInfo.ArgumentList member polyfill and argument escaping logic. |
| PolyShim.Tests/NetCore30/ProcessStartInfoTests.cs | Adds process-based tests intended to validate the new ArgumentList behavior across platforms. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
|
@copilot the build is failing on net35 and net40: https://github.com/Tyrrrz/PolyShim/actions/runs/24629070630/job/72013142864?pr=125 How hard would it be to polyfill those missing APIs? |
Agent-Logs-Url: https://github.com/Tyrrrz/PolyShim/sessions/cefeebcd-9df2-42ed-b8d6-b5ecf34bd7cd Co-authored-by: Tyrrrz <1935960+Tyrrrz@users.noreply.github.com>
|
@copilot declare ArgumentListCollection as |
…to file class Agent-Logs-Url: https://github.com/Tyrrrz/PolyShim/sessions/8c8419fc-9d41-482c-806e-6931321f907c Co-authored-by: Tyrrrz <1935960+Tyrrrz@users.noreply.github.com>
Agent-Logs-Url: https://github.com/Tyrrrz/PolyShim/sessions/e61d0a1d-8333-4035-ad9b-92713e866984 Co-authored-by: Tyrrrz <1935960+Tyrrrz@users.noreply.github.com>
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## prime #125 +/- ##
==========================================
+ Coverage 90.76% 95.80% +5.03%
==========================================
Files 285 188 -97
Lines 4959 3550 -1409
Branches 404 169 -235
==========================================
- Hits 4501 3401 -1100
+ Misses 366 128 -238
+ Partials 92 21 -71 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
NetCore10/WeakReference.cs—WeakReference<T>forNETFRAMEWORK && !NET45_OR_GREATERNetCore10/ConditionalWeakTable.cs—ConditionalWeakTable<TKey, TValue>forNETFRAMEWORK && !NET40_OR_GREATERNetCore30/ProcessStartInfo.cs— widen NETFRAMEWORK guard fromNET45_OR_GREATERtoNETFRAMEWORKPolyShim.Tests/NetCore10/WeakReferenceTests.csPolyShim.Tests/NetCore10/ConditionalWeakTableTests.cs