https://pulumi.com logo
#contribute
Title
# contribute
v

victorious-xylophone-55816

01/03/2022, 4:17 PM
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
p

prehistoric-nail-50687

01/03/2022, 4:32 PM
v

victorious-xylophone-55816

01/03/2022, 4:39 PM
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?
w

white-balloon-205

01/03/2022, 4:50 PM
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
b

brave-dawn-64711

01/03/2022, 4:52 PM
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
v

victorious-xylophone-55816

01/03/2022, 6:23 PM
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
table/row/cell
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) {}
b

brave-dawn-64711

01/03/2022, 6:38 PM
yes, that would have big impact on the user experience
d

delightful-oil-32538

01/30/2022, 6:26 PM
Is there a repo out yet, I would love to help!
b

brave-dawn-64711

05/04/2022, 3:18 PM
took a little longer than expected, but it's here 🙂 https://github.com/pulumi/pulumi-java
🎉 2
🚀 2
d

delightful-oil-32538

05/22/2022, 6:35 PM
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 😄
5 Views