Today, module processing and the lib dependency index setup occurs only when cljs.closure/build is invoked. This ticket asks for the same setup to occur if either :libs or :foreign-libs options are passed when a REPL is launched (without an explicit build step occurring first, as is done in the Quick Start examples involving cljs.repl/repl).
An example:
The above would be sufficient to cause, for example, CommonJS module processing to occur, and the results to be available within the REPL.
Additionally, the implementation should defer processing to after REPL -setup has been called, in case the REPL establishes an :output-dir for :merge-opts during -setup, thereby ensuring that any module processing output goes to the correct :output-dir.
Yes, David. I applied the patch to master and tested it with the slight revision that Maria suggested to the greetings.js in CLJS-1314 and it worked perfectly in the Node REPL, the Nashorn REPL, and also in the Ambly REPL (thus addressing the possibility that REPLs might use :output-dir. It also still passes unit tests.
David Nolen December 22, 2015 at 11:04 PM
Is this patch up-to-date?
Mike Fikes November 14, 2015 at 4:14 PM
I took a look and there might be a regression that we need to sort first (see CLJS-1314).
Today, module processing and the lib dependency index setup occurs only when
cljs.closure/build
is invoked. This ticket asks for the same setup to occur if either:libs
or:foreign-libs
options are passed when a REPL is launched (without an explicit build step occurring first, as is done in the Quick Start examples involvingcljs.repl/repl
).An example:
The above would be sufficient to cause, for example, CommonJS module processing to occur, and the results to be available within the REPL.
Additionally, the implementation should defer processing to after REPL
-setup
has been called, in case the REPL establishes an:output-dir
for:merge-opts
during-setup
, thereby ensuring that any module processing output goes to the correct:output-dir
.