-
Notifications
You must be signed in to change notification settings - Fork 27.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[NEXT-906] Licensing: 12.2.0 bundles MPL-licensed edge-runtime
#38467
Comments
Wow hats off for catching this! |
The two licenses are compatible and can be used together in the same larger program. If you need further assistance with redistributing Next.js code, I’m happy to hear more about your use case and how we can support you ( |
edge-runtime
Hi Lee, Thanks for looking into this issue! With respect, I'd prefer to keep this discussion in the public issue tracker; it affects all Next.js users, not just me or my team. The issue is not related to the compatibility of the MIT and MPLv2 licenses with one another; I agree that they can be used together in the same larger program. The issue is that the possibility of MPLv2-licensed code appearing in the output we distribute imposes new legal requirements on us as users, regardless of whether most of the project is MIT licensed, and the new licensing requirements:
Specifically, if I were publishing a personal site based on Next.js, my personal interpretation of the MPL's section 3.2 is that I would now need to add a notice to my website with a link to where users can find the edge-runtime source code. For my team at work, company lawyers are responsible for license interpretation, not me as an engineer, so it requires that we explain our usage of Next.js to a company lawyer every time we consume a new update of Next.js, plus spend engineering time implementing their recommendations. The components in question look like they probably aren't relevant to our usage, but we can't realistically rely on Next.js to never happen to use them - maybe some default middleware starts getting used as an implementation detail tomorrow, who knows? Ideally, we'd prefer if Next.js features that require other licenses to use could be contained to an optional secondary package that a user could choose explicitly whether to install or not. |
@dbjorge Thanks for following up. To speak to your example of your personal website, and deploying it:
That said, I am not a lawyer, and this is not legal advice 😄 If you do have questions, we encourage you to consult with your own legal counsel. This MPL 2.0 FAQ guide was quite helpful for me. |
Unfortunately, as a user of Next.js, I have no guarantee that the code in question will only appear in the back-end - as soon as Next.js happens to bundle any part of any of the components in question into any client js bundle, now I'm distributing an executable form of it. Even if you were to tell me today that Next.js doesn't include those components in client js in any circumstance today, it would be unsafe for me to assume that would remain true in future patches. This issue is a good demonstration that we wouldn't be able to trust that future release notes would capture any such change. |
Hi @jankaifer, Could you please offer any further details about the resolution of the issue? It doesn't appear to have been resolved, and my team remains locked on v12.1.6 today. It appears that:
Was this closed in error? |
Hi, sorry I was cleaning up old issues and shouldn't have closed this one. |
Hey @dbjorge, our stance remains the same as my comment above. I would recommend talking to your legal counsel. I can't provide generalized legal advice, as I am not a lawyer. |
Hi @leerob , thanks for responding! Yes, the concerns I'm raising are based on the guidance from my team's legal counsel already. I've reviewed your comment above again. To be clear, the issue is not with "the use of the executable on the back-end" - we are in agreement that if the components in question were only used on the back-end, it would probably not constitute a "distribution" for our purposes. (to be clear for anyone else reading this: like Lee, I am also not a lawyer, and my comments are also not generalized legal advice) The issue is that when I use Next.js to produce a website, some parts of Next.js end up embedded in front-end JS that does get distributed to end users, not just back-end code. In general, the legal guidance that applies to my team demands that I be able to certify that no part of any MPL component can appear as part of that front-end JS. But Next.js doesn't document or enforce any guarantees that there will never be any part of a client-side JS bundle that happens to use some utility function from Doing that once is already a lot of overhead and very easy for me to make a mistake with. But it's worse than that; I'd have to do that every time we take a Next.js update, not just once, because Next.js doesn't appear to have any sort of mechanism enforcing that those libraries (including every one of their utility functions/etc) cannot appear in client bundles going forward. These components being used in unexpected places isn't a theoretical issue; for example, just two weeks ago a usage of a utility class from For next steps that we think would resolve this issue:
|
To note: and add a point on: Because it is not reported I only found out about this because of this issue, we also have automated License checking compliance tool which thinks that Next is acceptable, but in reality, it isn't (for any License that is not MIT or similar, we need to record our usage internally). I think what is being asked for here is actually quite simple, and I would agree with it:
This goes much further than just to two packages as well, and has caused me issue before, as shown in my hacky script, Next compiles around 124 packages, which if my script works have the licenses: MIT, MPLv2, BSD-3-Clause, Apache-2.0, Unknown (yes there's a compiled package without a license!), ISC, CC0-1.0, BSD-2-Clause |
👋 I don't have a solid answer but wanted to note here that we're discussing options here internally and I will report back. Thanks for the persistence on this one. |
edge-runtime
edge-runtime
Any update on this? Since my last check, there are 2 more @edge-runtime packages with the MPL licenses attached: https://github.com/vercel/next.js/tree/canary/packages/next/src/compiled/@edge-runtime Again, the issue here is that there's no documentation when a package with one of these copyleft licenses is added, in particular, for copyleft, it should really be the case that these are called out, at least in change logs, rather than us having to manually check every time we update Next.JS, which appears to be the expected flow? For context, whenever a copyleft package is used, we have to log the use of that and why we believe it is permissive, without Next calling this out, we have to check all code changes to see if a new package with an offending license has been added since the last update. |
The MPL license is incompatible with the Apache license so this is problematic (see https://www.apache.org/legal/resolved.html#weak-copyleft-licenses). We're working on Apache-licensed software that includes a web UI that uses next.js. This change would probably mean we have to use something else. |
Hey y'all. Appreciate the feedback here. We've changed the |
This closed issue has been automatically locked because it had no new activity for 2 weeks. If you are running into a similar issue, please create a new issue with the steps to reproduce. Thank you. |
Verify canary release
Provide environment information
❯ npx --no-install next info
What browser are you using? (if relevant)
n/a
How are you deploying your application? (if relevant)
n/a
Describe the Bug
#37024 introduced new bundled dependencies on
edge-runtime
and@edge-runtime/primitives
, which are both licensed underMPLv2
. This is a breaking change; it introduces new required work and legal review for anyone redistributing Next-generated code which includes elements of these dependencies.Expected Behavior
Next.js shouldn't bundle dependencies with more copyleft encumbrances than Next.js itself claims to have - it's misleading.
If it must bundle these dependencies and the dependencies can't be licensed more permissively, it should:
Link to reproduction
n/a
To Reproduce
NEXT-906
The text was updated successfully, but these errors were encountered: