You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@pekko.apache.org by "mdedetrich (via GitHub)" <gi...@apache.org> on 2024/01/28 22:18:54 UTC

[PR] Add targetName overloaded methods for Scala 3 inline methods [incubator-pekko]

mdedetrich opened a new pull request, #1070:
URL: https://github.com/apache/incubator-pekko/pull/1070

   We are currently having the issue where the Scala 3 `inline` keyword actually strips any mention of the method inside the bytecode which is causing issues . Thankfully Scala 3 also introduced [targetName](https://docs.scala-lang.org/scala3/reference/other-new-features/targetName.html) which lets you set the target designated symbol name in the bytecode of any method, i.e. if you have
   
   ```
   @targetName("methodB")
   def methodA
   ```
   
   Then it will actually be called `methodB` in the generated JVM bytecode.
   
   We can use this trick to resolve https://github.com/apache/incubator-pekko/issues/1066 by just creating an alias method for every `inline def` and using `targetName` for the original method name and there won't be any conflict in the bytecode since `inline def` methods never generate any JVM bytecode (thats what the original problem is)


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@pekko.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@pekko.apache.org
For additional commands, e-mail: notifications-help@pekko.apache.org


Re: [PR] Add targetName overloaded methods for Scala 3 inline methods [incubator-pekko]

Posted by "pjfanning (via GitHub)" <gi...@apache.org>.
pjfanning commented on PR #1070:
URL: https://github.com/apache/incubator-pekko/pull/1070#issuecomment-1913742764

   Conceptually seems ok but would you be able to test it locally to see if it helps locally? Ideally, we wouldn't merge this and then use snapshots and CI builds using those snapshots to try it out for the first time. 


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@pekko.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@pekko.apache.org
For additional commands, e-mail: notifications-help@pekko.apache.org


Re: [PR] Add targetName overloaded methods for Scala 3 inline methods [incubator-pekko]

Posted by "mdedetrich (via GitHub)" <gi...@apache.org>.
mdedetrich commented on PR #1070:
URL: https://github.com/apache/incubator-pekko/pull/1070#issuecomment-1913743330

   > Conceptually seems ok but would you be able to test it locally to see if it helps locally? Ideally, we wouldn't merge this and then use snapshots and CI builds using those snapshots to try it out for the first time.
   
   Don't have an issue with this albeit it would probably take more time (in terms of labour) of testing this then merging it and waiting overnight.
   
   If this doesn't work then we would just revert this commit and the one that adds the inline keywords, we will be forced to use the Scala 3 `inline` keyword for Pekko 2.0.x


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@pekko.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@pekko.apache.org
For additional commands, e-mail: notifications-help@pekko.apache.org


Re: [PR] Add targetName overloaded methods for Scala 3 inline methods [incubator-pekko]

Posted by "mdedetrich (via GitHub)" <gi...@apache.org>.
mdedetrich commented on PR #1070:
URL: https://github.com/apache/incubator-pekko/pull/1070#issuecomment-1913756334

   Going to merge this so we catch the midnight snapshot deploys. Will take 1-2 days for changes to propagate until connectors.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@pekko.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@pekko.apache.org
For additional commands, e-mail: notifications-help@pekko.apache.org


Re: [PR] Add targetName overloaded methods for Scala 3 inline methods [incubator-pekko]

Posted by "He-Pin (via GitHub)" <gi...@apache.org>.
He-Pin commented on PR #1070:
URL: https://github.com/apache/incubator-pekko/pull/1070#issuecomment-1913923212

   @mdedetrich @pjfanning I think we can set the connectors nightly build to 1 AM.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@pekko.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@pekko.apache.org
For additional commands, e-mail: notifications-help@pekko.apache.org


Re: [PR] Add targetName overloaded methods for Scala 3 inline methods [incubator-pekko]

Posted by "mdedetrich (via GitHub)" <gi...@apache.org>.
mdedetrich merged PR #1070:
URL: https://github.com/apache/incubator-pekko/pull/1070


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@pekko.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@pekko.apache.org
For additional commands, e-mail: notifications-help@pekko.apache.org


Re: [PR] Add targetName overloaded methods for Scala 3 inline methods [incubator-pekko]

Posted by "mdedetrich (via GitHub)" <gi...@apache.org>.
mdedetrich commented on PR #1070:
URL: https://github.com/apache/incubator-pekko/pull/1070#issuecomment-1913745854

   I have just updated the pr to add `_` prefix to these methods to give a signal that they are not meant to be directly called in Scala.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@pekko.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@pekko.apache.org
For additional commands, e-mail: notifications-help@pekko.apache.org