Problem/Motivation

Proposed resolution

Remove Polymer from consideration as a library that can be added to Drupal core.

Remaining tasks

Discuss if there is any disagreement or workaround to the licensing problem.

Comments

effulgentsia created an issue. See original summary.

effulgentsia’s picture

Issue summary: View changes
effulgentsia’s picture

Title: JavaScript VDOM library evaluation: polymer license compatibility with GPL2 » JavaScript library evaluation: polymer license compatibility with GPL2

Removing VDOM from the issue title, since Polymer is not a VDOM library.

aleksip’s picture

Drupal is licensed GPL version 2 or later, that means that any GPL 3 compatible license can also be used. Apache 2.0 is compatible with GPL 3, but I don't know if the Polymer license is.

attiks’s picture

droplet’s picture

Simply copy and paste my question from another issue:

Does Drupal CORE compatible with Apache 2.0? I realise a (very popular) Polymer lib kit released under this license: https://vaadin.com/elements

So now, Drupal has no plans move to GPL v3
https://www.drupal.org/about/licensing#q12

On Apache 2.0 page, it says not compatible if I read it correctly.
https://www.gnu.org/licenses/license-list.html#apache2

Do we need to do a research on the these frameworks' popular `components` libs if we have a plan to reuse it instead make a custom one? (this question not limited to Polymer)

aleksip’s picture

Drupal's licensing page states that you are free "to run Drupal in combination with any code with any license that is compatible with either versions 2 or 3" of GPL.

droplet’s picture

Drupal CORE, or a mixture of drupal.org and modules. It seems unclear?

http://cgit.drupalcode.org/drupal/tree/core/LICENSE.txt

aleksip’s picture

IANAL but the licensing page does say "Drupal and all contributed files hosted on Drupal.org are licensed under the GNU General Public License, version 2 or later", that seems quite clear. The LICENSE.txt in core is just the standard GPL 2 license text, which includes this:

If the Program specifies a version number of this License which applies to it and "any later version", you have the option of following the terms and conditions either of that version or of any later version published by the Free Software Foundation.

cosmicdreams’s picture

This is probably a common question, but I'll ask it anyway:

What license would be acceptable? MIT? or does it have to be GPLv2?

If MIT then we could search for libraries that assist in the creation of web components that comply or we could focus on vanilla web components.

droplet’s picture

droplet’s picture

cosmicdreams’s picture

There is some good news from a follow up search of licenses for the other js file we would have to include: the webcomponents.js polyfill. It is licensed under a permissive BSD license listed here: https://github.com/webcomponents/webcomponentsjs/blob/master/LICENSE.md

And has no patent termination clause.

cosmicdreams’s picture

@droploet the concern is not the license itself but the file that @effulgentsia listed that adds on extra wording about patents.

aleksip’s picture

It looks like the Polymer license is the same as the WebM license:
https://www.webmproject.org/license/software/
https://www.webmproject.org/license/additional/

And according to FSF "WebM's license is free and GPL-compatible":
https://www.gnu.org/licenses/license-list.en.html#WebM

So based on this I would say that Polymer can be used in Drupal.

cosmicdreams’s picture

While it would make sense why Google would include the additional patent license and explicit verbage, given how often they are sued for patent trolly things, I understand why concern over patents is considered a blocker, given everything Facebook / React has gone through with the community.

For Refererce:
https://medium.com/@dwalsh.sdlr/react-facebook-and-the-revokable-patent-...
https://techcrunch.com/2017/09/15/wordpress-to-ditch-react-library-over-...
https://hackernoon.com/4-lessons-from-the-react-patent-license-controver...

Facebook resolved the React patent issue by relicensing with the MIT license (which doesn't make clear how patents are handled):
https://github.com/facebook/react/blob/master/LICENSE

Leading some to question if Facebook will one day decide to nuke the ecosystem they are building now, if they change their mind on patents.
https://medium.com/@dwalsh.sdlr/reacts-new-mit-license-the-circus-enters...

Bringing this back to Web Components: If we wish to only include software the meets our standards for Open and Free software we should make sure that the software we include meet those standards.

Let's compare the verbage of the previous react Patent clause and Polymer's patent clause:

React

The license granted hereunder will terminate, automatically and without notice,if you (or any of your subsidiaries, corporate affiliates or agents) initiate directly or indirectly, or take a direct financial interest in, any Patent Assertion: (i) against Facebook or any of its subsidiaries or corporate affiliates, (ii) against any party if such Patent Assertion arises in whole or in part from any software, technology, product or service of Facebook or any of its subsidiaries or corporate affiliates, or (iii) against any party relating to the Software. Notwithstanding the foregoing, if Facebook or any of its subsidiaries or corporate affiliates files a lawsuit alleging patent infringement against you in the first instance, and you respond by filing a patent infringement counterclaim in that lawsuit against that party that is unrelated to the Software, the license granted hereunder will not terminate under section (i) of this paragraph due to such counterclaim.

Polymer

(If you create your own polymer components, please do not copy this
file into it, as these patent grants are specific to the code that
Google distributes)

Additional IP Rights Grant (Patents)

"This implementation" means the copyrightable works distributed by
Google as part of the Polymer project.

Google hereby grants to You a perpetual, worldwide, non-exclusive,
no-charge, royalty-free, irrevocable (except as stated in this section)
patent license to make, have made, use, offer to sell, sell, import,
transfer and otherwise run, modify and propagate the contents of this
implementation of Polymer, where such license applies only to those
patent claims, both currently owned or controlled by Google and acquired
in the future, licensable by Google that are necessarily infringed by
this implementation of Polymer.  This grant does not include claims
that would be infringed only as a consequence of further modification of
this implementation.  If you or your agent or exclusive licensee
institute or order or agree to the institution of patent litigation
against any entity (including a cross-claim or counterclaim in a
lawsuit) alleging that this implementation of Polymer or any code
incorporated within this implementation of Polymer constitutes
direct or contributory patent infringement, or inducement of patent
infringement, then any patent rights granted to you under this License
for this implementation of Polymer shall terminate as of the date
such litigation is filed.

Now, I'm not a lawyer, but to me React's patent clause sounds like "if you sue me, I'll terminate your license." The little bit at the end sounds like they've thought through the process of suing and countersuing.

Google's patent clause sounds like "Don't worry about patents, unless you sue me, then I'll terminate your license".

So it seems that, despite relicensing with MIT, and public assurances that Facebook won't decide to terminate your license whenever they want, they still have the legal ability to do that. But again I'm not a lawyer.

It also seems that Google has the ability to do the same.

If all of the above is true, then main tangible difference between React (which we're on board with) and Polymer (which we're questioning the license compatibility) is that React is now licensed under MIT and Polymer is licensed under a Modified BSD license. As @alesip points out, Polymer's license is almost word-for-word the same license as what WebM uses, and WebM's license is currently certified by the FSF as being compatible with the GPL.

It's not just Drupal, but also the web development community seems to be satisfied that React has met the standard needed to be included in Open Source projects like Wordpress and Drupal. What more does Polymer need to do in order to gain that acceptance?

cosmicdreams’s picture

Through the polymer slack (polymer.slack.com) I was able to reach out to Justin Fagnani (the developer who previously responded to @attiks's tweet), hopefully we can draw the attention of Chris DiBona, Director of Open Source at Google, so he can weigh in here.

aleksip’s picture

The problem with React's BSD + Patents (Facebook version) was that it had a strong patent retaliation clause: the patent grant would have been terminated if you had sued Facebook for any kind of patent infringement at all.

Polymer's BSD + Patents (Google version) has a weak patent retaliation clause: the patent grant is only terminated if you sue Google for Polymer infringing your patents.

Google's BSD + Patents is arguably better than MIT, which does not mention patents at all: Google can't sue you for infringing possible Polymer patents, but Facebook can sue you for infringing possible React patents.

effulgentsia’s picture

Status: Active » Closed (works as designed)

There is some good news from a follow up search of licenses for the other js file we would have to include: the webcomponents.js polyfill. It is licensed under a permissive BSD license listed here: https://github.com/webcomponents/webcomponentsjs/blob/master/LICENSE.md

And has no patent termination clause.

I don't think that's true. That license says "Everything in this repo is BSD style license unless otherwise specified.". But the JS files themselves, such as webcomponents-lite.js has the extra statement of "Code distributed by Google as part of the polymer project is also
subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt".

However, fortunately...

WebM's license is currently certified by the FSF as being compatible with the GPL

Yes, and in fact, this post from 2010 explains the FSF's reasoning as to why. So, indeed, we're ok here.

Closing this as "works as designed". I'll open a separate issue for #6.

effulgentsia’s picture

Google's BSD + Patents is arguably better than MIT, which does not mention patents at all: Google can't sue you for infringing possible Polymer patents, but Facebook can sue you for infringing possible React patents.

The MIT license does not have to mention patents, because its text plainly says "the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software". Even though a patent normally grants a patent holder (e.g., Facebook) the right to exclude people from doing these things, here we have Facebook explicitly granting a license to do these things. The license does not need to explicitly mention patents if it's clear about the activities that are allowed. And this implied patent license has already been validated in court in the case of GPL2. If there's more discussion that's needed about this, let's have it in #2915586: JavaScript VDOM library evaluation: patents.

effulgentsia’s picture

cosmicdreams’s picture

Hey @effulgentsia I just want to thank you for being a voice of reason here. Thanks for being awesome.