Skip to content

This issue was moved to a discussion.

You can continue the conversation there. Go to discussion →

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

Discussion: Licensing in JS output #29

Closed
niloc132 opened this issue Feb 20, 2020 · 0 comments
Closed

Discussion: Licensing in JS output #29

niloc132 opened this issue Feb 20, 2020 · 0 comments

Comments

@niloc132
Copy link
Member

Closure-compiler is our upstream for generating the final JS output, so all else being equal, we avoid extra patches on them which then need to be maintained. They have the behavior that if an included .js file has some @license in the jsdocs, it will be included in the final output.

As of Dec 2019, closure-library now includes such a license, so all output of this plugin now bears a license header indicating that it is apache licensed, and copyright "The Closure Authors". See google/closure-compiler#3551 for more discussion.

Javadoc doesn't have a formal convention for listing a license like closure's flavor of jsdoc (and possibly other jsdocs, i'm not an expert), so tweaking j2cl to correctly generate headers consistently seems difficult. So far, google/j2cl is punting on it (both as a transpiler and for the bazel rules), but I think we need the maven plugin to solve this correctly. See (on-going?) discussion at google/j2cl#80.

Being a maven plugin, we also have extra information about a project than just what is in the .java file (similar to bazel) - the maven element could be used to try to generate a simple header automatically. The issue lies (as discussed in google/j2cl#80) in how to correctly attach these to the final output. My best off-the-cuff suggestion is that regardless the outcome of #26, we continue to ask for an entrypoint to be included in the plugin config, and either a .native.js file is created for it, or the licenses that appear to apply to this project are appended: all runtime dependencies of the project being compiled would have their licenses added.

Basic options:

  • Fork j2cl and add a new flag or something, allowing a license header to be included on all .java.js output files automatically, and feed that from the pom's tags.
  • Fork closure-compiler and remove this licensing mechanism entirely (or at least make it optional), and leave it to projects which use this plugin to correctly handle licensing (as GWT2 does today).
  • Regardless of the outcome of Discussion: entrypoints and dependency mode #26, continue to require an entrypoint and append all licenses from all runtime dependencies.
  • Wait for closure-compiler or j2cl to change their perspectives and hope that this gets made a moot point somehow (this is not a serious option, until it is).
@niloc132 niloc132 closed this as completed Mar 9, 2021
@Vertispan Vertispan locked and limited conversation to collaborators Mar 9, 2021

This issue was moved to a discussion.

You can continue the conversation there. Go to discussion →

Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant