Closed mfikes closed 6 years ago
Looks good, thanks! Can you please add the plank version requirements to the README?
Added Planck version requirement to README.
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.
Fixes #116
This PR adds the ability to to
lein doo lumo
andlein doo planck
.Detailed notes:
Self-hosted ClojureScript doesn't require the ClojureScript compile build step (as
lumo
andplanck
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 theauto
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
andplanck
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 waylumo
andplanck
are executed, they are directed to run the test by issuing arequire
on the(:main compiler-opts)
.I tried putting some of the self-hosted stuff into a separate namespace, with
defmethod
s for:lumo
and:planck
, which would be an appealing approach, but it is difficult to cleanly do this without wanting a circular dependency betweendoo.core
and that new separate namespace. So this PR just keeps it simple and puts the self-hosted support directly indoo.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 indoo
but they are reallyplanck
defects:doo.runner
to be reloaded after having set thedoo.runner/*exit-fn*
. Adoo
workaround would be to employdefonce
, but this has been fixed in Planck 2.14.0.doo
complain that the*exit-fn*
hasn't been properly set, owing to an artifact where Planck internally uses exceptions whenplanck/exit
is called; this also has been fixed in Planck 2.14.0 thus making it compatible with the waydoo
catches:default