-
Notifications
You must be signed in to change notification settings - Fork 173
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
Add NOTICE files to source units #1466
Merged
Merged
Conversation
This file contains 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
spatten
force-pushed
the
add-notice-files-to-source-units
branch
from
September 12, 2024 21:24
8c5bf4d
to
a0c5992
Compare
csasarak
approved these changes
Sep 16, 2024
src/App/Fossa/ManualDeps.hs
Outdated
@@ -517,7 +519,8 @@ instance FromJSON RemoteDependency where | |||
<$> (obj `neText` "name") | |||
<*> (unTextLike <$> obj `neText` "version") | |||
<*> (obj `neText` "url") | |||
<*> obj .:? "metadata" | |||
<*> obj | |||
.:? "metadata" |
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.
Did the formatter do this? Not at all blocking but just wanted to ask.
spatten
force-pushed
the
add-notice-files-to-source-units
branch
2 times, most recently
from
September 17, 2024 22:23
1838003
to
11e55d4
Compare
spatten
force-pushed
the
add-notice-files-to-source-units
branch
from
October 7, 2024 22:29
88b374c
to
4d6d466
Compare
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.
Overview
In https://github.com/fossas/themis/pull/68, Themis added NoticeFiles to its srclib output.
This PR updates the CLI to parse the NoticeFiles fields.
Acceptance criteria
Testing plan
First, you'll need to update the version of Themis that is embedded into the CLI. Run
vendor_download.sh
with the temporary edits in this PR, and thencabal clean; cabal build
.Run
fossa analyze --experimental-force-first-party-scans
on a directory structure with and without notice files in it.For a directory structure with notice files in it, you can use this:
notice-file-tester.zip
For a directory without notice files, just copy a license into an empty directory.
Run
cabal run fossa -- analyze --experimental-force-first-party-scans --output
on both directories.For the run against the directory structure with just licenses and no notice files, you should see one SourceUnit per license in the directory structure, and all SourceUnits should have a type of "LicenseUnit".
For the run against the notice-file-tester directory structure, the output will look something like this. There are two sourceUnits with a type of "LicenseUnit" and a third with a type of "NoticeFileMatches" that contains the notice file data.
Risks
This is safe to merge with and without the change to Themis, but the tests won't pass unless we use the version of Themis in https://github.com/fossas/themis/pull/68
Metrics
References
Checklist
- [ ] If this PR introduced a user-visible change, I added documentation intodocs/
.- [ ] If this PR added docs, I added links as appropriate to the user manual's ToC indocs/README.ms
and gave consideration to how discoverable or not my documentation is.Changelog.md
. If this PR did not mark a release, I added my changes into an# Unreleased
section at the top.- [ ] If I made changes to.fossa.yml
orfossa-deps.{json.yml}
, I updateddocs/references/files/*.schema.json
AND I have updated example files used byfossa init
command. You may also need to update these if you have added/removed new dependency type (e.g.pip
) or analysis target type (e.g.poetry
).- [ ] If I made changes to a subcommand's options, I updateddocs/references/subcommands/<subcommand>.md
.