Quarkus: Create the Picocli Example codestart in Java & Kotlin

Created on 9 Oct 2020  路  18Comments  路  Source: quarkusio/quarkus

All 18 comments

/cc @evanchooly
/cc @quarkusio/devtools

Hey, if someone's not working on this issue, can i work on it?

I don't see why not. I can assign it to you. I haven't done much with either but i'm happy to help address any kotlin issues you run in to.

I don't know much kotlin but i can definitely be efficient in java. From where do i start, like from which code file or docs to refer too, and what results are expected?

@jantosi, would you help @The-Nightwing do this one?

@The-Nightwing :
Take a look https://github.com/quarkusio/quarkus/blob/master/independent-projects/tools/codestarts/README.adoc to get a gist of what a new codestart is like.

You want to create a new directory inside /devtools/platform-descriptor-json/src/main/resources/codestarts/quarkus/examples/, and add your codestart there.

Suggestion: Create the codestart for each language as a separate project at code.quarkus.com first - it'll be easier for you to run and compile. Later on, write a YAML descriptor for the codestart, like here: https://github.com/quarkusio/quarkus/blob/master/devtools/platform-descriptor-json/src/main/resources/codestarts/quarkus/examples/funqy-http-example/codestart.yml and bundle your codestarts for each language.

See #12386 as an example :)

@The-Nightwing it would be nice to have it for 1.10, any update?

You can take inspiration from https://quarkus.io/guides/picocli

@The-Nightwing had to withdraw from this feature for personal reason. I will reassign it, @jantosi are u up?

and @The-Nightwing no worries, let me know when you are back to business and rested and I will find you a nice issue :)

@The-Nightwing all the best - hope you'll get better soon!

@ia3andy Sure, you can assign that to me. 馃憤 Is 1.10 a particular date I should aim for?

@jantosi cool! No worries for the delay, make it ready when it fits you 馃殌

@jantosi do you still want to do that one?

@ia3andy If I have a good comprehension, this is just about writing a very simple demonstrator that uses the picocli extension and a yaml file. Am I right ? If so, and issue has not been taken care of, I can do that. I may not be very efficient in Kotlin but I should be able to write 20 lines of code or so. Let me know if you're interested.

sure @jtama-op you are welcome to give it a shot :)

I'll update the doc & publish a script later today to help developing codestarts.. you should wait for it.

Just let me know when it's pushed.

@jtama-op ok, it's still a PR, but you can already follow it and give feedback:
https://github.com/ia3andy/quarkus/blob/cs-doc/independent-projects/tools/codestarts/README.adoc

The PR is here: https://github.com/quarkusio/quarkus/pull/13633

Ok I didn't wait but already have something in java, I will follow your guide to add kotlin.
I have a few questions though :

  • I think this exemple should be a singleton-exemple. What do you think ? Waiting for your input I added dedicated unit tests, and excluded it from the IT.

  • The code isn't tested. In fact it already bothers me for my project, there aren't any testing samples. How do I fake command agrs in a test env...

  • The singleton-exemple helped !

  • Finally, How do you mark a PR as draft ?

Was this page helpful?
0 / 5 - 0 ratings