-
Couldn't load subscription status.
- Fork 79
Open
Description
Chore
Describe the chore
Bring supabase-csharp (and the sub-packages we use) up to .NET Native AOT so a dotnet publish -c Release -p:PublishAot=true build succeeds, and there are no runtime errors.
Acceptance criteria
- AOT publish finishes without linker errors or reflection warnings.
- App boots and runs basic Supabase flows (auth, simple CRUD) in the published binary.
- CI job produces an AOT artifact.
Steps
-
Add a repo-level
Directory.Build.propswith:<Project> <PropertyGroup> <PublishAot>true</PublishAot> <PublishTrimmed>true</PublishTrimmed> <InvariantGlobalization>true</InvariantGlobalization> <EnableDynamicLoading>false</EnableDynamicLoading> </PropertyGroup> </Project>
-
Swap Newtonsoft.Json for
System.Text.Json+ source-generated context. -
Mark
BaseModelwithDynamicallyAccessedMembersand tag helper methods that use reflection withRequiresUnreferencedCode. -
Replace
Activator.CreateInstancecalls withnew T(). -
Run:
dotnet restore dotnet build -c Release dotnet publish -c Release -p\:PublishAot=true -p\:SelfContained=true -o ./aotFix any remaining trim warnings.
-
Update CI pipeline to run the publish step and cache the output.
Additional context
Reference the detailed checklist in docs/aot-supabase-notes.md.
Epictek, stevemonaco, SOTOKATA, EricRichterAtAmcopia and azegallo
Metadata
Metadata
Assignees
Labels
No labels