apiclient icon indicating copy to clipboard operation
apiclient copied to clipboard

Add license headers to source files.

Open anniesullie opened this issue 9 years ago • 3 comments

Some chromium dependencies import this project and would require the presence of valid license headers in all source files.

anniesullie avatar Aug 04 '15 11:08 anniesullie

Can you expand please?

Which chromium dependency requires this? Why do they require valid license headers in all source files?

Every legal guidance I've seen says that license headers are unnecessary and I'd prefer to avoid license headers in my code.

shazow avatar Aug 04 '15 12:08 shazow

Thanks for asking. This would be helpful for the open source community, e.g. Debian, packaging Chromium to automatically scan the source tree for known open source licenses. See e.g. https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=520324#61 and https://code.google.com/p/chromium/issues/detail?id=28291 for some context.

Short summary is that with 150+ third party projects in Chromium and a 200+ MB compressed source tarball, downstream users of Chromium would prefer automated solutions to look for known licenses (and manually look into each unrecognized case). In a source code which contains third party code using various licenses (and sometimes the third party dependencies have their own "nested" third party deps with different licenses) it seems safest on most comprehensive to rely on license headers in each individual file.

For some indication that it's not just me, consider taking a look at http://lu.is/blog/2012/03/17/on-the-importance-of-per-file-license-information/ .

The response we got from other projects when asked for this was mostly positive (questions were not uncommon, that's fine), and I'd be happy to provide you specific examples if you're interested.

Note that I realize this might be viewed as burden or bureaucracy, and I'm open to finding a way to minimize this and make this as simple as possible. In the end it's up to you what to do here.

It's fine if you only provide a very short header. For example, this is what we use for Chromium:

// Copyright 2013 The Chromium Authors. All rights reserved. // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file.

Note that you don't even need to include the word "Copyright" or the year (the first line) as far as I'm concerned. Just something to the effect that this file (included in each file) is under MIT license would be very helpful. Feel free to re-use the above snippet. One possible example:

// Use of this source code is governed by a MIT-style license that can be // found in the LICENSE.txt file.

Also, if you prefer, I can submit a pull request which would be guaranteed to work for the open source packagers.

Please let me know if you have further comments, questions or concerns.

phajdan avatar Aug 04 '15 17:08 phajdan

It's still not clear to me: Which chromium dependency requires this? Why do they require valid license headers in all source files? (Not sure what the relevant parts are from the massive '2009 threads.)

If a project is vendoring code, then it's common practice to include a list of licenses within the codebase in the project's README or LICENSE file.

shazow avatar Aug 04 '15 18:08 shazow