-
Notifications
You must be signed in to change notification settings - Fork 133
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
pekko support? #1784
Comments
Pardon the delay, I'm on vacation for the next two weeks. Is the only change the package namespace? If so it may be possible to have a module based on the akka modules that translates the package names in the AST during generation. I've been pushing for explicit package names to avoid namespace collisions with terms that come from OpenAPI files, so this may be all that's required until the libraries diverge significantly. |
Thanks @blast-hardcheese for your response. The Pekko code uses different package names - Pekko HTTP has Scala 3 support so you won't need to use Cross Version support to handle Scala 3. I've migrated a few libs to use Pekko and it is quite straightforward. There is no urgency is this issue but it would be nice to get around to it in a few months. |
👍
👍
indeed. I'm heartened that there's a push in this direction, happy to lend support when I can. |
OK, I've started on this -- Initial module work is in progress and should be published to maven central in a few days, though the ABI will only be compatible with the most recent SNAPSHOT release. |
For those who see this, something that would be very much appreciated is adding your organization name to the Additionally, especially if you use guardrail internals, please join the matrix server, there have been some significant structural changes to make it easier to develop new modules. |
New repo available at guardrail-dev/module-pekko-http, version 0.1.0 published to maven central. The module is still in very early stages, and due to a lack of foresight on my part, this release jar depends on some |
Alright, thank you all for the interest! Since this has been an ask from a few organizations at this point, feel free to reach out to devon@guardrail.dev or over Matrix if you determine you need more personalized solutions for your environment. For the DIY-ers, here's what you need to get guardrail generating Apache Pekko: guardrail-cli usage:
sbt-guardrail usage: diff --git a/build.sbt b/build.sbt
index 213d979..ec765f2 100644
--- a/build.sbt
+++ b/build.sbt
@@ -1,5 +1,5 @@
Compile / guardrailTasks := List(
- ScalaServer(file("petstore.yaml"), pkg="foo"),
+ ScalaServer(file("petstore.yaml"), pkg="foo", modules=List("pekko-http", "circe")),
)
diff --git a/project/guardrail.sbt b/project/guardrail.sbt
index c146a2d..bd14acc 100644
--- a/project/guardrail.sbt
+++ b/project/guardrail.sbt
@@ -1 +1,10 @@
-addSbtPlugin("com.twilio" % "sbt-guardrail" % "0.64.0")
+addSbtPlugin("dev.guardrail" % "sbt-guardrail" % "0.75.2")
+
+libraryDependencies ++= Seq(
+ "dev.guardrail" %% "guardrail-scala-pekko-http" % "0.1.0",
+ "dev.guardrail" %% "guardrail-core" % "0.76.0-SNAPSHOT",
+ "dev.guardrail" %% "guardrail-scala-support" % "0.76.0-SNAPSHOT",
+ "dev.guardrail" %% "guardrail-scala-akka-http" % "0.77.0-SNAPSHOT",
+)
+
+resolvers += "Sonatype OSS Snapshots" at "https://s01.oss.sonatype.org/content/repositories/snapshots" Note: For build tooling, you'll have to provide a snapshot release of Since this appers to work, I'll close this issue. As we continue to build towards the next major release, this module will get updates. |
@blast-hardcheese Thank you, this is great! |
tried a hack of creating a dummy declaration for |
I've changed |
Just noticed this change 133d58a will try to understand what has changed in https://github.com/guardrail-dev/guardrail/pull/1785/files it looks like a significant rewrite |
@stanislav-chetvertkov The changes to the API should be minimal, this time at least. https://github.com/guardrail-dev/guardrail/blob/master/MIGRATING.md#migrating-to-guardrail-core-0760-snapshot gives some guidance, specifically following the changes laid out in #1785 I debated writing a scalafix rule, since these changes are purely mechanical. |
Any interest in supporting pekko-http. This is a FOSS fork of akka-http.
pekko-http 1.0.0 should be released this week. Snapshots are available already.
https://pekko.apache.org/docs/pekko-http
The text was updated successfully, but these errors were encountered: