-
Notifications
You must be signed in to change notification settings - Fork 282
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Justinass/dep analyzer #1370
Justinass/dep analyzer #1370
Conversation
common_jvm_flags = [ | ||
"-Dplugin.jar.location=$(execpath //third_party/dependency_analyzer/src/main:dependency_analyzer)", | ||
"-Dscala.library.location=$(rootpath @io_bazel_rules_scala_scala_library)", | ||
"-Dscala.library2.location=$(rootpath @io_bazel_rules_scala_scala_library_2)", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
can we add a comment why we need both standard libraries?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't actually know why Scala 2 library is required, I tried various things until I got the code to compile... One hint was this line .
Without it compilation fails:
class dotty.tools.dotc.core.Symbols$NoSymbol$ cannot be cast to class dotty.tools.dotc.core.Symbols$ClassSymbol (dotty.tools.dotc.core.Symbols$NoSymbol$ and dotty.tools.dotc.core.Symbols$ClassSymbol are in unnamed module of loader 'app')
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I added a comment.
third_party/utils/src/test/io/bazel/rulesscala/utils/Scala3CompilerUtils.scala
Outdated
Show resolved
Hide resolved
third_party/utils/src/test/io/bazel/rulesscala/utils/Scala3CompilerUtils.scala
Outdated
Show resolved
Hide resolved
third_party/utils/src/test/io/bazel/rulesscala/utils/Scala3CompilerUtils.scala
Outdated
Show resolved
Hide resolved
Thanks, @justinass-wix |
Description
Minimal implementation of compiler utils for Scala 3 Dependency Analyzer tests.
Motivation
Dependency Analyzer uses
TestUtil
to run compiler. For Scala 3 these utils have to be rewritten to work with new compiler.analyzer_test.bzl
to 2 files for scala 2 & 3 respectivelyscala-library
andscala3-library_3
paths via JVM flags to satisfy compiler (for scala 2scala-library
andscala-reflect
are passed)