Fork me on GitHub
Marc O'Morain10: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 O'Morain10: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 O'Morain10:11:45

any ideas what could be up?

Marc O'Morain10:11:15

This is the copy of code with the extension launched.

Marc O'Morain10: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)


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 O'Morain10:11:19

d’oh, RTFM Marc 😄

Marc O'Morain10:11:32

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


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.


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 O'Morain10:11:07

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

Marc O'Morain10:11:23

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


OMG, that is awesome!!


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


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: (But I will keep this channel for the time being as well, of course.)


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