Skip to content
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

scala.* symbol precedes conflicting root package name #2856

Closed
olafurpg opened this issue Jul 12, 2017 · 0 comments
Closed

scala.* symbol precedes conflicting root package name #2856

olafurpg opened this issue Jul 12, 2017 · 0 comments

Comments

@olafurpg
Copy link
Contributor

This behavior may be intentional but I could not find a reference to it in the docs.

package io.grpc {
  trait Grpc
}
package bar {
  import io.grpc.Grpc
  object a extends Grpc
}

Dotty reports the following error

-- [E008] Member Not Found Error: grpc.scala:6:12 ------------------------------
6 |  import io.grpc.Grpc
  |         ^^^^^^^
  |         value `grpc` is not a member of io

one error found

while scalac reports no error.

A workaround for error is to prefix the import: import _root_.io.grpc.

Given the recent popularity of *.io domains, a few popular Scala libraries libraries now use io as their root package. For example, Circe (https://circe.github.io/circe/) and Quill (http://getquill.io/).

odersky added a commit to dotty-staging/dotty that referenced this issue Jul 13, 2017
The fix is more complex than I would like (see comment in source code).
If someone can reproduce the error locally without this commit and rack it down
this would help enormously.
odersky added a commit to dotty-staging/dotty that referenced this issue Jul 13, 2017
The fix is more complex than I would like (see comment in source code).
If someone can reproduce the error locally without this commit and rack it down
this would help enormously. (reverted from commit f50bf57)
odersky added a commit that referenced this issue Jul 13, 2017
Fix #2856 Drop special treatment of packages in findRef
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant