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

[Copyright] Update all copyright headers #190

Open
ivmarkov opened this issue Jun 22, 2024 · 8 comments
Open

[Copyright] Update all copyright headers #190

ivmarkov opened this issue Jun 22, 2024 · 8 comments

Comments

@ivmarkov
Copy link
Contributor

We need to update all copyright headers as they currently say "Copyright 2020 - 2022..." and 2022 is in the past.

Is the CSA alliance having any prescriptions here? If not:

@andreilitvin mentioned the C++ SDK has a policy to put newer copyright only in the files they newly add (or change?) BUT I do not understand this policy at all.

Copyright headers of all files - old or new always need to be up to date. Always. Not a lawyer, but pretty sure about that. Otherwise it would look as if the copyright of the old files had expired, which is just not the case.

Two options I can think of:

  • Periodically update (with regexp) the copyright headers by bumping up the ending year. I.e. it would become "Copyright 2020 - 2024" if we do it now.
  • (I prefer this) Change all headers to read "Copyright since 2020 - ", i.e. remove the ending year.

What to do with the beginning year? Also two options:

  • Option 1: I suggest - we just use the year when the new file "lands" in the repo. And don't touch it afterwards. I don't feel like going through all of them and changing the beginning year though, as that is a lot of pointless work
  • Option 2: Remove the beginning year as well. Why do we need it? It is anyway a copyright since the very existence of the file and until eternity (or until we decide otherwise). So the final message should just be "Copyright (c) Project Chip Authors"
@ivmarkov
Copy link
Contributor Author

@kedars ^^^

@kedars
Copy link
Collaborator

kedars commented Jun 23, 2024

@andreilitvin are there any project-chip-wide policies that are being followed by other repos?

@jwhui
Copy link

jwhui commented Jun 23, 2024

Copyright generally applies at the time of creation. The year clarifies when that creation occurred. Updating the copyright year generally occurs when new creative input was made.

@kedars
Copy link
Collaborator

kedars commented Jun 23, 2024

Copyright generally applies at the time of creation. The year clarifies when that creation occurred. Updating the copyright year generally occurs when new creative input was made.

That aligns with my understanding too.

So @ivmarkov the option to choose would be to update the year after the - whenever the particular file is updated.

@ivmarkov
Copy link
Contributor Author

@kedars OK just to confirm on 100%:

  • Year before - is only updated once - on file creation time
  • Year after - is updated each time the file is modified (and we hopefully don't forget that)

Right?

@andy31415
Copy link
Contributor

Let's start with: new files should have the current year (unless copied and pasted file content or rename).

Beyond that, I would like to reduce developer churn work as much as possible while still making lawyers happy. Currently I am not commenting on year changes on existing files, only remarked that if we create a new file we can add the current year.

@ivmarkov
Copy link
Contributor Author

ivmarkov commented Jun 25, 2024

Let's start with: new files should have the current year (unless copied and pasted file content or rename).

Beyond that, I would like to reduce developer churn work as much as possible while still making lawyers happy. Currently I am not commenting on year changes on existing files, only remarked that if we create a new file we can add the current year.

Here's a plan forward:

  • Don't ad-hoc change some headers (yet)
  • Do a regexp replace as follows, on everything:
    • Start year: 2022 (it is 2020 now). The earliest commit in the repo seems to be from Dec 12 2022. Or shall we just do 2023? @kedars Is it true that you guys started in 2022, or do I have it wrong and you've worked in another repo before that?
    • End year: 2024 (it is 2022 now). I think we have touched almost every file either in 2023 (when I did the no-std thing) or in 2024 anyway
  • After the change, follow what @andy31415 suggests: bump the beginning year for new files. We can also retro-actively apply this for some files that we do know popped up in 2024 - mostly in the reworked transport, as well as BTP

@kedars
Copy link
Collaborator

kedars commented Jun 25, 2024

Here's a plan forward:

Sounds good to me

Start year: 2022 (it is 2020 now). The earliest commit in the repo seems to be from Dec 12 2022. Or shall we just do 2023? @kedars Is it true that you guys started in 2022, or do I have it wrong and you've worked in another repo before that?

Let's keep it as 2021, I was working on a personal repo since 2021. The initial commit to this repo squashed everything since then into a single commit

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

No branches or pull requests

4 participants