Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Runner script no longer gets run... #2

Closed
lvh opened this issue Jun 18, 2015 · 13 comments
Closed

Runner script no longer gets run... #2

lvh opened this issue Jun 18, 2015 · 13 comments

Comments

@lvh
Copy link

lvh commented Jun 18, 2015

When trying 0.1.1-SNAPSHOT on a different project, the runner script no longer gets run... https://gist.github.com/lvh/351566fe6a6ca2ed86e0

I can't figure out what's special about it; any idea where to start? The problem does go away when switching to the old version of doo, though...

@lvh
Copy link
Author

lvh commented Jun 18, 2015

Note that it breaks with both once and implicit/explicit auto, so I guess I'll start digging how the two differ in behavior when auto is set.

PhantomJS is definitely running:

➜  ~ ps ax | grep phant                                                                                                                                                   15:52:33
 3922 s000  S+     0:00.00 /bin/bash /usr/local/bin/lein doo phantom test auto
 3927 s000  S+     0:39.94 /usr/bin/java -client -XX:+TieredCompilation -Xbootclasspath/a:/usr/local/Cellar/leiningen/2.5.1/libexec/leiningen-2.5.1-standalone.jar -Dfile.encoding=UTF-8 -Dmaven.wagon.http.ssl.easy=false -Dleiningen.original.pwd=/Users/lvh/Projects/rackspace/shrieker -Dleiningen.script=/usr/local/bin/lein -classpath :/usr/local/Cellar/leiningen/2.5.1/libexec/leiningen-2.5.1-standalone.jar clojure.main -m leiningen.core.main doo phantom test auto
 3957 s000  S+     0:00.99 phantomjs /var/folders/2w/kffqc_pj6m38rgrxlhk8z6nr0000gn/T/phantom1796805346186183090.js /var/folders/2w/kffqc_pj6m38rgrxlhk8z6nr0000gn/T/phantom-shim2496136592457419844.js target/test.js
 4105 s003  S+     0:00.00 grep phant

@lvh
Copy link
Author

lvh commented Jun 19, 2015

Trying to figure out how this works; set-exit-point! doesn't appear to be called from anywhere?

@lvh
Copy link
Author

lvh commented Jun 19, 2015

I've tried killing a bunch of the test ns'es to make sure it had nothing to do with that, but that didn't fix anything either...

@bensu
Copy link
Owner

bensu commented Jun 19, 2015

This issue is not related to once|auto but to set-exit-point!:

To return the correct error code I had to change how set-exit-point! works. It is still set from unit-test.js but is now called from cljs.test/report. This report event was added in [cljs 0.0.3308] for this use case. That way, *exit-fn* has the tests results from report and can check if they were successful before exiting.

Adding print statements won't help with this specific issue since the console output is managed by the plugin, which prints everything when Phantom terminates :)

If you already did some work around muting namespaces, could you send a minimal case? I'll happily debug on top of that.

Also, make sure you are cleaning all doo code, including lein clean which in cljs must be manually set to work properly. In the gist you rm -r .m2/doo but not rm -r .m2/lein-doo. Probably harmless but worth a try.

@bensu
Copy link
Owner

bensu commented Jun 19, 2015

Maybe I should call this packages doo/doo and doo/lein-doo just like figwheel does.

@lvh
Copy link
Author

lvh commented Jun 19, 2015

OK, cool; I'm not sure what I changed, but I have a minimal case that does work now, so I'm slowly adding things back...

@lvh
Copy link
Author

lvh commented Jun 19, 2015

... which I can't reproduce anymore, in which I'm wishing I wasn't on OS X, but on something with FS COW snapshots :( I'm working on the minimal broken example and I'll upload it Soon(TM) :) Thanks so much in advance!

@bensu
Copy link
Owner

bensu commented Jun 19, 2015

If you can't reproduce it in the complete repo, the error probably came from a stale runner.cljs/runner.js file.

@lvh
Copy link
Author

lvh commented Jun 19, 2015

Yep, it seems like killing that file helps.

@bensu
Copy link
Owner

bensu commented Jun 19, 2015

That probably means that your lein clean is not reaching some of the compiler's intermediate files. Check again your :clean-targets, otherwise you wouldn't have the stale file there.

Close this issue when you are sure.

@lvh
Copy link
Author

lvh commented Jun 19, 2015

Wooo! Yep, right on the money. I could've sworn that I had nuked target/ before, but maybe only while using the old (lein-)?doo.

clean-targets does look like it's missing something:

:clean-targets ^{:protect false} [[:cljsbuild :builds :app :compiler :output-dir]
                                    [:cljsbuild :builds :app :compiler :output-to]]

... so I changed that to the obvious:

:clean-targets ^{:protect false}
  [[:cljsbuild :builds :app :compiler :output-dir]
   [:cljsbuild :builds :app :compiler :output-to]
   [:cljsbuild :builds :test :compiler :output-dir]
   [:cljsbuild :builds :test :compiler :output-to]]

... but that still leaves all the cljsbuild stuff around, including, notably:

target/cljsbuild-compiler-0/doo

... so I guess I'm going to go look up the docs for clean-targets :) Thanks so much for your help!

@bensu
Copy link
Owner

bensu commented Jun 19, 2015

I've never seen the nested vector form, but it looks like :target-path is missing, which by default is anything under /target

@lvh
Copy link
Author

lvh commented Jun 19, 2015

Cool, thanks! Reported upstream to see if we can fix this for other people. Thanks so much for helping me debug this :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants