sormuras / bach

🎼 Bach Builds (on(ly)) Modules
https://bach.run
Universal Permissive License v1.0
234 stars 51 forks source link

Tests are not executed #213

Closed khmarbaise closed 3 years ago

khmarbaise commented 3 years ago

https://github.com/khmarbaise/kata-fraction/tree/bach

Currently I can build on plain command line without issue but it looks like I've overlooked something related to unit tests they are not executed. My assumption that I missed some kind of setup/configuration.

Unfortunately I haven't find something about related in the docs.

sormuras commented 3 years ago

It's due to a combination of (at least) two bugs in Bach and a non-matching glob pattern configured for test modules; plus missing "external module lookup directives", which I didn't document, yet.

Fixes are in progress...

sormuras commented 3 years ago

https://github.com/sormuras/bach/blob/b798489ac16c601b53d804ef3f41f8a05ea47de1/com.github.sormuras.bach/main/java/com/github/sormuras/bach/project/Spaces.java#L8

This line (read: the composed module finder) hides in-module test modules (patching main modules using same name) and their requires directives -- which in turns hides them from computation of missing external modules. Using both (main and test) declarations components individually should fix this.