pearmaster / json-schema-codegen

Generate C++ or Python3 code from JSON-Schema
GNU General Public License v2.0
39 stars 10 forks source link

GPL license means that generated code is also licensed under GPL #10

Open trittweiler opened 3 years ago

trittweiler commented 3 years ago

Hi there!

My understanding is that the output of json-schema-codegen constitutes a derivative work of the templates in the source repository and the templates are licensed under GPL. That makes the generated code also fall under the GPL.

And even if I write my own templates (licensed under a different license), I am not convinced that this will hold water legally. Or that the templates would not constitute a derivative work themselves and fall under GPL themselves.

My questions is:

When you chose GPL as license, were you aware that that choice will also transmit to the generated code? Was this a conscious decision?

In case this was a deliberate decision, would you consider adding a Bison-style exception[1] to json-schema-codegen, or change the license to a more permissive, non-copyleft license like MIT?

Thanks a lot for your work on json-schema-codegen and your consideration of this issue!

Tobias

[1] https://spdx.org/licenses/Bison-exception-2.2.html

pearmaster commented 3 years ago

Yes, I'm aware of this problem and have it on my list to fix it.

On a fork of this project that is not publically available, I explained my desire to have it licensed similar to the GCC compiler, that the generator itself is open source, but the resulting output maintains the same copyright as the input specification.

Because the output is code that is compiled and run, and therefore highly vulnerable to security problems, I want to use a license that promotes code re-publishing to increase the ability to audit the code.

Thanks for bringing the Bison exception to my attention, it may be exactly what I need in this case.

kobi-ca commented 2 years ago

Hello folks, I'm interested on this topic as well. Is there any update on the above? thanks! Kobi

jonpetri commented 2 years ago

Hello, I'm interested on this topic as well. The tool is amazing, I would be happy to use it in my current object. Doing so, I'm sure I'll find some bug and have some improve idea. But I can't use it because of the GPL license.

Publishing the generated code won't be an issue for me, but just not as GPL, because it would force my project to be GPL too, as I would link the generated code. I can propose a GCC-like license exception if you want.

Thanks Jon