Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

permanently hidden warning in scala application

Tags:

scala

I get the following warning whenever I start my Scala application:

WARN - imported `SVNProperties' is permanently hidden by definition of object SVNProperties in package core, at line 4 of app/core/SVNResource.scala

What could this mean?

like image 459
trajectory Avatar asked Feb 11 '11 16:02

trajectory


2 Answers

You probably have code that looks something like this:

object Hidden {
  import scala.collection.immutable
  object immutable { def x = 7 }
}

except in a less obvious way. You're importing something--in my example, the package immutable--and then you go and define something else with the same name that prevents you from using what you imported.

In particular, it looks like you tried to import SVNProperties into SVNResource.scala, except that SVNResource.scala defines its own SVNProperties which hides the import.

like image 59
Rex Kerr Avatar answered Oct 31 '22 22:10

Rex Kerr


I encountered this warning after moving some classes from one package to another. I guess there was some conflict between the new location and binaries from the old location. In my case this helped:

sbt clean
like image 36
astasiak Avatar answered Oct 31 '22 22:10

astasiak