-
Notifications
You must be signed in to change notification settings - Fork 1.1k
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
[CLI] Remove copyright from generated template instances #944
Comments
I added IBM copyright headers intentionally, see the discussion here: #867 (comment) What's important: The template source code files in our repository should have an IBM copyright header in them, IMO they are the same kind of a source code as the other "regular" So the question is whether the output of our CLI tool should include IBM copyright headers or not. IMO, running our CLI tool to copy template files (while making small changes via EJS) is the same act as if the user copied our source code files manually. I believe copyright headers should be preserved in the latter case and users should add their copyright header above the header from the original file. Something along the following lines: // Copyright FooBar Inc 2018. All Rights Reserved
// The content of this file is based on @loopback/cli template
// which has the following notice:
//
// Copyright IBM Corp. 2017,2018. All Rights Reserved.
// Node module: @loopback/cli
// This file is licensed under the MIT License.
// License text available at https://opensource.org/licenses/MIT IMO, this is needed to meet the following part of the MIT license:
Anyways, I am not a lawyer so it's entirely possible I may be interpreting the terms of MIT in a wrong way. @virkt25 could you please reach out to our legal department (perhaps @rmg or @dhmlau can help you?) and find out a definite answer for which approach we should take? In the light of my comment above, I am removing "good first issue" label. Last but not least, if we end up with removing (or commenting out) the copyright headers in our template files, then we need to find a way how to allow automated update of these headers via Possibly helpful comment: #867 (comment)
|
I'll follow up with @rmg and @dhmlau. I just find it weird that a project generated using CLI would have the CLI / IBM Copyright headers. If it turns out the header must be a part of the template then I think we need to pre-process the files before outputting them into a project for the user. I've personally never seen a project generate an app / template with it's own copyright headers ...
Also unsure why every file would need the header given the fact that the entire project is licensed under MIT License. (It's nice to have but I'll try to find out if it's legally necessary). |
Obviously, I am not a lawyer. My concern is that if we add copyright statements to the templated code, are we not asserting some level of ownership over that code in a way that may create a legal grey area for our users, even if we strip the copyright notices from the final products of those templates? @dhmlau We definitely need some legal advice from one of our IP lawyers about this. I don't want to create legal landmines for users that leverage our templates. |
Disclaimer: I'm not a lawyer either. I guess we have 2 questions here, and I can double check with our legal contact.
|
Including the copyright in this repo makes sense, but it should be stripped or replaced with the user's copyright when code is generated but preserved if a file is copied over and not intended to be modified (eg. like bundling a copy of jQuery or Angular in some app scaffolding). As far as prior art for not including copyrights on generated code, I can add to the list all the frameworks I tested in my app scaffold shootout:
I think we'd be causing more trouble by including our copyright header in the generated code - I think it raises more legal questions than stripping them does, because there isn't any license agreement related to generated code and nobody expects their code to be owned by their IDE or text editor. |
I think the easiest solution for this is to use EJS comments instead of JS comments for the license header? But then how to keep At the end, it may be simpler for us to remove our template files to IDK. Thoughts? |
Team, FYI - I just sent the questions to legal for clarification. |
I like the idea of switching to |
Team, got inputs from legal and Savio:
|
If a template is to contain the copyright then we have to switch to Can this be prioritized? I think this is within MVP scope since people are expected to use the CLI now. @dhmlau ? |
use `.template` extension for templates. Rename during project generation. Removes copyright headers from templates. Fixes #944
* fix(cli): remove copyright header from generated app use `.template` extension for templates. Rename during project generation. Removes copyright headers from templates. Fixes #944 * fixup! apply feedback - use RegExp for matching instead of extname
Overview
lb4 app
makes an app and the templates have IBM copyright headers on them. I believe we had agreed that templates will not have any copyright headers and think this was added by mistake when we update the headers for 2018.Acceptance Criteria
.ts
to.ts.template
.js
to.js.template
(if applicable)The text was updated successfully, but these errors were encountered: