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

Consolidation to Kaocha and Leiningen #22

Merged
merged 14 commits into from
Sep 5, 2019
Merged

Consolidation to Kaocha and Leiningen #22

merged 14 commits into from
Sep 5, 2019

Conversation

nilern
Copy link
Contributor

@nilern nilern commented Sep 3, 2019

Fixes #13

  • Run clj tests with kaocha
  • Run cljs tests with kaocha on node
  • Require kaocha.repl in user.clj
  • Update deps, update testit syntax accordingly
  • Remove deps.edn (for now, maybe we will later make a full switch to it)

@miikka
Copy link
Contributor

miikka commented Sep 4, 2019

Looks good. I might have made just a single :test profile for Leiningen, so you could all the tests with a single lein kaocha command.

However: when I run lein kaocha-cljs unit-cljs, I'm getting this long exception about Socket closed.

Stacktrace
% lein kaocha-cljs unit-cljs
[E]Exception in thread "main" Syntax error compiling at (/private/var/folders/8s/w7wls65s2vvdml8ztk54jfch0000gn/T/form-init2260913547816842698.clj:1:125).
	at clojure.lang.Compiler.load(Compiler.java:7647)
	at clojure.lang.Compiler.loadFile(Compiler.java:7573)
	at clojure.main$load_script.invokeStatic(main.clj:452)
	at clojure.main$init_opt.invokeStatic(main.clj:454)
	at clojure.main$init_opt.invoke(main.clj:454)
	at clojure.main$initialize.invokeStatic(main.clj:485)
	at clojure.main$null_opt.invokeStatic(main.clj:519)
	at clojure.main$null_opt.invoke(main.clj:516)
	at clojure.main$main.invokeStatic(main.clj:598)
	at clojure.main$main.doInvoke(main.clj:561)
	at clojure.lang.RestFn.applyTo(RestFn.java:137)
	at clojure.lang.Var.applyTo(Var.java:705)
	at clojure.main.main(main.java:37)
Caused by: java.net.SocketException: Socket closed
	at java.net.SocketOutputStream.socketWrite(SocketOutputStream.java:118)
	at java.net.SocketOutputStream.write(SocketOutputStream.java:155)
	at java.io.BufferedOutputStream.flushBuffer(BufferedOutputStream.java:82)
	at java.io.BufferedOutputStream.flush(BufferedOutputStream.java:140)
	at java.io.FilterOutputStream.close(FilterOutputStream.java:158)
	at sun.nio.cs.StreamEncoder.implClose(StreamEncoder.java:320)
	at sun.nio.cs.StreamEncoder.close(StreamEncoder.java:149)
	at java.io.OutputStreamWriter.close(OutputStreamWriter.java:233)
	at java.io.BufferedWriter.close(BufferedWriter.java:266)
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
	at java.lang.reflect.Method.invoke(Method.java:498)
	at clojure.lang.Reflector.invokeMatchingMethod(Reflector.java:167)
	at clojure.lang.Reflector.invokeNoArgInstanceMember(Reflector.java:438)
	at cljs.repl.node$close_socket.invokeStatic(node.clj:42)
	at cljs.repl.node$close_socket.invoke(node.clj:40)
	at cljs.repl.node.NodeEnv$fn__7580.invoke(node.clj:249)
	at cljs.repl.node.NodeEnv._tear_down(node.clj:243)
	at cljs.repl$tear_down.invokeStatic(repl.cljc:138)
	at cljs.repl$tear_down.invoke(repl.cljc:137)
	at kaocha.type.cljs$eval19930$fn__19932$fn__19957$fn__19964.invoke(cljs.clj:291)
	at kaocha.type.cljs$eval19930$fn__19932$fn__19957.invoke(cljs.clj:289)
	at kaocha.type.cljs$eval19930$fn__19932.invoke(cljs.clj:289)
	at clojure.lang.MultiFn.invoke(MultiFn.java:234)
	at clojure.lang.AFn.applyToHelper(AFn.java:156)
	at clojure.lang.AFn.applyTo(AFn.java:144)
	at clojure.core$apply.invokeStatic(core.clj:665)
	at clojure.core$apply.invoke(core.clj:660)
	at kaocha.plugin.capture_output$capture_output_wrap_run_hook$fn__2653$fn__2654.invoke(capture_output.clj:83)
	at clojure.core$with_redefs_fn.invokeStatic(core.clj:7514)
	at clojure.core$with_redefs_fn.invoke(core.clj:7498)
	at kaocha.plugin.capture_output$capture_output_wrap_run_hook$fn__2653.doInvoke(capture_output.clj:83)
	at clojure.lang.RestFn.invoke(RestFn.java:421)
	at kaocha.testable$run.invokeStatic(testable.clj:119)
	at kaocha.testable$run.invoke(testable.clj:110)
	at clojure.lang.AFn.applyToHelper(AFn.java:156)
	at clojure.lang.AFn.applyTo(AFn.java:144)
	at orchestra.spec.test$spec_checking_fn$fn__3762.doInvoke(test.cljc:127)
	at clojure.lang.RestFn.invoke(RestFn.java:421)
	at kaocha.testable$run_testable.invokeStatic(testable.clj:189)
	at kaocha.testable$run_testable.invoke(testable.clj:148)
	at kaocha.testable$run_testables.invokeStatic(testable.clj:202)
	at kaocha.testable$run_testables.invoke(testable.clj:192)
	at kaocha.api$run$fn__3150$fn__3151$fn__3152.invoke(api.clj:106)
	at clojure.core$with_redefs_fn.invokeStatic(core.clj:7514)
	at clojure.core$with_redefs_fn.invoke(core.clj:7498)
	at kaocha.api$run$fn__3150$fn__3151.invoke(api.clj:98)
	at clojure.lang.AFn.applyToHelper(AFn.java:152)
	at clojure.lang.AFn.applyTo(AFn.java:144)
	at clojure.core$apply.invokeStatic(core.clj:665)
	at clojure.core$with_bindings_STAR_.invokeStatic(core.clj:1973)
	at clojure.core$with_bindings_STAR_.doInvoke(core.clj:1973)
	at clojure.lang.RestFn.invoke(RestFn.java:425)
	at kaocha.api$run$fn__3150.invoke(api.clj:97)
	at clojure.lang.AFn.applyToHelper(AFn.java:152)
	at clojure.lang.AFn.applyTo(AFn.java:144)
	at clojure.core$apply.invokeStatic(core.clj:665)
	at clojure.core$with_bindings_STAR_.invokeStatic(core.clj:1973)
	at clojure.core$with_bindings_STAR_.doInvoke(core.clj:1973)
	at clojure.lang.RestFn.invoke(RestFn.java:425)
	at kaocha.api$run.invokeStatic(api.clj:83)
	at kaocha.api$run.invoke(api.clj:71)
	at kaocha.runner$run.invokeStatic(runner.clj:126)
	at kaocha.runner$run.invoke(runner.clj:68)
	at kaocha.runner$_main_STAR_.invokeStatic(runner.clj:156)
	at kaocha.runner$_main_STAR_.doInvoke(runner.clj:138)
	at clojure.lang.RestFn.invoke(RestFn.java:397)
	at clojure.lang.AFn.applyToHelper(AFn.java:152)
	at clojure.lang.RestFn.applyTo(RestFn.java:132)
	at clojure.core$apply.invokeStatic(core.clj:665)
	at clojure.core$apply.invoke(core.clj:660)
	at kaocha.runner$_main.invokeStatic(runner.clj:167)
	at kaocha.runner$_main.doInvoke(runner.clj:165)
	at clojure.lang.RestFn.invoke(RestFn.java:397)
	at clojure.lang.Var.invoke(Var.java:380)
	at user$eval3363.invokeStatic(form-init2260913547816842698.clj:1)
	at user$eval3363.invoke(form-init2260913547816842698.clj:1)
	at clojure.lang.Compiler.eval(Compiler.java:7176)
	at clojure.lang.Compiler.eval(Compiler.java:7166)
	at clojure.lang.Compiler.load(Compiler.java:7635)
	... 12 more

@miikka
Copy link
Contributor

miikka commented Sep 4, 2019

Found out the cause: you have to install the npm packages isomorphic-ws and ws to make kaocha-cljs work. Could you add this to HACKING.md and include package.json and package-lock.json with them, so one could run npm install and the right packages would be installed?

@nilern
Copy link
Contributor Author

nilern commented Sep 4, 2019

Going to make some improvements:

  • Deduplicate lein profiles
  • Add package.json for node websocket deps and document npm install in HACKING.md

@nilern nilern merged commit 5d69349 into develop Sep 5, 2019
@nilern nilern mentioned this pull request Sep 18, 2019
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

Successfully merging this pull request may close these issues.

Consolidate build tools
2 participants