fix: NativeAOT/Trimming for generated tools #26
pull-request.yml
on: pull_request
Test
/
Build, test and publish
1m 1s
Annotations
4 errors and 10 warnings
|
Test / Build, test and publish
Process completed with exit code 1.
|
|
Test / Build, test and publish
Test method CSharpToJsonSchema.SnapshotTests.ToolTests.VariousTypes threw exception:
VerifyException: Directory: /home/runner/work/CSharpToJsonSchema/CSharpToJsonSchema/src/tests/CSharpToJsonSchema.SnapshotTests/Snapshots
NotEqual:
- Received: ToolTests.VariousTypes_Diagnostics.received.txt
Verified: ToolTests.VariousTypes_Diagnostics.verified.txt
FileContent:
NotEqual:
Received: ToolTests.VariousTypes_Diagnostics.received.txt
[]
Verified: ToolTests.VariousTypes_Diagnostics.verified.txt
|
|
Test / Build, test and publish
Test method CSharpToJsonSchema.SnapshotTests.ToolTests.WeatherStrict threw exception:
VerifyException: Directory: /home/runner/work/CSharpToJsonSchema/CSharpToJsonSchema/src/tests/CSharpToJsonSchema.SnapshotTests/Snapshots
NotEqual:
- Received: ToolTests.WeatherStrict_Diagnostics.received.txt
Verified: ToolTests.WeatherStrict_Diagnostics.verified.txt
FileContent:
NotEqual:
Received: ToolTests.WeatherStrict_Diagnostics.received.txt
[]
Verified: ToolTests.WeatherStrict_Diagnostics.verified.txt
|
|
Test / Build, test and publish
Test method CSharpToJsonSchema.SnapshotTests.ToolTests.Weather threw exception:
VerifyException: Directory: /home/runner/work/CSharpToJsonSchema/CSharpToJsonSchema/src/tests/CSharpToJsonSchema.SnapshotTests/Snapshots
NotEqual:
- Received: ToolTests.Weather#IWeatherTools.Calls.generated.received.cs
Verified: ToolTests.Weather#IWeatherTools.Calls.generated.verified.cs
- Received: ToolTests.Weather#IWeatherTools.Double.g.received.cs
Verified: ToolTests.Weather#IWeatherTools.Double.g.verified.cs
- Received: ToolTests.Weather#IWeatherTools.g.received.cs
Verified: ToolTests.Weather#IWeatherTools.g.verified.cs
- Received: ToolTests.Weather#IWeatherTools.GetCurrentWeatherArgs.g.received.cs
Verified: ToolTests.Weather#IWeatherTools.GetCurrentWeatherArgs.g.verified.cs
- Received: ToolTests.Weather#IWeatherTools.GetCurrentWeatherAsyncArgs.g.received.cs
Verified: ToolTests.Weather#IWeatherTools.GetCurrentWeatherAsyncArgs.g.verified.cs
- Received: ToolTests.Weather#IWeatherTools.GetJsonTypeInfo.g.received.cs
Verified: ToolTests.Weather#IWeatherTools.GetJsonTypeInfo.g.verified.cs
- Received: ToolTests.Weather#IWeatherTools.PropertyNames.g.received.cs
Verified: ToolTests.Weather#IWeatherTools.PropertyNames.g.verified.cs
- Received: ToolTests.Weather#IWeatherTools.String.g.received.cs
Verified: ToolTests.Weather#IWeatherTools.String.g.verified.cs
- Received: ToolTests.Weather#IWeatherTools.Tools.generated.received.cs
Verified: ToolTests.Weather#IWeatherTools.Tools.generated.verified.cs
- Received: ToolTests.Weather#IWeatherTools.Unit.g.received.cs
Verified: ToolTests.Weather#IWeatherTools.Unit.g.verified.cs
- Received: ToolTests.Weather#IWeatherTools.Weather.g.received.cs
Verified: ToolTests.Weather#IWeatherTools.Weather.g.verified.cs
FileContent:
NotEqual:
Received: ToolTests.Weather#IWeatherTools.Calls.generated.received.cs
//HintName: IWeatherTools.Calls.generated.cs
#nullable enable
namespace CSharpToJsonSchema.IntegrationTests
{
public class GetCurrentWeatherArgs
{
public string Location { get; set; } = string.Empty;
public global::CSharpToJsonSchema.IntegrationTests.Unit Unit { get; set; }
}
public class GetCurrentWeatherAsyncArgs
{
public string Location { get; set; } = string.Empty;
public global::CSharpToJsonSchema.IntegrationTests.Unit Unit { get; set; }
}
public static partial class WeatherToolsExtensions
{
public static global::System.Collections.Generic.IReadOnlyDictionary<string, global::System.Func<string, global::System.Threading.CancellationToken, global::System.Threading.Tasks.Task<string>>> AsCalls(this IWeatherTools service)
{
return new global::System.Collections.Generic.Dictionary<string, global::System.Func<string, global::System.Threading.CancellationToken, global::System.Threading.Tasks.Task<string>>>
{
["GetCurrentWeather"] = (json, _) =>
{
return global::System.Threading.Tasks.Task.FromResult(service.CallGetCurrentWeather(json));
},
["GetCurrentWeatherAsync"] = async (json, cancellationToken) =>
{
return await service.CallGetCurrentWeatherAsync(json, cancellationToken);
},
};
}
public static GetCurrentWeatherArgs AsGetCurrentWeatherArgs(
this IWeatherTools functions,
string json)
{
#if NET6_0_OR_GREATER
if(global::System.Text.Json.JsonSerializer.IsReflectionEnabledByDefault)
{
return
global::System.Text.Json.JsonSerializer.Deserialize<GetCurrentWeatherArgs>(json, new global::System.Text.Json.JsonSerializerOptions
{
PropertyNamingPolicy = global::System.Text.Json.JsonNamingPolicy.CamelCase,
Converters = {{ new global::System.Text.Json.Serialization.JsonStringEnumConverter(glo
|
|
Test / Build, test and publish:
src/libs/CSharpToJsonSchema.Generators/JsonGen/Base/ValueEqualityImmutableDictionary.cs#L6
The type 'T' cannot be used as type parameter 'TKey' in the generic type or method 'ImmutableDictionary<TKey, TValue>'. Nullability of type argument 'T' doesn't match 'notnull' constraint.
|
|
Test / Build, test and publish:
src/libs/CSharpToJsonSchema.Generators/JsonGen/Base/ValueEqualityImmutableDictionary.cs#L6
The type 'T' cannot be used as type parameter 'TKey' in the generic type or method 'ImmutableDictionary<TKey, TValue>'. Nullability of type argument 'T' doesn't match 'notnull' constraint.
|
|
Test / Build, test and publish:
src/libs/CSharpToJsonSchema.Generators/JsonGen/JsonSourceGenerator.Parser.cs#L20
The using directive for 'CSharpToJsonSchema.Generators.JsonGen.System.Text.Json' appeared previously in this namespace
|
|
Test / Build, test and publish:
src/libs/CSharpToJsonSchema.Generators/JsonGen/JsonSourceGenerator.Parser.cs#L19
The using directive for 'CSharpToJsonSchema.Generators.JsonGen.Model' appeared previously in this namespace
|
|
Test / Build, test and publish:
src/libs/CSharpToJsonSchema.Generators/JsonGen/JsonSourceGenerator.Parser.cs#L18
The using directive for 'CSharpToJsonSchema.Generators.JsonGen.Helpers' appeared previously in this namespace
|
|
Test / Build, test and publish:
src/libs/CSharpToJsonSchema.Generators/JsonGen/JsonSourceGenerator.Parser.cs#L17
The using directive for 'CSharpToJsonSchema.Generators.JsonGen.Base' appeared previously in this namespace
|
|
Test / Build, test and publish:
src/libs/CSharpToJsonSchema.Generators/JsonGen/JsonSourceGenerator.Parser.cs#L15
The using directive for 'System.Text' appeared previously in this namespace
|
|
Test / Build, test and publish:
src/libs/CSharpToJsonSchema.Generators/JsonGen/JsonSourceGenerator.Parser.cs#L14
The using directive for 'System.Diagnostics.CodeAnalysis' appeared previously in this namespace
|
|
Test / Build, test and publish:
src/libs/CSharpToJsonSchema.Generators/JsonGen/JsonSourceGenerator.Parser.cs#L13
The using directive for 'System.Diagnostics' appeared previously in this namespace
|
|
Test / Build, test and publish:
src/libs/CSharpToJsonSchema.Generators/JsonGen/JsonSourceGenerator.Parser.cs#L12
The using directive for 'System.Collections.Immutable' appeared previously in this namespace
|