Skip to content

Commit

Permalink
upgrade dependencies and switch to .net 9.0 (#1602)
Browse files Browse the repository at this point in the history
  • Loading branch information
latonz authored Nov 19, 2024
1 parent e8302e0 commit 8727f10
Show file tree
Hide file tree
Showing 63 changed files with 1,833 additions and 728 deletions.
2 changes: 1 addition & 1 deletion Directory.Build.props
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<Project>

<PropertyGroup>
<TargetFramework>net8.0</TargetFramework>
<TargetFramework>net9.0</TargetFramework>
<DebugSymbols>true</DebugSymbols>
<DebugType>embedded</DebugType>
<ArtifactsPath>$(MSBuildThisFileDirectory)artifacts</ArtifactsPath>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,8 @@
<IncludeAssets>runtime; build; native; contentfiles; analyzers</IncludeAssets>
</PackageReference>
<PackageReference Include="Microsoft.Build.Locator" Version="1.7.8" />
<PackageReference Include="NuGet.Frameworks" Version="6.11.0" />
<PackageReference Include="NuGet.Frameworks" Version="6.12.1" />
<PackageReference Include="System.Formats.Asn1" Version="9.0.0" />
</ItemGroup>

<ItemGroup>
Expand Down
2 changes: 1 addition & 1 deletion docs/docs/configuration/generated-source.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ dotnet build /p:EmitCompilerGeneratedFiles=true
</Tabs>

By default the files are written to `{BaseIntermediateOutpath}/generated/{Assembly}/Riok.Mapperly/{GeneratedFile}`.
With `BaseIntermediateOutpath` for example being `obj/Debug/net8.0`.
With `BaseIntermediateOutpath` for example being `obj/Debug/net9.0`.
By convention, generated C# source code files will have the file extension `.g.cs`.

The output path can be customized via the `CompilerGeneratedFilesOutputPath` property.
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": "8.0.401",
"version": "9.0.100",
"rollForward": "latestMinor"
}
}
4 changes: 2 additions & 2 deletions src/Directory.Build.props
Original file line number Diff line number Diff line change
Expand Up @@ -16,11 +16,11 @@
</PropertyGroup>

<ItemGroup>
<PackageReference Include="Meziantou.Analyzer" Version="2.0.176">
<PackageReference Include="Meziantou.Analyzer" Version="2.0.180">
<PrivateAssets>all</PrivateAssets>
<IncludeAssets>runtime; build; native; contentfiles; analyzers</IncludeAssets>
</PackageReference>
<PackageReference Include="Meziantou.Polyfill" Version="1.0.40">
<PackageReference Include="Meziantou.Polyfill" Version="1.0.42">
<PrivateAssets>all</PrivateAssets>
<IncludeAssets>runtime; build; native; contentfiles; analyzers</IncludeAssets>
</PackageReference>
Expand Down
18 changes: 9 additions & 9 deletions test/Directory.Build.props
Original file line number Diff line number Diff line change
Expand Up @@ -11,10 +11,10 @@
</ItemGroup>

<ItemGroup>
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="17.10.0"/>
<PackageReference Include="FluentAssertions" Version="6.12.0"/>
<PackageReference Include="xunit" Version="2.8.0"/>
<PackageReference Include="xunit.runner.visualstudio" Version="2.8.0">
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="17.11.1"/>
<PackageReference Include="FluentAssertions" Version="6.12.2"/>
<PackageReference Include="xunit" Version="2.9.2"/>
<PackageReference Include="xunit.runner.visualstudio" Version="2.8.2">
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
<PrivateAssets>all</PrivateAssets>
</PackageReference>
Expand All @@ -26,11 +26,11 @@
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
<PrivateAssets>all</PrivateAssets>
</PackageReference>
<PackageReference Include="Meziantou.Xunit.ParallelTestFramework" Version="2.2.0"/>
<PackageReference Include="Verify.XUnit" Version="24.2.0" />
<PackageReference Include="Verify.DiffPlex" Version="3.0.0" />
<PackageReference Include="JunitXml.TestLogger" Version="4.0.254" />
<PackageReference Include="NSubstitute" Version="5.1.0" />
<PackageReference Include="Meziantou.Xunit.ParallelTestFramework" Version="2.3.0"/>
<PackageReference Include="Verify.XUnit" Version="28.3.2" />
<PackageReference Include="Verify.DiffPlex" Version="3.1.2" />
<PackageReference Include="JunitXml.TestLogger" Version="4.1.0" />
<PackageReference Include="NSubstitute" Version="5.3.0" />
<PackageReference Include="NSubstitute.Analyzers.CSharp" Version="1.0.17">
<PrivateAssets>all</PrivateAssets>
<IncludeAssets>runtime; build; native; contentfiles; analyzers</IncludeAssets>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

<PropertyGroup>
<!-- setting the TargetFramework directly from the cli via -p:TargetFramework=netA.B does not work using a custom msbuild property seems to work -->
<MapperlyIntegrationTestsTargetFramework Condition="'$(MapperlyIntegrationTestsTargetFramework)' == ''">net8.0</MapperlyIntegrationTestsTargetFramework>
<MapperlyIntegrationTestsTargetFramework Condition="'$(MapperlyIntegrationTestsTargetFramework)' == ''">net9.0</MapperlyIntegrationTestsTargetFramework>
<TargetFramework>$(MapperlyIntegrationTestsTargetFramework)</TargetFramework>

<EmitCompilerGeneratedFiles>true</EmitCompilerGeneratedFiles>
Expand Down Expand Up @@ -36,18 +36,18 @@
<ItemGroup>
<PackageReference Include="Microsoft.EntityFrameworkCore.Sqlite" Version="7.0.19" Condition="'$(TargetFramework)' == 'net7.0'" />
<PackageReference Include="Microsoft.EntityFrameworkCore.Sqlite" Version="8.0.8" Condition="'$(TargetFramework)' == 'net8.0'" />
<PackageReference Include="Microsoft.EntityFrameworkCore.Sqlite" Version="9.0.0-rc.2.24474.1" Condition="'$(TargetFramework)' == 'net9.0'" />
<PackageReference Include="Microsoft.EntityFrameworkCore.Sqlite" Version="9.0.0" Condition="'$(TargetFramework)' == 'net9.0'" />
</ItemGroup>

<!-- diffplex is only compatible with net7.0 up to 2.x-->
<!-- diffplex v3 is only compatible with net7.0 up to 2.x-->
<ItemGroup Condition="'$(TargetFramework)' == 'net7.0' OR '$(TargetFramework)' == 'net6.0'">
<PackageReference Update="Verify.DiffPlex" Version="2.2.1" />
</ItemGroup>

<!-- cannot use source generated polyfills since they require language version 11 -->
<ItemGroup Condition="'$(TargetFramework)' == 'net48'">
<PackageReference Include="System.Collections.Immutable" Version="8.0.0" />
<PackageReference Include="Portable.System.DateTimeOnly" Version="8.0.0" />
<PackageReference Include="System.Collections.Immutable" Version="9.0.0" />
<PackageReference Include="Portable.System.DateTimeOnly" Version="8.0.2" />
<PackageReference Include="IsExternalInit" Version="1.0.3">
<PrivateAssets>all</PrivateAssets>
<IncludeAssets>runtime; build; native; contentfiles; analyzers</IncludeAssets>
Expand Down
2 changes: 1 addition & 1 deletion test/Riok.Mapperly.Tests/Riok.Mapperly.Tests.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

<ItemGroup>
<PackageReference Include="Microsoft.CodeAnalysis.CSharp" Version="4.11.0" />
<PackageReference Include="Verify.SourceGenerators" Version="2.3.0" />
<PackageReference Include="Verify.SourceGenerators" Version="2.5.0" />
</ItemGroup>

<ItemGroup>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,14 +1,23 @@
{
Diagnostics: [
{
Id: RMG013,
Title: No accessible constructor with mappable arguments found,
Severity: Error,
WarningLevel: 0,
Location: : (11,4)-(11,59),
MessageFormat: {0} has no accessible constructor with mappable arguments,
Location: /*
{
private partial A Map(IDictionary<string, int> source);
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
}
*/
: (11,4)-(11,59),
Message: A has no accessible constructor with mappable arguments,
Category: Mapper
Severity: Error,
Descriptor: {
Id: RMG013,
Title: No accessible constructor with mappable arguments found,
MessageFormat: {0} has no accessible constructor with mappable arguments,
Category: Mapper,
DefaultSeverity: Error,
IsEnabledByDefault: true
}
}
]
}
Original file line number Diff line number Diff line change
@@ -1,14 +1,24 @@
{
Diagnostics: [
{
Id: RMG037,
Title: An enum member could not be found on the source enum,
Location: /*
{
private partial B Map(A source);
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
}
*/
: (11,4)-(11,36),
Message: Enum member Value3 (1) on D not found on source enum C,
Severity: Warning,
WarningLevel: 1,
Location: : (11,4)-(11,36),
MessageFormat: Enum member {0} ({1}) on {2} not found on source enum {3},
Message: Enum member Value3 (1) on D not found on source enum C,
Category: Mapper
Descriptor: {
Id: RMG037,
Title: An enum member could not be found on the source enum,
MessageFormat: Enum member {0} ({1}) on {2} not found on source enum {3},
Category: Mapper,
DefaultSeverity: Warning,
IsEnabledByDefault: true
}
}
]
}
Original file line number Diff line number Diff line change
@@ -1,24 +1,44 @@
{
Diagnostics: [
{
Id: RMG037,
Title: An enum member could not be found on the source enum,
Location: /*
{
private partial B Map(A source);
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
}
*/
: (11,4)-(11,36),
Message: Enum member value5 (0) on D not found on source enum C,
Severity: Warning,
WarningLevel: 1,
Location: : (11,4)-(11,36),
MessageFormat: Enum member {0} ({1}) on {2} not found on source enum {3},
Message: Enum member value5 (0) on D not found on source enum C,
Category: Mapper
Descriptor: {
Id: RMG037,
Title: An enum member could not be found on the source enum,
MessageFormat: Enum member {0} ({1}) on {2} not found on source enum {3},
Category: Mapper,
DefaultSeverity: Warning,
IsEnabledByDefault: true
}
},
{
Id: RMG037,
Title: An enum member could not be found on the source enum,
Location: /*
{
private partial B Map(A source);
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
}
*/
: (11,4)-(11,36),
Message: Enum member value7 (2) on D not found on source enum C,
Severity: Warning,
WarningLevel: 1,
Location: : (11,4)-(11,36),
MessageFormat: Enum member {0} ({1}) on {2} not found on source enum {3},
Message: Enum member value7 (2) on D not found on source enum C,
Category: Mapper
Descriptor: {
Id: RMG037,
Title: An enum member could not be found on the source enum,
MessageFormat: Enum member {0} ({1}) on {2} not found on source enum {3},
Category: Mapper,
DefaultSeverity: Warning,
IsEnabledByDefault: true
}
}
]
}
Original file line number Diff line number Diff line change
@@ -1,24 +1,44 @@
{
Diagnostics: [
{
Id: RMG038,
Title: An enum member could not be found on the target enum,
Location: /*
{
private partial B Map(A source);
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
}
*/
: (11,4)-(11,36),
Message: Enum member Value5 (0) on C not found on target enum D,
Severity: Warning,
WarningLevel: 1,
Location: : (11,4)-(11,36),
MessageFormat: Enum member {0} ({1}) on {2} not found on target enum {3},
Message: Enum member Value5 (0) on C not found on target enum D,
Category: Mapper
Descriptor: {
Id: RMG038,
Title: An enum member could not be found on the target enum,
MessageFormat: Enum member {0} ({1}) on {2} not found on target enum {3},
Category: Mapper,
DefaultSeverity: Warning,
IsEnabledByDefault: true
}
},
{
Id: RMG038,
Title: An enum member could not be found on the target enum,
Location: /*
{
private partial B Map(A source);
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
}
*/
: (11,4)-(11,36),
Message: Enum member Value7 (2) on C not found on target enum D,
Severity: Warning,
WarningLevel: 1,
Location: : (11,4)-(11,36),
MessageFormat: Enum member {0} ({1}) on {2} not found on target enum {3},
Message: Enum member Value7 (2) on C not found on target enum D,
Category: Mapper
Descriptor: {
Id: RMG038,
Title: An enum member could not be found on the target enum,
MessageFormat: Enum member {0} ({1}) on {2} not found on target enum {3},
Category: Mapper,
DefaultSeverity: Warning,
IsEnabledByDefault: true
}
}
]
}
Original file line number Diff line number Diff line change
@@ -1,14 +1,24 @@
{
Diagnostics: [
{
Id: RMG038,
Title: An enum member could not be found on the target enum,
Location: /*
{
private partial B Map(A source);
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
}
*/
: (11,4)-(11,36),
Message: Enum member Value5 (1) on C not found on target enum D,
Severity: Warning,
WarningLevel: 1,
Location: : (11,4)-(11,36),
MessageFormat: Enum member {0} ({1}) on {2} not found on target enum {3},
Message: Enum member Value5 (1) on C not found on target enum D,
Category: Mapper
Descriptor: {
Id: RMG038,
Title: An enum member could not be found on the target enum,
MessageFormat: Enum member {0} ({1}) on {2} not found on target enum {3},
Category: Mapper,
DefaultSeverity: Warning,
IsEnabledByDefault: true
}
}
]
}
Original file line number Diff line number Diff line change
@@ -1,24 +1,44 @@
{
Diagnostics: [
{
Id: RMG037,
Title: An enum member could not be found on the source enum,
Location: /*
{
private partial B Map(A source);
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
}
*/
: (11,4)-(11,36),
Message: Enum member Value2 (1) on D not found on source enum C,
Severity: Warning,
WarningLevel: 1,
Location: : (11,4)-(11,36),
MessageFormat: Enum member {0} ({1}) on {2} not found on source enum {3},
Message: Enum member Value2 (1) on D not found on source enum C,
Category: Mapper
Descriptor: {
Id: RMG037,
Title: An enum member could not be found on the source enum,
MessageFormat: Enum member {0} ({1}) on {2} not found on source enum {3},
Category: Mapper,
DefaultSeverity: Warning,
IsEnabledByDefault: true
}
},
{
Id: RMG037,
Title: An enum member could not be found on the source enum,
Location: /*
{
private partial B Map(A source);
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
}
*/
: (11,4)-(11,36),
Message: Enum member Value3 (2) on D not found on source enum C,
Severity: Warning,
WarningLevel: 1,
Location: : (11,4)-(11,36),
MessageFormat: Enum member {0} ({1}) on {2} not found on source enum {3},
Message: Enum member Value3 (2) on D not found on source enum C,
Category: Mapper
Descriptor: {
Id: RMG037,
Title: An enum member could not be found on the source enum,
MessageFormat: Enum member {0} ({1}) on {2} not found on source enum {3},
Category: Mapper,
DefaultSeverity: Warning,
IsEnabledByDefault: true
}
}
]
}
Loading

0 comments on commit 8727f10

Please sign in to comment.