boot-clj / boot-cljs

Boot task to compile ClojureScript programs.
Eclipse Public License 1.0
176 stars 40 forks source link

boot-cljs does not work with build.boot #123

Closed jukworks closed 8 years ago

jukworks commented 8 years ago

I made a build.boot as following: (from this tutorial)

(set-env!
  :source-paths #{"src/cljs"}
  :resource-paths #{"html"}
  :dependencies '[[adzerk/boot-cljs "1.7.228-1"]])

(require '[adzerk/boot-cljs :refer [cljs]])

When I run boot -h, I got an error message:

$ boot -h clojure.lang.ExceptionInfo: Could not locate boot_cljsinit.class or boot_cljs.clj on classpath. Please check that namespaces with dashes use underscores in the Clojure file name. data: {:file "C:\Users\kju\AppData\Local\Temp\boot.user2089387444844651866.clj", :line 7} java.io.FileNotFoundException: Could not locate boot_cljsinit.class or boot_cljs.clj on classpath. Please check that namespaces with dashes use underscores in the Clojure file name. ...

I could not find any clue so far.

When I run boot with command line parameters, it works.

$ boot -B -d adzerk/boot-cljs -s src/cljs -r html cljs target -d target Writing main.cljs.edn... Compiling ClojureScript... ? main.js Writing target dir(s)...

My boot configuration is: (OS: Windows 10)

$ boot -V BOOT_CLOJURE_NAME=org.clojure/clojure BOOT_CLOJURE_VERSION=1.8.0 BOOT_VERSION=2.5.5

and, I tried boot 2.6.0-SNAPSHOT, but got the same result.

Deraen commented 8 years ago

Notice dot instead of slash: (require '[adzerk.boot-cljs :refer [cljs]])

jukworks commented 8 years ago

Single typo ate up my 4 hours. Thank you, @Deraen

p-b-west commented 8 years ago

I get the same problem with this build.boot: `(set-env! :source-paths #{"src/cljs"} :resource-paths #{"html"}

:dependencies '[[adzerk/boot-cljs "1.7.228-1"]]

(require '[adzerk.boot-cljs :refer [cljs]]))`

I get the problem whether or not my ~/.boot/boot.properties contains this line BOOT_EMIT_TARGET=no

As with the OP, using a full command line solves the problem.

Deraen commented 8 years ago

@numinasthmatic In the snippet you have the end parenthesis of set-env! in wrong place, after the require. If you have this same in the file, I would think it would give different error than the one in this issue, but I could be mistaken.

p-b-west commented 8 years ago

Yes, thank you. A glaring typo, once you see it.

On 15 Jun 2016, at 10:16 PM, Juho Teperi notifications@github.com wrote:

@numinasthmatic In the snippet you have the env parenthesis of set-env! in wrong place, after the require. If you have this same in the file, I would think it would give different error than the one in this issue, but I could be mistaken.

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub, or mute the thread.