Fork me on GitHub
#polylith
<
2022-12-24
>
licht1stein19:12:07

Do you guys think it's possible to use this with polylith? So far the test runner doesn't seem to detect the tests macro: https://github.com/hyperfiddle/rcf

seancorfield20:12:07

Unfortunately, RCF is problematic in terms of tests that can be run by external test runners. See issues #31 and #41 and there are others as well. Having tests in source files is unusual, to start with, so some test runners have to be told to check source namespaces, not just test namespaces. In addition, RCF has to be run in a specific context to generate deftest-compatible tests and it does so by generating test names based on aspects of the code -- so the test names are not stable (they change as you edit the code) so you can't use that mode with a REPL, which means you can't run RCF tests via most editors' integrated testing facilities.

seancorfield20:12:35

I like the idea of RCF and I tried to use it on my own projects but the obstacles were just too great. I talked to the RCF team about it -- some of those issues on the repo came out of those discussions -- but they deferred any action on them until "after the rewrite" and I don't know where the project is regarding that today.

licht1stein20:12:02

So, it'll stay a nice idea then, thanks @U04V70XH6!

seancorfield20:12:51

If they address test name stability and a few other issues, RCF could be used a lot more widely. I don't know whether poly test would find tests in source code... that might be more of an obstacle.

imre08:12:14

Issue 62 is also related

licht1stein09:12:23

Interesting, there is also this. Will try it out later: https://github.com/ieugen/poly-rcf

licht1stein13:12:45

Ok, it actually wasn't that hard to implement. The repo above has nailed the right recipe, the test runner now picks up the tests from tests macro. I will report if something goes wrong.