Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix Obsolete Warning & More #184

Merged
merged 5 commits into from
Feb 6, 2025
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
14 changes: 7 additions & 7 deletions .github/workflows/dotnet.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ on:

jobs:
build:
runs-on: ubuntu-22.04
runs-on: ubuntu-24.04
steps:
- uses: actions/checkout@v4
- name: Setup .NET
Expand All @@ -23,9 +23,9 @@ jobs:
8.0.x
9.0.x
- name: Build
run: dotnet build src
run: dotnet build src --configuration Release
- name: Test
run: dotnet test src --no-build --verbosity normal
run: dotnet test src --no-build --configuration Release --verbosity normal
- name: Pack
run: dotnet pack src --output nuget /p:ReleaseVersion=${{ github.event.inputs.ReleaseVersion }}
- name: Get package version
Expand Down Expand Up @@ -60,7 +60,7 @@ jobs:
tfm: net8.0
- sdk: 9.0.x
tfm: net9.0
runs-on: ubuntu-22.04
runs-on: ubuntu-24.04
steps:
- uses: actions/checkout@v4
- name: Download all workflow run artifacts
Expand All @@ -81,11 +81,11 @@ jobs:
$version = $version.Substring(0, $version.LastIndexOf("."))
Write-Output "FunctionalTestPackageVersion=$version" | Out-File "${env:GITHUB_OUTPUT}" -Append
- name: Test
run: dotnet test eng/FunctionaTests.proj /p:FunctionalTestTargetFrameworks=${{ matrix.tfm }} /p:RestoreAdditionalProjectSources=${{ github.workspace }}/nuget /p:FunctionalTestPackageVersion=${{ needs.build.outputs.PackageVersion }}
run: dotnet test eng/FunctionalTests.proj --configuration Release /p:FunctionalTestTargetFrameworks=${{ matrix.tfm }} /p:RestoreAdditionalProjectSources=${{ github.workspace }}/nuget /p:FunctionalTestPackageVersion=${{ needs.build.outputs.PackageVersion }}
publish:
if: (github.event_name == 'workflow_dispatch') && github.ref == 'refs/heads/main'
needs: [build, test]
runs-on: ubuntu-22.04
runs-on: ubuntu-24.04
steps:
- name: Download all workflow run artifacts
uses: actions/download-artifact@v4
Expand All @@ -109,7 +109,7 @@ jobs:

update_versions:
needs: [build, publish]
runs-on: ubuntu-22.04
runs-on: ubuntu-24.04
steps:
- uses: actions/checkout@v4
- name: Update package versions in the repo
Expand Down
File renamed without changes.
6 changes: 6 additions & 0 deletions src/Jab.Attributes/Jab.Attributes.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -8,10 +8,16 @@
<DefineConstants>$(DefineConstants);JAB_ATTRIBUTES_PACKAGE;GENERIC_ATTRIBUTES</DefineConstants>
<Version>0.11.0</Version>
<Version Condition="'$(ReleaseVersion)' != ''">$(ReleaseVersion)</Version>
<PackageReadmeFile>README.md</PackageReadmeFile>
<PackageLicenseExpression>MIT</PackageLicenseExpression>
</PropertyGroup>

<ItemGroup>
<Compile Include="$(MSBuildThisFileDirectory)/../Jab/Attributes.cs" />
</ItemGroup>

<ItemGroup>
<None Include="..\..\README.md" Pack="true" PackagePath="\" Visible="false" />
</ItemGroup>

</Project>
6 changes: 2 additions & 4 deletions src/Jab.Tests/GeneratorAnalyzerTest.cs
Original file line number Diff line number Diff line change
@@ -1,13 +1,11 @@
using System.IO;
using Microsoft.CodeAnalysis.CSharp.Testing;
using Microsoft.CodeAnalysis.Diagnostics;
using Microsoft.CodeAnalysis.Testing.Verifiers;

using Jab;
using Microsoft.CodeAnalysis.Testing;

namespace JabTests
{
public class GeneratorAnalyzerTest<TAnalyzer> : CSharpAnalyzerTest<TAnalyzer, XUnitVerifier> where TAnalyzer : DiagnosticAnalyzer, new()
public class GeneratorAnalyzerTest<TAnalyzer> : CSharpAnalyzerTest<TAnalyzer, DefaultVerifier> where TAnalyzer : DiagnosticAnalyzer, new()
{
public GeneratorAnalyzerTest()
{
Expand Down
6 changes: 2 additions & 4 deletions src/Jab.Tests/GeneratorAnalyzerVerifier.cs
Original file line number Diff line number Diff line change
@@ -1,10 +1,8 @@
using System.Threading;
using System.Threading.Tasks;
using Microsoft.CodeAnalysis.CSharp.Testing.XUnit;
using Microsoft.CodeAnalysis.Diagnostics;
using Microsoft.CodeAnalysis.Testing;

using Jab;
using Microsoft.CodeAnalysis.CSharp.Testing;

namespace JabTests
{
Expand All @@ -26,6 +24,6 @@ public static Task VerifyAnalyzerAsync(string source, params DiagnosticResult[]
return test.RunAsync(CancellationToken.None);
}

public static DiagnosticResult Diagnostic(string expectedDescriptor) => AnalyzerVerifier<TAnalyzer>.Diagnostic(expectedDescriptor);
public static DiagnosticResult Diagnostic(string expectedDescriptor) => CSharpAnalyzerVerifier<TAnalyzer, DefaultVerifier>.Diagnostic(expectedDescriptor);
}
}
24 changes: 12 additions & 12 deletions src/jab.sln
Original file line number Diff line number Diff line change
Expand Up @@ -94,24 +94,24 @@ Global
{E06AB4BC-0AC8-4063-BA0E-810358AF905B}.Debug|x64.Build.0 = Debug|Any CPU
{E06AB4BC-0AC8-4063-BA0E-810358AF905B}.Debug|x86.ActiveCfg = Debug|Any CPU
{E06AB4BC-0AC8-4063-BA0E-810358AF905B}.Debug|x86.Build.0 = Debug|Any CPU
{E06AB4BC-0AC8-4063-BA0E-810358AF905B}.Release|Any CPU.ActiveCfg = Debug|Any CPU
{E06AB4BC-0AC8-4063-BA0E-810358AF905B}.Release|Any CPU.Build.0 = Debug|Any CPU
{E06AB4BC-0AC8-4063-BA0E-810358AF905B}.Release|x64.ActiveCfg = Debug|Any CPU
{E06AB4BC-0AC8-4063-BA0E-810358AF905B}.Release|x64.Build.0 = Debug|Any CPU
{E06AB4BC-0AC8-4063-BA0E-810358AF905B}.Release|x86.ActiveCfg = Debug|Any CPU
{E06AB4BC-0AC8-4063-BA0E-810358AF905B}.Release|x86.Build.0 = Debug|Any CPU
{E06AB4BC-0AC8-4063-BA0E-810358AF905B}.Release|Any CPU.ActiveCfg = Release|Any CPU
{E06AB4BC-0AC8-4063-BA0E-810358AF905B}.Release|Any CPU.Build.0 = Release|Any CPU
{E06AB4BC-0AC8-4063-BA0E-810358AF905B}.Release|x64.ActiveCfg = Release|Any CPU
{E06AB4BC-0AC8-4063-BA0E-810358AF905B}.Release|x64.Build.0 = Release|Any CPU
{E06AB4BC-0AC8-4063-BA0E-810358AF905B}.Release|x86.ActiveCfg = Release|Any CPU
{E06AB4BC-0AC8-4063-BA0E-810358AF905B}.Release|x86.Build.0 = Release|Any CPU
{B623424A-6395-45BB-B766-AEB7CD8414E5}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{B623424A-6395-45BB-B766-AEB7CD8414E5}.Debug|Any CPU.Build.0 = Debug|Any CPU
{B623424A-6395-45BB-B766-AEB7CD8414E5}.Debug|x64.ActiveCfg = Debug|Any CPU
{B623424A-6395-45BB-B766-AEB7CD8414E5}.Debug|x64.Build.0 = Debug|Any CPU
{B623424A-6395-45BB-B766-AEB7CD8414E5}.Debug|x86.ActiveCfg = Debug|Any CPU
{B623424A-6395-45BB-B766-AEB7CD8414E5}.Debug|x86.Build.0 = Debug|Any CPU
{B623424A-6395-45BB-B766-AEB7CD8414E5}.Release|Any CPU.ActiveCfg = Debug|Any CPU
{B623424A-6395-45BB-B766-AEB7CD8414E5}.Release|Any CPU.Build.0 = Debug|Any CPU
{B623424A-6395-45BB-B766-AEB7CD8414E5}.Release|x64.ActiveCfg = Debug|Any CPU
{B623424A-6395-45BB-B766-AEB7CD8414E5}.Release|x64.Build.0 = Debug|Any CPU
{B623424A-6395-45BB-B766-AEB7CD8414E5}.Release|x86.ActiveCfg = Debug|Any CPU
{B623424A-6395-45BB-B766-AEB7CD8414E5}.Release|x86.Build.0 = Debug|Any CPU
{B623424A-6395-45BB-B766-AEB7CD8414E5}.Release|Any CPU.ActiveCfg = Release|Any CPU
{B623424A-6395-45BB-B766-AEB7CD8414E5}.Release|Any CPU.Build.0 = Release|Any CPU
{B623424A-6395-45BB-B766-AEB7CD8414E5}.Release|x64.ActiveCfg = Release|Any CPU
{B623424A-6395-45BB-B766-AEB7CD8414E5}.Release|x64.Build.0 = Release|Any CPU
{B623424A-6395-45BB-B766-AEB7CD8414E5}.Release|x86.ActiveCfg = Release|Any CPU
{B623424A-6395-45BB-B766-AEB7CD8414E5}.Release|x86.Build.0 = Release|Any CPU
{E05277A5-CC2E-4B55-BCE7-B298803F1875}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{E05277A5-CC2E-4B55-BCE7-B298803F1875}.Debug|Any CPU.Build.0 = Debug|Any CPU
{E05277A5-CC2E-4B55-BCE7-B298803F1875}.Debug|x64.ActiveCfg = Debug|Any CPU
Expand Down
Loading