This is a common annoyance that annoyed paulp into an attempt to fix it. His idea was that a dir that doesn't contribute class files shouldn't be taken as a package. If you can take util
as scala.util
, you should do so in preference to foo.util
where that util is empty.
The util
dir is the usual suspect, because who doesn't have a util dir lying around, and in particular, ./util
?
apm@mara:~/tmp/coltfred$ mkdir -p com/coltfred/util/time
apm@mara:~/tmp/coltfred$ mkdir -p com/coltfred/util/com
apm@mara:~/tmp/coltfred$ vi com/coltfred/util/time/test.scala
apm@mara:~/tmp/coltfred$ scalac com/coltfred/util/time/test.scala
./com/coltfred/util/time/test.scala:5: error: object github is not a member of package com.coltfred.util.com
import com.github.nscala_time.time._
^
one error found
apm@mara:~/tmp/coltfred$ cat com/coltfred/util/time/test.scala
package com.coltfred
package util
package time
import com.github.nscala_time.time._
class Test
apm@mara:~/tmp/coltfred$
To debug, find out where the offending package is getting loaded from.