Sergio0694 / PolySharp

PolySharp provides generated, source-only polyfills for C# language features, to easily use all runtime-agnostic features downlevel. Add a reference, set your C# version to latest and have fun! 🚀
MIT License
1.83k stars 49 forks source link

Add polyfills for .NET 9 attributes. #108

Closed teo-tsirpanis closed 1 week ago

teo-tsirpanis commented 2 months ago

API breakdown (for new features)

Polyfills for the following attributes were added:

Polyfills for the following runtime-supported attributes were added:

Some of the runtime-supported attributes like the first and the last, might be considered too niche to polyfill. I'd be fine with removing them from the PR.

Additional context (optional)

The list of attributes was populated by searching for the string Attribute { in files matching release-notes/9.0/**/Microsoft.NETCore.App in the dotnet/core repository, and excluding the attributes in System.Text.Json.

Test coverage for the language support polyfills was added.

teo-tsirpanis commented 2 weeks ago

@Sergio0694 could you take a look now that .NET 9 released? Thanks.

Sergio0694 commented 2 weeks ago

Yup, on my todo list! Waiting for GitHub Actions to update the VM images to include the .NET 9 SDK 🙂

bgrainger commented 2 weeks ago

Waiting for GitHub Actions to update the VM images to include the .NET 9 SDK

If you add setup-dotnet to your GHA workflow, it will install the SDK version specified by global.json: https://github.com/Sergio0694/PolySharp/pull/113