Skip to content

build: Native AOT baseline and .NET 10/11 targets (stack base) - #62

Merged
Blind-Striker merged 6 commits into
masterfrom
review/native-aot-existing-consumers
Oct 23, 2026
Merged

Blind-Striker merged 6 commits into
masterfrom
review/native-aot-existing-consumers

Conversation

@Blind-Striker

@Blind-Striker Blind-Striker commented Oct 22, 2026 •

Copy link
Copy Markdown
Member

Stack (review bottom-up, merge as one stack): #62 base, #66 the #63 fix, #67 Native AOT test lane, #68 static-factory generic path, #70 slim generator, #71 public docs, #72 internal docs and 3.0.0, #73 reflection-free test, #74 package consumer in CI, #75 convention clean-up, #76 service catalog refresh.

Goal of the stack: 3.0.0, where existing consumers upgrade without code changes, both packages support Native AOT on net10.0/net11.0, and the libraries use no runtime reflection for types the compiler can see (a JIT-only fallback covers the rest).

This PR

  • The earlier Native AOT groundwork for existing consumers: generator delivery through Core's buildTransitive, fixed-schema options binding, Options 8.0.2 on modern assets, and the public AWS-mode factory. Later layers replace its rooted-reflection generator.
  • Retarget: Core netstandard2.0;net472;net10.0;net11.0, Extensions netstandard2.0;net10.0;net11.0. .NET 8 and 9 reach end of support on 2026-11-10; those apps use netstandard2.0. Tests and sandboxes run on net10.0/net11.0 (plus net472 where present). global.json pins the SDK 11 RC2 until .NET 11 GA.
  • The generator is enabled only for net10.0-compatible consumers, so .NET 8/9 apps on the netstandard2.0 asset never load it.
  • CI: with the .NET 11 SDK, .NET Framework tests run on Windows only, so net472 tests are skipped elsewhere and the macOS Mono install step is gone.
  • Framework values are defined once in Directory.Build.props (LocalStackModernMinimumTargetFramework, LocalStackModernTargetFrameworks, LocalStackClientTargetFrameworks, LocalStackExtensionsTargetFrameworks, the net472/netstandard properties, and the IsLocalStackModernTarget/IsLocalStackNetFrameworkTarget gates). Projects, the generated buildTransitive props, and Cake (through msbuild -getProperty) read them, so adding .NET 12 is a one-line change. tests/Directory.Build.props holds the test-naming analyzer exceptions. Older generator and options tests are renamed to the Should convention.
  • Package validation ignores the dropped net8.0/net9.0 baseline assets (PackageValidationBaselineFrameworkToIgnore). The only reported difference was AwsService not implementing ISpanFormattable on netstandard2.0, which System.Enum still provides on .NET 8+.

Verification

Build with 0 warnings. Core 100 on each of 3 TFMs, Extensions 60 x2, Integration 239 x3, Generator 11, Functional 50 x2 (LocalStack 4.14.0 and keyed 2026.10.2).

@github-actions

github-actions Bot commented Oct 22, 2026 •

Copy link
Copy Markdown

Dependency Review

✅ No vulnerabilities or license issues or OpenSSF Scorecard issues found.

OpenSSF Scorecard

PackageVersionScoreDetails
nuget/Microsoft.Extensions.Options >= 0 UnknownUnknown
nuget/Microsoft.CodeAnalysis.CSharp >= 0 UnknownUnknown
nuget/AWSSDK.S3 >= 0 UnknownUnknown
nuget/Microsoft.CodeAnalysis.CSharp >= 0 UnknownUnknown
nuget/Microsoft.NET.Test.Sdk >= 0 UnknownUnknown
nuget/xunit >= 0 UnknownUnknown
nuget/xunit.runner.visualstudio >= 0 UnknownUnknown

Scanned Files

  • src/LocalStack.Client.Extensions/LocalStack.Client.Extensions.csproj
  • src/LocalStack.Client.Generators/LocalStack.Client.Generators.csproj
  • tests/LocalStack.Client.Functional.Tests/LocalStack.Client.Functional.Tests.csproj
  • tests/LocalStack.Client.Generators.Tests/LocalStack.Client.Generators.Tests.csproj

@Blind-Striker
Blind-Striker added this pull request to stack #69 October 23, 2026 11:12
.NET 8 and .NET 9 reach end of support on 2026-11-10.

- Core: netstandard2.0;net472;net10.0;net11.0
- Extensions: netstandard2.0;net10.0;net11.0
- Tests and sandboxes move to net10.0/net11.0 (net472 kept where present)
- global.json selects SDK 11.0.100-rc.2 until .NET 11 GA
- Workflows stop installing the .NET 8 and .NET 9 SDKs
- The generator is enabled only for net10.0-compatible consumers, so
  net8/net9 consumers on the netstandard2.0 asset never load it
- Drop the System.Text.Json reference that NU1510 flags as prunable
- Rename the test helper class Extensions to MockExtensions (CA1724 on net11.0)
The .NET 11 SDK's test platform no longer runs .NET Framework test assemblies
through Mono ("Running .NET Framework tests is supported on Windows only"),
so the Linux and macOS jobs failed on the net472 runs. Skip net472 with a
warning off Windows; the Windows job still runs it. Drop the macOS Mono
install step.
@Blind-Striker
Blind-Striker force-pushed the review/native-aot-existing-consumers branch from 521addb to 7dc6a51 Compare October 23, 2026 11:23
…tion

Package validation compared the 2.0.0 net8.0/net9.0 assets with the
netstandard2.0 asset that .NET 8/9 apps now resolve, and reported that
the AwsService enum no longer implements ISpanFormattable there. On a
.NET 8+ runtime every enum still implements it through System.Enum, so
this is an artifact of dropping those target frameworks, which
PackageValidationBaselineFrameworkToIgnore declares explicitly.
Directory.Build.props now owns the framework sets and the modern-target
gate instead of repeating net10.0/net11.0 literals across projects:

- LocalStackModernMinimumTargetFramework / LocalStackModernTargetFrameworks
  (the targets that get Native AOT, the generator and the reflection-free
  paths), plus the netstandard2.0 and net472 targets and the per-package
  lists built from them
- IsLocalStackModernTarget / IsLocalStackNetFrameworkTarget (true/false)
  for conditions
- the package-validation baseline version and the frameworks it drops

The packaged buildTransitive gate reads
LocalStackClientGeneratorMinimumTargetFramework from a props file that pack
generates from LocalStackModernMinimumTargetFramework, so adding a .NET
version is a one-line change. Cake now asks MSBuild for evaluated target
frameworks instead of parsing project text. tests/Directory.Build.props
holds the settings every test project shared.
@Blind-Striker
Blind-Striker marked this pull request as ready for review October 23, 2026 21:54
@Blind-Striker
Blind-Striker merged commit 49573c2 into master Oct 23, 2026
8 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant