Why relicense from MIT to LGPL? #274
|
See
Does the LGPL license not require applications, websites, etc. to allow users to switch the library with anything else they choose? To comply with the LGPL license, many distributed projects will dynamically link to the library or allow users to compile projects from scratch. While that’s fine with server usage, web usage is severely impacted by this change, as sending a JavaScript file over the network may count as distribution and impose additional license requirements. Modern bundling setups for the web do not make this easy. If your goal is for users to open-source library modifications while being allowed to use the library as-is in any project, consider the MPL 2.0 license instead or the LGPL with the static linking exception. One solution would be to have multiple licenses under the |
Replies: 7 comments 2 replies
|
Hey @jlarmstrongiv, thanks for reaching out! I'm not an attorney, though I've read through the entire license a few times and will try my best to address your concerns.
Yes(*), dependents need to make sure that ZenFS can be swapped for different versions or forks. They don't need to make it compatible with them all though. For example if a project uses an experimental feature only present in a specific minor release, then there is no obligation to make it work with future minor releases.
Essentially, users need to be able to modify ZenFS without the dependent imposing legal or technical restrictions on doing so. The cool thing about JavaScript is that the "compiled" code is still JS and can be modified as such. Section four and five of the license cover this in more detail. Here is an example:
The AGPL was made specifically to address programs used over network, so I don't know entirely how the LGPL compares with regards to network-based code. Users can not modify code on the server, so they couldn't edit the JS sent anyway, including any libraries. Practically, if you have a web app that uses ZenFS, it is sufficient to include the attribution and repo/source link outlined in COPYING.md. 2.4.2 actually made this easier for projects using bundlers by including a comment that is preserved by bundlers. Any bundles of ZenFS v2.4.2+ will automatically include attribution and a link to the npm package in the code, though user-facing attribution is still required.
This is definitely part of it, though one of my biggest motivations is user freedom and control. I recommend giving What is Free Software? a read. In my opinion, if someone installs a program on their computer that uses ZenFS, they should have the freedom to modify ZenFS in order to serve them better. I personally wish free software was more prevalent, and would have gone with the (regular) GPL if not for the pervasiveness in the npm ecosystem of overly permissive licenses and competition from other packages licensed under permissive licenses. Fun fact: MIT-licensed projects require that the license and copyright notice are included in distributions, yet very few actually are. Here is my try at summarizing everything into an easy set of guidelines. Note that this only applies to ZenFS, not the rest of the dependent projects' code. Overall:
Additionally, if the user installs the project or runs it locally on their computer:
Please let me know if you have any other concerns, I'm happy to discuss it further. |
|
Hi @james-pre, thank you for your reply! I really appreciate your detailed feedback. I agree with your electron analysis, where the code could be omitted from bundling and swapped out. I also agree with your server analysis, which is not impacted by this change because the code is not distributed; however, an AGPL license would affect server code. The main impact of this change happens on websites, where:
My main concern is that I do not believe this interpretation is correct. Distributing a website with JavaScript files triggers the same rules that Electron apps do, despite the lack of build tools, infrastructure, or any other options to handle the license requirements.
Like you mentioned, popular bundlers like Vite and Esbuild inline all licenses above the minified JavaScript code. Some apps also include an acknowledgments section, popup window, or legal page where they credit the libraries they depend on. But I agree, many websites do not give the proper public-facing attributions. I do not think you need to revert back to the MIT license. However, the LGPL license is not feasible for web projects, especially those relying on Having written open-source libraries with licensing ranging from MIT to AGPL, a lot of thought and care goes into the licenses and their requirements. When adding dependencies, I also take care that I do not add dependencies that are incompatible with the license I chose or other dependencies’ license requirements. I completely understand your goal of using a copy-left license, but I worry about the web use case being left out. |
JavaScript is such a tricky thing to consider from a legal stand point. The user can't edit it since it lives on the server, but at the same time it still runs on the user's computer. I've gone ahead and cleared up that it is okay to use ZenFS in web apps with 5eefbee.
I really appreciate you going the extra mile when so many new programmers would just |
|
Thank you @james-pre! I really appreciate your thoughtfulness around licensing, your openness to feedback, and your adjustments to support the web use case.
It’s very tricky! Unfortunately, that’s why you don’t often see LGPL for web libraries. Other licenses like
Thank you! Does that apply to all backends, like
Thank you! It helps a lot. I really appreciate the addendum. It covers the use case for personal projects, though it does not necessarily cover the use case for libraries and frameworks. The challenge with those is that:
I really appreciate the addendum, as it covers my personal projects. I still highly encourage you to consider the
I worry for the programmers using AI without a legal basis. On projects where I care deeply about the licensing, no AI generated code is allowed. Unfortunately, a lot of licensing is just pedantic by nature. One of my favorite examples is Douglas Crockford’s extra line “The Software shall be used for Good, not Evil” in his custom license. Some companies would ask for exemptions, or just ban the use of those libraries. Even the OSI and Debian stated that it is not an open source license. Eventually, libraries like JSHint relicensed, but it hindered their growth and eventually required a rewrite. As for me, I just hope to be able to continue using ZenFS, without violating your license. Thanks again for this discussion and your consideration! |
Yes, I'll get around to updating them. Needless to say you can use them under the exception even though I haven't updated them yet.
ZenFS uses the LGPL v3+ SPDX, however I can add a I read through the LGPL linking exception and feel that it is too broad. Even under the standard LGPL, dependents are only required to provide ZenFS' source (I'm satisfied with a link to the npm page or GitHub repo for whatever release is used), and to allow ZenFS to be modified. The latter can easily be satisfied by simply not bundling ZenFS in with all the other code— which for a installable/local app would offer no significant technical benefit anyway.
This is a good question. The deciding factor is whether the JS is stored on the user's device. As I alluded to with my Electron example, the exception applys to apps "only accessed by users from other computers over a network". The exception is meant for cases where unmodified ZenFS code is not stored on the user's device(s), excluding browser cache.
ZenFS is still licensed under the LGPL (albeit with the exception), so a good starting point is to assume ZenFS is compatible with any LGPL compatible license. The exception is intentionally very narrow, since I can't see any other reasonable use case that wold require such an exception.
For the most part you shouldn't have to worry about using ZenFS. The worst case is that I reach out and request a minor change to some tooling or something. You're clearly conscious about respecting licenses, so I doubt you would have any issues with license compliance. If you are really that worried, my advice is to keep ZenFS separate from the (potentially minified) bundle for local/installed apps. For web apps the main constraint is to not prevent debugging or reverse engineering ZenFS, so avoiding minification would probably be enough. As always make sure to include the attribution and link to ZenFS source— for bundles that is automatically included, for user-facing apps you can just add a line/item to the attribution/licenses section of the app. |
|
Thank you @james-pre!
I am that worried, because minification is similar to obfusction, which is expressly prohibited in the license. I still think it’s difficult to fiddle around with bundler settings to exclude specifically ZenFS or disable entire optimizations like bundling, minifying, and polyfilling when granular control is unavailable. Loosing the performance gains—fewer requests, less bandwidth, easier caching, etc.—is a difficult trade off. Speaking of compiled JavaScript artifacts, another reason why the I appreciate you clarifying the combined electron and website example. Another use case I think will be impacted are CLI bundles generated from Node SEA or Deno Compile. It’s a case of distributing JavaScript, but the whole reason it’s bundled in an executable is to make it simple to install and run. Another use case is with ebooks / epubs / SCORM (which are zip files of xhtml, css, and js, and are similar to electron asar files) but some platforms encrypt their content, which would violate the license. I guess my main point is that JavaScript is just about everywhere and in any environment, and the LGPL isn’t easily compatible with many of them. All in all, I understand your decision not to use the However, I still believe the license is hard to use in another library or framework, and may omit other project use cases. Choosing this low-level library as a dependency to other open-source libraries adds requirements to projects that build on top of it, that are at best difficult to implement and may have other tradeoffs, or at worst are difficult to educate users about and lead to license violations. One other note is that when changing licenses from permissive licenses like MIT to copyleft licenses like LGPL, a major version bump would be helpful. I only found that change because I was reading the patch notes. A major version would help tell users that they are no longer be in compliance with your license. That would help bring attention to the new bundling and attribution requirements.
Thanks again! |
|
@james-pre I went ahead and created PRs for the other repos: |
Merged =).