Closed conan closed 8 years ago
Same results running from cmd. Confirmed it works on OSX.
here's the full stack trace in case it helps (apologies for the long post):
$ lein doo phantom test
Retrieving lein-cljsbuild/lein-cljsbuild/1.0.5/lein-cljsbuild-1.0.5.pom from clojars
Retrieving com/google/javascript/closure-compiler-externs/v20150505/closure-compiler-externs-v20150505.jar from central
Retrieving org/clojure/clojurescript/0.0-3308/clojurescript-0.0-3308.jar from central
Retrieving org/clojure/google-closure-library-third-party/0.0-20150505-021ed5b3/google-closure-library-third-party-0.0-20150505-021ed5b3.jar from central
Retrieving com/google/javascript/closure-compiler/v20150505/closure-compiler-v20150505.jar from central
Retrieving org/clojure/google-closure-library/0.0-20150505-021ed5b3/google-closure-library-0.0-20150505-021ed5b3.jar from central
Retrieving org/clojure/tools.reader/0.9.2/tools.reader-0.9.2.jar from central
Retrieving lein-cljsbuild/lein-cljsbuild/1.0.5/lein-cljsbuild-1.0.5.jar from clojars
Building ...
Analyzing jar:file:/C:/Users/Conan/.m2/repository/org/clojure/clojurescript/1.7.145/clojurescript-1.7.145.jar!/cljs/core.cljs
Analyzing jar:file:/C:/Users/Conan/.m2/repository/doo/doo/0.1.6-SNAPSHOT/doo-0.1.6-SNAPSHOT.jar!/doo/runner.cljs
Analyzing jar:file:/C:/Users/Conan/.m2/repository/org/clojure/clojurescript/1.7.145/clojurescript-1.7.145.jar!/cljs/test.cljs
Analyzing jar:file:/C:/Users/Conan/.m2/repository/org/clojure/clojurescript/1.7.145/clojurescript-1.7.145.jar!/cljs/pprint.cljs
Analyzing jar:file:/C:/Users/Conan/.m2/repository/org/clojure/clojurescript/1.7.145/clojurescript-1.7.145.jar!/clojure/string.cljs
Analyzing jar:file:/C:/Users/Conan/.m2/repository/karma-reporter/karma-reporter/0.1.0/karma-reporter-0.1.0.jar!/jx/reporter/karma.cljs
Analyzing file:/C:/Users/Conan/dev/doo/example/test/example/core_test.cljs
Analyzing file:/C:/Users/Conan/dev/doo/example/src/example/core.cljs
Analyzing jar:file:/C:/Users/Conan/.m2/repository/org/clojure/core.async/0.1.346.0-17112a-alpha/core.async-0.1.346.0-17112a-alpha.jar!/cljs/core/async.cljs
Analyzing jar:file:/C:/Users/Conan/.m2/repository/org/clojure/core.async/0.1.346.0-17112a-alpha/core.async-0.1.346.0-17112a-alpha.jar!/cljs/core/async/impl/channels.cljs
Analyzing jar:file:/C:/Users/Conan/.m2/repository/org/clojure/core.async/0.1.346.0-17112a-alpha/core.async-0.1.346.0-17112a-alpha.jar!/cljs/core/async/impl/dispatch.cljs
Analyzing jar:file:/C:/Users/Conan/.m2/repository/org/clojure/core.async/0.1.346.0-17112a-alpha/core.async-0.1.346.0-17112a-alpha.jar!/cljs/core/async/impl/buffers.cljs
Analyzing jar:file:/C:/Users/Conan/.m2/repository/org/clojure/core.async/0.1.346.0-17112a-alpha/core.async-0.1.346.0-17112a-alpha.jar!/cljs/core/async/impl/protocols.cljs
Analyzing jar:file:/C:/Users/Conan/.m2/repository/org/clojure/core.async/0.1.346.0-17112a-alpha/core.async-0.1.346.0-17112a-alpha.jar!/cljs/core/async/impl/ioc_helpers.cljs
Analyzing jar:file:/C:/Users/Conan/.m2/repository/org/clojure/core.async/0.1.346.0-17112a-alpha/core.async-0.1.346.0-17112a-alpha.jar!/cljs/core/async/impl/timers.cljs
Compiling out\cljs\test.cljs
Compiling out\clojure\string.cljs
Compiling out\cljs\pprint.cljs
Compiling C:\Users\Conan\dev\doo\example\test\example\core_test.cljs
Compiling out\cljs\core\async.cljs
Compiling out\cljs\core\async\impl\timers.cljs
Compiling out\cljs\core\async\impl\ioc_helpers.cljs
Compiling out\cljs\core\async\impl\protocols.cljs
Compiling out\cljs\core\async\impl\buffers.cljs
Compiling out\cljs\core\async\impl\dispatch.cljs
Compiling out\cljs\core\async\impl\channels.cljs
Compiling C:\Users\Conan\dev\doo\example\src\example\core.cljs
Compiling out\doo\runner.cljs
Compiling out\jx\reporter\karma.cljs
Compiling out\cljs\core.cljs
Applying optimizations :simple to 31 sources
... done. Elapsed 53.915774758 seconds
;; ======================================================================
;; Testing with Phantom:
ERROR: doo was not loaded from the compiled script.
Make sure you start your tests using doo-tests or doo-all-tests
and that you include that file in your build
Watching paths: C:\Users\Conan\dev\doo\example\src, C:\Users\Conan\dev\doo\example\test
Thanks @conan for the report.
As @danielcompton has noticed in #57, doo
is not Windows compatible. I'll let you know as soon as I merge his PR so you can try it.
Ah, I missed that, sorry. Still, what a lovely surprise to find an existing issue for my problem with an existing PR!
Hi @conan
I just merged @danielcompton's PR #57 for Windows support. Would you mind trying it before I deploy it to Clojars?
Sorry, flat-out today, will do asap
Sorry, I still experience the same error:
$ lein doo phantom test
Building ...
Analyzing jar:file:/C:/Users/Conan/.m2/repository/org/clojure/clojurescript/1.7.145/clojurescript-1.7.145.jar!/cljs/core.cljs
Analyzing jar:file:/C:/Users/Conan/.m2/repository/doo/doo/0.1.6-SNAPSHOT/doo-0.1.6-SNAPSHOT.jar!/doo/runner.cljs
Analyzing jar:file:/C:/Users/Conan/.m2/repository/org/clojure/clojurescript/1.7.145/clojurescript-1.7.145.jar!/cljs/test.cljs
Analyzing jar:file:/C:/Users/Conan/.m2/repository/org/clojure/clojurescript/1.7.145/clojurescript-1.7.145.jar!/cljs/pprint.cljs
Analyzing jar:file:/C:/Users/Conan/.m2/repository/org/clojure/clojurescript/1.7.145/clojurescript-1.7.145.jar!/clojure/string.cljs
Analyzing jar:file:/C:/Users/Conan/.m2/repository/karma-reporter/karma-reporter/0.1.0/karma-reporter-0.1.0.jar!/jx/reporter/karma.cljs
Analyzing file:/C:/Users/Conan/dev/doo/example/test/example/core_test.cljs
Analyzing file:/C:/Users/Conan/dev/doo/example/src/example/core.cljs
Analyzing jar:file:/C:/Users/Conan/.m2/repository/org/clojure/core.async/0.1.346.0-17112a-alpha/core.async-0.1.346.0-17112a-alpha.jar!/cljs/core/async.cljs
Analyzing jar:file:/C:/Users/Conan/.m2/repository/org/clojure/core.async/0.1.346.0-17112a-alpha/core.async-0.1.346.0-17112a-alpha.jar!/cljs/core/async/impl/channels.cljs
Analyzing jar:file:/C:/Users/Conan/.m2/repository/org/clojure/core.async/0.1.346.0-17112a-alpha/core.async-0.1.346.0-17112a-alpha.jar!/cljs/core/async/impl/dispatch.cljs
Analyzing jar:file:/C:/Users/Conan/.m2/repository/org/clojure/core.async/0.1.346.0-17112a-alpha/core.async-0.1.346.0-17112a-alpha.jar!/cljs/core/async/impl/buffers.cljs
Analyzing jar:file:/C:/Users/Conan/.m2/repository/org/clojure/core.async/0.1.346.0-17112a-alpha/core.async-0.1.346.0-17112a-alpha.jar!/cljs/core/async/impl/protocols.cljs
Analyzing jar:file:/C:/Users/Conan/.m2/repository/org/clojure/core.async/0.1.346.0-17112a-alpha/core.async-0.1.346.0-17112a-alpha.jar!/cljs/core/async/impl/ioc_helpers.cljs
Analyzing jar:file:/C:/Users/Conan/.m2/repository/org/clojure/core.async/0.1.346.0-17112a-alpha/core.async-0.1.346.0-17112a-alpha.jar!/cljs/core/async/impl/timers.cljs
Compiling C:\Users\Conan\dev\doo\example\test\example\core_test.cljs
Applying optimizations :simple to 31 sources
... done. Elapsed 35.88546153 seconds
;; ======================================================================
;; Testing with Phantom:
ERROR: doo was not loaded from the compiled script.
Make sure you start your tests using doo-tests or doo-all-tests
and that you include that file in your build
Watching paths: C:\Users\Conan\dev\doo\example\src, C:\Users\Conan\dev\doo\example\test
Thanks @conan.
Hey @danielcompton, does this work for you in Windows?
git clone git@github.com:bensu/doo
cd doo/example
lein doo phantom test
From the changes in ce83037d64a1211333d49573bc7396a99400a5be it seems like it should work.
Hey I get the same errors. My change was only about executing commands in a Windows environment, so it wouldn't necessarily address a particular runner working on Windows. It looks like Phantom is being successfully launched but it can't load the right JS files. I don't use Phantom, but my suspicion would be that you need to set an :asset-path
to load the libraries.
The next debugging steps would probably be to see which paths are trying to be loaded and if there is JS hosted at those places by the Phantom runner.
I doubt it is related to :asset-path
since it is using :optimizations :simple
. I'll add a verbose option so that we can try this again while seeing what is going on.
Hey @conan I just added a :debug
option to doo.core/run-script
that will print important internal events to the console. Do you mind trying it on the error?
After checking out and installing doo's latest version from master, add this to example/project.clj
:
:doo {:build "test"
:debug true ;; <- Add this
;; other config
}
:cljsbuild { ... }
and then run your error case, lein doo phantom test
.
not sure that changes anything:
Conan@admin MINGW64 ~/dev/doo (master)
$ git pull
Already up-to-date.
Conan@admin MINGW64 ~/dev/doo (master)
$ cd example/
Conan@admin MINGW64 ~/dev/doo/example (master)
$ head -20 project.clj
(defproject lein-doo-example "0.1.6-rc.1"
:description "Project to test lein-doo. Do not take it as an example"
:url "https://github.com/bensu/doo"
:license {:name "Eclipse Public License"
:url "http://www.eclipse.org/legal/epl-v10.html"}
:dependencies [[org.clojure/clojure "1.7.0"]
[org.clojure/clojurescript "1.7.145"]
[org.clojure/core.async "0.1.346.0-17112a-alpha"]]
:plugins [[lein-cljsbuild "1.0.5"]
[lein-doo "0.1.6-rc.1"]]
:source-paths ["src" "test" "failing-tests"]
:clean-targets ^{:protect false} [:target-path "resources/public/js/" "out"]
:doo {:build "test"
:debug true
:paths {:slimer "./node_modules/.bin/slimerjs"}
Conan@admin MINGW64 ~/dev/doo/example (master)
$ lein doo phantom test
Building ...
Analyzing jar:file:/C:/Users/Conan/.m2/repository/org/clojure/clojurescript/1.7.145/clojurescript-1.7.145.jar!/cljs/core.cljs
Analyzing jar:file:/C:/Users/Conan/.m2/repository/doo/doo/0.1.6-rc.1/doo-0.1.6-rc.1.jar!/doo/runner.cljs
Analyzing jar:file:/C:/Users/Conan/.m2/repository/org/clojure/clojurescript/1.7.145/clojurescript-1.7.145.jar!/cljs/test.cljs
Analyzing jar:file:/C:/Users/Conan/.m2/repository/org/clojure/clojurescript/1.7.145/clojurescript-1.7.145.jar!/cljs/pprint.cljs
Analyzing jar:file:/C:/Users/Conan/.m2/repository/org/clojure/clojurescript/1.7.145/clojurescript-1.7.145.jar!/clojure/string.cljs
Analyzing jar:file:/C:/Users/Conan/.m2/repository/karma-reporter/karma-reporter/0.1.0/karma-reporter-0.1.0.jar!/jx/reporter/karma.cljs
Analyzing file:/C:/Users/Conan/dev/doo/example/test/example/core_test.cljs
Analyzing file:/C:/Users/Conan/dev/doo/example/src/example/core.cljs
Analyzing jar:file:/C:/Users/Conan/.m2/repository/org/clojure/core.async/0.1.346.0-17112a-alpha/core.async-0.1.346.0-17112a-alpha.jar!/cljs/core/async.cljs
Analyzing jar:file:/C:/Users/Conan/.m2/repository/org/clojure/core.async/0.1.346.0-17112a-alpha/core.async-0.1.346.0-17112a-alpha.jar!/cljs/core/async/impl/channels.cljs
Analyzing jar:file:/C:/Users/Conan/.m2/repository/org/clojure/core.async/0.1.346.0-17112a-alpha/core.async-0.1.346.0-17112a-alpha.jar!/cljs/core/async/impl/dispatch.cljs
Analyzing jar:file:/C:/Users/Conan/.m2/repository/org/clojure/core.async/0.1.346.0-17112a-alpha/core.async-0.1.346.0-17112a-alpha.jar!/cljs/core/async/impl/buffers.cljs
Analyzing jar:file:/C:/Users/Conan/.m2/repository/org/clojure/core.async/0.1.346.0-17112a-alpha/core.async-0.1.346.0-17112a-alpha.jar!/cljs/core/async/impl/protocols.cljs
Analyzing jar:file:/C:/Users/Conan/.m2/repository/org/clojure/core.async/0.1.346.0-17112a-alpha/core.async-0.1.346.0-17112a-alpha.jar!/cljs/core/async/impl/ioc_helpers.cljs
Analyzing jar:file:/C:/Users/Conan/.m2/repository/org/clojure/core.async/0.1.346.0-17112a-alpha/core.async-0.1.346.0-17112a-alpha.jar!/cljs/core/async/impl/timers.cljs
Applying optimizations :simple to 31 sources
... done. Elapsed 33.084434684 seconds
;; ======================================================================
;; Testing with Phantom:
ERROR: doo was not loaded from the compiled script.
Make sure you start your tests using doo-tests or doo-all-tests
and that you include that file in your build
Watching paths: C:\Users\Conan\dev\doo\example\src, C:\Users\Conan\dev\doo\example\test
$ phantomjs -v
2.0.0
$ lein -v
Leiningen 2.5.3 on Java 1.8.0_66 Java HotSpot(TM) 64-Bit Server VM
Is there something I could do to get more information out of phantom? I realise none of this is much use
I don't know a lot about Phantom, it might pay to dig around their docs site for how to get more debug information.
@conan did you lein install
the latest version of the library before doing this? I added :debug
just for this issue and haven't deployed it to clojars.
In case you hadn't:
git pull origin master
cd library
lein install
Oh, no, silly me. I'll try tomorrow
On Mon, 30 Nov 2015, 21:42 Sebastian Bensusan notifications@github.com wrote:
@conan https://github.com/conan did you lein install the latest version of the library before doing this? I added :debug just for this issue and haven't deployed it to clojars.
git pull origin mastercd library lein install
— Reply to this email directly or view it on GitHub https://github.com/bensu/doo/issues/60#issuecomment-160770768.
Any news about this issue? Had the same problem recently.
@conan @nidu can you try with [doo "0.1.7-SNAPSHOT"]
?
It contains a PR fixing some Windows issues.
@bensu thanks! It works now! At least with phantom and slimer
@nidu great!
@conan if you try it and it works, feel free to close this issue.
@bensu I just tried this with a new project, encountered the same error, found this page and switched to 0.1.7-SNAPSHOT
and the issue was fixed. Thanks!
Is there a release of doo expected soon?
I'm experiencing this issue with doo 0.1.7. My project.clj looks like this:
(defproject tech.dashman/clientcommon "0.1.0-SNAPSHOT"
:description "Dashman - Common library to all clients"
:url "https://dashman.tech"
:min-lein-version "2.3.4"
:source-paths ["src"]
:cljsbuild {:builds {:test {:source-paths ["src" "test"]
:compiler {:output-to "target/test/clientcommon.js"
:output-dir "target/test"
:target :nodejs
:main clientcommon.test-runner}}}}
:doo {:build "test"
:debug true} ; Run tests: lein doo phantom
:dependencies [[org.clojure/clojure "1.8.0" :scope "provided"]
[org.clojure/clojurescript "1.9.229" :scope "provided"]
[com.taoensso/sente "1.11.0"]
[mount "0.1.10"]
[prismatic/schema "1.1.3"]
[cljsjs/react-with-addons "15.2.1-0"]
[reagent "0.6.0" :exclusions [cljsjs/react]]
[re-frame "0.8.0"]
[tech.dashman/reagent-toolbox "0.1.0-SNAPSHOT"]
[doo "0.1.7"]]
:plugins [[s3-wagon-private "1.3.0"]
[lein-cljsbuild "1.1.4"]
[lein-doo "0.1.7"]])
And when I run lein doo phantom
I get this:
;; ======================================================================
;; Testing with Phantom:
[doo] Command to run script: [phantomjs C:\Users\pupeno\AppData\Local\Temp\phantom6389714380003069278.js C:\Users\pupeno\AppData\Local\Temp\phantom-shim426857839400628935
.js target/test/clientcommon.js]
ERROR: doo was not loaded from the compiled script.
Make sure you start your tests using doo-tests or doo-all-tests
and that you include that file in your build
Watching paths: C:\Users\pupeno\Documents\Dashman\clientcommon\src, C:\Users\pupeno\Documents\Dashman\clientcommon\test
The test runner is very simple:
(ns clientcommon.test-runner
(:require [doo.runner :refer-macros [doo-tests doo-all-tests]]
[clientcommon.crypto-test]
[clientcommon.util-test]))
(doo-tests 'clientcommon.crypto-test
'clientcommon.util-test)
Any ideas why this is happening?
I am also getting this, on Linux.
@analyticbastard I got this because I used lein doo phantom test
instead of lein doo node test
, since my test build profile was a nodejs target. Don't know if your problem is similar
I checked out and ran the example like this:
I got this error:
I get this error in exactly the same way on my own project trying to get doo running, which is why I thought I'd give the example a try. Is there something I can do to resolve this?
I'm on Windows 10 using Git Bash.