gleam-lang / gleam-mode

🐙 Gleam support for Emacs
Apache License 2.0
77 stars 20 forks source link

Add a license #6

Closed J3RN closed 2 years ago

J3RN commented 2 years ago

Full disclosure: I am not an IP lawyer.

I just noticed that this repository does not have a license. As such, each contribution is licensed as "all rights reserved" to its author. This is a somewhat awkward position.

For inclusion in MELPA, the preeminent Emacs lisp package archive, this project would need to be licensed under something GPLv3 compatible, of which there are several options. Apache V2, the license used by Gleam, Erlang/OTP, etc is a viable option, though most Emacs packages are licensed GPLv2 or GPLv3 by convention. I'm not exactly sure what the implications of licensing this project as, say, Apache V2 and also pulling in GPL'd dependencies either (which it admittedly does not do yet).

In any event, in the course of research into this, I've found the suggestion that in order to create a new, licensed release containing the existing contributions, we (the authors and contributors) would need to provide written permission for the license change:

There are two main ways that open source projects handle this scenario:

Some projects include a “contributor licensing agreement” (CLA) ... Others simply consider every contributor to be a copyright owner. This is the default method that applies to most projects without an explicit CLA like Google’s.

The only downside of this method is if the primary or original author decides to change the license in the future. In this case, they must collect written permission from every single contributor.

Source

Once a license is agreed upon, we (the contributors) could choose to delegate copyright to a single individual (e.g. Copyright © 2021 Louis Pilfold), or distribute the copyright among the contributors (e.g. Copyright © 2021 gleam-mode's authors and contributors). Either is fine, but should we want to "change" the license for future releases, the former copyright would allow Louis to choose any license whereas the latter would require that the new license be compatible with the old or we'd have to do the collecting permission rigamarole all over again.

If anyone is or knows an IP lawyer, it might be worth chiming in :grin: Sorry to be the bearer of headache-laden news!

lpil commented 2 years ago

I'm open to GPL for this if that is the convention.

This project is such a small amount of code I'd suggest we just rewrite it from scratch in the PR that adds the licence.

J3RN commented 2 years ago

Good thinking @lpil! I'm embarrassed to say that I didn't think of that. Funny enough, I started an Emacs gleam-mode based on tree-sitter last week, but ultimately stopped after discovering that tree-sitter-gleam, on which it depended, is also unlicensed.

Anyhow, I should be able to pull out the tree-sitter bits, add old-fashioned highlighting and indentation rules (and, of course, a license!) and send a PR.

lpil commented 2 years ago

Wonderful! Thank you very much

J3RN commented 2 years ago

Just wanted to give an update here: I started down the road of doing syntax highlighting with font-lock and indentation with smie only to realize that I'd have to write one and a half Gleam parsers anyhow. Consequently, I decided that it would be the best use of time to just write a licensed :laughing: tree-sitter grammar for Gleam, which would have application beyond just Emacs. That work is begun here: https://github.com/J3RN/tree-sitter-gleam. It's very much a work-in-progress.

J3RN commented 2 years ago

As of #8, I think this can now be closed.