feat!: Bump minimum DotNet version to 8#225
Conversation
Drop netstandard2.0/net461/netcoreapp3.1 targets in favor of net8.0. Migrate test framework from xUnit v2 to v3, update all test methods from async void to async Task, and bump test dependencies (Moq 4.20.72, coverlet 6.0.2, System.Linq.Async 6.0.1). Remove obsolete packages (Microsoft.Bcl.AsyncInterfaces, System.Configuration.ConfigurationManager, .NET Framework reference assemblies). CI now tests against .NET 8, 9, and 10. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Runs `dotnet format --verify-no-changes` on PRs and pushes to main to catch formatting issues separately from the build. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Greptile SummaryThis PR bumps the minimum supported .NET version from Key changes:
Confidence Score: 4/5
Important Files Changed
Flowchart%%{init: {'theme': 'neutral'}}%%
flowchart TD
A[PR: Bump min .NET to 8] --> B[Library: WorkOS.net.csproj]
A --> C[Tests: WorkOSTests.csproj]
A --> D[CI: ci.yml]
A --> E[New: lint.yml]
A --> F[Release: release.yml]
B --> B1[netstandard2.0 + net461 ➜ net8.0]
B --> B2[Remove legacy compat packages\nBcl.AsyncInterfaces, RuntimeInformation, etc.]
C --> C1[xunit v2 ➜ xunit.v3 1.1.0]
C --> C2[async void ➜ async Task\nin all async test methods]
C --> C3[OutputType=Exe\nRollForward=Major]
C --> C4[NoWarn xUnit1051\nsuppresses void sync tests]
D --> D1[Matrix: 8.x / 9.x / 10.x]
D --> D2[dotnet test ➜ dotnet run]
D --> D3[Remove libssl1.1 step]
E --> E1[dotnet format --verify-no-changes\non every PR + main push]
F --> F1[Remove libssl1.1 step\nPin release build to .NET 8.x]
Last reviewed commit: "ci: Add dotnet forma..." |
| <RollForward>Major</RollForward> | ||
| <GenerateDocumentationFile>true</GenerateDocumentationFile> | ||
| <TreatWarningsAsErrors>true</TreatWarningsAsErrors> | ||
| <NoWarn>xUnit1051</NoWarn> |
There was a problem hiding this comment.
Global suppression of xUnit1051 hides migration gaps
xUnit1051 in xUnit v3 warns when [Fact] or [Theory] test methods return void instead of Task or ValueTask. The warning is being silenced globally, but there are at least 20+ synchronous public void test methods still present in the codebase (e.g., TestGetAuthorizationURLWithProvider, TestCreateQueryString, TestParseTime, etc.).
While this is a pragmatic workaround, it means the codebase is partially migrated. If the intent is to migrate all tests to async (as was done for many tests in this PR), the remaining synchronous tests should also be converted. If keeping synchronous tests is intentional, adding a comment explaining the rationale would help future maintainers understand why this suppression is in place.
Note: If this suggestion doesn't match your team's coding style, reply to this and let me know. I'll remember it for next time!
Co-authored-by: greptile-apps[bot] <165735046+greptile-apps[bot]@users.noreply.github.com>
…Task xUnit v3 uses an in-process runner, so `dotnet test` fails with missing testhost assemblies. Switch CI to `dotnet run --project`. Also convert all remaining synchronous void test methods to return Task, and document why the xUnit1051 suppression is still needed (CancellationToken warnings). Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Description
The next autogenerated SDK version will support Dotnet 8+.
Documentation
Does this require changes to the WorkOS Docs? E.g. the API Reference or code snippets need updates.
If yes, link a related docs PR and add a docs maintainer as a reviewer. Their approval is required.