PSA: Please use short-license block for new files

146 views
Skip to first unread message

Eric Seidel

unread,
Jan 29, 2014, 2:08:57 PM1/29/14
to blink-dev
Chromium has a very cool licensing solution which avoids the 100 line
boilerplate at the top of each file, instead we use:

// Copyright (c) 2014 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.

I've asked around internally and confirmed that Blink is now set-up
correctly to do so too! [1]

Please consider using this shorter license block for *new* files.
It's not worth the hassle to try and change existing files.

If you use this license, you must be sure to make sure you're listed
in the Chromium Authors file [2] and have followed the external
contributor checklist [3].

Thanks!

1. http://crbug.com/336943
2. http://src.chromium.org/svn/trunk/src/AUTHORS
3. http://dev.chromium.org/developers/contributing-code/external-contributor-checklist

Avi Drissman

unread,
Jan 29, 2014, 2:18:58 PM1/29/14
to Eric Seidel, blink-dev
I'm sorry, but you have the copyright block wrong.

The correct short copyright block is:

// Copyright 2014 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 there is no "(c)" in the first line. It is obsolete.

Avi

Eric Seidel

unread,
Jan 29, 2014, 2:21:53 PM1/29/14
to Avi Drissman, blink-dev
Thank you for the correction.

I wish an automated tool enforced this... This is such a useful place
for humans to be spending their valuable time. :)

Avi Drissman

unread,
Jan 29, 2014, 2:28:25 PM1/29/14
to Eric Seidel, Mark Mentovai, blink-dev
I agree :)

Mark...

Andrew Scherkus

unread,
Jan 29, 2014, 4:32:05 PM1/29/14
to Avi Drissman, Eric Seidel, Mark Mentovai, blink-dev
I believe it's already part of the default presubmit checks:

Perhaps it's a matter of fixing up the search path:


And in case anyone is wondering how we got here, here's the relevant discussion on chromium-dev@:

Andrew

Mathias Bynens

unread,
Jan 29, 2014, 4:47:45 PM1/29/14
to Andrew Scherkus, Avi Drissman, Eric Seidel, Mark Mentovai, blink-dev
What happens when existing files are edited? Is it okay, or even
required, to change the license block to the shorter version?

Does this apply to v8 as well? (The old thread
https://groups.google.com/a/chromium.org/forum/#!msg/chromium-dev/8p4JKV76kig/OiFYFjuZ6nAJ
seemed to indicate it did.)

Eric Seidel

unread,
Jan 29, 2014, 5:04:19 PM1/29/14
to Mathias Bynens, Andrew Scherkus, Avi Drissman, Mark Mentovai, blink-dev
My understanding is that existing files, with existing copyright
headers should just be left alone.

I'm only pointing out that it's now possible (and recommended) to use
the shorter copyright header going forward.

Dirk Pranke

unread,
Jan 29, 2014, 7:32:47 PM1/29/14
to Andrew Scherkus, Avi Drissman, Eric Seidel, Mark Mentovai, blink-dev
On Wed, Jan 29, 2014 at 1:32 PM, Andrew Scherkus <sche...@chromium.org> wrote:

Indeed, I would expect the presubmit checks to do the right thing. If they aren't (and I haven't checked), file a bug and I'll attempt to fix them.

-- Dirk 

Reply all
Reply to author
Forward
0 new messages