You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Add scala.tools.cmd.CommandLineParser for >=2.13.9
Fixes //third_party/utils/src/test:test_util for Scala 2.13.9 and later
by providing a thin `scala.tools.cmd.CommandLineParser` adapter.
Before this change, building under Scala 2.13.14 produced:
```txt
$ bazel build --repo_env=SCALA_VERSION=2.13.14 \
//third_party/utils/src/test:test_util
ERROR: .../third_party/utils/src/test/BUILD:6:14:
scala @@//third_party/utils/src/test:test_util failed: (Exit 1):
scalac failed: error executing Scalac command
(from target //third_party/utils/src/test:test_util)
bazel-out/darwin_arm64-opt-exec-ST-d57f47055a04/bin/src/java/io/bazel/rulesscala/scalac/scalac
@bazel-out/darwin_arm64-fastbuild/bin/third_party/utils/src/test/test_util.jar-0.params
third_party/utils/src/test/io/bazel/rulesscala/utils/TestUtil.scala:10:
error: object cmd is not a member of package tools
import scala.tools.cmd.CommandLineParser
^
third_party/utils/src/test/io/bazel/rulesscala/utils/TestUtil.scala:119:
error: not found: value CommandLineParser
val options = CommandLineParser.tokenize(compileOptions)
^
```
Turns out `CommandLineParser` disappered in Scala 2.13.9, and its
`Parser` replacement is private:
- scala/scala#10057
0 commit comments