Quantcast
Channel: JetBrains Developer Community : Thread List - IntelliJ IDEA Users
Viewing all articles
Browse latest Browse all 5661

Scala+SBT: Cannot resolve symbol

$
0
0

I was getting IDEA errors on imports and other classes of the form "Cannot resolve symbol" although compilation was working fine. I have a multi-project build.sbt file with a multi-layered dependency hierarchy. I found that these errors only occurred for implicit, transitive dependencies. For example, if project A dependsOn project B and project B dependsOn project C, then I would get these errors in project C for classes in project A. If I add those dependencies explicitly, then the problem goes away (part in bold):

 

lazy val projA = project in file("projB") ...

lazy val projB = project in file("projB") ... dependsOn(projectA)

lazy val projC = project in file("projC") ... dependsOn(projectB) dependsOn(projectA)


I don't have the time to create a standalone test of this theory to prove that this is the cause, but I just wanted to post this as a potential issue and solution in case others hit the same issue.


Viewing all articles
Browse latest Browse all 5661

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>