Stream: ideas

Topic: automatic license checking


view this post on Zulip Richard Feldman (Jun 22 2023 at 20:26):

I'd like to incorporate some form of license checking when you install a package from a URL, to prevent the situation where you build a big project and then later realize you've been accidentally relying on some code you didn't have legal permission to use

view this post on Zulip Richard Feldman (Jun 22 2023 at 20:28):

some specific scenarios that come to mind:

view this post on Zulip Richard Feldman (Jun 22 2023 at 20:34):

some important design considerations:

view this post on Zulip Richard Feldman (Jun 22 2023 at 20:42):

here's an idea for how this could work:

view this post on Zulip Richard Feldman (Jun 22 2023 at 20:45):

so in that design, the following would be true:

view this post on Zulip Richard Feldman (Jun 22 2023 at 20:46):

any thoughts welcome on this idea!

view this post on Zulip Brendan Hansknecht (Jun 22 2023 at 21:05):

and how they relate to each others in terms of which ones are compatible with which others

I don't think we should do policing. I think we likely should just enable listing what license a project depends on and the tree of how each license is pulled in.

The reasons I say we shouldn't do any sort of policing are:

  1. Users might have explicit permission to use something from the copyright holder, so the license doesn't apply to them
  2. Compatibility is debated and not clear cut.
  3. This is all legal stuff, which means that we have not way to truly know something until it is tested in court (for example, the classic question of what exactly is a derivative work). Also, the license may have more or less meaning depending on the country, so our rules may be incorrect.
  4. How do we police that a license is presented to the end user and thus being used correctly? If you pull some licenses you have to do stuff to use it, not just license your own code in a certain way.
  5. If we miss something and that leads to someone violating a license because we said it was ok, we probably could technically get sued (though that is probably exceptionally unlikely).

view this post on Zulip Richard Feldman (Jun 23 2023 at 00:12):

interesting - what if instead it's just messages that print after you install?

view this post on Zulip Richard Feldman (Jun 23 2023 at 00:12):

hm, I guess that wouldn't work because "install" isn't a thing

view this post on Zulip Richard Feldman (Jun 23 2023 at 00:13):

"download" is a thing, but that only happens once globally, it's not tracked per project :thinking:

view this post on Zulip Brendan Hansknecht (Jun 23 2023 at 00:49):

Yeah i would be for a message that pops up when you pull in a new dependency (add per project cache somewhere).

Says some like "dependency x has y license, please ensure you are following the requirements of the license, more details here <link>. Do you still want to pull in x as dependency?" Also, maybe print the path of how the dep got added.

I would also be ok with skipping this message for some of the very permissive licenses (apache, MIT, etc).


Last updated: Jun 16 2026 at 16:19 UTC