Fork me on GitHub
#tools-deps
<
2022-01-04
>
hlship20:01:48

Are the rules for mapping project names to GitHub URLs extensible? A lot of our libraries are in an internal GitHub repo, and it would be nice to omit the :git/url tag, as it could maybe be computed from the fully qualified artifact name.

pavlosmelissinos20:01:41

I'm pretty sure it doesn't matter that the repos are private as long as they're on http://GitHub.com or on any other of the supported hosts/domains. :thinking_face: Or are you asking a different question?

kennytilton23:01:24

Hmmm. I am used to project.clj where I can do a lein deps to check and pull down dependencies. Now working from a deps project I am in deps land, where I do npm i and npm start. That does not seem to pull down the jar I referenced in deps.edn: Clojure says it cannot find a certain path: The required namespace "tiltontec.model.core" is not available, it was required by "app/core.cljs". That path is my own project, so I can lein install and all goes well. My build approach just running npm must be daft. This is my deps.edn:

{:paths ["src" "src/demo" "src/mxreact"]
 :deps {lilactown/helix {:mvn/version "0.1.1"}
        binaryage/devtools {:mvn/version "0.9.7"}
        thheller/shadow-cljs {:mvn/version "2.15.1"}
        tiltontec/matrix {:mvn/version "4.1.7-SNAPSHOT"}
        cljs-http/cljs-http {:mvn/version "0.1.46"}}}
Is there a deps counterpart to lein deps?

slimslenderslacks23:01:58

Are you building a clojurescript project here?

seancorfield23:01:24

clojure -P should be all you need.

seancorfield23:01:03

(but make sure you're using a recent enough version of the CLI -- check clojure -version and then check https://clojure.org/releases/tools )

seancorfield23:01:44

Not sure why you're referring to npm here tho' @U0PUGPSFR?

slimslenderslacks23:01:07

If you're using shadow-cljs to start up the process to compile your clojurescript, maybe your sample project is using deps.edn to manage your clojurescript deps. So you might have both a shadow-cljs.edn and a deps.edn in your project?

kennytilton23:01:40

Yep.

;; shadow-cljs configuration
{:deps true
 :builds
 {:app {:target :browser
        :output-dir "js"
        :asset-path "/js"
        :modules {:app {:entries [app.core]}}
        :devtools {:http-root    "."
                   :http-port    8888
                   :reload-strategy :full
                   :preloads     [devtools.preload
                                  demo.dev]}}}}

kennytilton23:01:26

Heh-heh, @U04V70XH6: monkey see, monkey do. I think I started with a Helix ReactNative demo, converted that into a Matrix RN project, and it went so well I am also converting to a Matrix+React (web) project.

👍 1
seancorfield23:01:50

clojure -P = lein deps; clojure -Stree or clojure -X:deps tree = lein deps :tree (I believe)

seancorfield23:01:09

(but, like I say, check you're using an up-to-date version)

kennytilton23:01:37

I just installed CLI fresh because I upgraded to OS X Monterey and when I tried building sth it said "Go to Hell, you need all new everything." That was three hours ago. But I will double check the version. Thx!

kennytilton23:01:49

OK. let me blast Matrix out of .m2 and see how far I get. Delighted btw that the Clojars deploy no longer requires all that GPG stuff. That had me kneecapped for months.

hiredman23:01:56

if you are doing stuff with npm, you aren't doing stuff with tools.deps except via a third party tool, which would be shadow js here

hiredman23:01:39

so your issue is going to be with shadow js, so you should find the shadow js channel and ask there

👍 1
kennytilton23:01:35

Clojure CLI version 1.10.3.1040 Trying clojure -P next. But, yeah, @U0NCTKEV8, I will check with #shadow-cljs to see what I am misisng. 🙏

kennytilton23:01:43

Yer a genius, @U04V70XH6!

$ clojure -P
Downloading: tiltontec/matrix/4.1.7-SNAPSHOT/maven-metadata.xml from clojars
Downloading: tiltontec/matrix/4.1.7-SNAPSHOT/matrix-4.1.7-20220104.224346-2.pom from clojars
Downloading: tiltontec/matrix/4.1.7-SNAPSHOT/matrix-4.1.7-20220104.224346-2.jar from clojars
And after npm start... [:app] Build completed. (177 files, 14 compiled, 0 warnings, 6.88s) Hellasweet. Now let's see how I can tweak my Shadow config to do that. Thx all! 🙏

1
hiredman23:01:38

npm has nothing to do with tools deps and deps.edn