This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2019-06-23
Channels
- # announcements (1)
- # beginners (21)
- # calva (2)
- # cider (26)
- # clj-kondo (5)
- # cljdoc (4)
- # cljsrn (1)
- # clojure (42)
- # clojure-spec (5)
- # clojure-uk (1)
- # clojurescript (45)
- # cursive (5)
- # data-science (1)
- # datomic (5)
- # emacs (6)
- # fulcro (18)
- # hoplon (8)
- # immutant (1)
- # joker (9)
- # nyc (1)
- # off-topic (72)
- # re-frame (3)
- # reitit (1)
- # rewrite-clj (11)
- # shadow-cljs (9)
- # tools-deps (70)
Q: I can’t get :override-deps to work with :local/root deps. e.g. I have a default :git/sha dep and then for local dev I want to override that with a :local/root dep. Has anyone else made this work?
This sounds like it should work, but I’d have to see the relevant parts of the deps.edn
file I think…
my specific problem is that the the :git/sha dep is not reachable in local dev so I’m trying to override it. however, with the override, it still tries to pull the :git/sha dep and that breaks
I agree. it should work. however it appears that with an :override-deps, the overridden dep must still be accessible
I tried from the command line with an alias to provide override-deps and it seems to work…
Yup, deleted my ~/.gitlibs
folder and the :dev
alias that overrides the dep with :local/root
works fine. No attempt is made to clone the git repo.
{:deps {reifyhealth/specmonstah {:mvn/version "2.0.0-alpha-1"}}
:aliases {:local {:override-deps {reifyhealth/specmonstah {:git/url ""
:sha "8e47ffc60d3177cea90f2f657e73c48971d8a1e4"}}}}}
not quite the same as what I described but I think it might show how I am using the CLI opt wrong
hmm, I wonder if my version of tools.deps is too old and this is a fixed bug. I’ll check that now
(! 640)-> clj -Spath | tr ':' '\n' | sort| fgrep specmon
/Users/sean/.m2/repository/reifyhealth/specmonstah/2.0.0-alpha-1/specmonstah-2.0.0-alpha-1.jar
Sat Jun 22 22:50:18
(sean)-(jobs:0)-(~/clojure/steve)
(! 641)-> clj -A:local -Spath | tr ':' '\n' | sort | fgrep specmon
/Users/sean/.gitlibs/libs/reifyhealth/specmonstah/8e47ffc60d3177cea90f2f657e73c48971d8a1e4/src
Sat Jun 22 22:50:24
(sean)-(jobs:0)-(~/clojure/steve)
(! 642)-> cat deps.edn
{:deps {reifyhealth/specmonstah {:mvn/version "2.0.0-alpha-1"}}
:aliases {:local {:override-deps {reifyhealth/specmonstah {:git/url ""
:sha "8e47ffc60d3177cea90f2f657e73c48971d8a1e4"}}}}}
works for me-R:local
behaves the same, I checked.
(! 644)-> clj -Sdescribe
{:version "1.10.1.447"
Yeah, I think this is a bug that was fixed (ages ago).
yeah. I just ran the same commands you pasted in and local does not change the result
Mac or Linux?
Yup, that’s the right command.
Sorry. Mine’s about 150M down and 7.5M up.
mines 94m down which is really good for Aussie. I can’t complain. I suspect the latency hurts despite the good bandwidth
Yah, we have global monitors for our work stuff and the latency from Asia/Australia is pretty bad.
(our main data center is US East Coast and our primary AWS region is also US East Coast)
1.9 is super old. So many changes, fixes, enhancements since then!
(but then I’m the guy who always runs Clojure alpha/beta builds in production! LOL!)
have a good day/night. and thanks again for the videos, I’m gonna go watch the rest of them now
G’nite! It’s 11:15pm here and definitely bedtime.
btw: @seancorfield I just watched your video on deps.edn. really useful. thanks.
Glad it was helpful!
Can you share your deps for the git/url and local/root deps in the alias?
Right now they only work inside an alias @didibus — it’s a known issue/limitation. Sounds like the team may change that at some point…
Does anyone happen to know when you make a text file beginning with #! /usr/bin/env clojure
on a Unix/Linux system, once the JVM begins and the Clojure reader starts reading the file, is the Clojure reader also given that first line to read as well?
Or is there some code somewhere that somehow skips over it, and thus the Clojure reader never sees it?
And if so, do you know where that "skipping" code is?
In LispReader
It skips lines that start with #!
Or rather, those act as single line comments
thx. Someone was asking how this script worked, and I think I knew all of the magic, except that part. Now my magical knowledge is complete! https://gist.github.com/ericnormand/6bb4562c4bc578ef223182e3bb1e72c5
It was certainly a future looking escape in the reader :)
And I have a vague feeling that I have asked this and/or discovered it before, and was also then surprised that it has been around since 2009
Do you think it belongs in the Reading Clojure Characters guide, or better to keep it obscure? 🙂
Well I don’t think it belongs there as it’s not really part of the Clojure language
Really more syntax intentionally ignored by Clojure
Could be on the reader page
I haven't followed the myriad ways people have used deps and clj/clojure, but does the approach on that page: https://gist.github.com/ericnormand/6bb4562c4bc578ef223182e3bb1e72c5 pretty much a good way to go, if you want to embed the JVM and/or clj/clojure options within the same file as the Clojure code? As in, have people found other ways to combine those options together into the same file as the Clojure code, so that those options do not end up in a separate file/script somewhere?
It does restrict you a little bit, in that those first 16 lines must be valid shell syntax, as well as legal Clojure syntax, but yeah, I am pretty sure it is not the first language where someone has found a handful of dual-language lines of code.