Skip to content

feat: upgrade plugin to .NET 10 and support net9.0 / net10.0 generated code - #462

Merged
doron050 merged 10 commits into
mainfrom
feat/dotnet10
Oct 24, 2026
Merged

doron050 merged 10 commits into
mainfrom
feat/dotnet10

Conversation

@doron050

Copy link
Copy Markdown
Collaborator

Summary

  • Upgrade the plugin (and tests, docs tooling, benchmarks) to net10.0; global.json pins the .NET 10 SDK. Fixes Support generation for dotnet 9.0 #169.
  • targetFramework now accepts net9.0 and net10.0 (default stays net8.0, so existing projects don't change). Unsupported values fail with a message listing the valid ones.
  • The WASM plugin is still built as a wasip1 core module. The .NET 10 WASI SDK hardcodes wasip2 and links a component-model world, which sqlc (wazero) rejects with invalid version header. WasmRunner.csproj overrides the compile/link steps, and roots PluginOptions so the trimmer keeps RawOptions' constructor.
  • WASI SDK bumped 22 -> 25 in build.yml; workflows take the SDK from global.json (the unit-tests job gained a setup-dotnet step).
  • Core examples in sqlc.ci.yaml are spread over net8.0 / net9.0 / net10.0 so every framework is built and tested end-to-end.
  • Docs/AGENTS.md updated, including stale driver/Dapper default versions and make targets that no longer exist. README regenerated.

Test plan

Verified locally with the .NET 10 SDK:

  • WASM plugin builds via the repo scripts; sqlc -f sqlc.ci.yaml diff passes
  • dotnet build sqlc-gen-csharp.sln (0 errors), dotnet format --verify-no-changes clean
  • CodegenTests (77) and RepositoryTests pass; unit-tests sqlc diff in sync; generated end2end tests in sync
  • SQLite end2end tests (44) pass on the net10.0 and net9.0 examples

Not verified locally (please watch CI):

  • Postgres / MySQL end2end tests on net9.0 / net10.0 (needs Docker)
  • Windows .NET Framework job - kept on the .NET 8 SDK with global.json removed, since VS 2022 MSBuild may not support SDK 10
  • build.yml WASM job on Linux with wasi-sdk 25 (only built on macOS so far)

Notes

  • The wasip1 overrides rely on private WASI SDK item names (10.0.13 pack); the CI sqlc diff step is the tripwire after SDK upgrades.
  • The .NET 10 SDK now reports NU1903 advisories for old pinned packages in the benchmark/test projects - a follow-up.

🤖 Generated with Claude Code

…d code

Plugin
- All plugin, test, docs and benchmark projects now target net10.0; global.json pins the .NET 10 SDK.
- The WASM plugin is still built as a wasip1 core module: the .NET 10 WASI SDK hardcodes wasip2 and
  links a component-model world, which sqlc (wazero) rejects with "invalid version header".
  WasmRunner.csproj overrides the compile/link steps, and roots PluginOptions so the trimmer keeps
  RawOptions' constructor (System.Text.Json).
- WASI SDK bumped 22 -> 25 in the build workflow.

Generated code
- targetFramework accepts net9.0 and net10.0 (default stays net8.0, so existing projects do not change).
- Unsupported values now fail with a message listing the supported ones.
- The core examples in sqlc.ci.yaml are spread over net8.0 / net9.0 / net10.0 so every framework is
  built and tested end-to-end.

CI / docs
- Workflows take the SDK from global.json (unit-tests job gained a setup-dotnet step); the Windows
  .NET Framework job stays on the .NET 8 SDK.
- Docs and AGENTS.md updated: stale driver/Dapper default versions, make targets, prerequisites, a
  target-framework section, and why the WASM plugin targets wasip1. README regenerated.
- Ignore sqlc's plugin cache (/plugins/).

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
@doron050 doron050 added the minor New features or enhancements that are backward compatible. label Oct 24, 2026
@github-actions

Copy link
Copy Markdown
Contributor

Release Assistant - Passed

All requirements satisfied.

Release Information:

  • Type: minor

This PR is ready to merge.

doron050 and others added 9 commits October 24, 2026 13:35
# Conflicts:
#	.github/workflows/legacy-tests.yml
#	.github/workflows/tests.yml
README.md is regenerated from docs/ on release, so only the docs sources carry the changes.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
…mentException

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
… tests

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
@doron050
doron050 merged commit 382ad23 into main Oct 24, 2026
12 checks passed
@doron050
doron050 deleted the feat/dotnet10 branch October 24, 2026 12:53
@github-actions github-actions Bot mentioned this pull request Oct 24, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

minor New features or enhancements that are backward compatible.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Support generation for dotnet 9.0

1 participant