Closed gmendonca closed 4 years ago
This is a difference with bazel (at least the scala rules) and most JVM build: we require explicitly naming all the jars you need and we don’t include transitive classpath at compile time (only runtime).
There is a “deps + 1” mode in the scala rules that add one layer of transitive deps at compile time which solve most instances of this.
About the bazel-deps issue: note you wrote mockitocore but the artifact name is mockito-core. Can you try with a - not an ?
Annnnnnnd of course it was a typo. 🤦♂
About the bazel-deps issue: note you wrote mockitocore but the artifact name is mockito-core. Can you try with a - not an ?
Ok, at least this was useful for knowing I was in the right direction.
This is a difference with bazel (at least the scala rules) and most JVM build: we require explicitly naming all the jars you need and we don’t include transitive classpath at compile time (only runtime).
Will have a look on this 👍
There is a “deps + 1” mode in the scala rules that add one layer of transitive deps at compile time which solve most instances of this.
Thanks for the answers :)
Closing as not really an issue.
I'm playing with
bazel-deps
andrules_scala
: https://github.com/bazelbuild/rules_scala/commit/7b6360915f5d41a5c591328e2f30417550461486I'm trying to set up a
dependencies.yaml
with https://scalameta.org/ and I couldn't just declare:For making, for example, this work:
Instead, I had to teh following and now it's working fine:
Otherwise, I would get a:
I'm not sure if this is a proper way of fixing my problem, but it worked. However, I was trying to make the same thing with https://github.com/mockito/mockito-scala because of the error:
However, when trying to do this:
It wont' work as Mockito Core is a Java Dependecy:
In both cases, I'd expect to just declare the dependency without the inner dependencies. Am I doing something wrong or is this really a bug?