Page MenuHomePhabricator

[EPIC] Re-license Codex under MIT
Open, LowPublic

Description

Currently Codex is licensed under the GPL v2.0 software license (inherited from its predecessor WVUI, which aligned to same license as MediaWiki itself).

However, in a recent discussion on Wikitech-l some users have expressed concerns that this license is too restrictive to be able to use Codex in their projects, and that the MIT license (which is used by OOUI, the library that Codex is more or less the successor to) would be a better fit for this project. The MIT license imposes minimal restrictions. Users can include an MIT-licensed library in their projects (whether proprietary or open-source) without needing to share their source code or adhere to specific redistribution requirements. Switching the license to MIT would require explicit consent from all contributors to Codex under the GPL v2.0 license.

Any change to the license of Codex itself should also apply to Codex PHP.

Acceptance Criteria
  • Identify all contributors to Codex under the GPL v2.0 license.
  • Get explicit written consent from all contributors to re-license Codex under MIT
  • Open a patch that updates the license in the Codex repo

Event Timeline

What has happened here from my memory, is that the direct predecessor of CodexWVUI – has oriented itself on MediaWiki and its GPL v2 (not v3!). Codex then just followed in continuation without further discussion, as it took over a number of code fragments from WVUI.

See addition of GPL v2 in October 2020 https://gerrit.wikimedia.org/r/plugins/gitiles/wvui/+/d38936c639a64759dee80feb1fe43c13d8d30ff1

We only had a quick discussion internally in October 2021 (in reference to WiKit licensed under BSD-3-Clause):

Roan Kattouw Oct 1st, 2021 at 11:57 AM
WVUI is licensed as GPL v2 or later (same license as MediaWiki), and thankfully the 3-clause BSD license is compatible with GPL v2. So it's OK to take code from a project licensed under 3-clause BSD and copy it into a project licensed under GPL v2, which is what we would be doing here (assuming the new component library is GPL v2 or later, which is what I would suggest)

11:57
Sources: https://www.gnu.org/licenses/license-list.html#ModifiedBSD and https://www.gnu.org/licenses/gpl-faq.html#WhatDoesCompatMean

Volker E. Oct 1st, 2021 at 11:59 AM
For completion, OOUI has been licensed under MIT, something I was surprised about as well without ever digging deep (actually having the time to). I'd be for GPL as well, why v2 and not v3? (edited)

Roan Kattouw Oct 1st, 2021 at 12:03 PM
MW core and most extensions and other related software I know of is v2 or later, so that's why I suggested that. I'd be OK with v3 or later too, but I don't know what effect that would have on our ability to move code back and forth between the library and other GPL v2 or later repos. That's a question I defer to Legal on

Also note, that for historic reasons (inheriting from OOUI) our icons (package) is MIT licensed, the icons itself CC BY 4.0.

All others, root and packages codex, codex-design-tokens and codex-docs, currently state GPL-2.0+.

some users have expressed concerns

Two community members have expressed concerns about wanting a permissive license so they can use Codex in their own projects or in permissively licensed extensions as of 2025-01-06. A one of these community members has also expressed IANAL concerns about mixing CC BY-SA and GPL-2.0-or-later licenses in on-wiki maintained code (userscripts and gadgets).

As a counter point, in T360718: Relicense Wikibugs from MIT to GPL-3.0-or-later after approval by all substantive contributors I was able to relicense Wikibugs from MIT to GPL-3.0-or-later. My personal interest there was reducing the ability of projects that have adopted licenses not approved by the OSI such as the Server Side Public License (SSPL) to benefit from the work of the Wikimedia movement without reciprocal contributions. Fairly obviously the pile of code we use to produce IRC notifications from Gerrit events is not of wide interest in the open-core world, but by using licenses like the GPL and CC BY-SA which require modifications and enhancements to be shared in the same spirit as the original work I feel that we as a movement can help increase the total amount of code available for common use.

As one of the principal deciders behind why so much of our library-like FE code is MIT, including VE/OOjs/OOUI/etc., I was a bit surprised when WVUI decided to depart from what I thought was the otherwise-agreed standard.

So WVUI was originally licensed as GPL-2.0, and Codex inherited that along with some of the initial code (TypeaheadSearch comes to mind, but I think some of the Button code was also carried over for example). Since then this project has been de-commissioned (the repo is empty, it's no longer mirrored on Github, etc).

The Wikimedia Foundation is the author of both Codex and WVUI, so I think that we could re-license Codex as MIT if we desired to do so. This should be confirmed by someone in the Legal department though.

I think that there are places where GPL licenses are more appropriate, but in the case of a stand-alone library like Codex (where we actively want adoption and contribution), I believe we are better served by MIT. Especially if this is already used in other similar projects that we maintain.

Another option, as stated in the wikitech-l thread, were to dual-license Codex – as in adding MIT license.
IANAL, but from my understanding we would have to get written author permissions to re-license for using all parts of contributors until this moment. It could be a bit less disruptive to add MIT license and avoid legal or community complexities associated with re-licensing. New users or projects can opt for the permissive MIT license.

Volker_E updated the task description. (Show Details)

Given that its meant to be a replacement for OOUI, i think it makes the most sense to just keep the same license as OOUI if it is viable. That way people who want to switch from OOUI don't have to think if their usage complies with the new license.

IANAL, but from my understanding we would have to get written author permissions to re-license for using all parts of contributors until this moment. It could be a bit less disruptive to add MIT license and avoid legal or community complexities associated with re-licensing. New users or projects can opt for the permissive MIT license.

I don't think that makes sense. MIT is compatible with GPL. There is no effective difference between licensing it only MIT versus MIT+GPL. You would need all previous contributors permission either way. Perhaps you are thinking of the other direction. You don't need permission to go MIT -> GPL. You do need to permission to go in the GPL -> MIT direction.

Unless you're suggesting that part of the code be licensed GPL and part of it being MIT, which is just really confusing.

Another option, as stated in the wikitech-l thread, were to dual-license Codex – as in adding MIT license.
IANAL, but from my understanding we would have to get written author permissions to re-license for using all parts of contributors until this moment. It could be a bit less disruptive to add MIT license and avoid legal or community complexities associated with re-licensing. New users or projects can opt for the permissive MIT license.

A more permissive license cannot just be arbitrarily added. If that were possible then anyone who wanted a more permissively licensed library could just fork the upstream and add the license of their choosing. In order to relicense from GPL all current license holders must agree to the change. Because the Wikimedia projects do not use a Contributor License Agreement (CLA) that assigns all rights to the project this means that all contributors must be contacted for approval. If the project incorporates code from an upstream project by copying the rights holders to the upstream content must also be contacted.

Another option, as stated in the wikitech-l thread, were to dual-license Codex – as in adding MIT license.
IANAL, but from my understanding we would have to get written author permissions to re-license for using all parts of contributors until this moment. It could be a bit less disruptive to add MIT license and avoid legal or community complexities associated with re-licensing. New users or projects can opt for the permissive MIT license.

A more permissive license cannot just be arbitrarily added. If that were possible then anyone who wanted a more permissively licensed library could just fork the upstream and add the license of their choosing. In order to relicense from GPL all current license holders must agree to the change. Because the Wikimedia projects do not use a Contributor License Agreement (CLA) that assigns all rights to the project this means that all contributors must be contacted for approval. If the project incorporates code from an upstream project by copying the rights holders to the upstream content must also be contacted.

That sounds correct to me. I assume we'd need to contact all the code contributors listed in https://github.com/wikimedia/design-codex/blob/main/AUTHORS.txt and ask them to agree to a change in license.

Another option, as stated in the wikitech-l thread, were to dual-license Codex – as in adding MIT license.
IANAL, but from my understanding we would have to get written author permissions to re-license for using all parts of contributors until this moment. It could be a bit less disruptive to add MIT license and avoid legal or community complexities associated with re-licensing. New users or projects can opt for the permissive MIT license.

A more permissive license cannot just be arbitrarily added. If that were possible then anyone who wanted a more permissively licensed library could just fork the upstream and add the license of their choosing. In order to relicense from GPL all current license holders must agree to the change. Because the Wikimedia projects do not use a Contributor License Agreement (CLA) that assigns all rights to the project this means that all contributors must be contacted for approval. If the project incorporates code from an upstream project by copying the rights holders to the upstream content must also be contacted.

That sounds correct to me. I assume we'd need to contact all the code contributors listed in https://github.com/wikimedia/design-codex/blob/main/AUTHORS.txt and ask them to agree to a change in license.

You probably only need to contact external contributors? WMF owns the employees' work product while they're on the clock, so just the foundation's consent should be sufficient for all internal contributors. That should narrow down the list by a lot.

A more permissive license cannot just be arbitrarily added. If that were possible then anyone who wanted a more permissively licensed library could just fork the upstream and add the license of their choosing. In order to relicense from GPL all current license holders must agree to the change. Because the Wikimedia projects do not use a Contributor License Agreement (CLA) that assigns all rights to the project this means that all contributors must be contacted for approval. If the project incorporates code from an upstream project by copying the rights holders to the upstream content must also be contacted.

Thanks for the explicatory information. Yeah, sorry, I've realized this after writing and with diving even deeper into the topic. I was thinking back to a change from MIT=>GPL v2 in my far past.
And I also see @Bawolff's point, and having read more: it becomes clearer to me that dual licensing is probably more confusing to the consumers than deciding for one of the two with clarified public decision process around.

CCiufo-WMF renamed this task from Re-license Codex under MIT or some other more permissive open-source license to [EPIC] Re-license Codex under MIT or some other more permissive open-source license.Jan 13 2025, 6:31 PM
CCiufo-WMF subscribed.

There's general agreement to move forward with switching to MIT, but making that change will require explicit consent from all Codex contributors.

Next steps for this would be to contact all Codex contributors (probably starting with non-current WMF staff, who may be harder to reach) and gathering their written consent.

CCiufo-WMF moved this task from Now to Next on the Design-System-Team (Roadmap) board.

While I philosophically lean towards GPL (hence my longing in the task's question for at least a compromising middle ground of dual-licensing), I've been changing my position in the course of my research and within this discussion here to relicense towards MIT for Codex.
The permissive and less restrictive nature of the MIT license seems to make it more appealing to a broader audience, including enterprises and developers seeking legal simplicity and compatibility.
All in all for a design system library like ours, which integrates into other projects, this approach is more favorable. Re-licensing to MIT would streamline legal requirements for users, offering a single, simpler license and potentially maximizing adoption and expanding our user base.

CCiufo-WMF raised the priority of this task from Low to Needs Triage.Feb 13 2025, 9:17 PM
CCiufo-WMF moved this task from Next to Later on the Design-System-Team (Roadmap) board.

(probably starting with non-current WMF staff, who may be harder to reach)

Perhaps you have done this already, but you might want to check with legal if this is really neccessary for former WMF employees who contributed as part of their job. I would expect WMF contracts have language allowing you to relicense under a different open source license (thst said IANAL nor have i read these contracts)

(probably starting with non-current WMF staff, who may be harder to reach)

Perhaps you have done this already, but you might want to check with legal if this is really neccessary for former WMF employees who contributed as part of their job. I would expect WMF contracts have language allowing you to relicense under a different open source license (thst said IANAL nor have i read these contracts)

Yes, we did consult with the legal team and they indicated that we would need to get explicit consent from former WMF staff. It's a good point about the contracts though, we'll double check before starting the outreach.

I think I have a little patch in Codex, you have my explicit written consent to switch the license to MIT or really any other license you want.

CCiufo-WMF renamed this task from [EPIC] Re-license Codex under MIT or some other more permissive open-source license to [EPIC] Re-license Codex under MIT.Apr 3 2025, 10:00 PM
CCiufo-WMF updated the task description. (Show Details)

Sharing a perspective here that I've already discussed with Design-System-Team members:

I think we should reconsider the proposal to dual-license under GPL v2 and MIT instead of re-licensing. From what I understand, dual-licensing would be considered a MINOR version bump under semver, where re-licensing entirely would be a MAJOR version bump. This is because including a more permissive license is purely additive. Although MIT will be compatible with prior uses under GPL v2, dual-licensing might be preferred as a way to ensure "true" license backwards compatibility, meaning no one is implicitly re-licensing from MIT to GPL.

I realize the copyright implications with dual-licensing in this scenario aren't really any different, and this doesn't change the need to get explicit permission from current Codex copyright holders (everyone's who has contributed code or assets), but I'd like to avoid creating a situation where we need to do a major version bump just for this.

CCiufo-WMF moved this task from Later to Next on the Design-System-Team (Roadmap) board.

Also note, that for historic reasons (inheriting from OOUI) our icons (package) is MIT licensed, the icons itself CC BY 4.0.

wait wut ? how does that make any sense ? the icons are never used in a way where you can link to their author and license ??????

Also note, that for historic reasons (inheriting from OOUI) our icons (package) is MIT licensed, the icons itself CC BY 4.0.

wait wut ? how does that make any sense ? the icons are never used in a way where you can link to their author and license ??????

Yeah, I was wondering the same thing! OOUI icons are used on VE editor for example and there's no explicit link to their author and license?