bensu / doo

doo is a library and lein plugin to run cljs.test on different js environments.
Eclipse Public License 1.0
324 stars 63 forks source link

Support for self-hosted js-envs Lumo and Planck #179

Closed mfikes closed 6 years ago

mfikes commented 6 years ago

Fixes #116

This PR adds the ability to to lein doo lumo and lein doo planck.

Detailed notes:

Self-hosted ClojureScript doesn't require the ClojureScript compile build step (as lumo and planck operate directly on source, compiling in memory internally). So, in theory, while the build step is harmless, it could be omitted. But, it wasn't clear to me how this could be easily accomplished when the auto mode is in effect (because the ClojureScript compiler's watch capability is used). So, this PR does nothing with respect to the build step and preserves the existing logic.

Also, since lumo and planck don't need the results of the build, the (:output-to compiler-opts) final script runner command line argument is conditionally omitted for the self-hosted testing case. (If you look at the way lumo and planck are executed, they are directed to run the test by issuing a require on the (:main compiler-opts).

I tried putting some of the self-hosted stuff into a separate namespace, with defmethods for :lumo and :planck, which would be an appealing approach, but it is difficult to cleanly do this without wanting a circular dependency between doo.core and that new separate namespace. So this PR just keeps it simple and puts the self-hosted support directly in doo.core.

This PR works with the current lumo release.

For planck recently-released version 2.14.0 is required, otherwise two issue arise which could be worked-around in doo but they are really planck defects:

bensu commented 6 years ago

Looks good, thanks! Can you please add the plank version requirements to the README?

mfikes commented 6 years ago

Added Planck version requirement to README.

bensu commented 6 years ago

Thanks @mfikes! I'll let @miikka cut the next release when he feels it is ready. He has a better grasp on the latest, unreleased work.