Fork me on GitHub

Hi everyone. Me and @pez are working on improving the documentation ( I have started by updating the landing page of the high-level documentation. Please and see if you like the change! There are more to come.

metal 2

Cool! One thing I wonder from time to time is if polylith might be a good fit for cljdoc. If there is not already an intro of when to (and also not to) consider polylith for a backend system, that'd be helpful.


Havent’t used cljdoc myself. What would be the main reasons to switch from gitbook to cljdoc?


Oh no, totally not what I meant. simple_smile I consider using polylith for the cljdoc backend system itself, but never get around to learning if it is a good idea or not.


If you need some help, just let me know!


I should be a good fit for all backend systems, except if the artefacts are different libraries that need to work together and share the same components. There is an issue created for that case


Interesting, thanks for that.

👍 1

Trying to get poly test working for the first time, after just using the IDE to run tests. Nothing is being run. Is it possible that errors from illegal imports (deeper than the component's root interface) are causing the test runner to simply abort?


Errors like

Error 101: Illegal dependency on namespace db.customer.queries.interface in api.api. Use db.interface instead to fix the problem.


poly info shows the * and stx in the expected places


Run this command poly ws out:ws.edn from the workspace root and send me the ws.edn file + workspace.edn here on Slack (direct to me) and I will have a look.


Also send deps.edn at the root @U8ZQ1J1RR!


Hm, the var names of all interfaces makes me a bit uneasy to share it all. I'll start a new polylith project just to investigate testing, and take the ws.edn from that if I cannot figure it out. Thanks!


Okay, no problem!

Hukka08:08:51 I managed to get this one to run a test in, but not anywhere else (in the base src, or component's src or test)


In our real project the vast majority of tests are co-located with the source, some in the components' test folders, and none in the bases' test folders. So that kinda explains why I couldn't get anything to run


Okay, so you understand why you got the problem and how to solve it now?


And I would really like to 🙂


Okay, will have a look later.


I made a change in the base (a comment) and then ran the test command (from the shell in this case) and got this output:


Yeah, I also get the cli_test.clj to run. But a change in the component's function does not trigger the tests in the base's src, or component's src or tests


It starts by running the tests for mycomponent but it stops when that fails, otherwise it would have continued with cli , so it looks right to me.


Ah, fail fast is on be default. Somehow I thought I had read you'd have to set that manually


Though the failing test that it does run is not in the component, but in the cli. But that doesn't matter


Hm, reading through and but I cannot find a way to run all tests, to get all the failures. Is there one?


But it starts running cli (because it runs all the bricks alphabetically) and then it continues (if no tests are failing) with mycomponent . If you change the component naame to e.g. acomponent it would run that first, and then fail on cli.


No, we fail fast, and currently there is no way of configuring it to continue the test run even if it fails.


If you have several projects, I guess people would like to configure if the test runner should finish the current project and then stop, or continue with all projects, even if e.g. fails at the first project.


You can create an issue if you like.


Is this something that could be changed by using kaocha as the plugable runner?


And of course I still need to figure out why no tests were run at all on the real project 😕


> Is this something that could be changed by using kaocha as the plugable runner? Seems like it is, when I change to the kaocha runner, it runs all the tests


Hmh, but even that doesn't run tests that are co-located with source


Okay, so then you will use Kaocha instead?


Is the problem reproducable in your polylith-testing repo also?


Yeah, I haven't gotten anything working in the real repo yet


Just to make sure, is poly test supposed to run deftests that are in source files? That is files that are in src and which are not named in any special way (like with -test postfix)