Shared AOT cache: Support git deps
Description
Environment
Attachments
Activity
David Nolen May 18, 2018 at 9:41 PM
Mike Fikes May 18, 2018 at 9:36 PM
CLJS-2651-4.patch rebaselines.
Mike Fikes March 20, 2018 at 12:24 PM
CLJS-2651-3.patch rebaselines
Mike Fikes March 16, 2018 at 1:33 PM
CLJS-2651-2.patch rebaselines
Mike Fikes March 12, 2018 at 4:04 PM
The attached patch factors out some of the JAR-based caching logic for reuse.
It copies about 7 lines of code from clojure.tools.gitlibs
instead of taking on a dep, for the purposes of identifying the users .gitlibs
directory.
Otherwise the patch is fairly straightworward: If the file being compiled is a gitlibs file, it will put the compiled output in the cache if not already there, and likewise if not in the output directory, it will copy from the cache.
I tested the patch manually using core.async
:
deps.edn
Then (require 'clojure.core.async)
.
Note that files are compiled from the git dep location to the shared AOT cache and then copied to the out dir
Stop and restart REPL.
Then (require 'clojure.core.async)
This will exhibit normal quick startup owing to out
being populated.
Stop REPL.
Now remove the out
dir.
Start REPL:
Then (require 'clojure.core.async)
.
Note that cached files will now be copied as expected
Additionally, if you then revise deps.edn
to depend on the core.async
shipping JAR, stop REPL and restart and require core async, things will be recompiled in out as needed. The same thing will happen when you switch back to the git dep.
Details
Details
Assignee
Reporter
Approval
Patch
Priority

The shared AOT cache is built on the notion that code in shipping JARs is immutable and therefore compilation artifacts produced from them can be cached and shared. The same is true for code obtained as a git dep.
This ticket asks that the shared AOT cache mechanism be extended to also cache compilation artifacts produced from git deps.