5 ms·
I looked into Bazel. I like it overall, but it makes a lot of assumptions about the layout of your projects. For example, the java_test rule looks for all class
by varikin 11y ago
I looked into Bazel. I like it overall, but it makes a lot of assumptions about the layout of your projects. For example, the java_test rule looks for all classes under a java or javatests folder trying to figure out the package and full Java class name to feed into the JUnit runner. I understand this is a standard Maven layout, but we don't have a standard Maven layout (not using Maven). Instead of the java_test rule failing, it passes because no tests failed, but no tests were found either...
It figure this out, I had to patch Bazel with printlns where tries to find all the tests.
A coworker found a similar issue with assumptions around the project layout, but I can't remember what it was. Being that Bazel is was Alpha at the time, now Beta, I am not going to write it off yet. If nothing else, better documentation about assumed layouts would be great.
- skybrian 11y agoActually, that's not Maven. In Maven, each project has its own java directory. With Blaze (and I assume Bazel), Java libraries from entirely different projects all live in the same giant java and javatests subtrees. Behold the glory of the monolithic repository!
- GauntletWizard 11y agoBazel's opinionated nature is it's blessing and curse. If you follow it's rules (fairly simple, internally consistent, and well thought out), it's amazing, and you need think a lot less about "where does this file go?", etc. If you don't have all those rules in your head, or if you're inconsistent about them, it's a nightmare. Thankfully, it's a nightmare that can be fixed, and it behooves you to do so: Bazel's simple artifacts and build speedups are well worth the time you spend converting to it.