Fix ConsoleInterface binding things properly.#314
Merged
Conversation
In reference to sbt/sbt#2884 I'm seeing the console helpers (cpHelpers) being statically 'Object', and therefore not being that helpful: scala> cpHelpers res0: Object = sbt.internal.ConsoleProject$Imports@610be000 scala> cpHelpers.taskKeyEvaluate <console>:37: error: value taskKeyEvaluate is not a member of Object cpHelpers.taskKeyEvaluate ^ scala> cpHelpers.asInstanceOf[sbt.internal.ConsoleProject.Imports].taskKeyEvaluate _ res3: sbt.TaskKey[Nothing] => sbt.internal.ConsoleProject.Evaluate[Nothing] = $$Lambda$4294/1575143649@5a54d62c This is because I misinterpreted the Scala 2.8 compatibility layer I tore out in 1abf6ca.
Member
Author
|
I've a feeling this might actually fix sbt/sbt#2884: scala> val cpHelpers2 = cpHelpers.asInstanceOf[sbt.internal.ConsoleProject.Imports]
cpHelpers2: sbt.internal.ConsoleProject.Imports = sbt.internal.ConsoleProject$Imports@61cf462
scala> import cpHelpers2._
import cpHelpers2._
scala> compileInputs in compile in Compile eval
warning: there was one feature warning; for details, enable `:setting -feature' or `:replay -feature'
res0: xsbti.compile.Inputs = Inputs(compilers: Compilers(scalac: Analyzing compiler (Scala 2.12.2), javaTools: sbt.internal.inc.javac.JavaTools$$anon$1@4ad9abe), options: CompileOptions(classpath: [Ljava.io.File;@3b26b97b, sources: [Ljava.io.File;@57fffab1, classesDirectory: /s/t-2017-06-09.1403/target/scala-2.12/classes, scalacOptions: [Ljava.lang.String;@507e27c7, javacOptions: [Ljava.lang.String;@38ee2f1c, maxErrors: 100, sourcePositionMapper: sbt.util.InterfaceUtil$ConcreteF1@360da41b, order: Mixed), setup: Setup(perClasspathEntryLookup: sbt.Defaults$$anon$2@1e0ffa19, skip: false, cacheFile: /s/t-2017-06-09.1403/target/streams/compile/incCompileSetup/$global/streams/inc_compile_2.12.zip, cache: sbt.internal.inc.FreshCompilerCache@436fc703, incrementalCompil... |
eed3si9n
approved these changes
Jun 13, 2017
Member
|
@dwijnand There's a label "in-progress." Does that mean it's a work in progress? |
Member
Author
|
Nope, that was automatic. This is good to go. |
dwijnand
added a commit
to dwijnand/zinc
that referenced
this pull request
Jul 31, 2017
Follow-up on sbt#314 - I _still_ misinterpreted.. Turns out the ".asInstanceOf[AnyRef].getClass.getName" implementation was the _original_ implementation. Then Mark switched to using bindValue in sbt/sbt@4b8f0f3. Since Scala 2.11.0 (scala/scala#1648 in particular) bindValue was removed. So we'll use NamedParam and quietBind, both which exist since Scala 2.9.0. Fixes sbt/sbt#2884, tested with local releases.
dwijnand
added a commit
to dwijnand/zinc
that referenced
this pull request
Aug 14, 2017
Follow-up on sbt#314 - I _still_ misinterpreted.. Turns out the ".asInstanceOf[AnyRef].getClass.getName" implementation was the _original_ implementation. Then Mark switched to using bindValue in sbt/sbt@4b8f0f3. Since Scala 2.11.0 (scala/scala#1648 in particular) bindValue was removed. So we'll use NamedParam and quietBind, both which exist since Scala 2.9.0. Fixes sbt/sbt#2884, tested with local releases.
dwijnand
added a commit
to dwijnand/zinc
that referenced
this pull request
Sep 5, 2017
Follow-up on sbt#314 - I _still_ misinterpreted.. Turns out the ".asInstanceOf[AnyRef].getClass.getName" implementation was the _original_ implementation. Then Mark switched to using bindValue in sbt/sbt@4b8f0f3. Since Scala 2.11.0 (scala/scala#1648 in particular) bindValue was removed. So we'll use NamedParam and quietBind, both which exist since Scala 2.9.0. Fixes sbt/sbt#2884, tested with local releases.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
In reference to sbt/sbt#2884 I'm seeing the
console helpers (cpHelpers) being statically 'Object', and therefore not
being that helpful:
This is because I misinterpreted the Scala 2.8 compatibility layer I
tore out in 1abf6ca.