Fork me on GitHub
#babashka
<
2020-07-01
>
sogaiu02:07:03

has anyone had luck building pod-babashka-parcera? script/compile ends with the following for me:

Compiling pod.babashka.parcera
Syntax error macroexpanding at (java.clj:1:1).
Execution error (ClassNotFoundException) at java.net.URLClassLoader/findClass (URLClassLoader.java:382).
parcera.antlr.ClojureParser

Full report at:
/tmp/clojure-4547899370418611432.edn
Compilation failed: Subprocess failed
Uberjar aborting because jar failed: Compilation failed: Subprocess failed
Error encountered performing task 'do' with profile(s): 'base,system,user,provided,dev,uberjar'
Uberjar aborting because jar failed: Compilation failed: Subprocess failed

sogaiu02:07:20

i've tried building parcera itself and notice (via its .travis.yml ) that there's some initial generation of java code that's necessary to get parcera.antlr.ClojureParser (and friends?) to exist

sogaiu02:07:57

looking inside parcera 0.11.1.jar, i don't see any class files either

borkdude07:07:43

@sogaiu builds fine here, also on CI

borkdude07:07:00

@sogaiu I do see .class files in my dep here:

$ ls_jar.clj carocad/parcera 0.11.1
META-INF/MANIFEST.MF
....
parcera/antlr/ClojureParser$DerefContext.class
parcera/antlr/ClojureParser$FnContext.class
parcera/antlr/ClojureParser$Var_quoteContext.class
parcera/antlr/ClojureParser$BacktickContext.class
parcera/antlr/ClojureParser$MetadataContext.class
parcera/antlr/ClojureParser$Conditional_splicingContext.class
parcera/antlr/ClojureParser$KeywordContext.class

sogaiu07:07:55

strange -- i don't see any here

borkdude07:07:39

that's very weird

borkdude07:07:01

maybe try a local install of carocad/parcera

sogaiu07:07:21

i'll remove what's in .m2 once and see what subsequent actions do

sogaiu07:07:06

i kept a copy of the old stuff to compare ok, looks like the .class files are there now -- in the newly fetched .jar. so odd...

sogaiu07:07:10

thanks for your help!

sogaiu07:07:19

the .jar file filesizes are definitely different

sogaiu07:07:39

ah, ok i think i see what happened. i didn't know that one had to generate the java source from the .g4 file with antlr initially. i think i may have done an install to the local repository without first having created the class files. when i fetched a different jar for parcera from clojars, i fetched an older version, and that one doesn't have .class files either, but iirc parcera didn't always use antlr.

borkdude10:07:40

good to hear it's fixed

sogaiu10:07:34

it was all pilot error -- sorry for troubling you 😅

sogaiu10:07:57

am using the pod to explore parcera now

borkdude10:07:54

parcera pod is very interesting to make some scripts to analyze or rewrite Clojure code. rewrite-clj is cool, but the pure EDN approach of parcera makes it well suited for pod

sogaiu11:07:37

i'm evaluating it for something involving rewriting where i want to preserve whitespace and comments 🙂

sogaiu11:07:18

i think it's easier to try out parcera via the pod

sogaiu11:07:45

compared to setting up a jvm clojure project.clj or deps.edn that is

lread11:07:34

I like the simplicity of parcera, I’ll refer to it as an interesting alternative in rewrite-cljc docs.

borkdude11:07:46

One could build a code formatter in babashka using the parcera pod 😉

borkdude15:07:21

TIL: bb (print "\033[H\033[2J") has the same effect as clear.

uochan21:07:25

I just pushed a docker image for babashka-test-action. So you can test your babashka codes in your local machine easily ☺️ https://github.com/liquidz/babashka-test-action#local-usage

👍 6
😮 3