I was looking at what it would take to bootstrap a...
# contribute
I was looking at what it would take to bootstrap a JVM language provider for Pulumi (likely Java, then Kotlin/Scala can just wrap the Java package) Reading through the docs on creating a new language -- I don't understand why each language requires its own gRPC server 🤔 The protobuf definitions are shared, and looking at multiple SDK implementations like Node vs .NET, the gRPC server code seems nearly identical outside of flags and a handful of custom behaviors
👍 1
Oh this is awesome!! Thank you. VirtusLabs does so many awesome things for the JVM + Scala community
Do you know if there are plans to continue work on it/merge it by chance?
I'm hoping to catch up with @brave-dawn-64711 and @numerous-piano-36614 soon on plans for taking this further in 2022. I'd love to get to an official "preview" release out soon from this VirtusLab repo, and start getting some broader usage on that to provide feedback.
❤️ 3
yes, I’ve got Java SDK and provider codegen worked for terraform provider (kind) and for the native kubernetes provider
working on a real world demo now
would love to work on a Kotlin and Scala support, assuming I can get the funding
right now the work is sponsored by VirtusLab
Kotlin support would be amazing! You could take the approach of generating (roughly) identical DSL syntax in both Kotlin + Scala 3 I think, by using what Scala calls
context functions
and what Kotlin calls
block receivers
Stealing the
DSL example from Scala docs:
Copy code
table {
  row {
    cell("top left")
    cell("top right")
  row {
    cell("bottom left")
    cell("bottom right")
I think it would be roughly something like this 👀
Copy code
def table(init: Table ?=> Unit) = ???
def row(init: Row ?=> Unit)(using t: Table) = ??? 
def cell(str: String)(using r: Row) = ???

fun table(block: (Table) -> Unit) {}
fun row(block: (Row) -> Unit) {}
fun Row.cell(str: String) {}
yes, that would have big impact on the user experience
Is there a repo out yet, I would love to help!
took a little longer than expected, but it's here 🙂 https://github.com/pulumi/pulumi-java
🎉 2
🚀 2
I saw it! It's awesome, I'm not entirely sure how to get use Scala3 with it though, but hopefully I get some time to look at it 😄