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
Sbt can't compile due to shadowing of Range class #8262
Comments
Imported From: https://issues.scala-lang.org/browse/SI-8262?orig=1 |
@gkossakowski said: |
@retronym said: We need to figure out which change in Scala is responsible. |
@retronym said: |
@retronym said: |
@gkossakowski said: Do we want to rename the class or refactor the code so it's not private anymore? If it's true that c4341385629bd114b61c55103f1d83f26dce22f9 introduced regression how's possible that I report it 11 months later? Could it be that nobody tried to compile or never got to compiling sbt's |
@retronym said: I thought these nightly builds of SBT with 2.11 should have caught this: https://jenkins-dbuild.typesafe.com:8499/job/sbt-nightly-for-ide-on-scala-2.11.x/215/consoleFull |
@retronym said: I used this minimization: object Test {
val g: scala.tools.nsc.Global = ???
import g._
def foo(r: Range) = r: scala.Range
} Which starts giving the same error as your report when But something still doesn't add up. |
@gkossakowski said: When it comes to nightly builds, this one build only subset of Sbt that constitutes incremental compiler (and it's dependencies), see the following log entry: [info] The following subprojects will be built in project sbt: control, io, process, interface, logging, api, relation, classfile, launcher-interface, classpath, incremental-compiler, persist, launcher, compiler-interface, compile, compiler-integration See also the dbuild definition: {
name: "sbt",
uri: "git://github.com/sbt/sbt.git#0.13"
extra: {
sbt-version: "0.13.0",
projects: ["compiler-interface",
"classpath","logging","io","control","classfile",
"process","relation","interface","persist","api",
"compiler-integration","incremental-compiler","compile","launcher-interface"
],
run-tests: false,
commands: [ "set every Util.includeTestDependencies := false" // Without this, we have to build specs2
]
}
} In retrospect, it looks like the choice of names for jenkins jobs and configuration files was a bit unfortunate. |
@retronym said: |
@retronym said: |
I just tried building sbt with Scala 2.11.0-M8 and I got:
I've been scratching my head for a while but then it became clear what happened. The code in
Eval.scala
refers toscala.Range
(without any explicit import). Now, for reason I didn't identify yet there's Range class mixed intoGlobal
name space. Compare:That class shadows (through
globa._
import) the one previously used.The text was updated successfully, but these errors were encountered: