This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2023-10-25
Channels
- # announcements (22)
- # babashka (9)
- # beginners (33)
- # biff (12)
- # calva (17)
- # cider (64)
- # cljdoc (3)
- # cljfx (16)
- # clojure (125)
- # clojure-bay-area (14)
- # clojure-europe (15)
- # clojure-norway (64)
- # clojure-uk (2)
- # clojurescript (7)
- # conjure (1)
- # core-async (4)
- # cursive (6)
- # data-science (14)
- # datahike (8)
- # datomic (6)
- # defnpodcast (4)
- # emacs (5)
- # events (1)
- # hyperfiddle (15)
- # leiningen (17)
- # lsp (8)
- # membrane (27)
- # off-topic (25)
- # podcasts-discuss (4)
- # polylith (6)
- # portal (21)
- # reagent (11)
- # releases (1)
- # shadow-cljs (36)
- # slack-help (2)
- # sql (1)
- # squint (131)
- # testing (12)
- # xtdb (7)
I'm having a hard time setting up dep cache in CI. Unless I can embed some logic in the :local-repo
key to check for an environment variable, I want to control it from the outside. export MAVEN_OPTS=-Dmaven.local.repo
does not seem to be having an effect -- the resulting cache folder is empty at the end
You should also be able to update-in
though if you wanted to go that route.
Something like:
lein update-in : assoc :local-repo "$CUSTOM_LOCAL_REPO" -- <task>
I’d think.There is support for this in the :mvn/local-repo key in the deps edn
And you can pass these dynamically on the command line with -Sdeps
clj -Sdeps ‘{:mvn/local-repo “whatever”}’
Or the do the right quotey thing with an env var there
This is for the Clojure CLI but maybe I misunderstood and you are using lein ?
Oh, we are in leinigen, my bad I probably just confused it all :)
@U0LK1552A you can also use lein change assoc :local-repo "path/to/somewhere"
if you want to persist the changes to the project.clj file in case multiple commands are invoked separately during CI
@U064X3EF3 minor caveat: tools.build will not see that information unless you patch the code that creates a basis. I learned this the hard way when invoking clojure exactly as you described for a project that uses tools.deps
the solution in the end was patching the build.clj file since tools.build does not pick up certain keys from Sdeps
IME
@U0479UCF48H that doesn't seem accurate, but feel free to follow up in #C6QH853H8 or #C02B5GHQWP4 if you have more on that