Open noel-yap opened 2 months ago
Hello. It's not going to work with modules, since that requires all the sub-repos to be modules as well; or a special extension setup which I think is not worth the effort.
Not sure what your use case is, but after having quite a blast with trying to migrate some of my repos to modules I've concluded that it's too early to do so. It is OK to use both WORKSPACE and MODULE, and for the time being I'd recommend using bazel-bats
through WORKSPACE only.
But if you have a firm requirement to use this code through MODULE, may I suggest contributing a fix?
I don't know enough about MODULE to gauge whether it was something I was doing wrong or if bats itself needed to support it
Thanks for the info. It saved me a bunch of time going down a futile rabbit hole
It looks like https://docs.aspect.build/rulesets/aspect_bazel_lib/docs/bats/ has a different implementation of bats_test
(it doesn't have a deps
setting; instead what would go into deps
needs to be part of data
) and that rule can be used via bzlmod
MODULE.bazel
has:When I run
bazel test ...
, it errors with:Can
README.md
include instructions usingMODULE.bazel
?