babashka

https://github.com/babashka/babashka. Also see #sci, #nbb and #babashka-circleci-builds .
2020-08-27T13:17:18.108Z

@borkdude, which is the standard way to add a non-included java class? I am thinking of java.time.format.DateTimeParseException, which is missing in cljc.java-time. Or is it something that can only be done within babashka.impl.classes, unless I require an external clojure project as documented?

2020-08-27T13:21:45.108800Z

@kingcode The only way is to add it to babashka itself or to a pod

2020-08-27T13:22:17.110Z

Ok Thanks @jeroenvandijk, will look into it.

2020-08-27T13:24:58.111900Z

the namespace babashka.impl.classes is indeed the place where you have to add the class

2020-08-27T13:26:21.113400Z

ok…maybe doing my own bb build…?

borkdude 2020-08-27T13:29:21.113700Z

@kingcode What do you mean "missing in cljc.java-time"?

2020-08-27T13:32:41.116400Z

It is not available e.g. with

(require '[cljc.java-time.format.date-time-parse-exception]) 
When looking at the source, that ns has not been provided (as part of the mapping from java.time as documented in cljc.java-time README)

2020-08-27T13:33:39.117300Z

So I tried importing the Java class directly.

borkdude 2020-08-27T13:35:13.118900Z

ok, so you want to catch that specific exception

2020-08-27T13:35:21.119100Z

I also looked at D3/java-time, but it seems to work completely differently than cljc.java-time, by wrapping its own semantics as a facade around Java…

2020-08-27T13:35:25.119300Z

Correct

borkdude 2020-08-27T13:35:51.120300Z

if the exception is not part of bb, a PR is welcome. since bb supports java.time, the exception type is a good addition

2020-08-27T13:35:59.120500Z

I want my user’s to be able to use a variety of formats and parse them all until one works, and catching each parse exc. by going to the next format

2020-08-27T13:36:51.121400Z

OK Thanks! Not urgent by any means, I am playing around right now. Not familiar with PR process, will look it up and get back to you.

2020-08-27T13:37:27.121700Z

Have to log off. Thanks..

borkdude 2020-08-27T13:41:16.122200Z

I'll take care of this one, so it will be part of 0.2.0

borkdude 2020-08-27T14:48:53.122700Z

@kingcode new binaries are in #babashka_circleci_builds, the exception is now included on the master branch