How to use Clojure core specs in my own library with regards to the EPL license?

498 views
Skip to first unread message

Didier

unread,
Aug 28, 2019, 12:59:01 AM8/28/19
to Clojure
I'm looking to publish a Clojure library and would like to release it under the MIT license. That said, I needed to modify some core specs so that `fn` and `defn` can properly roundtrip between conform and unform.

To do this, I copied the specs for `fn` and `defn` in my own code base, and modified them accordingly.

From what I understand of the EPL, modifications of EPL code must be re-licensed under the EPL as well, and what changes were made must be documented. But, normally (though the Google vs Oracle lawsuit might change that), function signatures are not considered copyrightable. When it comes to Spec, things get fuzzy for me, the spec is code, so it probably means it is under the EPL. That said, even if I specced `fn` and `defn` myself, starting from scratch, chances are I would end up with almost the same spec. In some way, a spec is like a function signature as well. So I'm not sure how to treat them.

I believe my best bet right now is just either license my whole library under EPL, and document the changes I made to the core specs. Or to double license, move the specs into their own file with an EPL license, and license the rest under MIT.

P.S.: Is it a bug that fn and defn specs can not roundtrip?

Alex Miller

unread,
Aug 30, 2019, 9:29:25 PM8/30/19
to Clojure
I think at the point of "I copied the specs for `fn` and `defn` in my own code base, and modified them accordingly.", that sounds like a modification of source under the EPL. A more subtle interpretation would require legal expertise.

Re the PS, yes that's a larger known issue around regex specs in a vector, which is a thorny issue.

Didier

unread,
Aug 31, 2019, 5:29:27 AM8/31/19
to Clojure
Ya, I will just license the modifications to the specs under EPL.

I do feel though specs are a weird grey area. For example, EPL 2.0 says:

> Modified Works shall not include works that contain only declarations, interfaces, types, classes, structures, or files of the Program solely in each case in order to link to, bind by name, or subclass the Program or Modified Works thereof.

And EPL 1 allows a contributor to relicense under EPL 2.

It doesn't list specs explicitly, because it's clearly designed for Java, but I feel it begs the question:

If I implement a function of some spec, and then a spec for it. And someone implement a function of similar spec, and a spec for it. Now the specs could be seen as derivative. It can get tricky.

Anyways. That's just thoughts. For my project it don't matter. Thanks

Reply all
Reply to author
Forward
0 new messages