When experimenting with using bazel + bazel_deps, I ran into the following error for testing:
Exception in thread "main" java.lang.ClassFormatError: Absent Code attribute in method that is not native or abstract in class file org/scalactic/source/PositionMacro$
at java.lang.ClassLoader.defineClass1(Native Method)
at java.lang.ClassLoader.defineClass(ClassLoader.java:763)
...
Which I resolved by adding the following to dependencies.yaml:
My understanding was this kind of transitive dependency should be resolved by bazel_deps - I'm not sure if the reason it fails is because scalactic is being used as a macro (Additionally, I was under the impression that scalactic is an optional dependency for scalatest). Hopefully this is the right place to raise this issue - I'm still growing my understanding of the bazel ecosystem, and as adding scalactic to dependencies solved the problem, this seemed to be the most logical place.
When experimenting with using bazel + bazel_deps, I ran into the following error for testing:
Which I resolved by adding the following to dependencies.yaml:
My understanding was this kind of transitive dependency should be resolved by
bazel_deps
- I'm not sure if the reason it fails is because scalactic is being used as a macro (Additionally, I was under the impression that scalactic is an optional dependency for scalatest). Hopefully this is the right place to raise this issue - I'm still growing my understanding of the bazel ecosystem, and as adding scalactic to dependencies solved the problem, this seemed to be the most logical place.For reference, here's the test class:
Here's my BUILD: