This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2021-09-29
Channels
- # aws (8)
- # babashka (45)
- # beginners (83)
- # cider (23)
- # clj-on-windows (4)
- # cljdoc (23)
- # clojars (6)
- # clojure (68)
- # clojure-dev (33)
- # clojure-europe (75)
- # clojure-nl (1)
- # clojure-uk (4)
- # clojurescript (14)
- # conjure (6)
- # data-science (15)
- # datascript (7)
- # datomic (47)
- # docker (15)
- # events (1)
- # fulcro (4)
- # graphql (3)
- # jobs (4)
- # lsp (14)
- # nginx (2)
- # nrepl (2)
- # off-topic (41)
- # pathom (18)
- # pedestal (1)
- # polylith (72)
- # reitit (8)
- # reveal (1)
- # shadow-cljs (48)
- # tools-build (11)
- # tools-deps (24)
- # xtdb (8)
I am trying (once again) to see if I can use deps to manage the dependencies for Cursive, which is tricky because it’s a mixed-language project. I’m almost there, with some fiddling, some babashka scripting, and some hackery. I have one thing blocking me now - creating a dependency between two deps projects in a way that sort-of mimics what Maven would do. The dependency is on a Java-only project, so I need to create a dependency on the compiled class files in some way for compiling the dependent module. Has anyone done anything like this?
It would, but it’s not ideal since I’d have to ensure that the dep was built and compiled into a jar in order to be able to build the dependent project. I’m trying to figure out a way that will also work with IntelliJ’s compile process, and that’s tricky.
No worries. If you’re more familiar with Maven, it would be the equivalent of requiring a sub-project to be published into the local Maven repo in order to compile anything using it, which isn’t impossible but is annoying.
We are using babashka tasks over at graal-build-time as a kind of make. I don't know if that type of thing would hook in at all for you though. There was a time when I was familiar with Maven, but those memories have faded...
Yes, I’m already using babashka tasks to generate and update all the deps.edn files I’m using. It works great for setting the project up, but I just can’t get this last bit to work.
@cfleming there is prep lib now for on the fly compilation, would that help? Exact details should be in the reference (on the phone)
In the end I realised that what I needed was an IntelliJ-specific thing, likely only useful to me. So I added support for that, Cursive will now treat dependencies that look like:
cursive/jps-plugin:module {:local/root "jps-plugin"}
(local root with :module
suffix on the key) as special, and I just hide those deps in an alias so that only Cursive sees it.I’ll document it in case anyone else wants to use deps for managing non-Clojure projects with Cursive, though.
RE: help/doc
If I have a :build
alias in my deps.edn
and it has a proper ns doc string should I be able to run clojure -A:deps -T:build help/doc
or is this currently strictly only for non-project tools?
should be able to
Interesting. When I run clojure -A:deps -T:build help/doc
(clj version: 1.10.3.986) I get:
Namespace could not be loaded: help
@tkjone Is it possible you have your own :deps
alias, shadowing the root version?
Doesn’t look like. I actually pulled down next-jdbc
github repo and tried running the same command for that lib and I get the same result. I am assuming it works for you though?
Works for me:
(! 620)-> clojure -A:deps -T:build help/doc
Checking out: at 2ceb95afd9c60072a7a0646a4bb4d53615c6770b
next.jdbc's build script.
clojure -T:build ci
clojure -T:build deploy
Run tests via:
clojure -X:test
For more information, run:
clojure -A:deps -T:build help/doc
-------------------------
build/ci
([opts])
Run the CI pipeline of tests (and build the JAR).
-------------------------
build/deploy
([opts])
Deploy the JAR to Clojars.
-------------------------
build/test
([opts])
Run all the tests.
Are you sure you don't have a :deps
alias in your ~/.clojure/deps.edn
file?
lol I 100% do https://github.com/athomasoriginal/dotfiles/blob/master/.clojure/deps.edn#L27. Totally was not thinking about the global one
and that was indeed the problem
Thanks, Sean!!
My dot-clojure used to have a :deps
alias too, but I renamed it to :add-libs
https://github.com/seancorfield/dot-clojure/blob/develop/deps.edn#L96