Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
48 changes: 48 additions & 0 deletions .editorconfig
Original file line number Diff line number Diff line change
Expand Up @@ -191,6 +191,54 @@ dotnet_diagnostic.CA1819.severity = none
# CA2225: Provide a method … as an alternate for operator
dotnet_diagnostic.CA2225.severity = none

# CA1515: Consider making public types internal
dotnet_diagnostic.CA1515.severity = none

# CA1869: Cache and reuse 'JsonSerializerOptions' instances
dotnet_diagnostic.CA1869.severity = none

# CA1062: Validate arguments of public methods
dotnet_diagnostic.CA1062.severity = none

# CA1707: Identifiers should not contain underscores
dotnet_diagnostic.CA1707.severity = none

# CA1720: Identifiers should not contain type names
dotnet_diagnostic.CA1720.severity = none

# CA1002: Do not expose generic lists
dotnet_diagnostic.CA1002.severity = none

# CA1019: Define accessors for attribute arguments
dotnet_diagnostic.CA1019.severity = none

# CA1859: Use concrete types when possible for improved performance
dotnet_diagnostic.CA1859.severity = none

# CA1305: Specify IFormatProvider
dotnet_diagnostic.CA1305.severity = none

# CA1851: Possible multiple enumerations of IEnumerable collection
dotnet_diagnostic.CA1851.severity = none

# CA1307: Specify StringComparison for clarity
dotnet_diagnostic.CA1307.severity = none

# CA1034: Nested types should not be visible
dotnet_diagnostic.CA1034.severity = none

# CA1309: Use ordinal StringComparison
dotnet_diagnostic.CA1309.severity = none

# CA2007: Do not directly await a Task
dotnet_diagnostic.CA2007.severity = none

# CA1716: Identifiers should not match keywords
dotnet_diagnostic.CA1716.severity = none

# CA1032: Implement standard exception constructors
dotnet_diagnostic.CA1032.severity = none

# IDE0022: Use expression body for methods
dotnet_diagnostic.IDE0022.severity = suggestion

Expand Down
3 changes: 2 additions & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ jobs:
runs-on: ubuntu-latest
strategy:
matrix:
dotnet: ["8.0", "9.0"]
dotnet: ["8.0", "9.0", "10.0"]
env:
DOTNET_SKIP_FIRST_TIME_EXPERIENCE: 1
DOTNET_CLI_TELEMETRY_OPTOUT: 1
Expand All @@ -23,6 +23,7 @@ jobs:
dotnet-version: |
8.0.x
9.0.x
10.0.x
- name: Tool Restore
run: dotnet tool restore
- name: Restore
Expand Down
3 changes: 2 additions & 1 deletion .github/workflows/contracts-admin.yml
Original file line number Diff line number Diff line change
Expand Up @@ -32,12 +32,13 @@ jobs:
dotnet-version: |
8.0.x
9.0.x
10.0.x
- name: Restore
working-directory: src/LeanCode.Contracts.Admin
run: dotnet restore
- name: Generate Protobuf
working-directory: src/LeanCode.Contracts.Admin
run: dotnet run -f net9.0 --project ../LeanCode.ContractsGenerator/LeanCode.ContractsGenerator.csproj -- project -p ./LeanCode.Contracts.Admin.csproj -o LeanCode.Contracts.pb
run: dotnet run -f net10.0 --project ../LeanCode.ContractsGenerator/LeanCode.ContractsGenerator.csproj -- project -p ./LeanCode.Contracts.Admin.csproj -o LeanCode.Contracts.pb
- name: Build
env:
BUILD_VERSION: ${{ steps.version.outputs.version }}
Expand Down
1 change: 1 addition & 0 deletions .github/workflows/contracts.yml
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@ jobs:
dotnet-version: |
8.0.x
9.0.x
10.0.x
- name: Restore
working-directory: src/LeanCode.Contracts
run: dotnet restore
Expand Down
3 changes: 2 additions & 1 deletion .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@ jobs:
dotnet-version: |
8.0.x
9.0.x
10.0.x
- name: Restore
run: dotnet restore
- name: Build
Expand All @@ -39,7 +40,7 @@ jobs:
env:
BUILD_VERSION: ${{ steps.get_version.outputs.version }}
working-directory: src/LeanCode.ContractsGenerator
run: dotnet publish --output ./publish --no-self-contained --no-build --configuration Release --framework net9.0
run: dotnet publish --output ./publish --no-self-contained --no-build --configuration Release --framework net10.0
- name: Pack
env:
BUILD_VERSION: ${{ steps.get_version.outputs.version }}
Expand Down
8 changes: 8 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,12 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0

## LeanCode.ContractsGenerator

### [4.1.0]
Comment thread
michal12334 marked this conversation as resolved.

#### Added

- Support for `net10.0` TFM.

### [4.0.0]

#### Added
Expand Down Expand Up @@ -102,3 +108,5 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
[1.0.0]: https://github.com/leancodepl/contractsgenerator/compare/v0.1.0-alpha11...v1.0.0
[2.0.0]: https://github.com/leancodepl/contractsgenerator/compare/v1.0.0...v2.0.0
[3.0.0]: https://github.com/leancodepl/contractsgenerator/compare/v2.0.0...v3.0.0
[4.0.0]: https://github.com/leancodepl/contractsgenerator/compare/v3.0.0...v4.0.0
[4.1.0]: https://github.com/leancodepl/contractsgenerator/compare/v4.0.0...main
16 changes: 11 additions & 5 deletions Directory.Build.targets
Original file line number Diff line number Diff line change
Expand Up @@ -11,12 +11,18 @@
<ExtsVer>9.0.0</ExtsVer>
<LncdCaVer>8.1.2496</LncdCaVer>
</PropertyGroup>
<PropertyGroup Condition="'$(TargetFramework)' == 'net10.0'">
<MsbVer>18.0.2</MsbVer>
<CscVer>5.0.0-2.final</CscVer>
<ExtsVer>10.0.0</ExtsVer>
<LncdCaVer>9.0.2703</LncdCaVer>
</PropertyGroup>
<ItemGroup>
<PackageReference Update="Google.Protobuf" Version="3.31.0" />
<PackageReference Update="Grpc.Tools" Version="2.72.0" />
<PackageReference Update="Google.Protobuf" Version="3.33.0" />
<PackageReference Update="Grpc.Tools" Version="2.76.0" />
<PackageReference Update="CommandLineParser" Version="2.9.1" />
<PackageReference Update="Microsoft.SourceLink.GitHub" Version="8.0.0" />
<PackageReference Update="Microsoft.Build.Locator" Version="1.9.1" />
<PackageReference Update="Microsoft.Build.Locator" Version="1.10.12" />
<PackageReference Update="Microsoft.Build" Version="$(MsbVer)" />
<PackageReference Update="Microsoft.Build.Framework" Version="$(MsbVer)" />
<PackageReference Update="Microsoft.Build.Tasks.Core" Version="$(MsbVer)" />
Expand All @@ -26,12 +32,12 @@
<PackageReference Update="Microsoft.CodeAnalysis.Workspaces.MSBuild" Version="$(CscVer)" />
<PackageReference Update="Microsoft.Extensions.DependencyModel" Version="$(ExtsVer)" />
<PackageReference Update="Microsoft.Extensions.FileSystemGlobbing" Version="$(ExtsVer)" />
<PackageReference Update="System.Collections.Immutable" Version="9.0.0" />
<PackageReference Update="System.Collections.Immutable" Version="10.0.0" />
<PackageReference Update="System.Reflection.MetadataLoadContext" Version="$(ExtsVer)" />

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

But this, I think, should be bumpable to 10.0.0.

<PackageReference Include="LeanCode.CodeAnalysis" Version="$(LncdCaVer)" PrivateAssets="all" />
</ItemGroup>
<ItemGroup>
<PackageReference Update="Microsoft.NET.Test.Sdk" Version="17.13.0" />
<PackageReference Update="Microsoft.NET.Test.Sdk" Version="18.0.1" />
<PackageReference Update="xunit" Version="2.9.3" />
<PackageReference Update="xunit.analyzers" Version="1.21.0" />
<PackageReference Update="xunit.runner.visualstudio" Version="3.1.0" />
Expand Down
2 changes: 1 addition & 1 deletion examples/project/Directory.Build.props
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<Project>
<PropertyGroup>
<TargetFrameworks>net8.0;net9.0</TargetFrameworks>
<TargetFrameworks>net8.0;net9.0;net10.0</TargetFrameworks>
</PropertyGroup>
</Project>
4 changes: 4 additions & 0 deletions examples/project/Directory.Build.targets
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
<Project>
<PropertyGroup Condition="'$(NETCoreAppMaximumVersion)' != ''">
<TargetFrameworks
Condition="$([MSBuild]::VersionGreaterThanOrEquals('$(NETCoreAppMaximumVersion)', '9.0')) AND $([MSBuild]::VersionLessThan('$(NETCoreAppMaximumVersion)', '10.0'))"
>net8.0;net9.0</TargetFrameworks
>
<TargetFrameworks Condition="$([MSBuild]::VersionLessThan('$(NETCoreAppMaximumVersion)', '9.0'))"
>net8.0</TargetFrameworks
>
Expand Down
2 changes: 1 addition & 1 deletion global.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"sdk": {
"version": "9.0.100",
"version": "10.0.100",
"allowPrerelease": true,
"rollForward": "latestMajor"
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
<PropertyGroup>
<AssemblyName>LeanCode.Contracts.Admin</AssemblyName>
<Nullable>annotations</Nullable>
<TargetFrameworks>net8.0;net9.0</TargetFrameworks>
<TargetFrameworks>net8.0;net9.0;net10.0</TargetFrameworks>
<Description>Package with base contracts for LeanCode's Admin App Generator Contracts.</Description>
</PropertyGroup>
<ItemGroup>
Expand Down
2 changes: 1 addition & 1 deletion src/LeanCode.Contracts/LeanCode.Contracts.csproj
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<TargetFrameworks>net8.0;net9.0</TargetFrameworks>
<TargetFrameworks>net8.0;net9.0;net10.0</TargetFrameworks>
<PublishRepositoryUrl>true</PublishRepositoryUrl>
<Description>Package with base contracts for LeanCode's Contracts Generator.</Description>
</PropertyGroup>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<TargetFrameworks>net8.0;net9.0</TargetFrameworks>
<TargetFrameworks>net8.0;net9.0;net10.0</TargetFrameworks>
<PreserveCompilationContext>true</PreserveCompilationContext>
<IsPackable>false</IsPackable>
</PropertyGroup>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ private sealed record class BinaryDTO(Binary? Null, Binary? NullableValue, Binar

private static readonly BinaryDTO DTO = new(null, Hello?.AsBinary(), Hello!.AsBinary());

private static readonly string Json = $$"""
private const string Json = $$"""
{
"{{nameof(BinaryDTO.Null)}}": null,
"{{nameof(BinaryDTO.NullableValue)}}": "aGVsbG8=",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -75,12 +75,12 @@ public void NotificationEnvelope_is_deserializable()
deserializedNotification.Should().BeEquivalentTo(SampleNotification);
}

private class Topic : ITopic, IProduceNotification<Notification>
private sealed class Topic : ITopic, IProduceNotification<Notification>
{
public List<string> EntityIds { get; set; } = default!;
}

private class Notification
private sealed class Notification
{
public string EntityId { get; set; } = default!;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ public void SubscriptionEnvelope_is_deserializable()
deserializedTopic.Should().BeEquivalentTo(SampleTopic);
}

private class Topic : ITopic
private sealed class Topic : ITopic
{
public List<string> EntityIds { get; set; } = default!;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@ public async Task<IReadOnlyCollection<CSharpCompilation>> CompileAsync()
return output.Values;
}

private async Task CompileTransitivelyAsync(
private static async Task CompileTransitivelyAsync(
Workspace workspace,
ProjectId id,
Dictionary<ProjectId, CSharpCompilation> output
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<OutputType>Exe</OutputType>
<TargetFrameworks>net8.0;net9.0</TargetFrameworks>
<TargetFrameworks>net8.0;net9.0;net10.0</TargetFrameworks>
<PreserveCompilationContext>true</PreserveCompilationContext>
<RootNamespace>LeanCode.ContractsGenerator</RootNamespace>
</PropertyGroup>
Expand All @@ -13,6 +13,7 @@
<ItemGroup>
<!-- We don't actually ship affected versions, instead the versions from .NET SDK are used. -->
<NuGetAuditSuppress Include="https://github.com/advisories/GHSA-h4j7-5rxr-p4wc" />
<NuGetAuditSuppress Include="https://github.com/advisories/GHSA-w3q9-fxm7-j8fq" />
</ItemGroup>
<ItemGroup>
<Protobuf Include="../../contracts.proto" GrpcServices="None" />
Expand Down
2 changes: 1 addition & 1 deletion src/LeanCode.ContractsGenerator/Program.cs
Original file line number Diff line number Diff line change
Expand Up @@ -105,7 +105,7 @@ public class ProtocolOptions : IGenerationOptions
public bool AllowDateTime { get; set; }
}

internal class Program
internal sealed class Program
{
[System.Diagnostics.CodeAnalysis.SuppressMessage("?", "CA1031", Justification = "Exception boundary.")]
private static async Task<int> Main(string[] args)
Expand Down
Loading