Fork me on GitHub
#tools-deps
<
2020-07-09
>
ejelome11:07:33

... Hello, I have a deps.edn question, I tried to replicate what I use in the terminal as config options with deps.edn, but it seems that the generated .js file logs some errors, Here's the CLI:

clj -m cljs.main -o public/js/main.js -O advanced -c hello-world.core 
Here's what I expected as equivalent deps.edn version:
{:deps {org.clojure/clojurescript {:mvn/version "1.10.764"}
        reagent {:mvn/version "1.0.0-alpha2"}}
 :main "hello-world.core"
 :optimizations :advanced
 :output-dir "public/js/out"
 :output-to "public/js/main.js"}
Then I run it with:
clj -m cljs.main -co deps.edn
The generated .js file from CLI works fine, but the generated version from deps.edn options gives an error:
main.js:314 Uncaught TypeError: Cannot read property 'mg' of undefined
    at Mb (main.js:314)
    at Tn (main.js:699)
    at Rn (main.js:698)
    at Nn.h.Me (main.js:718)
    at Function.Wn.A (main.js:710)
    at Nn.h.Le (main.js:718)
    at Function.Wn.j (main.js:710)
    at ep (main.js:761)
    at main.js:761
... and it doesn't seem to exit from the terminal (the terminal becomes unusable)

euccastro11:07:34

you may want to try asking in #clojurescript?

ejelome11:07:29

hey, thanks, that's probably the right place

Wesley Matson19:07:37

Are there any default aliases or good ways to get some extra resource paths added to the classpath for all local repls started with the clojure command? (some key in ~/.clojure/deps.edn perhaps?) I’d prefer not to need to add a -A flag to all invocations across the several IDEs I use

Alex Miller (Clojure team)19:07:31

if you mean an alias that is automatically supplied, no

Alex Miller (Clojure team)19:07:57

:paths in ~/.clojure/deps.edn will be used everywhere

Wesley Matson19:07:23

I thought :paths got merged across the candidate deps.edns with a “last one wins” strategy

Wesley Matson19:07:09

Does :extra-paths only exist for aliases? My use case is that I’ve got a local directory for various properties files that’s global to all projects (shared DB/service locations, and whatnot for local development, shared across several languages).

Wesley Matson19:07:15

Okay, thanks for your responsiveness and time 🙂

souenzzo22:07:57

@alexmiller I see that :git/url "file:///foo" isn't supported by gitlibs I already find that it's a issue with clojure.tools.gitlibs.impl/clean-url A PR/Patch is welcome about this problem?

Alex Miller (Clojure team)22:07:36

I'm unclear why this is better than using :local/root

Alex Miller (Clojure team)22:07:26

git deps let you get the dep from a remote git repo. if you already have it locally, just use it?

Alex Miller (Clojure team)22:07:42

I guess a git dep would let you use multiple shas

Alex Miller (Clojure team)22:07:49

can you walk back and say how you're using it?

Alex Miller (Clojure team)22:07:13

stepping away for evening but will check later

souenzzo22:07:01

Let's go: I'm trying to deploy my application with clojure -Sdeps "{:deps {my/app {:git/url \"...\" :sha \"...\"}}}" -m my.app.start But I'm on AWS/CodeCommit CodeCommit on ephemeral EC2 recommends use https with credential provider jgit do not support credential provider so I'm trying to use git-cli to clone, then use local file I can run directly but I want to keep my SHA control in the "start command line"

souenzzo23:07:57

TL; DR: How to use git deps with CodeCommit?

jeroenvandijk11:07:42

@U2J4FRT2T You have to put some magic in your .gitconfig . Something like:

[credential ""]
  helper = !aws --profile dev1 codecommit credential-helper $@
  useHttpPath = true
And maybe enfore https (not sure, don’t remember):
[url ""]
  insteadOf = [email protected]:

jeroenvandijk11:07:49

If I remember correctly this did work with tools.deps