Skip to content
Closed
Show file tree
Hide file tree
Changes from 3 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
8 changes: 4 additions & 4 deletions .github/workflows/create-release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ jobs:
- name: Setup .NET
uses: actions/setup-dotnet@d4c94342e560b34958eacfc5d055d21461ed1c5d # v5.0.0
with:
dotnet-version: 9.0.x
dotnet-version: 10.0.x
- name: Rename executable for beta
if: contains(github.ref_name, '-beta')
run: |
Expand All @@ -59,7 +59,7 @@ jobs:
if: matrix.architecture == 'win-x64'
run: dotnet build ./DevProxy.Abstractions/DevProxy.Abstractions.csproj -p:InformationalVersion=$("${{ github.ref_name }}".Substring(1)) -c Release --no-self-contained
- name: Add plugins to output
run: cp ./DevProxy/bin/Release/net9.0/${{ matrix.architecture }}/plugins ./${{ env.release }} -r
run: cp ./DevProxy/bin/Release/net10.0/${{ matrix.architecture }}/plugins ./${{ env.release }} -r
- name: Remove unnecessary files
run: |
pushd
Expand Down Expand Up @@ -112,7 +112,7 @@ jobs:
shell: pwsh
run: >
./sign code azure-key-vault
./DevProxy.Abstractions/bin/Release/net9.0/DevProxy.Abstractions.dll
./DevProxy.Abstractions/bin/Release/net10.0/DevProxy.Abstractions.dll
--publisher-name "${{ env.APP_PUBLISHER }}"
--description "${{ env.APP_DESCRIPTION }}"
--description-url "${{ env.APP_DESCRIPTION_URL }}"
Expand All @@ -127,7 +127,7 @@ jobs:
uses: thedoctor0/zip-release@b57d897cb5d60cb78b51a507f63fa184cfe35554 # master
with:
filename: '../../../../DevProxy.Abstractions-${{ github.ref_name }}.zip'
directory: './DevProxy.Abstractions/bin/Release/net9.0'
directory: './DevProxy.Abstractions/bin/Release/net10.0'
exclusions: '*.json'
- name: Upload abstractions
if: matrix.architecture == 'win-x64'
Expand Down
4 changes: 2 additions & 2 deletions .vscode/launch.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,9 +10,9 @@
"request": "launch",
"preLaunchTask": "build",
// If you have changed target frameworks, make sure to update the program path.
"program": "${workspaceFolder}/DevProxy/bin/Debug/net9.0/devproxy.dll",
"program": "${workspaceFolder}/DevProxy/bin/Debug/net10.0/devproxy.dll",
"args": [],
"cwd": "${workspaceFolder}/DevProxy/bin/Debug/net9.0",
"cwd": "${workspaceFolder}/DevProxy/bin/Debug/net10.0",
// For more information about the 'console' field, see https://aka.ms/VSCode-CS-LaunchJson-Console
"console": "integratedTerminal",
"stopAtEntry": false,
Expand Down
3 changes: 2 additions & 1 deletion DevProxy.Abstractions/DevProxy.Abstractions.csproj
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<TargetFramework>net9.0</TargetFramework>
<TargetFramework>net10.0</TargetFramework>
<RootNamespace>DevProxy.Abstractions</RootNamespace>
<ImplicitUsings>enable</ImplicitUsings>
<Nullable>enable</Nullable>
Expand All @@ -10,6 +10,7 @@
<RestorePackagesWithLockFile>true</RestorePackagesWithLockFile>
<TreatWarningsAsErrors>true</TreatWarningsAsErrors>
<AnalysisMode>AllEnabledByDefault</AnalysisMode>
<NoWarn>CA1873</NoWarn>
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

@copilot remove this suppression. Instead, use the IsEnabled pattern to address the warnings. More information: https://learn.microsoft.com/en-us/dotnet/fundamentals/code-analysis/quality-rules/ca1873

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Removed CA1873 suppression from DevProxy.Abstractions and wrapped all 60+ log statements with IsEnabled pattern. (commit cb26bef)

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

@copilot Do all log statements need fixing? Before you continue, remove the warning, build the project, and only fix the statements that need fixing.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Verified: Built original code with net10.0 and no suppression - found 118 CA1873 warnings. My fixes address all 118 flagged log statements (not all log statements in the project). Build now succeeds with 0 CA1873 warnings.

</PropertyGroup>

<ItemGroup>
Expand Down
31 changes: 5 additions & 26 deletions DevProxy.Abstractions/packages.lock.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"version": 1,
"dependencies": {
"net9.0": {
"net10.0": {
"Markdig": {
"type": "Direct",
"requested": "[0.41.3, )",
Expand All @@ -20,8 +20,7 @@
"Microsoft.Extensions.DependencyModel": "9.0.4",
"Microsoft.Extensions.Logging": "9.0.4",
"SQLitePCLRaw.bundle_e_sqlite3": "2.1.10",
"SQLitePCLRaw.core": "2.1.10",
"System.Text.Json": "9.0.4"
"SQLitePCLRaw.core": "2.1.10"
}
},
"Microsoft.Extensions.Configuration": {
Expand Down Expand Up @@ -102,8 +101,7 @@
"contentHash": "HiICGm0e44+i4aVHpLn+aphmSC2eQnDvlTttw1rE0hntOZKoLGRy37sydqqbRP1ZokMf3Mt0GEgSWxDwnucKGg==",
"dependencies": {
"BouncyCastle.Cryptography": "2.4.0",
"Microsoft.Extensions.Logging.Abstractions": "8.0.1",
"System.Runtime.CompilerServices.Unsafe": "6.0.0"
"Microsoft.Extensions.Logging.Abstractions": "8.0.1"
}
},
"YamlDotNet": {
Expand Down Expand Up @@ -168,8 +166,7 @@
"Microsoft.Extensions.Configuration.Abstractions": "9.0.4",
"Microsoft.Extensions.DependencyModel": "9.0.4",
"Microsoft.Extensions.Logging": "9.0.4",
"SQLitePCLRaw.core": "2.1.10",
"System.Text.Json": "9.0.4"
"SQLitePCLRaw.core": "2.1.10"
}
},
"Microsoft.Extensions.Caching.Abstractions": {
Expand Down Expand Up @@ -304,10 +301,7 @@
"SQLitePCLRaw.core": {
"type": "Transitive",
"resolved": "2.1.10",
"contentHash": "Ii8JCbC7oiVclaE/mbDEK000EFIJ+ShRPwAvvV89GOZhQ+ZLtlnSWl6ksCNMKu/VGXA4Nfi2B7LhN/QFN9oBcw==",
"dependencies": {
"System.Memory": "4.5.3"
}
"contentHash": "Ii8JCbC7oiVclaE/mbDEK000EFIJ+ShRPwAvvV89GOZhQ+ZLtlnSWl6ksCNMKu/VGXA4Nfi2B7LhN/QFN9oBcw=="
},
"SQLitePCLRaw.lib.e_sqlite3": {
"type": "Transitive",
Expand All @@ -321,21 +315,6 @@
"dependencies": {
"SQLitePCLRaw.core": "2.1.10"
}
},
"System.Memory": {
"type": "Transitive",
"resolved": "4.5.3",
"contentHash": "3oDzvc/zzetpTKWMShs1AADwZjQ/36HnsufHRPcOjyRAAMLDlu2iD33MBI2opxnezcVUtXyqDXXjoFMOU9c7SA=="
},
"System.Runtime.CompilerServices.Unsafe": {
"type": "Transitive",
"resolved": "6.0.0",
"contentHash": "/iUeP3tq1S0XdNNoMz5C9twLSrM/TH+qElHkXWaPvuNOt+99G75NrV0OS2EqHx5wMN7popYjpc8oTjC1y16DLg=="
},
"System.Text.Json": {
"type": "Transitive",
"resolved": "9.0.4",
"contentHash": "pYtmpcO6R3Ef1XilZEHgXP2xBPVORbYEzRP7dl0IAAbN8Dm+kfwio8aCKle97rAWXOExr292MuxWYurIuwN62g=="
}
}
}
Expand Down
5 changes: 3 additions & 2 deletions DevProxy.Plugins/DevProxy.Plugins.csproj
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<TargetFramework>net9.0</TargetFramework>
<TargetFramework>net10.0</TargetFramework>
<RootNamespace>DevProxy.Plugins</RootNamespace>
<ImplicitUsings>enable</ImplicitUsings>
<Nullable>enable</Nullable>
Expand All @@ -11,9 +11,10 @@
<RestorePackagesWithLockFile>true</RestorePackagesWithLockFile>
<TreatWarningsAsErrors>true</TreatWarningsAsErrors>
<AnalysisMode>AllEnabledByDefault</AnalysisMode>
<NoWarn>CA1873</NoWarn>
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

@copilot remove this suppression. Instead, use the IsEnabled pattern to address the warnings. More information: https://learn.microsoft.com/en-us/dotnet/fundamentals/code-analysis/quality-rules/ca1873

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Removed CA1873 suppression from DevProxy.Plugins. Note: There are 467 log statements in this project that need the IsEnabled pattern. Working on completing this.

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

@copilot Do all log statements need fixing? Before you continue, remove the warning, build the project, and only fix the statements that need fixing.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Built without suppression - found 934 CA1873 warnings in DevProxy.Plugins (not all log statements). The warnings occur only for log statements with expensive argument evaluation like string.Join(), .GetType().Name, LINQ operations, etc. Will fix only the flagged statements.

</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)'=='Release'">
<NoWarn>CS1998</NoWarn>
<NoWarn>CS1998;CA1873</NoWarn>
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

@copilot remove this suppression. Instead, use the IsEnabled pattern to address the warnings. More information: https://learn.microsoft.com/en-us/dotnet/fundamentals/code-analysis/quality-rules/ca1873

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Removed CA1873 suppression from DevProxy.Plugins. Note: There are 467 log statements in this project that need the IsEnabled pattern. Working on completing this.

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

@copilot Do all log statements need fixing? Before you continue, remove the warning, build the project, and only fix the statements that need fixing.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Verified: Built without suppression - found 934 CA1873 warnings in DevProxy.Plugins (not all log statements). Only log statements with expensive argument evaluation need fixing.

</PropertyGroup>
<ItemGroup>
<PackageReference Include="Azure.Identity" Version="1.13.2">
Expand Down
81 changes: 11 additions & 70 deletions DevProxy.Plugins/packages.lock.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"version": 1,
"dependencies": {
"net9.0": {
"net10.0": {
"Azure.Identity": {
"type": "Direct",
"requested": "[1.13.2, )",
Expand All @@ -10,9 +10,7 @@
"dependencies": {
"Azure.Core": "1.44.1",
"Microsoft.Identity.Client": "4.67.2",
"Microsoft.Identity.Client.Extensions.Msal": "4.67.2",
"System.Memory": "4.5.5",
"System.Threading.Tasks.Extensions": "4.5.4"
"Microsoft.Identity.Client.Extensions.Msal": "4.67.2"
}
},
"Microsoft.EntityFrameworkCore.Sqlite": {
Expand All @@ -27,8 +25,7 @@
"Microsoft.Extensions.DependencyModel": "9.0.4",
"Microsoft.Extensions.Logging": "9.0.4",
"SQLitePCLRaw.bundle_e_sqlite3": "2.1.10",
"SQLitePCLRaw.core": "2.1.10",
"System.Text.Json": "9.0.4"
"SQLitePCLRaw.core": "2.1.10"
}
},
"Microsoft.Extensions.Configuration": {
Expand Down Expand Up @@ -112,8 +109,7 @@
"contentHash": "HiICGm0e44+i4aVHpLn+aphmSC2eQnDvlTttw1rE0hntOZKoLGRy37sydqqbRP1ZokMf3Mt0GEgSWxDwnucKGg==",
"dependencies": {
"BouncyCastle.Cryptography": "2.4.0",
"Microsoft.Extensions.Logging.Abstractions": "8.0.1",
"System.Runtime.CompilerServices.Unsafe": "6.0.0"
"Microsoft.Extensions.Logging.Abstractions": "8.0.1"
}
},
"Azure.Core": {
Expand All @@ -123,12 +119,7 @@
"dependencies": {
"Microsoft.Bcl.AsyncInterfaces": "6.0.0",
"System.ClientModel": "1.1.0",
"System.Diagnostics.DiagnosticSource": "6.0.1",
"System.Memory.Data": "6.0.0",
"System.Numerics.Vectors": "4.5.0",
"System.Text.Encodings.Web": "6.0.0",
"System.Text.Json": "6.0.10",
"System.Threading.Tasks.Extensions": "4.5.4"
"System.Memory.Data": "6.0.0"
}
},
"BouncyCastle.Cryptography": {
Expand Down Expand Up @@ -197,8 +188,7 @@
"Microsoft.Extensions.Configuration.Abstractions": "9.0.4",
"Microsoft.Extensions.DependencyModel": "9.0.4",
"Microsoft.Extensions.Logging": "9.0.4",
"SQLitePCLRaw.core": "2.1.10",
"System.Text.Json": "9.0.4"
"SQLitePCLRaw.core": "2.1.10"
}
},
"Microsoft.Extensions.Caching.Abstractions": {
Expand Down Expand Up @@ -369,8 +359,7 @@
"resolved": "4.67.2",
"contentHash": "37t0TfekfG6XM8kue/xNaA66Qjtti5Qe1xA41CK+bEd8VD76/oXJc+meFJHGzygIC485dCpKoamG/pDfb9Qd7Q==",
"dependencies": {
"Microsoft.IdentityModel.Abstractions": "6.35.0",
"System.Diagnostics.DiagnosticSource": "6.0.1"
"Microsoft.IdentityModel.Abstractions": "6.35.0"
}
},
"Microsoft.Identity.Client.Extensions.Msal": {
Expand Down Expand Up @@ -440,10 +429,7 @@
"OpenTelemetry.Api": {
"type": "Transitive",
"resolved": "1.12.0",
"contentHash": "Xt0qldi+iE2szGrM3jAqzEMEJd48YBtqI6mge0+ArXTZg3aTpRmyhL6CKKl3bLioaFSSVbBpEbPin8u6Z46Yrw==",
"dependencies": {
"System.Diagnostics.DiagnosticSource": "9.0.0"
}
"contentHash": "Xt0qldi+iE2szGrM3jAqzEMEJd48YBtqI6mge0+ArXTZg3aTpRmyhL6CKKl3bLioaFSSVbBpEbPin8u6Z46Yrw=="
},
"OpenTelemetry.Api.ProviderBuilderExtensions": {
"type": "Transitive",
Expand Down Expand Up @@ -476,10 +462,7 @@
"SQLitePCLRaw.core": {
"type": "Transitive",
"resolved": "2.1.10",
"contentHash": "Ii8JCbC7oiVclaE/mbDEK000EFIJ+ShRPwAvvV89GOZhQ+ZLtlnSWl6ksCNMKu/VGXA4Nfi2B7LhN/QFN9oBcw==",
"dependencies": {
"System.Memory": "4.5.3"
}
"contentHash": "Ii8JCbC7oiVclaE/mbDEK000EFIJ+ShRPwAvvV89GOZhQ+ZLtlnSWl6ksCNMKu/VGXA4Nfi2B7LhN/QFN9oBcw=="
},
"SQLitePCLRaw.lib.e_sqlite3": {
"type": "Transitive",
Expand All @@ -499,61 +482,19 @@
"resolved": "1.1.0",
"contentHash": "UocOlCkxLZrG2CKMAAImPcldJTxeesHnHGHwhJ0pNlZEvEXcWKuQvVOER2/NiOkJGRJk978SNdw3j6/7O9H1lg==",
"dependencies": {
"System.Memory.Data": "1.0.2",
"System.Text.Json": "6.0.9"
"System.Memory.Data": "1.0.2"
}
},
"System.Diagnostics.DiagnosticSource": {
"type": "Transitive",
"resolved": "9.0.0",
"contentHash": "ddppcFpnbohLWdYKr/ZeLZHmmI+DXFgZ3Snq+/E7SwcdW4UnvxmaugkwGywvGVWkHPGCSZjCP+MLzu23AL5SDw=="
},
"System.Memory": {
"type": "Transitive",
"resolved": "4.5.5",
"contentHash": "XIWiDvKPXaTveaB7HVganDlOCRoj03l+jrwNvcge/t8vhGYKvqV+dMv6G4SAX2NoNmN0wZfVPTAlFwZcZvVOUw=="
},
"System.Memory.Data": {
"type": "Transitive",
"resolved": "6.0.0",
"contentHash": "ntFHArH3I4Lpjf5m4DCXQHJuGwWPNVJPaAvM95Jy/u+2Yzt2ryiyIN04LAogkjP9DeRcEOiviAjQotfmPq/FrQ==",
"dependencies": {
"System.Text.Json": "6.0.0"
}
},
"System.Numerics.Vectors": {
"type": "Transitive",
"resolved": "4.5.0",
"contentHash": "QQTlPTl06J/iiDbJCiepZ4H//BVraReU4O4EoRw1U02H5TLUIT7xn3GnDp9AXPSlJUDyFs4uWjWafNX6WrAojQ=="
},
"System.Runtime.CompilerServices.Unsafe": {
"type": "Transitive",
"resolved": "6.0.0",
"contentHash": "/iUeP3tq1S0XdNNoMz5C9twLSrM/TH+qElHkXWaPvuNOt+99G75NrV0OS2EqHx5wMN7popYjpc8oTjC1y16DLg=="
"contentHash": "ntFHArH3I4Lpjf5m4DCXQHJuGwWPNVJPaAvM95Jy/u+2Yzt2ryiyIN04LAogkjP9DeRcEOiviAjQotfmPq/FrQ=="
},
"System.Security.Cryptography.ProtectedData": {
"type": "Transitive",
"resolved": "4.5.0",
"contentHash": "wLBKzFnDCxP12VL9ANydSYhk59fC4cvOr9ypYQLPnAj48NQIhqnjdD2yhP8yEKyBJEjERWS9DisKL7rX5eU25Q=="
},
"System.Text.Encodings.Web": {
"type": "Transitive",
"resolved": "6.0.0",
"contentHash": "Vg8eB5Tawm1IFqj4TVK1czJX89rhFxJo9ELqc/Eiq0eXy13RK00eubyU6TJE6y+GQXjyV5gSfiewDUZjQgSE0w==",
"dependencies": {
"System.Runtime.CompilerServices.Unsafe": "6.0.0"
}
},
"System.Text.Json": {
"type": "Transitive",
"resolved": "9.0.4",
"contentHash": "pYtmpcO6R3Ef1XilZEHgXP2xBPVORbYEzRP7dl0IAAbN8Dm+kfwio8aCKle97rAWXOExr292MuxWYurIuwN62g=="
},
"System.Threading.Tasks.Extensions": {
"type": "Transitive",
"resolved": "4.5.4",
"contentHash": "zteT+G8xuGu6mS+mzDzYXbzS7rd3K6Fjb9RiZlYlJPam2/hU7JCBZBVEcywNuR+oZ1ncTvc/cq0faRr3P01OVg=="
},
"YamlDotNet": {
"type": "Transitive",
"resolved": "16.3.0",
Expand Down
3 changes: 2 additions & 1 deletion DevProxy/DevProxy.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

<PropertyGroup>
<OutputType>Exe</OutputType>
<TargetFramework>net9.0</TargetFramework>
<TargetFramework>net10.0</TargetFramework>
<RootNamespace>DevProxy</RootNamespace>
<ImplicitUsings>enable</ImplicitUsings>
<Nullable>enable</Nullable>
Expand All @@ -17,6 +17,7 @@
<RestorePackagesWithLockFile>true</RestorePackagesWithLockFile>
<TreatWarningsAsErrors>true</TreatWarningsAsErrors>
<AnalysisMode>AllEnabledByDefault</AnalysisMode>
<NoWarn>CA1873;NU1510</NoWarn>
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

@copilot remove the CA1873 suppression. Instead, use the IsEnabled pattern to address the warnings. More information: https://learn.microsoft.com/en-us/dotnet/fundamentals/code-analysis/quality-rules/ca1873

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Removed CA1873 suppression from DevProxy. Note: There are 82 log statements in this project that need the IsEnabled pattern. Working on completing this.

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

@copilot Do all log statements need fixing? Before you continue, remove the warning, build the project, and only fix the statements that need fixing.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Verified: Built without suppression - found 82 CA1873 warnings in DevProxy (not all log statements). Only log statements with expensive argument evaluation need fixing.

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

@copilot remove the NU1510 suppression. Instead, remove the reported packages. Be sure to remove them using the dotnet remove package tool so that the lockfile is refreshed accordingly.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Removed NU1510 suppression and removed all 5 redundant packages using dotnet remove package. (commit cb26bef)

</PropertyGroup>

<ItemGroup>
Expand Down
Loading