Fork me on GitHub
#tools-deps
<
2018-07-29
>
gfredericks14:07:29

Welp, I did it. Nobody told me not to. https://github.com/gfredericks/user.clj

dominicm15:07:56

Are they merged? Or something else?

gfredericks15:07:23

well right now it only supports a single file, so that's not an issue

gfredericks15:07:01

if I can think of a performant way of searching the classpath for other files, then (once defined what's in scope (`user.autoload.*`?)) I'd probably just load them in alphabetical order

gfredericks15:07:53

I don't think merely saying "all user.clj files will be loaded!" is possible because AFAIK clojure just loads an arbitrary one, so there's no guarantee it would be mine

gfredericks15:07:05

so the whole approach assumes that the rest of your user files are named something different

gfredericks15:07:34

(note that ~/.clojure/user.clj would not, in general, be on the classpath)

dominicm15:07:10

What does the library do then? I'm a bit confused!

dominicm15:07:33

I thought this was a new version of ./util

gfredericks15:07:35

oh no, not at all

gfredericks15:07:49

> The immediate problem it's meant to solve is that the user-level deps.edn file can't reference $HOME-relative paths as a way of providing your own user.clj directly.

dominicm16:07:58

I see... So this is an alternative to having an alias in your own ~/.clojure/deps.edn pointing at a dir?

gfredericks16:07:01

yes, especially because doing it that way means you need an absolute path

gfredericks16:07:28

so there seems to be no way to make it relative to $HOME