Fork me on GitHub
#babashka
<
2020-05-27
>
pdmct07:05:27

Hi everyone, Playing around the bb and can't get xml to work .. is there a trick? I have installed bb on mac osx voia brew (version 0.0.99) when I try to use xml/parse-str I get , eg:

bb '
(->> (curl/get "")
  :body (#(xml/parse-str % :skip-whitespace true))
  :content (filter #(= "entry" (some-> % :tag name)))
  first :content first :content)'
clojure.lang.ExceptionInfo: Could not resolve symbol: xml/parse-str [at line 3, column 12] 

pdmct07:05:52

same in the repl

borkdude08:05:32

@pdmct on my machine:

$ bb '
(->> (curl/get "")
  :body (#(xml/parse-str % :skip-whitespace true))
  :content (filter #(= "entry" (some-> % :tag name)))
  first :content first :content)'
("ClojureScript web server with Macchiato, Shadow CLJS and Reitit")

borkdude08:05:52

let me try the brew version

borkdude08:05:16

What do you see when you type bb --version, sure there isn't another one on your path?

borkdude08:05:39

Works with the brew version as well for me

borkdude08:05:26

@pdmct Also tested on a linux machine from brew, same result: works

jeroenvandijk12:05:10

Nice! What was it before?

borkdude13:05:36

Pretty much the same, only older content

borkdude13:05:48

And I used to write the HTML manually 🙈

💪 8
Crispin15:05:32

Bootleg 0.1.9 released. https://github.com/retrogradeorbit/bootleg/releases/tag/v0.1.9 Faster pod loading (thanks @borkdude)! - Support for deferred pod namespace loading in babashka (requires bb >= 0.0.99)

🎉 16
borkdude15:05:28

^ this will speed up things considerably if you're only going to use yaml, hiccup, etc and not the enlive stuff

👍 4
pdmct21:05:53

@borkdude thanks, yes I did indeed have an older version that was causing the issue

pdmct21:05:09

fixed and working now, cheers

borkdude21:05:36

pod-babashka-postgresql: a new pod for interacting with PostgreSQL! https://github.com/babashka/babashka-sql-pods

👀 16