Fork me on GitHub
#babashka
<
2024-02-08
>
pez09:02:37

I’m trying to use clostache from a bb script and am missing something obvious. This is my bb.edn:

{:paths ["scripts"]
 :deps {de.ubercode.clostache/clostache {:mvn/version "1.4.0"}}}
And in scripts/clostashe_test.clj I have:
(ns clostashe-test
  (:require [clostashe.parser :as cs]))

(cs/render "Hello, {{name}}!" {:name "Felix"})
Then:
bb ./scripts/clostashe_test.clj
----- Error --------------------------------------------------------------------
Type:     java.io.FileNotFoundException
Message:  Could not locate clostashe/parser.bb, clostashe/parser.clj or clostashe/parser.cljc on classpath.
Location: /Users/pez/Projects/anteo/mobile-map-playground/./scripts/clostashe_test.clj:2:3

1
borkdude09:02:36

you have a typo in your namespace

borkdude09:02:05

btw, Selmer is built-in to bb, it's very similar?

pez09:02:23

Thanks! I’ll use Selmer instead then.

mmer13:02:03

Hi is wally supported by BB? I am wondering if the following message means no?

defrecord/deftypecurrently only support protocol implementations

borkdude13:02:08

can you specify what wally is? maybe a link to the project?

borkdude13:02:31

that's not going to work in bb since playwright is a java project. take a look at #C7KDM0EKW for something that works in bb

mmer13:02:46

Thanks

👍 1
borkdude14:02:31

another option is to use playwright with #C029PTWD3HR if you are open to Node.js

borkdude14:02:05

Is there anyone here using Gentoo with (bb OR (clojure with tools.build))?

Ingy döt Net20:02:09

I am

630aefd665cb / # cat /etc/gentoo-release 
Gentoo Base System release 2.14
630aefd665cb / # /bb --version
babashka v1.3.188
😉

Ingy döt Net20:02:04

docker run -it --rm gentoo/stage3 bash

Ingy döt Net20:02:25

installed with curl and tar

borkdude20:02:51

Can you try this:

bb -Sdeps '{:deps {dev.weavejester/medley {:mvn/version "1.7.0"}}}' -e "(require '[medley.core])"

Ingy döt Net20:02:59

$ docker run -it --rm gentoo/stage3 bash
786fba5e0727 / # curl -sSLO 
786fba5e0727 / # curl -sSLO 
786fba5e0727 / # tar xf graalvm-jdk-21_linux-x64_bin.tar.gz
786fba5e0727 / # tar xf babashka-1.3.188-linux-amd64.tar.gz
786fba5e0727 / # export JAVA_HOME=/graalvm-jdk-21.0.2+13.1 PATH=/:/graalvm-jdk-21.0.2+13.1/bin:$PATH
786fba5e0727 / # bb -Sdeps '{:deps {dev.weavejester/medley {:mvn/version "1.7.0"}}}' -e "(require '[medley.core])"
Clojure tools not yet in expected location: /root/.deps.clj/1.11.1.1435/ClojureTools/clojure-tools-1.11.1.1435.jar
Downloading  to /root/.deps.clj/1.11.1.1435/ClojureTools/clojure-tools.zip
Unzipping /root/.deps.clj/1.11.1.1435/ClojureTools/clojure-tools.zip ...
Successfully installed clojure tools!
Downloading: org/clojure/clojure/1.11.1/clojure-1.11.1.pom from central
Downloading: org/clojure/core.specs.alpha/0.2.62/core.specs.alpha-0.2.62.pom from central
Downloading: org/clojure/spec.alpha/0.3.218/spec.alpha-0.3.218.pom from central
Downloading: org/clojure/pom.contrib/1.1.0/pom.contrib-1.1.0.pom from central
Downloading: dev/weavejester/medley/1.7.0/medley-1.7.0.pom from clojars
Downloading: org/clojure/core.specs.alpha/0.2.62/core.specs.alpha-0.2.62.jar from central
Downloading: org/clojure/spec.alpha/0.3.218/spec.alpha-0.3.218.jar from central
Downloading: org/clojure/clojure/1.11.1/clojure-1.11.1.jar from central
Downloading: dev/weavejester/medley/1.7.0/medley-1.7.0.jar from clojars

borkdude21:02:59

thanks, I'll post this as a counter-repro..

👍 1