Fix NU1903 (Tmds.DBus.Protocol) and CS0162 build warnings#128
Merged
Conversation
- Pin Tmds.DBus.Protocol to 0.21.3 to address GHSA-xrw6-gwf8-vvr9 (transitive via Avalonia on Linux). - Suppress CS0162 around the intentionally-dead branch in SnippetSearcher gated by the SupplyChildrenFromSelectedSnippets compile-time constant. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
There was a problem hiding this comment.
Pull request overview
This PR cleans up build output for the Avalonia app by addressing (1) a NuGet security advisory on a transitive dependency and (2) a C# unreachable-code warning in the core snippet search logic.
Changes:
- Pins
Tmds.DBus.Protocolto0.21.3via central package management and adds a direct reference in the Avalonia project to ensure the patched version is used. - Removes an unreachable code path in
SnippetSearcher.Searchthat was gated by aconst falseflag (CS0162).
Reviewed changes
Copilot reviewed 3 out of 3 changed files in this pull request and generated 2 comments.
| File | Description |
|---|---|
src/Neptuo.Productivity.SnippetManager/SnippetSearcher.cs |
Removes unreachable feature-flagged block to eliminate CS0162 warning. |
src/Neptuo.Productivity.SnippetManager.Avalonia/Neptuo.Productivity.SnippetManager.Avalonia.csproj |
Adds direct PackageReference to Tmds.DBus.Protocol to force patched version selection. |
src/Directory.Packages.props |
Adds centrally-managed version 0.21.3 for Tmds.DBus.Protocol. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Clears two build warnings so the Avalonia project builds clean.
Changes
Tmds.DBus.Protocol0.21.2 (high-severity advisory on Linux). Added a directPackageReferencepinned to 0.21.3 (the patched version per the advisory) via central package management, so it overrides the vulnerable transitive version.SnippetSearcher.Search: TheSupplyChildrenFromSelectedSnippetsblock was gated by aconst bool = false, making it unreachable. Per the TODO comment it was kept intentionally for future work, so the block is now commented out (with the TODO preserved) and the unused const removed.Verified with
dotnet buildon the Avalonia project: 0 warnings, 0 errors.