Skip to content
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

Use compact SPDX license identifer in JS files #10771

Merged
merged 3 commits into from
Mar 27, 2020
Merged

Use compact SPDX license identifer in JS files #10771

merged 3 commits into from
Mar 27, 2020

Conversation

kripken
Copy link
Member

@kripken kripken commented Mar 25, 2020

Also see notes in #10770

Copy link
Collaborator

@sbc100 sbc100 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Probably better to preserve the copyright year.. I guess that would require writing some kind of script.

@kripken
Copy link
Member Author

kripken commented Mar 26, 2020

This ended up requiring some more work to get tests passing:

Closure compiler will preserve comments in the new format, and
we don't have a way to tell it about our new flag for controlling this.
So it was ending up adding the license unnecessarily and in
a duplicate way. To avoid that, manually remove the license from
the closure output if we don't want it.

@kripken kripken requested a review from sbc100 March 26, 2020 21:31
// found in the LICENSE file.
/**
* @license
* Copyright 2020 Emscripten authors
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What about preserving those dates?

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

How about capital A in authors to match the convention uses here and in chromium. Also the The?

Copy link
Member Author

@kripken kripken Mar 27, 2020

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Happy to change to Authors with capitals.

Adding The seems unnecessary to me? But no feelings either way, adding.

Changing the dates seems unnecessary to me, and I am actually modifying the files now, so the copyright would need to reflect that, I think? But IANAL and maybe you know more?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Asking some people, the answer is to preserve the year. Changed the PR for that now.

tools/shared.py Outdated
@@ -2997,6 +3009,14 @@ class JS(object):
*/
'''

closured_emscripten_license = '''\
/*

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why the extra newline here? And why not use the * at the start of each line ?

Copy link
Member Author

@kripken kripken Mar 27, 2020

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is the exact format of what closure emits. It changes the /** to /* and removes the @license but keeps an empty line for it. That last part does look a little odd, I agree, but closure doens't give us a flag to change that.

@kripken
Copy link
Member Author

kripken commented Mar 27, 2020

Updated to have The Emscripten Authors as requested.

@sbc100
Copy link
Collaborator

sbc100 commented Mar 27, 2020

I think its generally a good idea to have the original file creation year as the copyright year but I also I'm not a lawyer.

@kripken
Copy link
Member Author

kripken commented Mar 27, 2020

This required some generalization of the closure code workaround, pushed now.

@kripken kripken merged commit 7c3ced6 into master Mar 27, 2020
@kripken kripken deleted the license branch March 27, 2020 22:20
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants