Fork me on GitHub
#tools-deps
<
2019-01-06
>
duncanmak06:01:25

where’s the source code to the clj tool?

lilactown06:01:21

not sure if it’s the source of truth, but I found the code here: https://github.com/clojure/brew-install/tree/1.10.0/src/main/resources

lilactown06:01:31

clj calls clojure with rlwrap

pesterhazy09:01:11

wrapper scripts in the brew-install repo (not only for macOS but also Linux0

alexmiller11:01:07

Those are the correct places

duncanmak18:01:39

i’ve been clicking around, trying to understand how clj and tools.deps work

duncanmak18:01:18

afaict, it’s all java code, so my question is, where / when does it change the classpath? does it start the jvm twice? once to calculate the right classpath, and once to actually run the instance?

duncanmak18:01:44

and also, i’ve been looking for the code of the procurers

alexmiller18:01:16

Yes, it runs the jvm twice - once to compute the classpath then again to launch your program

alexmiller18:01:33

Caching is used to avoid the first step when possible

alexmiller18:01:28

The procurer code is all under tools.deps.alpha.extensions

duncanmak23:01:02

@alexmiller ahh, okay, so it’s not as magical as I thought, great!

duncanmak23:01:15

@alexmiller where can i see it running twice, is that in the shell script wrapper?