New (Old) Source Code Copyright Boilerplate Policy: Don’t Touch That Year

417 views
Skip to first unread message

Mark Mentovai

unread,
Aug 6, 2012, 8:13:41 PM8/6/12
to chromium-dev
Chromium developers-

We (again) need to revise the way we deal with the copyright notice line at the top of each of our source code files. In short, we’re going back to the original policy that did not require the year to be updated each time a file changed.

Once the new policy takes effect (shortly), when you make changes to an existing file, don’t change the year in the copyright notice at the top of the file. When you create a new file, put the current year in the copyright notice.

For those of you using the commit queue, this probably won’t result in a workflow change. If you’ve been leaving the years alone when modifying files, the commit queue took care of updating them for you, and it will soon stop doing this. Those of you that have become accustomed to modifying the copyright notice manually will regain the precious seconds you spent on this task.

We’re not going to be undoing all of the changes to copyright lines made in the past year and a half under the outgoing policy. What’s done is done.

In related news, the “(c)” will be being dropped from the notice line, and the original files whose years are listed as 2006-2008 will be changed to show only 2006. For the time being, both “(c)” and “2006-2008” will be permitted until the codebase is transitioned.

Some of you won’t like the new policy. Some of you didn’t like the old policy either. Most of you won’t care. Mark Larson and I been through this with the lawyers carefully before arriving at this conclusion. The new policy and notice line matches what is used for Google source code elsewhere. If you have questions, and you shouldn’t, you can ask them here, or get in touch with me privately.

If you’re exceptionally interested, you can follow along by tracking the changes to implement this new policy at http://crbug.com/140977 . The Chromium style guide at http://www.chromium.org/developers/coding-style will be updated to reflect the new policy as soon as the presubmit checks are revised to accept the new notice line. At that time, there will be an additional notice sent to chromium-dev informing developers that the new policy has taken effect.

This policy is intended and expected to cover all projects in the Chromium universe, including Chrome OS and V8 (which is already nearly compliant).

Mark

Jonathan Dixon

unread,
Aug 6, 2012, 8:28:39 PM8/6/12
to ma...@chromium.org, chromium-dev
On 6 August 2012 17:13, Mark Mentovai <ma...@chromium.org> wrote:
Chromium developers-

We (again) need to revise the way we deal with the copyright notice line at the top of each of our source code files. In short, we’re going back to the original policy that did not require the year to be updated each time a file changed.

Once the new policy takes effect (shortly), when you make changes to an existing file, don’t change the year in the copyright notice at the top of the file. When you create a new file, put the current year in the copyright notice.


One question that maybe of general interest: if a CL is adding a 'new' file that existed for some year(s) on a private branch --- aka "upstreaming" -- should the new file carry the current year, or the year of its first creation? (My guess would be, the former.)


Mark Mentovai

unread,
Aug 6, 2012, 9:11:17 PM8/6/12
to jo...@chromium.org, chromium-dev
Jonathan Dixon wrote:
We’ll use the current year in this case, as you expected.

Thiago Farina

unread,
Aug 6, 2012, 10:16:03 PM8/6/12
to ma...@chromium.org, jo...@chromium.org, chromium-dev
Why do we need the year at all? SCM provides that information.

In git it says something like this in the output of the commit message:
Date: Sun Jul 1 20:22:13 2012 +0000

So if we can see, and we can, when the file was created, we can know
the year when that file was created, which is repeated in this header
license doc comment.

--
Thiago

James Robinson

unread,
Aug 6, 2012, 10:22:23 PM8/6/12
to tfa...@chromium.org, ma...@chromium.org, jo...@chromium.org, chromium-dev
You tried to use logic!  It doesn't affect legal requirements.

Legal requirements use lawyers!  It's super effective!

You are defeated.

- James

--
Thiago

--
Chromium Developers mailing list: chromi...@chromium.org
View archives, change email options, or unsubscribe:
    http://groups.google.com/a/chromium.org/group/chromium-dev

Mark Larson (Google)

unread,
Aug 6, 2012, 11:30:24 PM8/6/12
to jam...@google.com, tfa...@chromium.org, ma...@chromium.org, jo...@chromium.org, chromium-dev
Hard to argue with that.

Another line, however: files might get included in other repositories. Don't believe me? Look at our own third_party dirs. In that case, the copyright owner and time can only be derived from the header. 

Mark Mentovai

unread,
Aug 7, 2012, 5:31:59 PM8/7/12
to chromium-dev
This new policy is now in effect. The presubmit script no longer checks that you’ve updated the copyright year in a file, so if you’re modifying a file, you should no longer update the year.

The commit queue hasn’t been restarted yet, so it will continue to update the years for a little while longer. Don’t worry about this.

There will be a separate change to remove the “(c)” from all files en masse. If you find yourself modifying a file with a “(c)” in the copyright notice, don’t bother removing it.

Happy hacking!

Mark Mentovai

unread,
Sep 17, 2012, 5:52:21 PM9/17/12
to Samuel Huang, chromium-dev
Thanks for bringing this up. I’ll fix it.


On Sat, Sep 15, 2012 at 12:35 AM, Samuel Huang <hua...@google.com> wrote:

Is the policy concerned with source code only?  Or does it apply to copyright notices in binaries?  I noticed recently that the Copy right notice in chrome.exe (viewable in Windows by right-click => Properties => Details) is:

Copyright (C) 2006-2010 The Chromium Authors. All Rights Reserved.

Should this be updated, deleted, or left alone?  Thanks.

--
Samuel Huang


--

Lei Zhang

unread,
Jan 15, 2013, 7:49:00 PM1/15/13
to Mark Mentovai, chromium-dev
So it's 2013. If one has a CL they carried over from 2012, they should
update the copyright to 2013 for new files in that CL, right?

It doesn't look like we have a presubmit check to make sure we don't
add new files in 2013 with "copyright 2012". Should we add one?

Torne (Richard Coles)

unread,
Jan 16, 2013, 2:40:31 PM1/16/13
to the...@chromium.org, Mark Mentovai, chromium-dev
Related: the gyp presubmit check still enforces that copyright dates are updated to 2013. Presumably this should be removed, and I should just ignore the error in my current CL? (I am not adding new files).
--
Torne (Richard Coles)
to...@google.com

Mark Mentovai

unread,
Jan 16, 2013, 2:56:42 PM1/16/13
to Torne (Richard Coles), Lei Zhang, chromium-dev
Lei Zhang <the...@chromium.org> wrote: 
So it's 2013. If one has a CL they carried over from 2012, they should
update the copyright to 2013 for new files in that CL, right?

Right.

Torne (Richard Coles) <to...@google.com> wrote:
Related: the gyp presubmit check still enforces that copyright dates are updated to 2013. Presumably this should be removed, and I should just ignore the error in my current CL? (I am not adding new files).

The presubmit check in the GYP project itself, as opposed to Chromium? Yes, that should be fixed. Only new files should say 2013. Leave old files alone.

Torne (Richard Coles)

unread,
Jan 16, 2013, 2:57:24 PM1/16/13
to Mark Mentovai, Lei Zhang, chromium-dev
Yes, PRESUBMIT.py in the gyp project itself still has this check.
Reply all
Reply to author
Forward
0 new messages