REPL shouldn't auto-load user.(cljs|cljc) files in gitlibs


With CLJS-2298, support was added for automatically loading user.cljs or user.cljc files found "in a user's workspace". In particular, the revision involved specifically checking that any candidates found on the classpath were actually files on disk as opposed to files discovered in JARs. (See

If you instead depend (via git deps) on a library that has a user.cljs or user.cljc file, then checking that it is a file is insufficient as a guard. In addition, we should exclude any file found in gitlibs. We could accomplish this by reusing a function like cljs.closure/gitlibs-src?. (See Note that we can't reuse this function directly as is because it is temporarily set to return false. But, some of this capability could be factored into one of the util namespaces and reused from the REPL.




Hyunwoo Nam
November 6, 2018, 6:40 PM

I had no idea how to add tests around this patch.

However I've tested manually that

  • user.cljs from gitlibs is not autoloaded.

  • current workspace's user.cljs is still autoloaded.

Your pinned fields
Click on the next to a field label to start pinning.


Hyunwoo Nam


Mike Fikes