Comments (5)
Hey @joprice you shouldn't have to include the Scala standard library as a dependency. How are you binding default_scala
in your WORKSPACE
?
Also, what version of the IntelliJ plugin are you using?
from rules_scala.
I am using Intelij 2019.2.4 and Bazel plugin 2019.11.14.0.1. I'm configuring it like this:
bind(
name = "default_scala",
actual = "@rules_scala_annex//src/main/scala:zinc_2_12_8",
)
from rules_scala.
I've seen this issue when a custom ScalaConfiguration
doesn't include the Scala compiler in its compiler_classpath
, but the default one does so that's not it..
It might be that the IntelliJ plugin doesn't recognize it if it's coming from an external source. If that's the case, then specifying your own ScalaConfiguration in your workspace as explained here might be the way to go (although that'd be unfortunate because it'd mean the experience when using the default isn't great :/) simpler workaround in next comment
from rules_scala.
I poked around a bit more. This is an odd bug. If @annex//:org_scala_lang_scala_library
or @annex//:org_scala_lang_scala_compiler
are included as deps
or runtime_deps
on any Scala target in your workspace, IntelliJ recognizes things correctly everywhere, even if that target's not used.
Specifying your own ScalaConfiguration would make the issue go away because it specifies a scala_library
with these deps, but a simpler work around would be to add a dummy rule somewhere.
e.g.
scala_binary(
name = "fooNotUsed",
runtime_deps = ["@annex//:org_scala_lang_scala_library"],
)
from rules_scala.
I'm also having this issue when using multiple scala versions, and the workaround doesn't seem to help. I have some projects on 2.12 and others on 2.11. Both projects seem to think they have some scala version available, as I can jump to source, but there is always a banner up top saying "No Scala SDK in module". When clicking Setup Scala SDK, it offers an incorrect version from the local ivy cache. For scala 2.12 projects, newer features like Future.unit
are red since it's validating against an older version of scala. I would expect in the latter case for it to be broken as before, but it looks like it's using some global version.
from rules_scala.
Related Issues (20)
- How do I use a different scala version? HOT 7
- NoClassDefFoundError HOT 5
- Cannot configure scala_deps_used via --define HOT 9
- "Failed to save cached analysis" error HOT 5
- NoSuchFileException when running scalafmt HOT 3
- deps_used error when used with rules_docker's scala_image HOT 19
- Comparison/Document relationship with bazelbuild/rules_scala HOT 3
- Error when using repl with a compiler plugin configured with global_scalacopts
- scala_format_test vs scala_with_scalafmt.bzl HOT 1
- Compiling Scala 2.13 HOT 7
- Error on build: depset elements must not be mutable values HOT 4
- Add some comments to tests/WORKSPACE HOT 6
- scala_library from generated sources not showing up in intellij HOT 3
- ScalaCheckDeps error with --jobs build option HOT 5
- Cannot build a scala_test rule HOT 2
- Zinc AnalysisCache outputs are not reproducible HOT 2
- error running coverage command
- Travis merge check status not updating on PRs
- Is this project dead? HOT 7
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from rules_scala.