Starr
06/25/2022, 6:58 PMPiotr Krzemiński
06/25/2022, 7:14 PMPiotr Krzemiński
06/25/2022, 7:17 PMPiotr Krzemiński
06/25/2022, 7:19 PMStarr
06/25/2022, 7:20 PMStarr
06/25/2022, 7:24 PMPiotr Krzemiński
06/25/2022, 8:24 PMnull
or some other value instead of throwing an exception if a given input is not set? I prefer such exceptionless APIs for the sake of FP approach, sometimes for performance. I suggest having two variants in the library, like Kotlin's stdlib does sometimesStarr
06/25/2022, 8:38 PMResult
types. I think I'll migrate the low-level function to return null
(or add an *OrNull
variant), and pull the exception up to the delegate syntax sugar.Starr
06/25/2022, 8:42 PMPiotr Krzemiński
06/25/2022, 8:57 PMonly that delegates aren't very friendly to nullable ortypesResult
See e. g. https://ajalt.github.io/clikt/ - this library allows reading a CLI option that's optional, then the delegate's returned type is nullable. Unless I don't understand the problem :)
Vampire
06/26/2022, 1:11 PMindeed in Kotlin and Docker-basedMay I ask why you did it Docker-based? They are slower than JavaScript based and are only running on Linux runners and only if Docker is installed while the JavaScript actions should run on any valid runner. And thanks to Kotlin/JS you can still write them in Kotlin unless you need some JVM-only dependencies. https://github.com/Vampire/setup-wsl is an example of how to do it. :-)
Starr
06/26/2022, 1:18 PMPiotr Krzemiński
06/26/2022, 1:19 PMStarr
06/26/2022, 1:22 PMVampire
06/26/2022, 1:44 PMStarr
06/26/2022, 2:03 PMVampire
06/26/2022, 2:04 PMVampire
06/26/2022, 2:25 PMType | Operating system
Docker container | Linux
JavaScript | Linux, macOS, Windows
Composite Actions | Linux, macOS, Windowsand
Docker container actions can only execute on runners with a Linux operating system. Self-hosted runners must use a Linux operating system and have Docker installed to run Docker container actions.https://docs.github.com/en/actions/creating-actions/creating-a-docker-container-action:
Self-hosted runners must use a Linux operating system and have Docker installed to run Docker container actions.
Starr
06/26/2022, 2:26 PM