rfan-debug / bazel-scala-test

Validating building Scala with Bazel

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

bazel-scala-test

Repo to validate issues with test-dependencies using: https://github.com/bazelbuild/rules_scala

At this point in time the repo is working fine:

  • Building a scala_library
  • Using scala_library as a dependency to scala_test
  • Running under Bazel 4.0.0

This repo is for validating the effect of gotest's flag on scala test. The following command will fail

bazel test //...

Demo of the rule_jvm_external transitive dependency problem

It pops the following problem when run bazel build //...

A full rebuild may help if 'Encoder.class' was compiled against an incompatible version of cats.
  Greeting("Hey", Person("Chris"), 3).asJson
          ^
src/main/scala/CirceSample/CirceSample.scala:10: error: could not find implicit value for parameter encoder: io.circe.Encoder[CirceSample.CirceSample.Greeting]
  Greeting("Hey", Person("Chris"), 3).asJson

The code https://github.com/rfan-debug/bazel-scala-test/tree/master/src/main/scala/CirceSample

is originally from Circe's example: https://circe.github.io/circe/codecs/auto-derivation.html

About

Validating building Scala with Bazel


Languages

Language:Starlark 89.6%Language:Scala 10.4%