Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
Problem/Motivation
- #2914759: Proposal to use Lit / web components for building Drupal’s administrative UIs proposes to add the Polymer library to Drupal core.
- The polymer license includes the following language:
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 - That patents grant includes a termination provision.
- According to the Free Software Foundation, the Apache2 license is incompatible with GPL2 due to its patent termination and indemnification provisions. As far as I can tell, the same logic would therefore make the Google BSD+Patents licensing incompatible with GPL2.
- Drupal core is released as GPL2.
- Therefore, I think that Drupal core may not include Polymer.
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
Comment #2
effulgentsia CreditAttribution: effulgentsia at Acquia commentedComment #3
effulgentsia CreditAttribution: effulgentsia at Acquia commentedRemoving VDOM from the issue title, since Polymer is not a VDOM library.
Comment #4
aleksipDrupal 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.
Comment #5
attiks CreditAttribution: attiks at Attiks commentedFYI I tweeted polymer, https://twitter.com/attiks/status/920710779674021888
Comment #6
droplet CreditAttribution: droplet commentedSimply 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)
Comment #7
aleksipDrupal'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.
Comment #8
droplet CreditAttribution: droplet commentedDrupal CORE, or a mixture of drupal.org and modules. It seems unclear?
http://cgit.drupalcode.org/drupal/tree/core/LICENSE.txt
Comment #9
aleksipIANAL 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:
Comment #10
cosmicdreams CreditAttribution: cosmicdreams commentedThis 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.
Comment #11
droplet CreditAttribution: droplet commentedgoogling and find a simple chart in d.org:
https://www.drupal.org/docs/develop/packaging-a-distribution/drupalorg-d...
Comment #12
droplet CreditAttribution: droplet commentedhttps://github.com/Polymer/polymer/blob/master/LICENSE.txt
the copy is 3-clause BSD
https://en.wikipedia.org/wiki/BSD_licenses#3-clause
Comment #13
cosmicdreams CreditAttribution: cosmicdreams commentedThere 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.
Comment #14
cosmicdreams CreditAttribution: cosmicdreams commented@droploet the concern is not the license itself but the file that @effulgentsia listed that adds on extra wording about patents.
Comment #15
aleksipIt 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.
Comment #16
cosmicdreams CreditAttribution: cosmicdreams commentedWhile 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
Polymer
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?
Comment #17
cosmicdreams CreditAttribution: cosmicdreams commentedThrough 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.
Comment #18
aleksipThe 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.
Comment #19
effulgentsia CreditAttribution: effulgentsia at Acquia commentedI 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...
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.
Comment #20
effulgentsia CreditAttribution: effulgentsia at Acquia commentedThe 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.
Comment #21
effulgentsia CreditAttribution: effulgentsia at Acquia commentedHere we go: #2917529: JavaScript library evaluation: ecosystem license compatibility with GPL2
Comment #22
cosmicdreams CreditAttribution: cosmicdreams commentedHey @effulgentsia I just want to thank you for being a voice of reason here. Thanks for being awesome.