matthewmueller / joy

A delightful Go to Javascript compiler (ON HOLD)
https://mat.tm/joy
GNU General Public License v3.0
1.32k stars 35 forks source link

Licensing: Update examples & add License file #60

Open matthewmueller opened 6 years ago

matthewmueller commented 6 years ago

From HN: https://news.ycombinator.com/item?id=15910300

Hey, great work! Just a heads up about licensing. JavaScript code fragments that you use inside the compiler to produce the final output are technically part of the source code, and thus the output is also GPLv3 licensed as a derived work.

That's a known GPL quirk, and other GPL-licensed compilers like GCC use a separate variant of GPL to avoid that collision.

You can see how GNU Bison does it: https://git.savannah.gnu.org/cgit/bison.git/tree/src/parse-g... since they put fragments of Bison code to the final generate source file. That's exactly what Joy does to generate JavaScript, so you should put similar notice to the repository.

Also, LICENCE file is not there.

matthewmueller commented 6 years ago

Okay, so I'm not an expert here but it sounds like I need to add something like this:

/* As a special exception, you may create a larger work that contains
   part or all of the Bison parser skeleton and distribute that work
   under terms of your choice, so long as that work isn't itself a
   parser generator using the skeleton or a modified version thereof
   as a parser skeleton.  Alternatively, if you modify or redistribute
   the parser skeleton itself, you may (at your option) remove this
   special exception, which will cause the skeleton and the resulting
   Bison output files to be licensed under the GNU General Public
   License without this special exception.

   This special exception was added by the Free Software Foundation in
   version 2.2 of Bison.  */

to Joy's runtime and standard library. Anyone know more about this?

glycerine commented 6 years ago

Sadly, using the GPL is a certain showstopper for most of my projects. I would invite you to consider a Go-style 2/3-clause BSD license. Or even the simple, friendly MIT license, for widest adoption.

matthewmueller commented 6 years ago

@glycerine what makes it a showstopper? Can you explain what you'd like to do a little better that GPLv3 wouldn't allow?

glycerine commented 6 years ago

It's not commercially friendly, and I deploy using static binaries.

matthewmueller commented 6 years ago

Got it. Yep – that's by design. This measure is in place to prevent companies from profiting off the hard work of others without giving back. Many other big open source projects also do this (e.g. WordPress & the GCC)

Companies would need to either license Joy or open source their code if they want to build services on top of the Joy compiler itself.

It's important to note that this only applies to building services on top of the compiler itself (e.g. a dynamic CDN). You own the code that you compile with Joy – input and output source code.

This issue was created to handle some edge cases I need to fix to make sure that's always the case.