Skip to content

Commit

Permalink
Merge pull request #556 from SteveDunn/net8
Browse files Browse the repository at this point in the history
Net8
  • Loading branch information
SteveDunn authored Feb 20, 2024
2 parents 84a6d98 + 616d381 commit ea9da44
Show file tree
Hide file tree
Showing 4,736 changed files with 1,530,834 additions and 114 deletions.
The diff you're trying to view is too large. We only load the first 3000 changed files.
5 changes: 4 additions & 1 deletion .github/workflows/build.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ jobs:
- uses: actions/[email protected]
with:
dotnet-version: |
8.0.x
7.0.x
6.0.x
5.0.x
Expand All @@ -30,6 +31,7 @@ jobs:
- uses: actions/[email protected]
with:
dotnet-version: |
8.0.x
7.0.x
6.0.x
5.0.x
Expand All @@ -45,7 +47,7 @@ jobs:
- uses: actions/[email protected]
with:
dotnet-version: |
7.0.x
8.0.x
- name: Run Snapshots
run: ./RunSnapshots.ps1
shell: pwsh
Expand All @@ -57,6 +59,7 @@ jobs:
- uses: actions/[email protected]
with:
dotnet-version: |
8.0.x
7.0.x
6.0.x
5.0.x
Expand Down
4 changes: 4 additions & 0 deletions .github/workflows/codeql-analysis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,10 @@ jobs:
uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Setup dotnet 8.0
uses: actions/[email protected]
with:
dotnet-version: '8.0.x'
- name: Setup dotnet 7.0
uses: actions/[email protected]
with:
Expand Down
1 change: 1 addition & 0 deletions .github/workflows/publish.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ jobs:
- uses: actions/[email protected]
with:
dotnet-version: |
8.0.x
7.0.x
6.0.x
5.0.x
Expand Down
2 changes: 1 addition & 1 deletion Build.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ exec { & dotnet restore Vogen.sln --no-cache --verbosity $verbosity }

exec { & dotnet build Vogen.sln -c Release -p Thorough=true --no-restore --verbosity $verbosity}

# run the analyzer and code generation tests
# run the analyzer tests
WriteStage("Running analyzer tests...")
exec { & dotnet test tests/AnalyzerTests/AnalyzerTests.csproj -c Release --no-build -l trx -l "GitHubActions;report-warnings=false" --verbosity $verbosity }

Expand Down
98 changes: 98 additions & 0 deletions Directory.Build.targets
Original file line number Diff line number Diff line change
@@ -0,0 +1,98 @@
<Project>
<!-- https://www.nuget.org/packages/Microsoft.CodeAnalysis.Analyzers/ -->
<!-- https://www.nuget.org/packages/Microsoft.CodeAnalysis.CSharp.Workspaces/ -->
<PropertyGroup>
<RoslynVersion></RoslynVersion>
</PropertyGroup>

<Choose>
<When Condition="$(RoslynVersion) == 'roslyn3.8'">
<ItemGroup >
<PackageReference Update="Microsoft.CodeAnalysis.Analyzers" Version="3.3.3" />
<PackageReference Update="Microsoft.CodeAnalysis.CSharp" Version="3.8.0" />
<PackageReference Update="Microsoft.CodeAnalysis.Workspaces.Common" Version="3.8.0" />
<PackageReference Update="Microsoft.CodeAnalysis.CSharp.Workspaces" Version="3.8.0" />
</ItemGroup>
<PropertyGroup>
<DefineConstants>$(DefineConstants);ROSLYN_3_8</DefineConstants>
<DefineConstants>$(DefineConstants);CSHARP9_OR_GREATER</DefineConstants>
<NoWarn>$(NoWarn);nullable</NoWarn>
</PropertyGroup>
</When>

<When Condition="$(RoslynVersion) == 'roslyn4.2'">
<ItemGroup>
<PackageReference Update="Microsoft.CodeAnalysis.Analyzers" Version="3.3.3" />
<PackageReference Update="Microsoft.CodeAnalysis.CSharp" Version="4.2.0" />
<PackageReference Update="Microsoft.CodeAnalysis.Workspaces.Common" Version="4.2.0" />
<PackageReference Update="Microsoft.CodeAnalysis.CSharp.Workspaces" Version="4.2.0" />
</ItemGroup>
<PropertyGroup>
<DefineConstants>$(DefineConstants);ROSLYN_4_2;ROSLYN_4_2_OR_GREATER</DefineConstants>
<DefineConstants>$(DefineConstants);CSHARP9_OR_GREATER;CSHARP10_OR_GREATER</DefineConstants>
<NoWarn>$(NoWarn);nullable</NoWarn>
</PropertyGroup>
</When>

<When Condition="$(RoslynVersion) == 'roslyn4.4'">
<ItemGroup>
<PackageReference Update="Microsoft.CodeAnalysis.Analyzers" Version="3.3.3" />
<PackageReference Update="Microsoft.CodeAnalysis.CSharp" Version="4.4.0" />
<PackageReference Update="Microsoft.CodeAnalysis.Workspaces.Common" Version="4.4.0" />
<PackageReference Update="Microsoft.CodeAnalysis.CSharp.Workspaces" Version="4.4.0" />
</ItemGroup>
<PropertyGroup>
<DefineConstants>$(DefineConstants);ROSLYN_4_4;ROSLYN_4_2_OR_GREATER;ROSLYN_4_4_OR_GREATER</DefineConstants>
<DefineConstants>$(DefineConstants);CSHARP9_OR_GREATER;CSHARP10_OR_GREATER;CSHARP11_OR_GREATER</DefineConstants>
<NoWarn>$(NoWarn);nullable</NoWarn>
</PropertyGroup>
</When>

<When Condition="$(RoslynVersion) == 'roslyn4.6'">
<ItemGroup>
<PackageReference Update="Microsoft.CodeAnalysis.Analyzers" Version="3.3.4" />
<PackageReference Update="Microsoft.CodeAnalysis.CSharp" Version="4.6.0" />
<PackageReference Update="Microsoft.CodeAnalysis.Workspaces.Common" Version="4.6.0" />
<PackageReference Update="Microsoft.CodeAnalysis.CSharp.Workspaces" Version="4.6.0" />
</ItemGroup>
<PropertyGroup>
<DefineConstants>$(DefineConstants);ROSLYN_4_6;ROSLYN_4_2_OR_GREATER;ROSLYN_4_4_OR_GREATER;ROSLYN_4_6_OR_GREATER</DefineConstants>
<DefineConstants>$(DefineConstants);CSHARP9_OR_GREATER;CSHARP10_OR_GREATER;CSHARP11_OR_GREATER</DefineConstants>
<NoWarn>$(NoWarn);nullable</NoWarn>
</PropertyGroup>
</When>

<When Condition="$(RoslynVersion) == 'roslyn4.8'">
<ItemGroup>
<PackageReference Update="Microsoft.CodeAnalysis.Analyzers" Version="3.3.4" />
<PackageReference Update="Microsoft.CodeAnalysis.CSharp" Version="4.8.0" />
<PackageReference Update="Microsoft.CodeAnalysis.Workspaces.Common" Version="4.8.0" />
<PackageReference Update="Microsoft.CodeAnalysis.CSharp.Workspaces" Version="4.8.0" />
</ItemGroup>
<PropertyGroup>
<DefineConstants>$(DefineConstants);ROSLYN_4_8;ROSLYN_4_2_OR_GREATER;ROSLYN_4_4_OR_GREATER;ROSLYN_4_6_OR_GREATER;ROSLYN_4_8_OR_GREATER</DefineConstants>
<DefineConstants>$(DefineConstants);CSHARP9_OR_GREATER;CSHARP10_OR_GREATER;CSHARP11_OR_GREATER;CSHARP12_OR_GREATER</DefineConstants>
<NoWarn>$(NoWarn);nullable</NoWarn>
</PropertyGroup>
</When>

<Otherwise>
<ItemGroup>
<PackageReference Update="Microsoft.CodeAnalysis.Analyzers" Version="3.11.0-beta1.23525.2" />
<PackageReference Update="Microsoft.CodeAnalysis.CSharp" Version="4.8.0" />
<PackageReference Update="Microsoft.CodeAnalysis.Workspaces.Common" Version="4.8.0" />
<PackageReference Update="Microsoft.CodeAnalysis.CSharp.Workspaces" Version="4.8.0" />
</ItemGroup>
<PropertyGroup>
<DefineConstants>$(DefineConstants);ROSLYN4_8;ROSLYN_4_2_OR_GREATER;ROSLYN_4_4_OR_GREATER;ROSLYN_4_5_OR_GREATER;ROSLYN_4_6_OR_GREATER;ROSLYN_4_8_OR_GREATER</DefineConstants>
<DefineConstants>$(DefineConstants);CSHARP9_OR_GREATER;CSHARP10_OR_GREATER;CSHARP11_OR_GREATER;CSHARP12_OR_GREATER</DefineConstants>
<NoWarn>$(NoWarn);CS0618</NoWarn>
</PropertyGroup>
</Otherwise>
</Choose>

<!-- disable the nullable warnings when compiling for .NET Standard 2.0 -->
<PropertyGroup Condition="'$(TargetFramework)' == 'netstandard2.0' OR '$(TargetFramework)' == 'net462'">
<NoWarn>$(NoWarn);nullable</NoWarn>
</PropertyGroup>
</Project>
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -314,7 +314,7 @@ There are several code analysis warnings for invalid configuration, including:

## Performance

(to run these yourself: `dotnet run -c Release --framework net7.0 -- --job short --filter *` in the `Vogen.Benchmarks` folder)
(to run these yourself: `dotnet run -c Release --framework net8.0 -- --job short --filter *` in the `Vogen.Benchmarks` folder)

As mentioned previously, the goal of Vogen is to achieve very similar performance compare to using primitives themselves.
Here's a benchmark comparing the use of a validated Value Object with underlying type of int vs using an int natively (*primitively* 🤓)
Expand Down
9 changes: 9 additions & 0 deletions Vogen.sln
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,8 @@ Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "_files", "_files", "{72AF0E
README.md = README.md
test.ps1 = test.ps1
RunSnapshots.ps1 = RunSnapshots.ps1
Directory.Build.targets = Directory.Build.targets
global.json = global.json
EndProjectSection
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Vogen.SharedTypes", "src\Vogen.SharedTypes\Vogen.SharedTypes.csproj", "{ACBCBC0B-430F-46A3-AD96-6AF28DBA7F9D}"
Expand All @@ -50,6 +52,8 @@ Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Shared", "tests\Shared\Shar
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "SnapshotTests", "tests\SnapshotTests\SnapshotTests.csproj", "{83488ED4-6EB4-42B2-BFAC-D75B02A6F9A6}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Vogen.CodeFixers", "src\Vogen.CodeFixers\Vogen.CodeFixers.csproj", "{7A9E16A8-0BF0-460C-A347-44FEEA091D52}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|Any CPU = Debug|Any CPU
Expand Down Expand Up @@ -80,6 +84,10 @@ Global
{83488ED4-6EB4-42B2-BFAC-D75B02A6F9A6}.Debug|Any CPU.Build.0 = Debug|Any CPU
{83488ED4-6EB4-42B2-BFAC-D75B02A6F9A6}.Release|Any CPU.ActiveCfg = Release|Any CPU
{83488ED4-6EB4-42B2-BFAC-D75B02A6F9A6}.Release|Any CPU.Build.0 = Release|Any CPU
{7A9E16A8-0BF0-460C-A347-44FEEA091D52}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{7A9E16A8-0BF0-460C-A347-44FEEA091D52}.Debug|Any CPU.Build.0 = Debug|Any CPU
{7A9E16A8-0BF0-460C-A347-44FEEA091D52}.Release|Any CPU.ActiveCfg = Release|Any CPU
{7A9E16A8-0BF0-460C-A347-44FEEA091D52}.Release|Any CPU.Build.0 = Release|Any CPU
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
Expand All @@ -93,6 +101,7 @@ Global
{38935F7D-8E91-4984-9119-1FB0A639CB09} = {9955BB98-6ACF-4EC8-AE59-1B8DDCCBDCC6}
{D53F5547-E077-43FF-9342-ABA02A4FF360} = {9955BB98-6ACF-4EC8-AE59-1B8DDCCBDCC6}
{83488ED4-6EB4-42B2-BFAC-D75B02A6F9A6} = {9955BB98-6ACF-4EC8-AE59-1B8DDCCBDCC6}
{7A9E16A8-0BF0-460C-A347-44FEEA091D52} = {57174048-09D4-46A6-932C-8F90F2B603D0}
EndGlobalSection
GlobalSection(ExtensibilityGlobals) = postSolution
SolutionGuid = {E4D5DD02-533B-4333-9CF9-ACD294C7F2EE}
Expand Down
4 changes: 2 additions & 2 deletions global.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"sdk": {
"version": "7.0.0",
"rollForward": "latestMinor",
"version": "8.0.100",
"rollForward": "latestMajor",
"allowPrerelease": false
}
}
98 changes: 98 additions & 0 deletions src/Vogen.CodeFixers/Resources.Designer.cs

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading

0 comments on commit ea9da44

Please sign in to comment.