Fork me on GitHub

Using deps.edn, when developing an app with some libs locally, what’s the intended way when App -> LibA and LibA -> LibB. Is there a way to do this without tainting App’s deps.edn with App’s dependencies dependencies (where all are local)?


@niclasnilsson :local/root I think?


you can have a profile with local dependencies


I mean an alias


@dominicm Only seems to work in one “layer”, not picking things up recursively


@mpenet, yep, that’s what I’d like to avoid. It’s just boring.


well you can add exclusions and explicit deps to other local deps


but yeah, it requires some work


@niclasnilsson I see, you mean when all 3 are local. Transitive aliases don't work, I don't think there's anyway to configure libraries to load in transitive local mode.


And (I think) even when LibA is local and LibB is on github for instance, App doesn’t seem to pick it up. (Unless I did something wrong)


The local dep issues are quickly becoming a problem for our Cursive users - we spend a lot of time clicking on the error dialogs popping up - we tried adding :manifest :deps but the the use from the command line broke for some reason. I might invest some time digging into it...


@richiardiandrea I think you want :deps/manifest :deps


Ah yep I think with put that sorry 😃 will come up with a repro first then we'll see

Alex Miller (Clojure team)17:09:45

@niclasnilsson don’t forget that you can put aliases in ~/.clojure/deps.edn too and then combine them with stuff in your project. so if you had a bunch of local dep overrides, you could declare them there (without touching your project deps.edn)

👍 4

Something that just occurred to me. Languages like Ruby and Perl that have spent a lot more time optimising their CLIs have relatively succinct (but also somewhat cryptic) APIs for interactic with text. Consider the following examples, first in Ruby and the an approximation using clj:

$ echo 4 | ruby -pne '$_.to_i + 1'
$ echo 4 | clj -e '(inc (Long/parseLong (first (line-seq ( *in*)))))'
I'd argue that $_ is hard to remember and Google, but if you want to apply an operation to each line in some input the Ruby syntax is quite convenient (assuming you can remember it). Are there plans on adding similar switches to the new clj executable to support process *in* with a bit less ceremony?

Alex Miller (Clojure team)23:09:55

just append - at the end


Hi @alexmiller! How would I change echo 4 | clj -e '(inc (Long/parseLong (first (line-seq ( *in*)))))' to make use of -? Sorry for being dumb but it's not immediately obvious to me.


I have used - with other programs before, but not with clj.


       -m, --main ns-name
              Call the -main function from namespace w/args
       -r, --repl
              Run a repl
       path   Run a script from a file or resource located at path
       -      Run a script from standard input


I've found - in the man page for clj.


For context I'm thinking I want to make it easier doing something like curl | jq '.users' | clj -e '...' so I can combine Clojure with other tools I have on the command-line.


I can of course do everything from Clojure, but just wondering if there's thought going into the API for passing in data to a new Clojure process.