Fork me on GitHub
#babashka
<
2020-08-27
>
kingcode13:08:18

@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?

jeroenvandijk13:08:45

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

kingcode13:08:17

Ok Thanks @jeroenvandijk, will look into it.

jeroenvandijk13:08:58

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

kingcode13:08:21

ok…maybe doing my own bb build…?

borkdude13:08:21

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

kingcode13:08:41

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)

kingcode13:08:39

So I tried importing the Java class directly.

borkdude13:08:13

ok, so you want to catch that specific exception

kingcode13:08:21

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…

borkdude13:08:51

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

kingcode13:08:59

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

kingcode13:08:51

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.

kingcode13:08:27

Have to log off. Thanks..

borkdude13:08:16

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

borkdude14:08:53

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