Support for Native AOT
Nobody has claimed this yet.
Assessment
- Difficulty
- 5/5
- Estimated time
- Over a week
- Newbie friendliness
- 30/100
- Issue type
- Feature
- Clarity
- Needs clarification
- Activity status
- Stale
- Tech stack
- csharp, docker
- Domain
- api, backend-api-design
Research direction
Start by reproducing the Native AOT sample and inspect src/Docker.DotNet/JsonSerializer.cs, especially its JsonSerializerOptions setup. Compare the manual JsonSerializerContext and TrimMode requirements described in the issue, then define how completion will be verified for all serializable models without those application-level additions.
Written by the indexing model from the issue text.
Description
I was testing with a simple application with Native AOT and got problems:
using Docker.DotNet;
using Docker.DotNet.Models;
var client = new DockerClientConfiguration()
.CreateClient();
var param = new ImagesListParameters
{
All = true
};
var images = await client.Images.ListImagesAsync(param);
This sample only works if i add <TrimMode>partial</TrimMode> to my csproject, add this class:
namespace Docker.DotNet;
using System.Text.Json.Serialization;
using Models;
[JsonSerializable(typeof(ImagesListResponse[]))]
[JsonSerializable(typeof(ImagesListParameters[]))]
public partial class JsonSerializerContext :System.Text.Json.Serialization.JsonSerializerContext {}
And set the TypeInfoResolver on JsonSerializerOptions to JsonSerializerContext.Default.
It seems that all serializable models must be added to the JsonSerializerContext, are you planning to automate this?
- Dominant language
- C#
- Stars
- 2.4k
- Forks
- 416
- PR merge metrics
- No merged PRs in 30d
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from dotnet/Docker.DotNet
-
Difficulty 3/5 1-2 days Newbie friendliness 55/100
dotnet/Docker.DotNet#709 · 3 comments ·
-
Difficulty 3/5 1-2 days Newbie friendliness 35/100
dotnet/Docker.DotNet#702 · 2 comments ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 38/100
dotnet/Docker.DotNet#700 ·
-
Difficulty 3/5 1-2 days Newbie friendliness 30/100
dotnet/Docker.DotNet#698 · 1 comment ·
-
Difficulty 3/5 1-2 days Newbie friendliness 35/100
dotnet/Docker.DotNet#697 ·
All issues in dotnet/Docker.DotNet
Similar issues
-
type/automation type/tech-debt
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
-
bug
Difficulty 2/5 1-3 hours Newbie friendliness 88/100
-
t/bug
Difficulty 2/5 1-3 hours Newbie friendliness 82/100
-
ci-failure-cause test-failure
Difficulty 2/5 1-3 hours Newbie friendliness 82/100
-
area:auth FE mvp P3
Difficulty 2/5 1-3 hours Newbie friendliness 88/100
klasolsson81/jobbliggaren#1788 ·