Skip to content

Adds license parsing to main pipeline #257

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

Closed
wants to merge 4 commits into from

Conversation

mikesol
Copy link

@mikesol mikesol commented Oct 23, 2021

No description provided.

@@ -12,6 +12,7 @@ import Foreign.SemVer (SemVer, parseSemVer)
import Registry.PackageName (PackageName)
import Registry.PackageName as PackageName
import Registry.Schema (Repo(..))
import Registry.License as RLicense
Copy link
Member

Choose a reason for hiding this comment

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

Suggested change
import Registry.License as RLicense
import Registry.License as License

@@ -397,7 +368,7 @@ constructManifestFields package version address = do
-- We can detect the license for the project using a combination of `licensee`
-- and reading the license directly out of the Spago and Bower files (the
-- CLI tool will not read from either file).
licenseeOutput <- detectLicense files
licenseeOutput <- detectLicense files ------------------ pull this out
Copy link
Member

Choose a reason for hiding this comment

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

When pulling this out, keep in mid that we still need to do the work below -- where we pull the licenses out of the Spago manifest and Bowerfile -- because we detect the licenses using a combination of licensee (which checks the LICENSE file and package.json file) and the licenses we pull out of the other manifest files. So the entire thing will need to be factored out.

@mikesol
Copy link
Author

mikesol commented Nov 9, 2021

@thomashoneyman when you get a chance, could you take a peek here and let me know if I'm going in the right direction? Basically, I created Manifest.purs to work with manifests from a project, and I'll probably tweak it for usage in the actual pipeline. That required importing a bunch of stuff from the legacy script, and I noticed that in general there was bit of cruft where stuff from the legacy script was imported into API.purs. I'm assuming modules should flow the other way - the legacy script and current pipeline should pull from the same files which "belong" to neither and are sorty of lib-ish/util-ish in nature.

If you sign off on this leg of work, the next step will be using constructManifestFields in the main pipeline followed by the license-checking stuff on the resulting manifest.

@f-f
Copy link
Member

f-f commented Jan 9, 2022

I'll close this in favor of #288

@f-f f-f closed this Jan 9, 2022
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