-
Notifications
You must be signed in to change notification settings - Fork 3.6k
Added integration with sbt-header like in akka-http #24594
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
Conversation
|
Thank you for your pull request! After a quick sanity check one of the team will reply with 'OK TO TEST' to kick off our automated validation on Jenkins. This compiles the project, runs the tests, and checks for things like binary compatibility and source code formatting. When two team members have also manually reviewed and (perhaps after asking for some amendments) accepted your contribution, it should be good to be merged. For more details about our contributing process, check out CONTRIBUTING.md - and feel free to ask! |
# Conflicts: # akka-remote/src/main/java/akka/remote/artery/aeron/AeronErrorLog.java # akka-testkit-typed/src/main/scala/akka/testkit/typed/javadsl/ExplicitlyTriggeredScheduler.scala
|
OK TO TEST |
|
Excellent, I'm all for merging it -- perhaps after we merge things for today's release. |
patriknw
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
great, finally a smart pattern that preserves the original years
| /** | ||
| * Copyright (C) 2017-2018 Lightbend Inc. <https://www.lightbend.com> | ||
| */ | ||
|
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
do we have to add these newlines?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
In my opinion that looks consistent with akka-http
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
They're also there in akka-http indeed, but they do look a bit strange to me as well. Do we want them?
| @@ -1,3 +1,7 @@ | |||
| /* | |||
| * Copyright (C) 2018 Lightbend Inc. <https://www.lightbend.com> | |||
| */ | |||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
good one
| * Written by Doug Lea with assistance from members of JCP JSR-166 | ||
| * Expert Group and released to the public domain, as explained at | ||
| * http://creativecommons.org/publicdomain/zero/1.0/ | ||
| */ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Good that it doesn't change that
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Do we have any other headers that have both Lightbend and some other copyright notice? When we copy code from elsewhere (when the license permits) we preserve the original copyright notice.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
akka-protobuf
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
akka-persistence
|
Test FAILed. |
|
Test FAILed. |
|
Things that changed after last commits:
|
|
Test FAILed. |
|
Test FAILed. |
|
Test FAILed. |
|
|
||
| /** | ||
| * Copyright (C) 2009-2018 Lightbend Inc. <https://www.lightbend.com> | ||
| */ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
looks wrong?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Probably something due to extra space in the beginning of each line. I would actually expect MiMa to format it correctly or complain about it. Anyway this could be also fixed with a bit of enhancing of detection regexp.
|
Test FAILed. |
|
Test PASSed. |
|
Looks like all done. Sorry for mess, looks like I actually broke build somehow accidentally changing line endings from Please let me know if there is anything that should be done on this PR. |
| @@ -1,3 +1,7 @@ | |||
| /* | |||
| * Copyright (C) 2018 Lightbend Inc. <https://www.lightbend.com> | |||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
should this be 2011-2018 in this case and similarly for other files that did not have a copyright header yet? Or do we not care?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think the sbt-header configuration just adding 2018 is OK. We could consider manually updating files we know are older, but I'm OK with the header like this as well. AFAIK the year in a copyright header is mostly there for informational purposes, not really legal ones.
raboof
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We might want to remove the extra newlines and look into the problem @ktoso noticed, but in general super nice PR! Looking forward to having it in :)
|
Thanks for further steps, I will revisit this PR tomorrow. Probably line endings should not be an issue and will start from there. |
|
Actually, looks like it is an issue 😢 See this rejected PR for more info, looks like play and others are okay with it. I am trying to somehow hack around it but so far it looks like change cannot be done from plugin user side. PR closed for now as I am reiterating in the same branch. Let me know if you will change your mind regarding line endings. |
|
So unfortunately no way around it so far. Root cause of these extra line ending is here. Sorry guys but it is pretty much closed by |
This PR introduces integration with sbt-headers discussed in this PR based on implementation in another PR from akka-http in order to automate population of copyright header in source code.
Main points of changes:
project/plugins.sbt,project/CopyrightHeader.scala,build.sbt. All other files are changed due to execution ofheaderCreatesbt command.I am no sbt expert however this seemed like a low hanging fruit which could improve contribution experience for others especially the ones who contribute to akka for the first time.