This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2021-08-26
Channels
- # adventofcode (2)
- # announcements (7)
- # babashka (20)
- # beginners (77)
- # brompton (6)
- # calva (4)
- # clj-kondo (28)
- # clj-together (1)
- # cljdoc (2)
- # cljfx (10)
- # cljsrn (1)
- # clojure (77)
- # clojure-europe (33)
- # clojure-gamedev (12)
- # clojure-uk (11)
- # clojurescript (95)
- # clojureverse-ops (4)
- # core-async (4)
- # core-logic (1)
- # cryogen (2)
- # cursive (14)
- # data-science (3)
- # datomic (47)
- # duct (1)
- # emacs (7)
- # fulcro (51)
- # gratitude (8)
- # helix (14)
- # hoplon (4)
- # improve-getting-started (60)
- # jobs (1)
- # jobs-discuss (4)
- # joker (11)
- # lsp (99)
- # meander (62)
- # membrane (5)
- # news-and-articles (3)
- # off-topic (64)
- # pathom (3)
- # polylith (11)
- # practicalli (7)
- # react (1)
- # reagent (8)
- # reveal (15)
- # shadow-cljs (78)
- # specter (7)
- # sql (16)
- # tools-build (1)
- # tools-deps (29)
- # workspaces (1)
- # xtdb (17)
We have this problem where tools.deps is using its cache for :local/root dependencies, but the cache is out of date. This happens sometimes when switching git branch for example Deleting .cpcache fixes the problem is there a way we can disable caching of local/root deps, or disable it altogether? (aside from deleting the cache file every time ofc). thanks
@henryw374 -Sforce
hi, I'm trying to know what is the clojure way (deps.edn ?!) of publishing some files (json. data files) to a private maven repository and download that file so we can build a docker image from multiple dependencies. In gradle fpr example I can set tasks to download a set of dependencies to a specific directory and then process them for use in a zip distribution.
tools-deps downloads artifacts (jars) from maven repos and assembles them into a classpath and launches clojure with that classpath
maven repos are for storing artifacts (jars, maybe some metadata about jars) not for storing random json
if it isn't random json, but some data some code needs access to, that often lives in resources/ in your project, and gets bundled into your jar along with your code and published to wherever, so you don't need to download it separately, it is baked in
it's data - queries for a load test - that we generate via an app from the db. We update them once per quarter and I use them in a locust test (I build a docker image). They are too big IMO (15MB) to be stored in git so IMO the best place to put them is in a binary repo - we have a private instance. I don't want to put them in S3 because I will need to give people access there as well and it complicates things.
I'm looking to use tools.build to package them as a zip and probably call maven to upload them to the repo
I did find an issue while following the guide at https://clojure.org/guides/tools_build .
{:paths ["src"]
:deps {org.clojure/clojure {:mvn/version "1.10.3"}
org.clojure/core.async {:mvn/version "1.3.618"}
com.stuartsierra/component {:mvn/version "1.0.0"}
;; io.github.clojure/tools.build {:git/tag "v0.1.9" :git/sha "6736c83"}
}
:aliases
{:build {:deps {io.github.clojure/tools.build {:git/tag "v0.1.9" :git/sha "6736c83"}}
:ns-default ro.ieugen.training.tools-build-guide}}}
ieugen@daos-495:~/.../clojure/clojure-training$ clj -T:build clean
Execution error (FileNotFoundException) at clojure.run.exec/requiring-resolve' (exec.clj:35).
Could not locate ro/ieugen/training/tools_build_guide__init.class, ro/ieugen/training/tools_build_guide.clj or ro/ieugen/training/tools_build_guide.cljc on classpath. Please check that namespaces with dashes use underscores in the Clojure file name.
Full report at:
/tmp/clojure-4875866060227779231.edn
and
ls -la src/ro/ieugen/training/tools_build_guide.clj
-rw-r--r-- 1 ieugen ieugen 1299 Aug 26 22:05 src/ro/ieugen/training/tools_build_guide.clj
ieugen@daos-495:~/.../clojure/clojure-training$ clojure --version
Clojure CLI version 1.10.3.943
if it's usefull, I pushed the code that fails for me https://github.com/ieugen/clojure-training/
-T will remove your project :paths and :deps, so you'll want to add either :paths ["src"]
or :extra-paths ["src"]
in your :build alias
(doesn't really matter which)
thanks, that's missing in the guide online - so most people following the guide will probably fail like me
often people put their build script in a different src dir (the project root is automatically included)
sure is, thanks!
oh, that's because I'm assuming it's in the root of the project, which is added by -T
but this is worth explaining for sure
you have your build script under src/yada/yada
but if you put your tools_build_guide.clj next to the deps.edn, you could do that instead
I logged this as https://github.com/clojure/clojure-site/issues/550 so I can improve the next time I do doc work
you're right - it needs explanation! :)
you can, but I'm likely to edit it :)