Improve declared license collection from nuspec files (#2669) - #5271
Open
teyesan wants to merge 6 commits into
Open
Improve declared license collection from nuspec files (#2669)#5271teyesan wants to merge 6 commits into
teyesan wants to merge 6 commits into
Conversation
AyanSinhaMahapatra
left a comment
Member
There was a problem hiding this comment.
@teyesan there are no test files for your tests.
Author
|
Two tests are designed to fail currently and will pass once fix has been pushed. |
teyesan
force-pushed
the
improve-declared-license-detection
branch
from
August 19, 2026 20:56
9eba4de to
c9ea9fb
Compare
teyesan
force-pushed
the
improve-declared-license-detection
branch
from
August 21, 2026 02:07
6df7db8 to
bded38b
Compare
teyesan
force-pushed
the
improve-declared-license-detection
branch
2 times, most recently
from
August 27, 2026 02:22
a2a8c5d to
9d35a92
Compare
6 tasks
Signed-off-by: Temi Eyesan <teyesan06@icloud.com>
Signed-off-by: Temi Eyesan <teyesan06@icloud.com>
…helper function Signed-off-by: tram-tr <htrinh@nd.edu>
…ction Signed-off-by: Temi Eyesan <teyesan06@icloud.com>
…e-org#2669) Signed-off-by: Temi Eyesan <teyesan06@icloud.com>
teyesan
force-pushed
the
improve-declared-license-detection
branch
2 times, most recently
from
August 28, 2026 02:31
aa4cf99 to
7fd01d5
Compare
Signed-off-by: teyesan <teyesan06@icloud.com>
teyesan
marked this pull request as ready for review
August 29, 2026 11:28
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.
Description
Improve NuGet
.nuspeclicense handling to correctly process the different ways license information can be declared.Changes
<license type="expression">as the package's declared license expression.<license type="file">as a reference to a license file and store the filename inextra_data["license_file"].<licenseUrl>field when no<license>element is present.licenseUrl(https://aka.ms/deprecateLicenseUrl).License precedence
When
<license type="expression">is present, the SPDX expression is used as the declared license statement.When
<license type="file">is present, the referenced filename is stored separately inextra_data["license_file"], since it's a reference rather than license text itself, not the declared license statement directly.A real (non-deprecated)
<licenseUrl>is still treated as meaningful license information: it fills in the declared license statement when nothing else is available, or is appended alongside an SPDX expression when both are present. This preserves useful license info from licenseUrl rather than discarding it whenever a<license>element also exists.NuGet's deprecated placeholder value (https://aka.ms/deprecateLicenseUrl) is always ignored, regardless of what else is present.
Fixes #2669
Tasks
Run tests locally to check for errors.