-
Notifications
You must be signed in to change notification settings - Fork 697
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
Fix #701: Add licenseFiles
to InstalledPackageInfo
#9172
base: master
Are you sure you want to change the base?
Conversation
Related discussion #8967 |
Is there anything that needs to be done to get this PR reviewed or merged? 😅 |
@L-TChen I am very sorry for the lack of feedback. Personally speaking, the direction I would like to see is reducing (not increasing) the amount of information in the packagedb. GHC is not going to do anything with the licence field, neither is cabal. This is what I was arguing in the linked issue. I feel we haven't yet reached consensus though so that is why I hesitated giving you feedback based on my own opinion. So maybe we can make progress by understanding what prompted you to propose this change. Of the two issues you link, one I reckon is mostly an historycal discussion (I added the "consider closing" label). The other (that you opened) is a clear bug with a clear simple solution which you have correctly indentified; as far as I understand (please correct me) the fix to this issue does not require changing IPI. Again with apologies, would you consider limiting the scope of this PR to only fixing #9184? (or opening a separate one if so you prefer). Let me know if I am missing something more fundamental. |
Thanks for getting back to me!
If we take the above clause seriously, then releasing any Haskell program in binary form requires reproducing the copyright notice"s" of all packages the program uses whenever the above clause applies. Cabal has all the license information (i.e. the type of license, and the location of copyright notices), so it can help users compile a license report during compilation based on the license types. Therefore, I'd like to solve #701 by adding a field to |
This PR address the issue #701 and #9184. A field
licenseFile
(singular) should have been there inInstalledPackageInfo
,IPI
for short) as described in Section 5.9.9 the GHC documentation, but it is not.Thus, this PR adds a field
license-files
for multiple license files and changes the pretty printer ofPackageDescription
to print the fieldlicense-files
which was previously hidden.Rationale:
cabal
has supported the fieldlicenseFiles
for multiple license files and some packages have adopted this form, so it makes sense to supportlicenseFiles
inIPI
as well. Considering thatIPI
has not yet supported the singular form oflicenseFiles
(i.e. no backward compatibility is needed), I suggest only the field namelicense-files
should be used to simplify pretty printer and parsing.Template Α: This PR modifies
cabal
behaviourInclude the following checklist in your PR:
Bonus points for added automated tests!