lark icon indicating copy to clipboard operation
lark copied to clipboard

Standalone license clarification

Open LynnKirby opened this issue 2 years ago • 9 comments

A generated standalone parser contains the user's dumped grammar data plus code extracted from Lark which is otherwise under the MIT license. Given that, how is the generated parser licenced as MPL-2.0?

LynnKirby avatar Feb 22 '23 14:02 LynnKirby

The standalone generator is not under MIT, but under MPL-2.0. It also generates extra code inside the resulting file that is not from anywhere else in Lark. So while the file includes code that was MIT, the resulting file is not MIT.

MegaIng avatar Feb 22 '23 15:02 MegaIng

In that case the result should be MIT and MPL-2.0 (unless all contributors have agreed to dual licence their code).

Regardless, it seems odd to licence the generator this way considering it would be trivial to create your own version that does the exact same thing.

LynnKirby avatar Feb 22 '23 15:02 LynnKirby

Whether or not contributors agree doesn't matter, since MIT allows relicensing this way without problems.

Yeah, you can create a tool that does this. I wouldn't call it trivial. Make sure to not copy any code from the standalone tool. Check #247 and #507 for discussions as to why it's not MIT

MegaIng avatar Feb 22 '23 15:02 MegaIng

MIT allows sublicencing, which is not the same thing as completely replacing the license.

Just to be clear, I have no problem with the MPL (in fact the project I am evaluating Lark for will be MPL anyways). I just want to ensure the license situation is crystal clear.

LynnKirby avatar Feb 22 '23 16:02 LynnKirby

The only problem I see that might exists is that the generated standalone file potentially should contain the MIT license notice, although it wouldn't apply to code. But also, since erezsh is the copyright holder (and for sure still has a larger majority of the codebase as his solo creation), the terms of the MIT license don't have to apply to this anyway.

I am not a legal expert, I am basing it on the discussion here: https://opensource.stackexchange.com/questions/5832/relicensing-an-mit-licensed-project-under-the-gpl-that-has-non-code-contribution

MegaIng avatar Feb 22 '23 16:02 MegaIng

For info from a lawyer, see Lawrence Rosen's Open Source Licensing ch. 5, page 87 (https://www.rosenlaw.com/oslbook.htm).

the generated standalone file potentially should contain the MIT license notice

That sounds about right.

LynnKirby avatar Feb 22 '23 16:02 LynnKirby

Just to be clear:

  • We are sublicensing not relicensing (based on the definition in the book from what I can tell)
  • We don't need to have the resulting file also be under MIT license
  • We can in fact remove rights that the original MIT license gave (we just couldn't add new rights)
  • We don't need permission from authors (since they agreed to MIT)

Right?

So the only remaining question is whether or not the license text for MIT needs to be included in the generated file. It doesn't apply to the file. So what is the point of it being included? My argument here is that erezsh is the copyright owner and can therefore give it out under a different license without respecting this term of the MIT license. But maybe this is wrong.

MegaIng avatar Feb 22 '23 16:02 MegaIng

We are sublicensing not relicensing

The user could sublicence the MIT part of the generated code. The Lark developers could sublicence the MIT part of Lark source code and distribute it as MIT and MPL-2.0 from now on. But simply using the generator doesn't sublicence the result since it's a mechanical process, not a person.

We don't need to have the resulting file also be under MIT license

The conditions of the license can't be removed. For example, a hypothetical sublicensable 2-clause BSD could be sublicensed directly as 3-clause BSD because the conditions are only being extended. However MIT requires the license text to be distributed which is an additional condition on top of MPL-2.0.

My argument here is that erezsh is the copyright owner and can therefore give it out under a different license without respecting this term of the MIT license.

There are multiple contributors and (as far as I know) no agreement to transfer copyright to erezsh so this isn't the case.

LynnKirby avatar Feb 22 '23 17:02 LynnKirby

Wouldn't the MPL conflict with the MIT license? The MIT license is extremely permissive, whereas the MPL is not. And the MIT license is not on the list of secondary licenses as defined in the MPL (the MPL only lists the GPL and LGPL).

ethindp avatar Aug 19 '23 19:08 ethindp