REPL support for libs compiler opts

Description

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.

Environment

None

Attachments

1

Activity

Show:

Mike Fikes December 23, 2015 at 2:05 AM

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).

David Nolen November 10, 2015 at 2:46 PM

Does this patch still apply to master?

Completed

Details

Assignee

Reporter

Affects versions

Priority

Created June 18, 2015 at 12:35 AM
Updated December 23, 2015 at 3:36 AM
Resolved December 23, 2015 at 3:36 AM