Skip to content

chore(deps): drop redundant direct ZstdSharp.Port references - #155

Open
jafin wants to merge 1 commit into
robertpopa22:mainfrom
jafin:chore/drop-unused-zstd-reference
Open

chore(deps): drop redundant direct ZstdSharp.Port references#155
jafin wants to merge 1 commit into
robertpopa22:mainfrom
jafin:chore/drop-unused-zstd-reference

Conversation

@jafin

@jafin jafin commented Aug 5, 2026

Copy link
Copy Markdown

What

Removes the direct ZstdSharp.Port PackageReference from mRemoteNG, mRemoteNGTests, and mRemoteNGSpecs.

Why

No project code references ZstdSharp — the package arrives transitively via MySql.Data, whose nuspec declares ZstdSharp.Port >= 0.8.6 on every target framework (used for MySQL protocol zstd compression). The three direct references added nothing.

The one thing worth reviewing

The central PackageVersion for ZstdSharp.Port is deliberately kept at 0.8.7. With CentralPackageTransitivePinningEnabled=true, that entry is what bumps the resolved version above MySql.Data's 0.8.6 floor. Deleting it alongside the PackageReference lines would silently downgrade the shipped assembly to 0.8.6 — so this PR keeps it, plus a comment explaining why the entry has no matching PackageReference.

Verification

Full build via build.ps1 (VS2026 MSBuild 18.x), green. After the change:

  • mRemoteNG/obj/project.assets.jsonZstdSharp.Port/0.8.7
  • mRemoteNG/bin/x64/Release/mRemoteNG.deps.jsonZstdSharp.Port/0.8.7
  • mRemoteNG/bin/x64/Release/Assemblies/ZstdSharp.dll still present

No behavior change — same assembly, same version, one less redundant declaration in three project files.

No project code uses ZstdSharp — it arrives transitively via MySql.Data,
which declares ZstdSharp.Port >= 0.8.6 on every target framework for
MySQL protocol zstd compression. The direct PackageReference in the app,
test, and spec projects added nothing.

Keep the central PackageVersion at 0.8.7 so transitive pinning still
bumps the resolved version above MySql.Data's floor; without it NuGet
would silently fall back to 0.8.6.

Verified: ZstdSharp.Port/0.8.7 still resolves in project.assets.json and
mRemoteNG.deps.json, and ZstdSharp.dll still ships in the build output.
Copilot AI lite review requested due to automatic review settings August 5, 2026 11:25
@qodo-code-review

Copy link
Copy Markdown

PR Summary by Qodo

Remove redundant ZstdSharp.Port PackageReferences; keep central transitive pin

⚙️ Configuration changes 🕐 10-20 Minutes

Grey Divider

AI Description

• Remove direct ZstdSharp.Port references from app, test, and spec projects.
• Keep central ZstdSharp.Port version pin to avoid transitive downgrade via MySql.Data.
• Document why the central PackageVersion exists without a matching PackageReference.
Diagram

graph TD
  DP["Directory.Packages.props"] --> APP["mRemoteNG.csproj"] --> MYSQL["MySql.Data (transitive)"] --> ZSTD["ZstdSharp.Port 0.8.7"]
  DP --> TESTS["mRemoteNGTests.csproj"] --> MYSQL --> ZSTD
  DP --> SPECS["mRemoteNGSpecs.csproj"] --> MYSQL --> ZSTD
Loading
High-Level Assessment

The chosen approach is appropriate: remove redundant direct PackageReferences while keeping the centrally-pinned transitive version to prevent NuGet from resolving ZstdSharp.Port down to MySql.Data’s minimum. Alternatives (e.g., removing the central PackageVersion too) would risk an unintentional downgrade and are not preferable.

Files changed (4) +1 / -3

Other (4) +1 / -3
Directory.Packages.propsDocument ZstdSharp.Port transitive pin rationale +1/-0

Document ZstdSharp.Port transitive pin rationale

• Adds an inline comment explaining that ZstdSharp.Port is not referenced directly and is pinned centrally to 0.8.7 due to transitive resolution via MySql.Data (floor 0.8.6). This clarifies why the PackageVersion entry exists without a matching PackageReference.

Directory.Packages.props

mRemoteNG.csprojRemove redundant ZstdSharp.Port PackageReference from app project +0/-1

Remove redundant ZstdSharp.Port PackageReference from app project

• Deletes the direct PackageReference to ZstdSharp.Port from the main application project. The package remains available transitively and is still version-pinned centrally.

mRemoteNG/mRemoteNG.csproj

mRemoteNGSpecs.csprojRemove redundant ZstdSharp.Port PackageReference from specs project +0/-1

Remove redundant ZstdSharp.Port PackageReference from specs project

• Removes the direct PackageReference to ZstdSharp.Port from the specs project. Dependency continues to resolve transitively with the centrally pinned version.

mRemoteNGSpecs/mRemoteNGSpecs.csproj

mRemoteNGTests.csprojRemove redundant ZstdSharp.Port PackageReference from tests project +0/-1

Remove redundant ZstdSharp.Port PackageReference from tests project

• Removes the direct PackageReference to ZstdSharp.Port from the tests project. Dependency resolution relies on transitive restore and central version pinning.

mRemoteNGTests/mRemoteNGTests.csproj

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Pull request overview

Removes redundant direct ZstdSharp.Port package references from the main app and test/spec projects while keeping the centrally-pinned ZstdSharp.Port version to ensure the transitive dependency remains resolved at 0.8.7 (via central transitive pinning).

Changes:

  • Dropped direct PackageReference Include="ZstdSharp.Port" from mRemoteNG, mRemoteNGTests, and mRemoteNGSpecs.
  • Kept PackageVersion Include="ZstdSharp.Port" Version="0.8.7" and added an explanatory comment in Directory.Packages.props.

Reviewed changes

Copilot reviewed 4 out of 4 changed files in this pull request and generated no comments.

File Description
mRemoteNGTests/mRemoteNGTests.csproj Removes redundant direct ZstdSharp.Port reference from the test project.
mRemoteNGSpecs/mRemoteNGSpecs.csproj Removes redundant direct ZstdSharp.Port reference from the specs project.
mRemoteNG/mRemoteNG.csproj Removes redundant direct ZstdSharp.Port reference from the main application project.
Directory.Packages.props Documents and preserves the ZstdSharp.Port transitive version pin (0.8.7) under central transitive pinning.

@qodo-code-review

Copy link
Copy Markdown

Code Review by Qodo

🐞 Bugs (0) 📘 Rule violations (2) 📜 Skill insights (0)

Grey Divider


Remediation recommended

1. Comment-only change in props 📘 Rule violation ✧ Quality
Description
A new XML comment was added in Directory.Packages.props without any adjacent configuration/logic
change. This violates the rule against adding comments to otherwise-untouched code regions.
Code

Directory.Packages.props[71]

+    <!-- Transitive via MySql.Data (floor 0.8.6); pinned here to 0.8.7 by central transitive pinning. -->
Evidence
PR Compliance ID 104327 forbids adding comments/docstrings where the only change is the comment
itself. The diff shows a single added comment line above an otherwise unchanged <PackageVersion>
entry.

Rule 104327: Avoid adding comments or docstrings to untouched code
Directory.Packages.props[71-71]

Agent prompt
The issue below was found during a code review. Follow the provided context and guidance below and implement a solution

## Issue description
A comment was added without any accompanying code/config change in the same region, which violates the PR rule prohibiting comment-only modifications to otherwise-untouched code.

## Issue Context
The PR adds an explanatory comment above the `ZstdSharp.Port` central package version entry.

## Fix Focus Areas
- Directory.Packages.props[71-71]

ⓘ Copy this prompt and use it to remediate the issue with your preferred AI generation tools


2. Modified protected Directory.Packages.props 📘 Rule violation § Compliance
Description
Directory.Packages.props is listed as a protected infrastructure file, but it was modified in this
PR. Any modification to this file violates the protected-files rule.
Code

Directory.Packages.props[71]

+    <!-- Transitive via MySql.Data (floor 0.8.6); pinned here to 0.8.7 by central transitive pinning. -->
Evidence
PR Compliance ID 104330 prohibits any modifications to Directory.Packages.props. The diff shows an
added comment line in that file, which is sufficient to violate the rule.

Rule 104330: Do not modify protected infrastructure files
Directory.Packages.props[71-71]

Agent prompt
The issue below was found during a code review. Follow the provided context and guidance below and implement a solution

## Issue description
The PR modifies `Directory.Packages.props`, which is explicitly listed as a protected infrastructure file that must not be edited in this change set.

## Issue Context
The only modification is an added XML comment line.

## Fix Focus Areas
- Directory.Packages.props[71-71]

ⓘ Copy this prompt and use it to remediate the issue with your preferred AI generation tools


Grey Divider

Context used
✅ Compliance rules (platform): 52 rules

To customize comments, go to the Qodo configuration screen, or learn more in the docs.

Qodo Logo

Comment thread Directory.Packages.props
<PackageVersion Include="System.Windows.Extensions" Version="10.0.5" />
<PackageVersion Include="VaultSharp" Version="1.17.5.1" />
<PackageVersion Include="VncSharpCore" Version="1.2.1" />
<!-- Transitive via MySql.Data (floor 0.8.6); pinned here to 0.8.7 by central transitive pinning. -->

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Remediation recommended

1. Comment-only change in props 📘 Rule violation ✧ Quality

A new XML comment was added in Directory.Packages.props without any adjacent configuration/logic
change. This violates the rule against adding comments to otherwise-untouched code regions.
Agent Prompt
## Issue description
A comment was added without any accompanying code/config change in the same region, which violates the PR rule prohibiting comment-only modifications to otherwise-untouched code.

## Issue Context
The PR adds an explanatory comment above the `ZstdSharp.Port` central package version entry.

## Fix Focus Areas
- Directory.Packages.props[71-71]

ⓘ Copy this prompt and use it to remediate the issue with your preferred AI generation tools

Comment thread Directory.Packages.props
<PackageVersion Include="System.Windows.Extensions" Version="10.0.5" />
<PackageVersion Include="VaultSharp" Version="1.17.5.1" />
<PackageVersion Include="VncSharpCore" Version="1.2.1" />
<!-- Transitive via MySql.Data (floor 0.8.6); pinned here to 0.8.7 by central transitive pinning. -->

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Remediation recommended

2. Modified protected directory.packages.props 📘 Rule violation § Compliance

Directory.Packages.props is listed as a protected infrastructure file, but it was modified in this
PR. Any modification to this file violates the protected-files rule.
Agent Prompt
## Issue description
The PR modifies `Directory.Packages.props`, which is explicitly listed as a protected infrastructure file that must not be edited in this change set.

## Issue Context
The only modification is an added XML comment line.

## Fix Focus Areas
- Directory.Packages.props[71-71]

ⓘ Copy this prompt and use it to remediate the issue with your preferred AI generation tools

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants