Fix misleading "Installation options" label on Update/Uninstall operation logs#5037
Open
Scott (7ranceaddic7) wants to merge 1 commit into
Open
Conversation
…tion logs UpdatePackageOperation and UninstallPackageOperation both logged their options dump under the header "Installation options:", inherited from InstallPackageOperation via copy-paste. Since InstallOptions.ToString() already renders CustomParameters_Install/_Update/_Uninstall separately by field name, this only affected the header text -- but it's actively misleading: users configuring a package's "Custom Install Arguments" field see that same value echoed under an "Installation options:" banner during an update run, which reads as confirmation that the install-time argument applies to updates too, even though it doesn't (CustomParameters_Update is the field that actually gets appended for update operations, per NpmPkgOperationHelper._getOperationParameters).
4 tasks
Author
|
Real-world verification, beyond the build/test run noted above: Confirmed the underlying claim of this PR (that
This was done via a temporary local test (not committed) calling |
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.
UpdatePackageOperation.Initialize()andUninstallPackageOperation.Initialize()inPackageOperations.csboth logged theirOptions.ToString()dump under the header"Installation options: ", copy-pasted fromInstallPackageOperation. SinceInstallOptionsalready has three independent fields (CustomParameters_Install,CustomParameters_Update,CustomParameters_Uninstall) that are correctly applied per operation type (seeNpmPkgOperationHelper._getOperationParameters), the mislabeled header was purely cosmetic, but it's actively misleading during debugging: a user who only set "Custom Install Arguments" sees that value echoed under an"Installation options:"banner during an update run, which reads as confirmation that the flag applies, when in fact it'sCustomParameters_Update(a separate, empty field) that actually gets appended to the update command.This surfaced while diagnosing why
--legacy-peer-depswasn't being applied tonpmpackage updates: the engine behavior was correct, but the log was telling a different story.Change: rename the header to
"Update options: "and"Uninstall options: "in their respective operation classes. No behavior change, no new abstraction; matches the existing per-class string literal style already used forMetadata.Title/Metadata.Status/etc. in the same file.Verified with
dotnet build(0 errors) anddotnet testonUniGetUI.PackageEngine.Tests(252/252 passing, no regressions) against SDK 10.0.301.N/A. No existing issue tracks this; not creating one per the PR template guidance.