Skip to content

Commit

Permalink
feat: update versions
Browse files Browse the repository at this point in the history
  • Loading branch information
EngRajabi committed Feb 23, 2024
1 parent dca63a4 commit 20b6f9a
Show file tree
Hide file tree
Showing 10 changed files with 47 additions and 26 deletions.
2 changes: 1 addition & 1 deletion .github/dependabot.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,6 @@ updates:
- package-ecosystem: nuget
directory: "/"
schedule:
interval: daily
interval: monthly
time: "01:30"
open-pull-requests-limit: 10
2 changes: 1 addition & 1 deletion .github/workflows/dotnetcore.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ jobs:
- name: Setup .NET Core SDK
uses: actions/setup-dotnet@v2
with:
dotnet-version: '6.0.300'
dotnet-version: '8.0.102'

- name: Install Dependencies
run: dotnet restore
Expand Down
7 changes: 7 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,10 @@
## v1.0.14
Added default values for ToStringFast/ToDisplayFast methods.
Added ToDescriptionFast method.
Added "DisplayNames" and "DisplayDescriptions" dictionaries to hold static values as dictionaries.
## v1.0.13
Breaking changes
- return false for not found enum to IsDefinedFast
## 1.0.12
Breaking changes
- rename StringToFast to ToStringFast
Expand Down
4 changes: 3 additions & 1 deletion Clean.bat
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
FOR /d /r . %%d in (bin,obj) do @if exist "%%d" rd /s/q "%%d"
FOR /F "tokens=*" %%G IN ('DIR /B /AD /S Packages') DO RMDIR /S /Q "%%G"
FOR /F "tokens=*" %%G IN ('DIR /B /AD /S .vs') DO RMDIR /S /Q "%%G"
FOR /F "tokens=*" %%G IN ('DIR /B /AD /S .vscode') DO RMDIR /S /Q "%%G"
FOR /F "tokens=*" %%G IN ('DIR /B /AD /S TestResults') DO RMDIR /S /Q "%%G"
FOR /F "tokens=*" %%G IN ('DIR /B /AD /S AppPackages') DO RMDIR /S /Q "%%G"
DEL /Q /F /S "*.csproj.user"
DEL /Q /F /S "*.csproj.user"
DEL /Q /F /S "*.sln.DotSettings.user"
6 changes: 3 additions & 3 deletions Directory.Build.props
Original file line number Diff line number Diff line change
Expand Up @@ -55,17 +55,17 @@
<ContinuousIntegrationBuild>true</ContinuousIntegrationBuild>
</PropertyGroup>
<ItemGroup>
<PackageReference Include="Microsoft.CodeAnalysis.NetAnalyzers" Version="6.0.0">
<PackageReference Include="Microsoft.CodeAnalysis.NetAnalyzers" Version="8.0.0">
<PrivateAssets>all</PrivateAssets>
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
</PackageReference>

<PackageReference Include="Microsoft.CodeAnalysis.Analyzers" Version="3.3.3">
<PackageReference Include="Microsoft.CodeAnalysis.Analyzers" Version="3.3.4">
<PrivateAssets>all</PrivateAssets>
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
</PackageReference>

<PackageReference Include="Microsoft.SourceLink.GitHub" Version="1.1.1" PrivateAssets="All" />
<PackageReference Include="Microsoft.SourceLink.GitHub" Version="8.0.0" PrivateAssets="All" />
</ItemGroup>

<ItemGroup>
Expand Down
14 changes: 14 additions & 0 deletions Supernova.Enum.Generators.sln
Original file line number Diff line number Diff line change
Expand Up @@ -10,11 +10,17 @@ EndProject
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Solution Items", "Solution Items", "{ED0FBF28-B700-4E39-AA8A-4F9553E99351}"
ProjectSection(SolutionItems) = preProject
.editorconfig = .editorconfig
.gitignore = .gitignore
AssemblyInfo.cs = AssemblyInfo.cs
BannedSymbols.txt = BannedSymbols.txt
CHANGELOG.md = CHANGELOG.md
Clean.bat = Clean.bat
Directory.Build.props = Directory.Build.props
global.json = global.json
icon.png = icon.png
LICENSE = LICENSE
README.md = README.md
Supernova.Enum.Generators.png = Supernova.Enum.Generators.png
EndProjectSection
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "UnitTests", "test\UnitTests\UnitTests.csproj", "{28CEBA67-8F05-4377-8049-3439CB6978CE}"
Expand All @@ -23,6 +29,13 @@ Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Supernova.Enum.Generators",
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Console.Test.Benchmark", "test\Console.Test.Benchmark\Console.Test.Benchmark.csproj", "{0FEDCA69-2161-4D1E-89B9-3CD4E1E3CD57}"
EndProject
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "github", "github", "{8376A6BC-14BC-459E-A0A0-451A12E8E048}"
ProjectSection(SolutionItems) = preProject
.github\dependabot.yml = .github\dependabot.yml
.github\workflows\dotnetcore.yml = .github\workflows\dotnetcore.yml
.github\FUNDING.yml = .github\FUNDING.yml
EndProjectSection
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|Any CPU = Debug|Any CPU
Expand All @@ -49,6 +62,7 @@ Global
{28CEBA67-8F05-4377-8049-3439CB6978CE} = {360CDEDF-49F8-486D-9A78-001C2D875DC5}
{88902DA0-F625-4674-BE00-F363A785E4A7} = {A60E376C-0437-4383-80A1-0F444BAF5056}
{0FEDCA69-2161-4D1E-89B9-3CD4E1E3CD57} = {360CDEDF-49F8-486D-9A78-001C2D875DC5}
{8376A6BC-14BC-459E-A0A0-451A12E8E048} = {ED0FBF28-B700-4E39-AA8A-4F9553E99351}
EndGlobalSection
GlobalSection(ExtensibilityGlobals) = postSolution
SolutionGuid = {89B80459-89FC-4D46-AC8C-50DD80B99D18}
Expand Down
6 changes: 2 additions & 4 deletions Supernova.Enum.Generators/Supernova.Enum.Generators.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -10,19 +10,17 @@
<AssemblyVersion>1.0.14</AssemblyVersion>
<PackageReadmeFile>README.md</PackageReadmeFile>
<PackageIcon>icon.png</PackageIcon>
<EnforceExtendedAnalyzerRules>true</EnforceExtendedAnalyzerRules>
<PackageReleaseNotes>
v1.0.14
Added default values for ToStringFast/ToDisplayFast methods.
Added ToDescriptionFast method.
Added "DisplayNames" and "DisplayDescriptions" dictionaries to hold static values as dictionaries.
v1.0.13
Breaking changes
- return false for not found enum to IsDefinedFast
</PackageReleaseNotes>
</PropertyGroup>

<ItemGroup>
<PackageReference Include="Microsoft.CodeAnalysis.CSharp" Version="4.2.0" PrivateAssets="all" />
<PackageReference Include="Microsoft.CodeAnalysis.CSharp" Version="4.8.0" PrivateAssets="all" />
</ItemGroup>


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": "6.0.300",
"version": "8.0.102",
"rollForward": "latestMajor",
"allowPrerelease": false
}
Expand Down
6 changes: 3 additions & 3 deletions test/Console.Test.Benchmark/Console.Test.Benchmark.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -2,15 +2,15 @@

<PropertyGroup>
<OutputType>Exe</OutputType>
<TargetFramework>net6.0</TargetFramework>
<TargetFramework>net8.0</TargetFramework>
</PropertyGroup>

<ItemGroup>
<PackageReference Include="BenchmarkDotNet" Version="0.13.2" />
<PackageReference Include="BenchmarkDotNet" Version="0.13.12" />
</ItemGroup>

<ItemGroup>
<ProjectReference Include="..\..\Supernova.Enum.Generators\Supernova.Enum.Generators.csproj" OutputItemType="Analyzer" ReferenceOutputAssembly="false"/>
<ProjectReference Include="..\..\Supernova.Enum.Generators\Supernova.Enum.Generators.csproj" OutputItemType="Analyzer" ReferenceOutputAssembly="false" />
</ItemGroup>

</Project>
24 changes: 12 additions & 12 deletions test/UnitTests/UnitTests.csproj
Original file line number Diff line number Diff line change
@@ -1,35 +1,35 @@
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<TargetFramework>net6.0</TargetFramework>
<TargetFramework>net8.0</TargetFramework>

<IsPackable>false</IsPackable>
</PropertyGroup>

<ItemGroup>
<PackageReference Include="coverlet.collector" Version="3.1.2">
<PackageReference Include="coverlet.collector" Version="6.0.1">
<PrivateAssets>all</PrivateAssets>
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
</PackageReference>
<PackageReference Include="FluentAssertions" Version="6.7.0" />
<PackageReference Include="FluentAssertions.Analyzers" Version="0.17.2">
<PackageReference Include="FluentAssertions" Version="6.12.0" />
<PackageReference Include="FluentAssertions.Analyzers" Version="0.30.0">
<PrivateAssets>all</PrivateAssets>
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
</PackageReference>
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="17.3.0" />
<PackageReference Include="Moq" Version="4.18.2" />
<PackageReference Include="MSTest.TestAdapter" Version="2.2.10" />
<PackageReference Include="MSTest.TestFramework" Version="2.2.10" />
<PackageReference Include="xunit" Version="2.4.2" />
<PackageReference Include="xunit.analyzers" Version="1.0.0" />
<PackageReference Include="xunit.runner.visualstudio" Version="2.4.5">
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="17.9.0" />
<PackageReference Include="Moq" Version="4.20.70" />
<PackageReference Include="MSTest.TestAdapter" Version="3.2.2" />
<PackageReference Include="MSTest.TestFramework" Version="3.2.2" />
<PackageReference Include="xunit" Version="2.7.0" />
<PackageReference Include="xunit.analyzers" Version="1.11.0" />
<PackageReference Include="xunit.runner.visualstudio" Version="2.5.7">
<PrivateAssets>all</PrivateAssets>
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
</PackageReference>
</ItemGroup>

<ItemGroup>
<ProjectReference Include="..\..\Supernova.Enum.Generators\Supernova.Enum.Generators.csproj" OutputItemType="Analyzer" ReferenceOutputAssembly="false"/>
<ProjectReference Include="..\..\Supernova.Enum.Generators\Supernova.Enum.Generators.csproj" OutputItemType="Analyzer" ReferenceOutputAssembly="false" />
</ItemGroup>

</Project>

8 comments on commit 20b6f9a

@oguzhankahyaoglu
Copy link

Choose a reason for hiding this comment

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

Hey we were using .net6 framework and this change broke our build :) Could you release another version with a breaking change like 8.0.1 containing this change and revert this for 1.0.14 or another version? @EngRajabi
50>CSC: Warning CS9057 : The analyzer assembly 'C:\Users\okahyaolu\.nuget\packages\supernova.enum.generators\1.0.14\analyzers\dotnet\cs\Supernova.Enum.Generators.dll' references version '4.8.0.0' of the compiler, which is newer than the currently running version '4.7.0.0'.

@EngRajabi
Copy link
Owner Author

Choose a reason for hiding this comment

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

Hey we were using .net6 framework and this change broke our build :) Could you release another version with a breaking change like 8.0.1 containing this change and revert this for 1.0.14 or another version? @EngRajabi 50>CSC: Warning CS9057 : The analyzer assembly 'C:\Users\okahyaolu\.nuget\packages\supernova.enum.generators\1.0.14\analyzers\dotnet\cs\Supernova.Enum.Generators.dll' references version '4.8.0.0' of the compiler, which is newer than the currently running version '4.7.0.0'.

No problem, I can change it. But check this link in the dependency section. According to this, it should not be a problem
https://www.nuget.org/packages/Microsoft.CodeAnalysis.CSharp/4.8.0
Let me know the result

@oguzhankahyaoglu
Copy link

Choose a reason for hiding this comment

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

Hey I double checked the dependencies of the package but we have to stick with 4.3.0 version of the analyzer as we have dependency to both .netStandart2.0 and .netFramework 4.7.2 and also to .NETCoreApp 3.1, thus we cannot upgrade it.
I can also suggest that you can publish .net6 and .net8 versions separetely by using TargetFrameworks attribute in csproj.

@EngRajabi
Copy link
Owner Author

Choose a reason for hiding this comment

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

Hey I double checked the dependencies of the package but we have to stick with 4.3.0 version of the analyzer as we have dependency to both .netStandart2.0 and .netFramework 4.7.2 and also to .NETCoreApp 3.1, thus we cannot upgrade it. I can also suggest that you can publish .net6 and .net8 versions separetely by using TargetFrameworks attribute in csproj.

Excellent. I looked, we can upgrade to version 4.4.0. Or to bet on the versions.
Add if you have time. Or I will add in the next few days

@EngRajabi
Copy link
Owner Author

Choose a reason for hiding this comment

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

@oguzhankahyaoglu
I checked more closely.
There should be no problem. The package only refers to one package and it is of asset type (PrivateAssets="all").
I made a .NET 6 project myself and tested it and it was ok.
Please test again

@oguzhankahyaoglu
Copy link

Choose a reason for hiding this comment

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

Hi again, ty for checking it again. I double checked that it is due to our specific project, where it has many other package references, and they need to me sticking with 4.30.0 version of the analyzer.
In theory, upgrading the .net version of the package should introduce a major version change for the package.

I would be glad if you can split into two versions for example:

  • 1.0.15 with my changes
  • 2.0.0 or 8.0.0 both my changes and the .net8 upgrade.

@EngRajabi
Copy link
Owner Author

Choose a reason for hiding this comment

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

Hi again, ty for checking it again. I double checked that it is due to our specific project, where it has many other package references, and they need to me sticking with 4.30.0 version of the analyzer. In theory, upgrading the .net version of the package should introduce a major version change for the package.

I would be glad if you can split into two versions for example:

  • 1.0.15 with my changes
  • 2.0.0 or 8.0.0 both my changes and the .net8 upgrade.

Please check version 1.0.15. It must be resolved

@oguzhankahyaoglu
Copy link

Choose a reason for hiding this comment

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

Hi again, ty for checking it again. I double checked that it is due to our specific project, where it has many other package references, and they need to me sticking with 4.30.0 version of the analyzer. In theory, upgrading the .net version of the package should introduce a major version change for the package.
I would be glad if you can split into two versions for example:

  • 1.0.15 with my changes
  • 2.0.0 or 8.0.0 both my changes and the .net8 upgrade.

Please check version 1.0.15. It must be resolved

That works, TY!

Please sign in to comment.