Skip to content

Notice followups#11059

Merged
sschuberth merged 1 commit into
mainfrom
notice-followups
Jun 5, 2026
Merged

Notice followups#11059
sschuberth merged 1 commit into
mainfrom
notice-followups

Conversation

@sschuberth
Copy link
Copy Markdown
Member

Please have a look at the individual commit messages for the details.

@sschuberth sschuberth requested a review from a team as a code owner November 7, 2025 14:22
}

addApplicableLicenseFiles(licenseFiles)
addApplicableLicenseFiles(noticeFiles)
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Why should these be treated the same as license files?

(This imho should also have a rationale in the commit msg)

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

I believe the function name is just misleading. We use the same function for adding any files, including patentFiles and otherLicenseFiles. So it seems natural to also use it for noticeFiles, and I don't think a justification is needed.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Hm, the function docs say "Return a mapping from the given relative [directories] to the relative paths of the (root) licenses file". So, the result is considered a "root license" file. An I suppose (haven't checked), that the returned stuff is treated like a root license file. For example when inserting original license texts into a notice. E.g. would this change here alter

  1. what the main license of a package is (also in SPDX report
  2. what is put into the notice file

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Or does this change only lead to the files being include by the file archiver, but does not have any effect otherwise?

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

Or does this change only lead to the files being include by the file archiver, but does not have any effect otherwise?

That's at least exactly the intention of this change. Also see this Slack conversation.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

This is called by matchWithRootLicenses() and looking at the callers of that one, to me it is not clear why there should be no effect on those. Can you please explain?

Copy link
Copy Markdown
Member Author

@sschuberth sschuberth Jun 2, 2026

Choose a reason for hiding this comment

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

I've finally found the time to revisit the mainLicense() code: In essence, it creates detectedLicenses from those applicableLicenseFiles with license findings, and I agree that notice files should not be considered here, as notice files do not contain the license(s) of the project(s), but their of dependencies.

So I'll drop the last commit, @fviernau.

@sschuberth sschuberth requested review from a team and fviernau November 7, 2025 15:01
@sschuberth sschuberth enabled auto-merge (rebase) November 7, 2025 16:35
@codecov
Copy link
Copy Markdown

codecov Bot commented Nov 7, 2025

Codecov Report

❌ Patch coverage is 0% with 3 lines in your changes missing coverage. Please review.
✅ Project coverage is 58.59%. Comparing base (555bc12) to head (23a45cf).
⚠️ Report is 1 commits behind head on main.

Files with missing lines Patch % Lines
model/src/main/kotlin/utils/PathLicenseMatcher.kt 0.00% 3 Missing ⚠️
Additional details and impacted files
@@             Coverage Diff              @@
##               main   #11059      +/-   ##
============================================
- Coverage     58.60%   58.59%   -0.02%     
  Complexity     1809     1809              
============================================
  Files           359      359              
  Lines         13387    13390       +3     
  Branches       1355     1355              
============================================
  Hits           7846     7846              
- Misses         5049     5052       +3     
  Partials        492      492              
Flag Coverage Δ
funTest-no-external-tools 30.68% <0.00%> (-0.02%) ⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

This is a fixup for a71ed8b.

Signed-off-by: Sebastian Schuberth <sebastian@doubleopen.org>
@sschuberth sschuberth force-pushed the notice-followups branch 2 times, most recently from 23a45cf to fa3e93f Compare June 2, 2026 12:41
@sschuberth sschuberth dismissed fviernau’s stale review June 5, 2026 05:35

Comment addressed (commit dropped).

@sschuberth sschuberth merged commit c942f6c into main Jun 5, 2026
31 of 32 checks passed
@sschuberth sschuberth deleted the notice-followups branch June 5, 2026 05:35
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.

3 participants