Kotlin toolchain has been a good experience for me...
# kotlin-toolchain
p
Kotlin toolchain has been a good experience for me for such an early release. With minor effort and some help on this channel (thanks!!!) I have been able to build, test and publish a multi-module project (previously done in Maven). The
module.yaml
config files are as minimalistic as one can hope for. It is also fast enough for my use-cases. Below some insights into size of build logic (characters per file): Maven
Copy code
2142 ./roboquant-questdb/pom.xml
  2099 ./roboquant-ibkr/pom.xml
  16794 ./pom.xml
  2766 ./roboquant/pom.xml
  2330 ./roboquant-charts/pom.xml
  2288 ./roboquant-alpaca/pom.xml
  2754 ./roboquant-avro/pom.xml
Kotlin toolchain
Copy code
183 ./roboquant-questdb/module.yaml
   126 ./project.yaml
   225 ./roboquant-ibkr/module.yaml
   296 ./roboquant/module.yaml
   913 ./project.module-template.yaml
   244 ./roboquant-charts/module.yaml
   193 ./roboquant-alpaca/module.yaml
   297 ./roboquant-avro/module.yaml
Only few minor findings: • if no regular test cases are found in a module,
kotlin check
aborts. • Not sure why the way to set credentials for a regular Maven repo is different from MavenCentral. Personally like to use environment variables more than a property file, but perhaps support both. • The command line doesn’t support the option to exclude modules, only include is supported. Next is to consider to refactor directory structure from Maven format to the default format. I like the slightly flatter structure of the default format and my project is pure Kotlin, so don’t expect too many issues. Tip: We all know the shorter the name of a build tool, the better it is. So perhaps rename
kotlin
to
kt
😉.
❤️ 1
kodee loving 5
j
Thanks a lot Peter for the feedback! And sorry for the delay.
> if no regular test cases are found in a module,
kotlin check
aborts Could you please clarify your situation here? I can't reproduce this. Is this a multi-module project?
Not sure why the way to set credentials for a regular Maven repo is different from MavenCentral. Personally like to use environment variables more than a property file, but perhaps support both.
This is just historical and it will change. In short, we're going to change how repositories are declared, and we're working on a way to provide external values (such as secrets) to the build in general. We are aware that the current approach to credentials is a bit inconsistent and somewhat uncomfortable, so in the meantime, please stay strong 😄 Sorry for the inconvenience!
The command line doesn’t support the option to exclude modules, only include is supported
I think you're talking about
kotlin check
, right? Indeed at the moment we haven't propagated all the capabilities of the
kotlin test
command. If you want more control over test runs, I suggest you use
kotlin test
and its CLI options. We will think about which CLI options should be ported to
kotlin check
as well.
p
• it is a multi-module project. one module has integration test (TestIT*)* but no regular test *(*Test) and kotlin aborted. I just made a quick regular test and since then no more problems. • The credential file is not a great solution. When I check in my code, of course I don’t want to check-in that property file. But if the file doesn’t exist, kotlin toolchain won’t run 😞 so cannot use it in my GitHub actions. But I’ll survive 😉 • Will checkout
kotlin test
, thank!!!