You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@pekko.apache.org by "pjfanning (via GitHub)" <gi...@apache.org> on 2023/01/25 00:46:05 UTC

[GitHub] [incubator-pekko-connectors] pjfanning opened a new issue, #23: follow up with maintainers of externally maintained alpakka connectors

pjfanning opened a new issue, #23:
URL: https://github.com/apache/incubator-pekko-connectors/issues/23

   * see https://doc.akka.io/docs/alpakka/current/external/
   * 3 of those are Akka maintained and we have Pekko equivalents (gRPC, TCP, HTTP)
   * the others are not maintained by Lightbend and there is no Pekko team equivalent
   * we could raise issues with the lib owners when Pekko snapshots are ready 


-- 
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.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


[GitHub] [incubator-pekko-connectors] jtjeferreira commented on issue #23: follow up with maintainers of externally maintained alpakka connectors

Posted by "jtjeferreira (via GitHub)" <gi...@apache.org>.
jtjeferreira commented on issue #23:
URL: https://github.com/apache/incubator-pekko-connectors/issues/23#issuecomment-1533149546

   I have used the following code to use source generators and search/replace on the imports to publish the same library for akka and pekko:
   
   ```scala
   import sbt._
   
   object PekkoMigration {
     def generatePekkoSourcesFromAkka(scalaSourceDirectory: File, sourceManagedDir: File): Seq[File] = {
       val scalaFiles: PathFinder = scalaSourceDirectory ** "*.scala"
       //collect the files
       val filesToBeCopied: Seq[(File, File)] = scalaFiles.get().map { f =>
         val Some(relative) = scalaSourceDirectory.relativize(f)
         val target: File = sourceManagedDir / relative.toPath.toString
         (f, target)
       }
       //copy the files
       val copiedFiles = IO.copy(filesToBeCopied).toSeq
       //rewrite imports
       copiedFiles.map { f =>
         val modifiedLines = IO.readLines(f).map {
           case l if l.startsWith("import akka.stream.alpakka") =>
             l.replaceFirst("import akka.stream.alpakka", "import org.apache.pekko.stream.connectors")
           case l if l.startsWith("import akka") =>
             l.replaceFirst("import akka", "import org.apache.pekko")
           case l => l
         }
         IO.writeLines(f, modifiedLines)
         f
       }
     }
   }
   ```
   
   and then you can use it like this
   
   ```scala
       Compile / sourceGenerators += Def.task {
         PekkoMigration.generatePekkoSourcesFromAkka((AKKA_PROJECT / Compile / scalaSource).value, (Compile / sourceManaged).value)
       }.taskValue
   ``` 
   
   
   It is not very fancy (i.e it does not use scalafix) but gets the job done for small libs


-- 
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


[GitHub] [incubator-pekko-connectors] pjfanning commented on issue #23: follow up with maintainers of externally maintained alpakka connectors

Posted by "pjfanning (via GitHub)" <gi...@apache.org>.
pjfanning commented on issue #23:
URL: https://github.com/apache/incubator-pekko-connectors/issues/23#issuecomment-1607593009

   with the Kinesis alternatives, I've logged issues in those projects
   * https://github.com/500px/kinesis-stream/issues/15
   * https://github.com/StreetContxt/kcl-akka-stream/issues/191


-- 
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