Fork me on GitHub
#calva
<
2018-11-14
>
marc-omorain10:11:13

Hey @pez – I’ve been thinking of doing some hacking on Calva to enable the test results window. I have a couple of thoughts/questions before I get stuck into the code.

marc-omorain10:11:41

I was able to run the extension locally from a git checkout fine a couple of days ago, but I get this now ^

marc-omorain10:11:45

any ideas what could be up?

marc-omorain10:11:15

This is the copy of code with the extension launched.

marc-omorain10:11:48

The copy of vscode with calva running shows this in the shadow-cljs output:

shadow-cljs - watching build :calva
[:test] Compiling ...
[:calva] Configuring build.
[:calva] Compiling ...
========= Running Tests =======================
Error: ENOENT: no such file or directory, open '/Users/marc/dev/calva/.shadow-cljs/builds/test/dev/out/cljs-runtime/goog.debug.error.js'
    at Object.openSync (fs.js:443:3)
    at Object.readFileSync (fs.js:348:35)
    at global.SHADOW_IMPORT (/Users/marc/dev/calva/test-out/tests.js:46:15)
    at /Users/marc/dev/calva/test-out/tests.js:3005:1
    at Object.<anonymous> (/Users/marc/dev/calva/test-out/tests.js:3039:3)
    at Module._compile (internal/modules/cjs/loader.js:702:30)
    at Object.Module._extensions..js (internal/modules/cjs/loader.js:713:10)
    at Module.load (internal/modules/cjs/loader.js:612:32)
    at tryModuleLoad (internal/modules/cjs/loader.js:551:12)
    at Function.Module._load (internal/modules/cjs/loader.js:543:3)
===============================================
[:calva] Build completed. (45 files, 23 compiled, 0 warnings, 27.10s)
[:test] Build completed. (34 files, 12 compiled, 0 warnings, 28.43s)
[:calva] Compiling ...
[:test] Compiling ...
[:calva] Build completed. (45 files, 2 compiled, 0 warnings, 0.07s)
========= Running Tests =======================

Ran 0 tests containing 0 assertions.
0 failures, 0 errors.
===============================================
[:test] Build completed. (34 files, 1 compiled, 0 warnings, 0.38s)

pez10:11:38

I’m happy to hear you want to add that, @marc-omorain! The error you get is probably because you haven’t started the build tasks in the right order. You need to first start the CLJS task and wait for it to finish, then the TS task (which will build the extension module that that error message complains about).

marc-omorain10:11:19

d’oh, RTFM Marc 😄

marc-omorain10:11:32

I’ll share a gif of th test result pane once I get it launched

pez10:11:51

I often get that goog-debug complaint when first starting the CLJS task. Never figured out why, and it doesn’t seem to matter for the functionality of anything.

pez10:11:53

One more thing to keep in mind is that when you have built a production package you also need to restart the build tasks afterwards, because the production build task cleans away (rim-raf!) the symlinks that the watchers rely on.

marc-omorain10:11:07

@pez it needs some better icons, etc, but it’s showing the tests at least ^

marc-omorain10:11:23

(ignore the fact that I have to run tests, we have a strange bug in our logging setup at present)

pez11:11:39

OMG, that is awesome!!

pez11:11:05

We have some problems with the test runner as such, actually, but this would probably speed the fixing of that up.

pez11:11:21

Announcement: I have opened up a Calva stream on Clojurians Zulip. I think that will be a better place for discussing Calva than this channe: https://clojurians.zulipchat.com/#narrow/stream/calva (But I will keep this channel for the time being as well, of course.)

pez11:11:15

Please consider telling us about this Test view in that Zulip stream, @marc-omorain, it is awfully quite there now. 😄