Skip to content
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

Provide a license report #6676

Open
hseg opened this issue Jan 9, 2025 · 0 comments
Open

Provide a license report #6676

hseg opened this issue Jan 9, 2025 · 0 comments

Comments

@hseg
Copy link

hseg commented Jan 9, 2025

At the moment, it is hard to generate a bill of materials for dependencies.
Since IIUC standard Haskell practice is to link statically, that seems to mean
that binary distributions effectively are redistributing derivative works of all
dependencies, and so my understanding is that all their license terms need to be
distributed along with the software.

However, I acknowledge that even projects as conservative as Debian aren't
bothering to do this
, so this may be a solution looking for a
problem. On the other hand, the existence of cabal-plan license-report suggests to me that some people are bothering to do
this.

In particular stack ls dependencies --license isn't enough.
This is for a couple of reasons:

  • For some licenses (MIT, BSD, ISC, ...), the license text needs to also be
    distributed.

  • The output still needs to be massaged into an actual report

  • It'd be nice if the report could canonicalize the license strings -- right now
    it seems it produces the raw license strings from the .cabal files.

    (A further ask that requires social, not technical, solutions is to have the
    license strings be SPDX identifiers, since the current freeform standard gives
    rise to such ambiguities as "What does GPL mean?" (version is ambiguous, as
    is whether using later versions is permitted))

Hacking a solution around cabal-plan is not viable, since it requires both a
plan.json (which might be generated from a freezefile, but…) and also a
populated Cabal store. Hence, a stack-native solution is necessary. For the
same reason, it is unreasonable to push this to cabal-plan, and given that
stack ls dependencies --license exists, it makes sense to push for it to
actually be useful.

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

No branches or pull requests

1 participant