Open
Conversation
…ing to validate netstandard20
7 tasks
Contributor
There was a problem hiding this comment.
Pull request overview
This PR adds .NET Standard 2.0 support to the ToonFormat library, expanding compatibility to .NET Framework and earlier .NET Core versions while maintaining support for .NET 8.0, 9.0, and 10.0.
Changes:
- Added .NET Standard 2.0 as a target framework with conditional compilation for API compatibility
- Introduced polyfill attributes (
RequiredMemberAttribute,CompilerFeatureRequiredAttribute,SetsRequiredMembersAttribute) for .NET Standard 2.0 - Updated test framework configuration to support .NET Framework 4.8.1 on Windows for local development
Reviewed changes
Copilot reviewed 19 out of 19 changed files in this pull request and generated 7 comments.
Show a summary per file
| File | Description |
|---|---|
| Directory.Build.props | Defines target frameworks and conditional test framework selection based on CI/local and OS platform |
| src/ToonFormat/ToonFormat.csproj | Adds conditional package references and unsafe blocks for .NET Standard 2.0 |
| src/ToonFormat/ToonDecoder.cs | Implements conditional StreamReader instantiation for .NET Standard 2.0 compatibility |
| src/ToonFormat/System.Runtime.CompilerServices/RequiredMemberAttribute.cs | Polyfill attribute for .NET Standard 2.0 |
| src/ToonFormat/System.Runtime.CompilerServices/CompilerFeatureRequiredAttribute.cs | Polyfill attribute for .NET Standard 2.0 |
| src/ToonFormat/System.Diagnostics.CodeAnalysis/SetsRequiredMembersAttribute.cs | Polyfill attribute for .NET Standard 2.0 |
| src/ToonFormat/Internal/Shared/NumericUtils.cs | Adds IsFinite polyfills for float and double in .NET Standard 2.0 |
| src/ToonFormat/Internal/Shared/FloatUtils.cs | Implements unsafe pointer-based signed zero normalization for .NET Standard 2.0 |
| src/ToonFormat/Internal/Encode/Primitives.cs | Adds conditional string.EndsWith compatibility for .NET Standard 2.0 |
| src/ToonFormat/Internal/Encode/Normalize.cs | Updates to use NumericUtils.IsFinite and adds .NET Standard 2.0 compatibility |
| src/ToonFormat/Internal/Encode/Folding.cs | Updates method signatures and adds conditional string.Join for .NET Standard 2.0 |
| src/ToonFormat/Internal/Encode/Encoders.cs | Changes parameter types from IReadOnlySet to IReadOnlyCollection |
| src/ToonFormat/Internal/Decode/Scanner.cs | Replaces ReadOnlySpan constructor with ToString() for .NET Standard 2.0 |
| src/ToonFormat/Internal/Decode/Parser.cs | Adds conditional string.StartsWith compatibility for .NET Standard 2.0 |
| tests/ToonFormat.Tests/ToonFormat.Tests.csproj | Updates to use centralized test framework configuration |
| tests/ToonFormat.Tests/ManualTests/PerformanceBenchmark.cs | Replaces TotalMicroseconds with Ticks-based calculation for .NET Standard 2.0 |
| tests/ToonFormat.SpecGenerator/ToonFormat.SpecGenerator.csproj | Removes redundant System.Text.Json package reference |
| README.md | Updates documentation to reflect .NET Standard 2.0 support |
| CONTRIBUTING.md | Updates contributor documentation with .NET Standard 2.0 information |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
src/ToonFormat/System.Runtime.CompilerServices/CompilerFeatureRequiredAttribute.cs
Show resolved
Hide resolved
src/ToonFormat/System.Runtime.CompilerServices/RequiredMemberAttribute.cs
Outdated
Show resolved
Hide resolved
src/ToonFormat/System.Runtime.CompilerServices/CompilerFeatureRequiredAttribute.cs
Outdated
Show resolved
Hide resolved
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
…RequiredAttribute.cs Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
…ttribute.cs Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
…RequiredAttribute.cs Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
johannschopplich
approved these changes
Jan 21, 2026
Contributor
johannschopplich
left a comment
There was a problem hiding this comment.
LGTM! You decide when to merge. Thanks for the effort! 🙏
Contributor
Author
|
Coming back to this folks, can we get some eyes and approval for us to merge? |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Linked Issue
Closes #25 and #20
Description
This minimizes the surface area of impact by making this library netstandard2.0 compliant and using specific attributes for compatibility.
Type of Change
Changes Made
System.Text.JsonandSystem.Collections.Immutablefor compatibilitynetstandard20worldSPEC Compliance
Testing
Pre-submission Checklist
Breaking Changes
Additional Context