-
Notifications
You must be signed in to change notification settings - Fork 3.6k
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
Rename addr to address in non-public API. #23432
Conversation
Can one of the repo owners verify this patch? |
060ca21
to
bcde2ce
Compare
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.
Not a huge improvement, but LGTM, I guess.
OK TO TEST |
Test FAILed. |
Failure is formatting, the code is auto formatted when compiled, so please compile all changed code locally and then commit the changes and push that. |
@johanandren Really sorry for that stupid mistake. I only used IntelliJ in local without sbt. By the way, can I verify broke public API in the local with |
@jiminhsieh for checking binary compatibility have a look at https://github.com/akka/akka/blob/master/CONTRIBUTING.md#binary-compatibility |
bcde2ce
to
d1ef284
Compare
Test FAILed. |
Seems this caused a few test failures now, plus binary compatibility errors. See https://jenkins.akka.io:8498/job/pr-validator-per-commit-jenkins/9885/ for details. |
d1ef284
to
64dc827
Compare
Test PASSed. |
64dc827
to
f6d5445
Compare
@@ -272,11 +272,11 @@ final case class RootActorPath(address: Address, name: String = "/") extends Act | |||
|
|||
override val toSerializationFormat: String = toString | |||
|
|||
override def toStringWithAddress(addr: Address): String = | |||
override def toStringWithAddress(newAddress: Address): String = |
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.
These are actually not source compatible, since the parameter names in Scala are a part of the API (because you could use named params, not likely that anyone does for this but we cannot know nobody did a toStringWithAddress(addr = something)
which will not work anymore with this change.
Strange that MiMa didn't complain about 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.
Ok, I got it. Thanks for you explanation! : ) I will rollback this soon. BTW, maybe it would be a good idea to send an issue to MiMa? They would know this situation.
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.
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.
Yeah this is breaking only for scala in that specific use case.
Scala has tools to deal with that though - the def method(@deprecatedName("addr") newOne: Address)
syntax can make that work, though I'm unsure we care enough about this name here to make the change - let's not change it in method params perhaps?
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.
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.
Does test code need to be consider compatibility? Normally, it would be to fine to change public methods or public attributes in test code. Thanks!
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.
Tests as well as the testkit (which is public API but exempt from these rules) are fine to change :)
Test PASSed. |
Test PASSed. |
I will review the compatibility of each file again. Since there are some use cases MiMa could not detect. For example - https://github.com/akka/akka/pull/23432/files/f6d54455d28c0e5e1bae7e82e056bcfea98065da#r130586385. |
f0e2302
to
3fa2725
Compare
Test PASSed. |
It will break source compatibility. For example, toStringWithAddress(addr = something).
3fa2725
to
bf700ab
Compare
Test PASSed. |
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.
LGTM
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.
LGTM
Issue - #21874
I will use another commit to change attributes from
addr
toaddress
in Java. I found previous PR, #21885, not only simply changeaddr
toaddress
but also methods and attributes containedaddr
in the middle. For instance,getAddrString
togetAddressString
. Is it fine for the Akka-Team? Thanks!