/cljsbuild-wsl-bug

A bug with cljsbuild

Primary LanguageJavaScriptEclipse Public License 1.0EPL-1.0

hello-world

This is a repository meant to demonstrate a perceived bug with lein-cljsbuild.

It is possible the bug only exists on Windows Subsystem Linux (Or, Bash on Ubuntu on Windows). I assume this because the nature of the absolute filepath follows the file-access syntax of WSL. I should mention that I have lein, java, and node all installed on this subsystem, and have been using these tools when this error occured.

From what I've seen, if an output-dir is not specified in the compiler options for a build, a default one is provided. However, when the cljsbuild is run, in the "mainBroken.js" file, you see that the absolute path to this default directory is provided in the require statements, and then joined to the absolute file path for the local directory generated by Node's "path" library.

This does not occur when building directly with the cljs build api (As shown in the "node.clj" and "mainBasic.js". To run, use "lein run -m clojure.main node.clj")

This also does not occur if the bulid has an output-dir specified directly (as shown in "mainGood.js")

(You can test these with "node ", though you should run "lein cljsbuild once" first. I have included the main.js files so you can see the nature of the problem without having to clone and run the program, but to actually test it you need to build it)

Hopefully this bug is reproducable outside my host machine, and easily fixed.