-
Notifications
You must be signed in to change notification settings - Fork 695
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Duplicate NuGetAuditSuppress warnings use code NU1508 #5921
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@nkolev92 why does NuGet.exe disable duplicate checking?
AddProperty(args, "DisableCheckingDuplicateNuGetItems", bool.TrueString); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Because TreatWarningsAsErrors would fail the dg spec generation and fail the operation with a message that's not very actionable.
It wasn't worth the effort back then.
Spec has more details: https://github.com/NuGet/Home/blob/dev/accepted/2022/duplicate-nuget-item-error-handling.md#technical-explanation.
@@ -359,7 +359,7 @@ Copyright (c) .NET Foundation. All rights reserved. | |||
<CheckForDuplicateNuGetItemsTask | |||
Items="@(NuGetAuditSuppress)" | |||
ItemName="NuGetAuditSuppress" | |||
LogCode="NU1505" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@nkolev92 from NuGet/Home#13620
This should be a new log code.
Why do we use a different code for each MSBuild item type?
The docs are the same for each item type, since the resolution is the same. I feel like all this design decision does is cause us extra busy work. I feel like one error code, where in the docs we mention that this can happen for multiple item types, would just be easier, with no downside.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The owner of the action isn't always the same.
In particular the SDK sets PackageDownload items, so any issues are likely problems on the SDK side.
For example, if you search with NU1505, you end up with dotnet/sdk#24747.
NU1504 gives you something else.
It's duplicative sure, but I think there's an eventual limit to the number of items we'll be using :)
7239453
to
ed458cf
Compare
Bug
Fixes: NuGet/Home#13620
Description
PR Checklist