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
[WIP] Distribution.SPDX.LicenseId generation #4913
Conversation
c316685
to
5e6c233
Compare
|
23dcce2
to
ce8a228
Compare
@@ -353,7 +353,7 @@ isAsciiAlpha c = ('a' <= c && c <= 'z') | |||
-- False | |||
-- | |||
isAsciiAlphaNum :: Char -> Bool | |||
isAsciiAlphaNum c = isAscii c || isDigit c | |||
isAsciiAlphaNum c = isAscii c && isAlphaNum c |
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.
this weren't used anywhere before :S
This PR introduces SPDX modules. They aren't yet used in parsing |
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.
LGTM modulo minor comments.
cabal.project.meta
Outdated
@@ -1 +1,2 @@ | |||
packages: cabal-dev-scripts | |||
other-packages: |
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.
Why is this needed?
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.
to not include */*.cabal
which causes it resolve to weird things.
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.
Ah, I meant it should be optional-packages
, will fix that.
travis-meta.sh
Outdated
# Regenerate files | ||
timed make gen-extra-source-files | ||
timed make spdx |
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.
👍
Would be nice to fix make lexer
as well.
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.
I tried, it failed on travis (there were whitespace difference, no idea why)
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.
Different version of alex
or some of its dependencies maybe? Though I have 3.1.7 from @hvr's PPA installed and the diff after make lexer
is empty.
cabal-dev-scripts/src/GenSPDXExc.hs
Outdated
-- Licenses | ||
------------------------------------------------------------------------------- | ||
|
||
data License = License |
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.
Shouldn't this be LicenseException
? A bit confusing that this one and the one in GenSPDX.hs
have the same name, but are slightly different. Maybe move these types to a common module as well?
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.
It should. I'll add a TODO note. I'm not keen on refactoring that too much now, as it might need bigger changes (hopefully not). It can be done after the release, as it's not part of delivery
Distribution.SDPX.LicenseId and Distribution.SDPX.LicenceExceptionId are generated.
Please include the following checklist in your PR:
[ci skip]
is used to avoid triggering the build bots.Please also shortly describe how you tested your change. Bonus points for added tests!