Conversation
Co-authored-by: Tyrrrz <1935960+Tyrrrz@users.noreply.github.com>
|
@copilot tests failing |
…ension blocks Co-authored-by: Tyrrrz <1935960+Tyrrrz@users.noreply.github.com>
The CI failure was in |
string.Join polyfills
There was a problem hiding this comment.
Pull request overview
Adds missing string.Join overload polyfills to PolyShim to align with the .NET API surface across older TFMs, and updates the signature inventory + tests accordingly.
Changes:
- Added
string.Join(string?, params object?[])andstring.Join<T>(string?, IEnumerable<T>)polyfills for older .NET Framework targets (net35). - Added
string.Joinchar-separator overload polyfills (object[],string[],IEnumerable<T>, and indexed slice) for frameworks where they’re missing. - Updated
Signatures.mdcounts/entries and added tests for the new char-separator overloads.
Reviewed changes
Copilot reviewed 4 out of 4 changed files in this pull request and generated 4 comments.
| File | Description |
|---|---|
| PolyShim/Signatures.md | Updates signature totals and adds entries for the newly polyfilled string.Join overloads. |
| PolyShim/NetCore10/String.cs | Adds .NET 4.0-era Join overload polyfills for older .NET Framework. |
| PolyShim/NetCore20/String.cs | Adds .NET Core 2.0-era char-separator Join overload polyfills. |
| PolyShim.Tests/NetCore20/StringTests.cs | Adds test coverage for the new char-separator Join overloads. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
You can also share your feedback on Copilot code review. Take the survey.
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## prime #90 +/- ##
==========================================
+ Coverage 85.40% 85.48% +0.08%
==========================================
Files 220 220
Lines 3603 3630 +27
Branches 314 315 +1
==========================================
+ Hits 3077 3103 +26
- Misses 454 456 +2
+ Partials 72 71 -1 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
Implements missing
string.Joinpolyfills as tracked in the API reference.Changes
PolyShim/NetCore10/String.csAdds two overloads introduced in .NET Framework 4.0 (missing on
net35):Join(string? separator, params object?[] values)Join<T>(string? separator, IEnumerable<T> values)PolyShim/NetCore20/String.csAdds four char-separator overloads introduced in .NET Core 2.0 (missing on all .NET Framework, older .NET Core, and .NET Standard < 2.1), consolidated into the existing
extension(string str)block:Join(char separator, params object?[] values)Join(char separator, params string?[] values)Join<T>(char separator, IEnumerable<T> values)Join(char separator, string?[] value, int startIndex, int count)Note:
Join(string? separator, string?[] value, int startIndex, int count)has been available since .NET Framework 1.1 and does not require a polyfill.Tests
PolyShim.Tests/NetCore20/StringTests.cs— tests for the char-separator Join overloadsSecurity Summary
No security vulnerabilities introduced or discovered.
💬 Send tasks to Copilot coding agent from Slack and Teams to turn conversations into code. Copilot posts an update in your thread when it's finished.