Skip to content

feat(scalasdk): Codegen for Views, #372#428

Merged
octonato merged 6 commits intomainfrom
wip-gen-views-patriknw
Sep 21, 2021
Merged

feat(scalasdk): Codegen for Views, #372#428
octonato merged 6 commits intomainfrom
wip-gen-views-patriknw

Conversation

@patriknw
Copy link
Copy Markdown
Contributor

  • and starting at scala-value-entity-customer-registry sample

Doesn't work yet, but sharing...

Refs #372

@@ -0,0 +1,3 @@
addSbtPlugin("com.akkaserverless" % "sbt-akkaserverless" % System.getProperty("akkaserverless-sdk.version", "0.7.1"))
addSbtPlugin("com.lightbend.akka.grpc" % "sbt-akka-grpc" % "2.1.0")
Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

is this as intended, or would akka-grpc be included automatically by sbt-akkaserverless?

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I didn't need it yet in the current scripted test, but when we refactor the 'service call' API's to use Akka gRPC I guess we should pull it in automatically

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Without sbt-akka-grpc it doesn't generate anything (from sbt-akkaserverless)

Comment thread samples/scala-value-entity-customer-registry/build.sbt
@@ -0,0 +1,3 @@
addSbtPlugin("com.akkaserverless" % "sbt-akkaserverless" % System.getProperty("akkaserverless-sdk.version", "0.7.1"))
Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

publishLocal and then version with:

sbt -Dakkaserverless-sdk.version="0.7.1-23-7a6dfec4-SNAPSHOT"

Comment thread codegen/core/src/main/scala/com/lightbend/akkasls/codegen/ModelBuilder.scala Outdated
@patriknw patriknw force-pushed the wip-gen-views-patriknw branch from 34bf5ed to 6cdc5ff Compare September 20, 2021 14:50

package customer.domain;

option java_outer_classname = "CustomerDomain";
Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The generated code in the sample is looking good, aside from that CustomerDomain is different for Scala, but I think @raboof is looking into that problem.

@patriknw patriknw force-pushed the wip-gen-views-patriknw branch from 02ad8b9 to bdb19b6 Compare September 21, 2021 10:49
@patriknw patriknw marked this pull request as ready for review September 21, 2021 10:49
@patriknw
Copy link
Copy Markdown
Contributor Author

I have rebased this. Still compilation error for the State references, but that is a know issue. I think we can review/merge this anyway.

@octonato
Copy link
Copy Markdown
Member

I'm merging this

@octonato octonato merged commit 59fa173 into main Sep 21, 2021
@octonato octonato deleted the wip-gen-views-patriknw branch September 21, 2021 12:09
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants