Welcome! Please see the About page for a little more info on how this works.

0 votes
in ClojureScript by

Hi,

it appears as if there is a regression since cljs 1.10.748+ that when a node compilation is requested without explicitly specifying the outdir, a .cljs_node_repl directory is created as the output dir instead of out.

The default out compilation directory is not mentioned in cljs.main -h help, but it appears to be out by default, and this is backed by statement at the end of https://clojurescript.org/reference/repl-and-main :

Compiling Source

To compile ClojureScript source code, pass the main namespace to
cljs.main via the -c option:

java -cp src:cljs.jar cljs.main -c my-namespace.core

The output will be written to the directory specified via the -d
option (or out if unspecified), or to the file specified via the -o
option.

To reproduce
1. download both clojurescript 1.10.742 and clojuresript 1.10.748 jars, https://github.com/clojure/clojurescript/releases
2. create the getting started hello world program from https://clojurescript.org/guides/quick-start
3. execute java -cp "src;cljs-1.10.748.jar" cljs.main -t node -c hello-world.core, observe that a .cljs_node_repl directory has been created instead of the excpected out dir.

If one runs the same with and earlier version, e.g. java -cp "src;cljs-1.10.742.jar" cljs.main -t node -c hello-world.core they can observe that an out dir is created as expected.

This looks like a regression to me.

Workaround is to explicitly specify the directory, .e.g. java -cp "src;cljs-1.11.60.jar" cljs.main -t node -d out -c hello-world.core

Thanks

1 Answer

0 votes
by

That is interesting, I think there were some patches around the options and maybe this slipped by. I opened a minor issue here https://clojure.atlassian.net/browse/CLJS-3390

...