This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2021-09-24
Channels
- # announcements (30)
- # asami (9)
- # babashka (37)
- # beginners (120)
- # calva (26)
- # cider (3)
- # clara (9)
- # clj-commons (7)
- # clj-kondo (17)
- # cljsrn (2)
- # clojure (32)
- # clojure-europe (56)
- # clojure-nl (1)
- # clojure-norway (13)
- # clojure-uk (4)
- # clojurescript (34)
- # conjure (1)
- # copenhagen-clojurians (8)
- # core-async (21)
- # cursive (2)
- # datahike (2)
- # datascript (5)
- # events (4)
- # fulcro (32)
- # graalvm (10)
- # heroku (3)
- # introduce-yourself (1)
- # jobs (2)
- # lsp (3)
- # luminus (1)
- # malli (8)
- # meander (15)
- # minecraft (1)
- # nrepl (2)
- # off-topic (57)
- # pathom (2)
- # polylith (35)
- # reagent (6)
- # reitit (8)
- # releases (1)
- # rewrite-clj (7)
- # shadow-cljs (21)
- # timbre (4)
- # tools-build (1)
- # tools-deps (33)
- # vrac (8)
Pretty cool command line parsing in a few lines if I may say so myself :) https://github.com/clj-easy/graal-config/blob/master/build_shared.clj#L7
nice! at least until somebody messes up or there will be no-argument build flags 🙂
@borkdude, hi!
We have such scenario:
1. Closed environment (without Internet). Only corporate mirrors for Maven Central & Clojars
2. Corporate Jenkins CI agent with ~/.m2 is empty and read only.
3. Using mvn
and pom.xml
we have downloaded all deps to local project folder into .m2 folder
4. In deps.edn we set :mvn/local-repo
to ".m2" value
5. clojure tools deps can use this local repo to run aliases
6. We use bb tasks. One of them requires cprop 0.1.18 which is already downloaded to local project folder into .m2. babashka (0.5.0) can't see ".m2" and trying to download deps from Internet ignoring :mvn/local-repo
in deps.edn
How to tell bb to use local .m2 cache in project folder?
Thank you. In order to update babashka
on all corporate servers I need to pass some bureaucratic procedures, security checks, etc. 😂
Perhaps bb could also support something like -Sdeps
so you can merge in some settings in the bb.edn on CI
@mike1452 Note that you can also do this: write a classpath using bb print-deps --format classpath
in older bb where you cannot use print-deps
you can get the classpath using (babashka.classpath/get-classpath)
Big thank you. I'll try this
There is also babashka.classpath/split-classpath
to split a classpath into multiple segments
@mike1452 something like this:
borkdude@MBP2019 /tmp $ cat bb.edn
{:deps {medley/medley {:mvn/version "1.3.0"}} :paths ["."]}
borkdude@MBP2019 /tmp $ bb -e '(->> (babashka.classpath/get-classpath) (babashka.classpath/split-classpath) (map #(str/replace %(System/getProperty "user.home") ".")) (str/join (System/getProperty "path.separator")))'
".:./.m2/repository/medley/medley/1.3.0/medley-1.3.0.jar"
Yeah, I'll take it right now
The same result - can't see jars.
We run not in docker. It is pure linux.
BABASHKA_CLASSPATH=".m2"
All deps are in a local .m2 including cprop dep.
run bb test
cannot find cprop, which is required for bb.edn
The classpath must look something like: ".:./.m2/repository/medley/medley/1.3.0/medley-1.3.0.jar"
. See the example above.
ok, I'll try to change
Now, it works! thank you.
BABASHKA_CLASSPATH=".:./.m2/cprop/cprop/0.1.18/cprop-0.1.18.jar" was correct answer
@mike1452 In case you didn't understand me yet: the example above generates that classpath automatically