Repository navigation
Every project builds, tests and packs for both .NET 9 and .NET 10 - #130
Open
MelbourneDeveloper wants to merge 4 commits into
Open
MelbourneDeveloper wants to merge 4 commits into
MelbourneDeveloper wants to merge 4 commits into
Conversation
- Directory.Build.props targets net9.0;net10.0. The Blazor WASM site and the h5 netstandard2.1 project opt out. - Mvc.Testing is referenced per framework; Reporting integration tests fixed for the analyzer findings the new net9.0 build surfaced. - Native AOT DataProviderMigrate publishes from net10.0 (LTS). - make test gates coverage on the lowest per-framework report.
The codegen targets build each tool through the MSBuild task, which inherits the caller's TargetFramework. Hard-coded net9.0/net10.0 tool paths therefore pointed at outputs a clean build had not produced yet, so `dotnet build -c Debug` from clean failed with missing Generated types. Tool paths now use $(TargetFramework). Also restores the LqlExtension threshold to 54%: CI measures 54.48%.
This branch has not been deployed
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.
TLDR
Every project now builds, tests and packs for both .NET 9 and .NET 10.
What Was Added?
[BUILD-MULTI-TARGET]indocs/specs/ci-spec.md.Microsoft.AspNetCore.Mvc.Testingreferences (9.0.3 for net9.0, 10.0.0 for net10.0) inSync.Http.Tests,Sync.Integration.TestsandReporting.Integration.Tests. The package ships one framework per major version.What Was Changed or Deleted?
Directory.Build.propsreplaces<TargetFramework>net9.0</TargetFramework>with<TargetFrameworks>net9.0;net10.0</TargetFrameworks>. Projects that pinned a single framework now inherit it. That covers theDataProvidertool (was net10.0 only),Reporting.Integration.Tests(was net10.0 only), the F# projects,Lql.Browserand the type-provider test data project.TargetFrameworks:Lql.Website(net9.0, deployed once).Reporting.React(netstandard2.1, the only framework h5 transpiles from).DataProviderMigrate: a multi-targeted publish needs-f.make aot, the CI smoke-test path andrelease-dotnet-aot-multiplatform.ymlpublish-f net10.0. The binary is self-contained, so it ships one runtime, .NET 10 (LTS), instead of .NET 9.make testreads every per-frameworkcoverage.cobertura.xmland gates on the lowest line rate. Before, it read only the first report it found.Sync.Integration.Tests: referencesMicrosoft.Extensions.Logging.Abstractions10.0.0 (which also supports net9.0). Mvc.Testing 10 needs it, and 9.0.3 was a NU1605 downgrade on net10.0.Reporting.Integration.Tests: this project only ever built for net10.0, where these analyzer rules never ran on it. Its new net9.0 build raised 45 analyzer errors, which I fixed in the code (no suppressions):Uri.StringContentdisposed withusing.ConfigureAwait(false)in the fixture.UseWebRoot, so the host owns and disposes its file provider.ReportingE2ECollectionDefinitionandReportingPlatformCollectionDefinition.Example,Lql.TypeProvider.FSharp.TestsandLql.TypeProvider.FSharp.Tests.Datarun theDataProvider,DataProviderMigrateandLqltools frombin/$(Configuration)/$(TargetFramework)/. Before, they used hard-codednet9.0/net10.0paths. Their build targets build each tool through the MSBuild task, which inherits the caller'sTargetFramework. So a cleandotnet build DataProvider.sln -c Debug(the CI build job) built theDataProvidertool for net9.0 only, then ran the net10.0 path, which didn't exist yet. Codegen produced nothing, and the build failed with'Generated' could not be found.How Do The Automated Tests Prove It Works?
make cipasses. All 12 .NET test projects ran twice, once on.NETCoreApp v9.0and once onv10.0, with identical test counts (for exampleMigration.Tests614/614 andDataProvider.Tests393/393 on each). Each project produced two coverage reports with the same line rate, and every gate passed.make aot RID=linux-x64publishes the net10.0 native binary and its smoke migrate passes.NativeAotMigrateSmokeTestspass against it on both test frameworks.dotnet packoutput:Nimblesite.Sql.Modelcarrieslib/net9.0andlib/net10.0.DataProvider,DataProviderMigrateandLqltools carrytools/net9.0/anyandtools/net10.0/any.dotnet build DataProvider.sln -c Release: 0 warnings, 0 errors for both frameworks.dotnet build DataProvider.sln -c Debug. It fails before the tool-path fix and passes after it (0 errors).DataProvider.Example.Tests(194) andLql.TypeProvider.FSharp.Tests(70) then pass on both net9.0 and net10.0.Spec / Doc Changes
docs/specs/ci-spec.md: new[BUILD-MULTI-TARGET]section. It covers the shared targets, opt-outs, per-framework packages, the net10.0 AOT binary, the coverage gate, and why netstandard2.1 is not a target. Migration and Sync depend on SqlParserCS, Npgsql and SqlClient, which ship no netstandard build. The other libraries use .NET 6+ APIs that would need polyfills plus a separate test harness.docs/specs/codegen-cli-tool.md: the tool targets net9.0 and net10.0.installation.mdandgetting-started.md: .NET 9 or .NET 10 SDK, andnet9.0works.ci.ymlcomment: projects target both net9.0 and net10.0.Breaking Changes
lib/net9.0. The nativeDataProviderMigratebinary now runs on the .NET 10 runtime, but it is self-contained, so users need no runtime installed.