Skip to content

Conversation

@Parship12
Copy link

@Parship12 Parship12 commented Jan 22, 2026

What this PR does:
Fixed the update-copyright.sh to work correctly:

  • Removing -Z from grep (using newline-separated output)
  • Adding cross-platform for sed -i (mac vs Linux)

Why we need it: The script grep -rlZ which causing all filenames to concatenate into one string. Also, the script used macOS sed -i '' which is not working on linux.

Before:
Screenshot 2026-01-25 152804

After:
Screenshot 2026-01-25 153250

Does this PR introduce a user-facing change?:

  • How are users affected by this change: NA
  • Is this breaking change: NO
  • How to migrate (if breaking change): NA

@Parship12 Parship12 requested a review from a team as a code owner January 22, 2026 04:17
@Parship12 Parship12 changed the title fix: update-copyright.sh script and update copyright year to 2026 fix: update-copyright script and update copyright year to 2026 Jan 22, 2026
Copy link
Contributor

@eeshaanSA eeshaanSA left a comment

Choose a reason for hiding this comment

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

@Parship12 Thanks for this. Two things:

  1. Please always open an issue first. It is better to discuss the ideas, and then start working on it.

  2. The script should be separately updated in one PR. This PR changes 300 files, and is difficult to review.

@Parship12
Copy link
Author

Parship12 commented Jan 22, 2026

@eeshaanSA Yeah sorry for that, actually I have done 2 things in the PR:

  1. Update the script file update-copyright.sh -> This was my main aim
  2. Ran the script: And after running the script all the files are the just updated by 2025 -> 2026.

Okay, I will create a different PR for the changes done in the script.

@Ayushmore1214
Copy link
Contributor

@eeshaanSA @Parship12 quick question , doesn't the copyright year usually represent the creation year?

@Parship12
Copy link
Author

@eeshaanSA @Parship12 quick question , doesn't the copyright year usually represent the creation year?

I thought the same, but then I found this PR: #4745

@eeshaanSA
Copy link
Contributor

@eeshaanSA @Parship12 quick question , doesn't the copyright year usually represent the creation year?

New code added in 2025 and 2026 has to reflect the changes. That is why, it is recommended, to have the current year, or the range, for example 2021-2026.

@eeshaanSA
Copy link
Contributor

@eeshaanSA @Parship12 quick question , doesn't the copyright year usually represent the creation year?

I thought the same, but then I found this PR: #4745

So, the motive of this PR is that the .hack/update-copyright.sh file fails?

@Parship12
Copy link
Author

Why we need it: The update-copyright.sh script was failing on linux with errors like "sed: can't read". The script grep -rlZ which causing all filenames to concatenate into one string. Also, the script used macOS sed -i '' which is not working on linux.

Yes, it was failing on Linux and also the file names were concatenate.

@eeshaanSA
Copy link
Contributor

Understood, thanks!

Why we need it: The update-copyright.sh script was failing on linux with errors like "sed: can't read". The script grep -rlZ which causing all filenames to concatenate into one string. Also, the script used macOS sed -i '' which is not working on linux.

Yes, it was failing on Linux and also the file names were concatenate.

Copy link
Contributor

@eeshaanSA eeshaanSA left a comment

Choose a reason for hiding this comment

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

@Parship12, if we want to get this merged, as suggested, please separate the PRs. Ideally, first, only open a PR with the script changed. The script can be run later (probably by one of the maintainers), since it modifies almost the entire code base in some way.

@Parship12
Copy link
Author

@eeshaanSA Sure, I will do it by EOD. Do I need to open an issue and link it?

@Parship12 Parship12 marked this pull request as draft January 25, 2026 06:19
@Parship12 Parship12 closed this Jan 25, 2026
Signed-off-by: Parship Chowdhury <[email protected]>
Signed-off-by: Parship Chowdhury <[email protected]>
@Parship12 Parship12 marked this pull request as ready for review January 25, 2026 10:12
@Parship12 Parship12 changed the title fix: update-copyright script and update copyright year to 2026 fix: update-copyright script for linux compatibility Jan 25, 2026
@Parship12 Parship12 requested a review from eeshaanSA January 25, 2026 10:20
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants