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

[1.x] .eval in consoleProject is broken #2884

Closed
dwijnand opened this issue Dec 28, 2016 · 7 comments
Closed

[1.x] .eval in consoleProject is broken #2884

dwijnand opened this issue Dec 28, 2016 · 7 comments
Assignees
Milestone

Comments

@dwijnand
Copy link
Member

steps

In my jenga-stack of sbt 1.x changes (possibly even on current HEAD of sbt/sbt 1.0.x branch), run (compileInputs in compile in Compile).eval

problem

scala> (compileInputs in compile in Compile).eval
<console>:39: error: value eval is not a member of sbt.TaskKey[xsbti.compile.Inputs]
       (compileInputs in compile in Compile).eval
                                                    ^

expectation

I expect the sbt.Compiler.Inputs or xsbti.compile.Inputs value.

notes

Discovered while trying to debug the 'compiler-project/src-dep-plugin' scripted test in sbt/sbt.

@dwijnand dwijnand added the Bug label Dec 28, 2016
@dwijnand dwijnand added this to the 1.0.0 milestone Mar 10, 2017
@dwijnand dwijnand self-assigned this Apr 3, 2017
@dwijnand
Copy link
Member Author

dwijnand commented Apr 4, 2017

This is really confusing.. here's me trying to figure it out, with little success:

> consoleProject
[info] Starting scala interpreter... (out-102)
[info]  (out-102)
Welcome to Scala 2.12.1 (Java HotSpot(TM) 64-Bit Server VM, Java 1.8.0_112).
Type in expressions for evaluation. Or try :help.

scala> import _root_.scala.xml.{TopScope=>$scope}
import _root_.sbt._
import _root_.sbt.Keys._
import _root_.sbt.plugins.IvyPlugin
import _root_.sbt.plugins.JvmPlugin
import _root_.sbt.plugins.CorePlugin
import _root_.sbt.plugins.JUnitXmlReportPlugin
import _root_.sbt.plugins.Giter8TemplatePlugin
import currentState._
import extracted._
import cpHelpers._


scala> val inputs = compileInputs in compile in Compile
inputs: sbt.TaskKey[xsbti.compile.Inputs] = sbt.Scoped$$anon$2@7b4b38bc

scala> import xsbti.compile.Inputs
import xsbti.compile.Inputs

scala> inputs.eval
<console>:38: error: value eval is not a member of sbt.TaskKey[xsbti.compile.Inputs]
       inputs.eval
              ^

scala> taskKeyEvaluate(inputs).eval
res1: T = Inputs(compilers: Compilers(scalac: Analyzing compiler (Scala 2.12.1), javaTools: sbt.internal.inc.javac.JavaTools$$anon$1@1a98448c), options: CompileOptions(classpath: [Ljava.io.File;@43bdb9c9, sources: [Ljava.io.File;@18035042, classesDirectory: /s/t/target/scala-2.12/classes, scalacOptions: [Ljava.lang.String;@6a54e6bf, javacOptions: [Ljava.lang.String;@32b0735d, maxErrors: 100, sourcePositionMapper: sbt.util.InterfaceUtil$ConcreteF1@1cedf733, order: Mixed), setup: Setup(perClasspathEntryLookup: sbt.Defaults$$anon$4@1eee35ac, skip: false, cacheFile: /s/t/target/streams/compile/incCompileSetup/$global/streams/inc_compile_2.12.zip, cache: sbt.internal.inc.CompilerCache$$anon$2@70ec04f0, incrementalCompilerOptions: IncOptions(transitiveStep: 3, recomp...
scala>

scala> taskKeyEvaluate(inputs): sbt.internal.ConsoleProject.Evaluate[Inputs]
<console>:38: error: type mismatch;
 found   : sbt.internal.ConsoleProject.Evaluate
 required: sbt.internal.ConsoleProject.Evaluate[xsbti.compile.Inputs]
       taskKeyEvaluate(inputs): sbt.internal.ConsoleProject.Evaluate[Inputs]
                      ^

scala> taskKeyEvaluate(inputs): sbt.internal.ConsoleProject.Evaluate
<console>:38: error: class Evaluate takes type parameters
       taskKeyEvaluate(inputs): sbt.internal.ConsoleProject.Evaluate
                                                            ^

scala> taskKeyEvaluate(inputs)
scala.reflect.internal.Types$TypeError: kinds of the type arguments (sbt.internal.ConsoleProject.Evaluate) do not conform to the expected kinds of the type parameters (type T0).
sbt.internal.ConsoleProject.Evaluate's type parameters do not match type T0's expected parameters:
class Evaluate has one type parameter, but type T0 has none
	at scala.tools.nsc.typechecker.Contexts$ThrowingReporter.handleError(Contexts.scala:1374)
	at scala.tools.nsc.typechecker.Contexts$ContextReporter.issue(Contexts.scala:1226)
	at scala.tools.nsc.typechecker.Contexts$Context.issue(Contexts.scala:575)
	at scala.tools.nsc.typechecker.Typers$Typer.$anonfun$typed1$29(Typers.scala:4669)
	at scala.tools.nsc.typechecker.Typers$Typer.$anonfun$typed1$28(Typers.scala:4669)
	at scala.tools.nsc.typechecker.Typers$Typer.normalTypedApply$1(Typers.scala:4642)
	at scala.tools.nsc.typechecker.Typers$Typer.typedApply$1(Typers.scala:4700)
	at scala.tools.nsc.typechecker.Typers$Typer.typedInAnyMode$1(Typers.scala:5466)
	at scala.tools.nsc.typechecker.Typers$Typer.typed1(Typers.scala:5483)
	at scala.tools.nsc.typechecker.Typers$Typer.runTyper$1(Typers.scala:5519)
	at scala.tools.nsc.typechecker.Typers$Typer.typedInternal(Typers.scala:5549)
	at scala.tools.nsc.typechecker.Typers$Typer.body$2(Typers.scala:5493)
	at scala.tools.nsc.typechecker.Typers$Typer.typed(Typers.scala:5497)
	at scala.tools.nsc.typechecker.Typers$Typer.typedByValueExpr(Typers.scala:5580)
	at scala.tools.nsc.typechecker.Typers$Typer.typedAssign$1(Typers.scala:4340)
	at scala.tools.nsc.typechecker.Typers$Typer.typedOutsidePatternMode$1(Typers.scala:5447)
	at scala.tools.nsc.typechecker.Typers$Typer.typedInAnyMode$1(Typers.scala:5476)
	at scala.tools.nsc.typechecker.Typers$Typer.typed1(Typers.scala:5483)
	at scala.tools.nsc.typechecker.Typers$Typer.runTyper$1(Typers.scala:5519)
	at scala.tools.nsc.typechecker.Typers$Typer.typedInternal(Typers.scala:5549)
	at scala.tools.nsc.typechecker.Typers$Typer.body$2(Typers.scala:5493)
	at scala.tools.nsc.typechecker.Typers$Typer.typed(Typers.scala:5497)
	at scala.tools.nsc.typechecker.Typers$Typer.typedByValueExpr(Typers.scala:5580)
	at scala.tools.nsc.typechecker.Typers$Typer.typedStat$1(Typers.scala:3062)
	at scala.tools.nsc.typechecker.Typers$Typer.$anonfun$typedStats$9(Typers.scala:3206)
	at scala.tools.nsc.typechecker.Typers$Typer.typedStats(Typers.scala:3206)
	at scala.tools.nsc.typechecker.Typers$Typer.typedBlock(Typers.scala:2443)
	at scala.tools.nsc.typechecker.Typers$Typer.$anonfun$typed1$91(Typers.scala:5441)
	at scala.tools.nsc.typechecker.Typers$Typer.$anonfun$typerWithLocalContext$1(Typers.scala:491)
	at scala.tools.nsc.typechecker.Typers$Typer.typedOutsidePatternMode$1(Typers.scala:491)
	at scala.tools.nsc.typechecker.Typers$Typer.typedInAnyMode$1(Typers.scala:5476)
	at scala.tools.nsc.typechecker.Typers$Typer.typed1(Typers.scala:5483)
	at scala.tools.nsc.typechecker.Typers$Typer.runTyper$1(Typers.scala:5519)
	at scala.tools.nsc.typechecker.Typers$Typer.typedInternal(Typers.scala:5549)
	at scala.tools.nsc.typechecker.Typers$Typer.body$2(Typers.scala:5493)
	at scala.tools.nsc.typechecker.Typers$Typer.typed(Typers.scala:5497)
	at scala.tools.nsc.typechecker.Typers$Typer.typed(Typers.scala:5591)
	at scala.tools.nsc.typechecker.Typers$Typer.typedIf$1(Typers.scala:4357)
	at scala.tools.nsc.typechecker.Typers$Typer.typedOutsidePatternMode$1(Typers.scala:5442)
	at scala.tools.nsc.typechecker.Typers$Typer.typedInAnyMode$1(Typers.scala:5476)
	at scala.tools.nsc.typechecker.Typers$Typer.typed1(Typers.scala:5483)
	at scala.tools.nsc.typechecker.Typers$Typer.runTyper$1(Typers.scala:5519)
	at scala.tools.nsc.typechecker.Typers$Typer.typedInternal(Typers.scala:5549)
	at scala.tools.nsc.typechecker.Typers$Typer.body$2(Typers.scala:5493)
	at scala.tools.nsc.typechecker.Typers$Typer.typed(Typers.scala:5497)
	at scala.tools.nsc.typechecker.Typers$Typer.$anonfun$typedArg$1(Typers.scala:3219)
	at scala.tools.nsc.typechecker.Typers$Typer.typedArg(Typers.scala:482)
	at scala.tools.nsc.typechecker.Typers$Typer.typedArgToPoly$1(Typers.scala:3609)
	at scala.tools.nsc.typechecker.Typers$Typer.$anonfun$doTypedApply$33(Typers.scala:3617)
	at scala.tools.nsc.typechecker.Typers$Typer.handlePolymorphicCall$1(Typers.scala:3617)
	at scala.tools.nsc.typechecker.Typers$Typer.doTypedApply(Typers.scala:3628)
	at scala.tools.nsc.typechecker.Typers$Typer.normalTypedApply$1(Typers.scala:4666)
	at scala.tools.nsc.typechecker.Typers$Typer.typedApply$1(Typers.scala:4700)
	at scala.tools.nsc.typechecker.Typers$Typer.typedInAnyMode$1(Typers.scala:5466)
	at scala.tools.nsc.typechecker.Typers$Typer.typed1(Typers.scala:5483)
	at scala.tools.nsc.typechecker.Typers$Typer.runTyper$1(Typers.scala:5519)
	at scala.tools.nsc.typechecker.Typers$Typer.typedInternal(Typers.scala:5549)
	at scala.tools.nsc.typechecker.Typers$Typer.body$2(Typers.scala:5493)
	at scala.tools.nsc.typechecker.Typers$Typer.typed(Typers.scala:5497)
	at scala.tools.nsc.typechecker.Typers$Typer.typedByValueExpr(Typers.scala:5580)
	at scala.tools.nsc.typechecker.Typers$Typer.typedStat$1(Typers.scala:3062)
	at scala.tools.nsc.typechecker.Typers$Typer.$anonfun$typedStats$9(Typers.scala:3206)
	at scala.tools.nsc.typechecker.Typers$Typer.typedStats(Typers.scala:3206)
	at scala.tools.nsc.typechecker.Typers$Typer.typedBlock(Typers.scala:2443)
	at scala.tools.nsc.typechecker.Typers$Typer.$anonfun$typed1$91(Typers.scala:5441)
	at scala.tools.nsc.typechecker.Typers$Typer.$anonfun$typerWithLocalContext$1(Typers.scala:491)
	at scala.tools.nsc.typechecker.Typers$Typer.typedOutsidePatternMode$1(Typers.scala:491)
	at scala.tools.nsc.typechecker.Typers$Typer.typedInAnyMode$1(Typers.scala:5476)
	at scala.tools.nsc.typechecker.Typers$Typer.typed1(Typers.scala:5483)
	at scala.tools.nsc.typechecker.Typers$Typer.runTyper$1(Typers.scala:5519)
	at scala.tools.nsc.typechecker.Typers$Typer.typedInternal(Typers.scala:5549)
	at scala.tools.nsc.typechecker.Typers$Typer.body$2(Typers.scala:5493)
	at scala.tools.nsc.typechecker.Typers$Typer.typed(Typers.scala:5497)
	at scala.tools.nsc.typechecker.Typers$Typer.transformedOrTyped(Typers.scala:5730)
	at scala.tools.nsc.typechecker.Typers$Typer.typedDefDef(Typers.scala:2274)
	at scala.tools.nsc.typechecker.Typers$Typer.typedMemberDef$1(Typers.scala:5431)
	at scala.tools.nsc.typechecker.Typers$Typer.typed1(Typers.scala:5482)
	at scala.tools.nsc.typechecker.Typers$Typer.runTyper$1(Typers.scala:5519)
	at scala.tools.nsc.typechecker.Typers$Typer.typedInternal(Typers.scala:5549)
	at scala.tools.nsc.typechecker.Typers$Typer.body$2(Typers.scala:5493)
	at scala.tools.nsc.typechecker.Typers$Typer.typed(Typers.scala:5497)
	at scala.tools.nsc.typechecker.Typers$Typer.typed(Typers.scala:5576)
	at scala.tools.nsc.typechecker.Typers$Typer.typedPos(Typers.scala:5583)
	at scala.tools.nsc.transform.Fields$FieldsTransformer.typedPos(Fields.scala:541)
	at scala.tools.nsc.transform.AccessorSynthesis$CheckedAccessorTreeSynthesis$SynthLazyAccessorsIn.$anonfun$expandLazyClassMember$2(AccessorSynthesis.scala:347)
	at scala.tools.nsc.transform.AccessorSynthesis$CheckedAccessorTreeSynthesis$SynthLazyAccessorsIn.$anonfun$expandLazyClassMember$1(AccessorSynthesis.scala:347)
	at scala.tools.nsc.transform.AccessorSynthesis$CheckedAccessorTreeSynthesis$SynthLazyAccessorsIn.expandLazyClassMember(AccessorSynthesis.scala:347)
	at scala.tools.nsc.transform.Fields$FieldsTransformer.transform(Fields.scala:736)
	at scala.tools.nsc.transform.Fields$FieldsTransformer.transformTermsAtExprOwner(Fields.scala:763)
	at scala.tools.nsc.transform.Fields$FieldsTransformer.$anonfun$transformStats$3(Fields.scala:776)
	at scala.tools.nsc.transform.Fields$FieldsTransformer.transformStats(Fields.scala:776)
	at scala.tools.nsc.transform.Fields$FieldsTransformer.transformStats(Fields.scala:540)
	at scala.reflect.internal.Trees.itransform(Trees.scala:1408)
	at scala.reflect.internal.Trees.itransform$(Trees.scala:1340)
	at scala.reflect.internal.SymbolTable.itransform(SymbolTable.scala:16)
	at scala.reflect.internal.SymbolTable.itransform(SymbolTable.scala:16)
	at scala.reflect.api.Trees$Transformer.transform(Trees.scala:2555)
	at scala.tools.nsc.transform.TypingTransformers$TypingTransformer.super$transform(TypingTransformers.scala:40)
	at scala.tools.nsc.transform.TypingTransformers$TypingTransformer.$anonfun$transform$1(TypingTransformers.scala:40)
	at scala.tools.nsc.transform.TypingTransformers$TypingTransformer.atOwner(TypingTransformers.scala:30)
	at scala.tools.nsc.transform.TypingTransformers$TypingTransformer.transform(TypingTransformers.scala:25)
	at scala.tools.nsc.transform.Fields$FieldsTransformer.transform(Fields.scala:755)
	at scala.tools.nsc.transform.Fields$FieldsTransformer.transform(Fields.scala:540)
	at scala.reflect.api.Trees$Transformer.transformTemplate(Trees.scala:2563)
	at scala.reflect.internal.Trees.$anonfun$itransform$4(Trees.scala:1412)
	at scala.tools.nsc.transform.TypingTransformers$TypingTransformer.atOwner(TypingTransformers.scala:30)
	at scala.tools.nsc.transform.TypingTransformers$TypingTransformer.atOwner(TypingTransformers.scala:25)
	at scala.reflect.internal.Trees.itransform(Trees.scala:1411)
	at scala.reflect.internal.Trees.itransform$(Trees.scala:1340)
	at scala.reflect.internal.SymbolTable.itransform(SymbolTable.scala:16)
	at scala.reflect.internal.SymbolTable.itransform(SymbolTable.scala:16)
	at scala.reflect.api.Trees$Transformer.transform(Trees.scala:2555)
	at scala.tools.nsc.transform.TypingTransformers$TypingTransformer.transform(TypingTransformers.scala:44)
	at scala.tools.nsc.transform.Fields$FieldsTransformer.transform(Fields.scala:746)
	at scala.tools.nsc.transform.Fields$FieldsTransformer.$anonfun$transformStats$4(Fields.scala:776)
	at scala.tools.nsc.transform.Fields$FieldsTransformer.transformStats(Fields.scala:776)
	at scala.tools.nsc.transform.Fields$FieldsTransformer.transformStats(Fields.scala:540)
	at scala.reflect.internal.Trees.$anonfun$itransform$7(Trees.scala:1430)
	at scala.tools.nsc.transform.TypingTransformers$TypingTransformer.atOwner(TypingTransformers.scala:30)
	at scala.tools.nsc.transform.TypingTransformers$TypingTransformer.atOwner(TypingTransformers.scala:25)
	at scala.reflect.internal.Trees.itransform(Trees.scala:1430)
	at scala.reflect.internal.Trees.itransform$(Trees.scala:1340)
	at scala.reflect.internal.SymbolTable.itransform(SymbolTable.scala:16)
	at scala.reflect.internal.SymbolTable.itransform(SymbolTable.scala:16)
	at scala.reflect.api.Trees$Transformer.transform(Trees.scala:2555)
	at scala.tools.nsc.transform.TypingTransformers$TypingTransformer.super$transform(TypingTransformers.scala:40)
	at scala.tools.nsc.transform.TypingTransformers$TypingTransformer.$anonfun$transform$2(TypingTransformers.scala:42)
	at scala.tools.nsc.transform.TypingTransformers$TypingTransformer.atOwner(TypingTransformers.scala:30)
	at scala.tools.nsc.transform.TypingTransformers$TypingTransformer.transform(TypingTransformers.scala:25)
	at scala.tools.nsc.transform.Fields$FieldsTransformer.transform(Fields.scala:755)
	at scala.tools.nsc.transform.Fields$FieldsTransformer.transform(Fields.scala:540)
	at scala.tools.nsc.ast.Trees$Transformer.transformUnit(Trees.scala:140)
	at scala.tools.nsc.transform.Transform$Phase.apply(Transform.scala:30)
	at scala.tools.nsc.Global$GlobalPhase.$anonfun$applyPhase$1(Global.scala:416)
	at scala.tools.nsc.Global$GlobalPhase.applyPhase(Global.scala:409)
	at scala.tools.nsc.Global$GlobalPhase.$anonfun$run$1(Global.scala:380)
	at scala.tools.nsc.Global$GlobalPhase.$anonfun$run$1$adapted(Global.scala:380)
	at scala.collection.Iterator.foreach(Iterator.scala:929)
	at scala.collection.Iterator.foreach$(Iterator.scala:929)
	at scala.collection.AbstractIterator.foreach(Iterator.scala:1406)
	at scala.tools.nsc.Global$GlobalPhase.run(Global.scala:380)
	at scala.tools.nsc.Global$Run.compileUnitsInternal(Global.scala:1418)
	at scala.tools.nsc.Global$Run.compileUnits(Global.scala:1403)
	at scala.tools.nsc.Global$Run.compileSources(Global.scala:1398)
	at scala.tools.nsc.interpreter.IMain.compileSourcesKeepingRun(IMain.scala:430)
	at scala.tools.nsc.interpreter.IMain$ReadEvalPrint.compileAndSaveRun(IMain.scala:801)
	at scala.tools.nsc.interpreter.IMain$ReadEvalPrint.compile(IMain.scala:759)
	at scala.tools.nsc.interpreter.IMain$Request.$anonfun$compile$4(IMain.scala:965)
	at scala.runtime.java8.JFunction0$mcZ$sp.apply(JFunction0$mcZ$sp.java:12)
	at scala.tools.nsc.interpreter.IMain.$anonfun$withoutWarnings$1(IMain.scala:104)
	at scala.tools.nsc.interpreter.IMain.beQuietDuring(IMain.scala:209)
	at scala.tools.nsc.interpreter.IMain.withoutWarnings(IMain.scala:99)
	at scala.tools.nsc.interpreter.IMain$Request.compile$lzycompute(IMain.scala:965)
	at scala.tools.nsc.interpreter.IMain$Request.compile(IMain.scala:943)
	at scala.tools.nsc.interpreter.IMain.compile(IMain.scala:599)
	at scala.tools.nsc.interpreter.IMain.interpret(IMain.scala:588)
	at scala.tools.nsc.interpreter.IMain.interpret(IMain.scala:560)
	at scala.tools.nsc.interpreter.ILoop.interpretStartingWith(ILoop.scala:825)
	at scala.tools.nsc.interpreter.ILoop.command(ILoop.scala:684)
	at scala.tools.nsc.interpreter.ILoop.processLine(ILoop.scala:402)
	at scala.tools.nsc.interpreter.ILoop.loop(ILoop.scala:423)
	at scala.tools.nsc.interpreter.ILoop.$anonfun$process$1(ILoop.scala:993)
	at scala.tools.nsc.interpreter.ILoop.process(ILoop.scala:892)
	at xsbt.ConsoleInterface.run(ConsoleInterface.scala:68)
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
	at java.lang.reflect.Method.invoke(Method.java:498)
	at sbt.internal.inc.AnalyzingCompiler.call(AnalyzingCompiler.scala:259)
	at sbt.internal.inc.AnalyzingCompiler.console(AnalyzingCompiler.scala:224)
	at sbt.Console.console0$1(Console.scala:26)
	at sbt.Console.$anonfun$apply$1(Console.scala:29)
	at scala.runtime.java8.JFunction0$mcV$sp.apply(JFunction0$mcV$sp.java:12)
	at sbt.util.InterfaceUtil$ConcreteF0.apply(InterfaceUtil.scala:40)
	at sbt.TrapExit$App.run(TrapExit.scala:247)
	at java.lang.Thread.run(Thread.java:745)

That entry seems to have slain the compiler.  Shall I replay
your session? I can re-run each line except the last one.
[y/n]Replaying: val inputs = compileInputs in compile in Compile

I need backup.. @retronym @adriaanm @lrytz, apologies for the ping, any idea why I'm told:

scala.reflect.internal.Types$TypeError: kinds of the type arguments (sbt.internal.ConsoleProject.Evaluate) do not conform to the expected kinds of the type parameters (type T0).
sbt.internal.ConsoleProject.Evaluate's type parameters do not match type T0's expected parameters:
class Evaluate has one type parameter, but type T0 has none

?

The relevant code is (fairly) straight-forward, and hasn't varied much since 0.13.13: main/src/main/scala/sbt/internal/ConsoleProject.scala

@dwijnand
Copy link
Member Author

dwijnand commented Apr 4, 2017

Please don't misread the "Regression" as an indication that this ticket is urgent. It's not.

I just want to fix it for 1.0.0, ideally sooner rather than later so I can use .eval in the pre-releases.

@dwijnand dwijnand modified the milestones: 1.0.0-RC1, 1.0.0 Jun 1, 2017
dwijnand added a commit to dwijnand/zinc that referenced this issue Jun 9, 2017
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.
@jvican
Copy link
Member

jvican commented Jul 26, 2017

It seems this is still present in RC2:

(compileInputs in compile in Compile).eval
<console>:94: error: value eval is not a member of sbt.TaskKey[xsbti.compile.Inputs]
       (compileInputs in compile in Compile).eval
                                             ^

@dwijnand dwijnand modified the milestones: 1.0.0-RC3, 1.0.0-RC1 Jul 26, 2017
@dwijnand dwijnand reopened this Jul 26, 2017
@eed3si9n eed3si9n modified the milestones: 1.0.1, 1.0.0-RC3 Jul 28, 2017
@eed3si9n
Copy link
Member

Moving this to 1.0.1 milestone.

dwijnand added a commit to dwijnand/zinc that referenced this issue 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
Copy link
Member Author

dwijnand commented Aug 1, 2017

sbt/zinc#386

@dwijnand dwijnand closed this as completed Aug 1, 2017
dwijnand added a commit to dwijnand/zinc that referenced this issue 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 issue 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.
@eed3si9n eed3si9n reopened this Sep 5, 2017
@eed3si9n eed3si9n modified the milestones: 1.0.2, 1.0.1 Sep 5, 2017
@dwijnand
Copy link
Member Author

dwijnand commented Sep 6, 2017

This is pending the merge of sbt/zinc#386 and an upgrade of zinc here that includes that fix.

eed3si9n added a commit to eed3si9n/sbt that referenced this issue Sep 16, 2017
@eed3si9n
Copy link
Member

Fixed in #3549

eed3si9n pushed a commit to eed3si9n/scala that referenced this issue May 14, 2019
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 1abf6ca3bfe0628321e1562a9b4cfe58e19ab7b7.
eed3si9n pushed a commit to eed3si9n/scala that referenced this issue May 14, 2019
Follow-up on scala#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#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.
lrytz pushed a commit to lrytz/scala that referenced this issue Nov 5, 2019
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 1abf6ca3bfe0628321e1562a9b4cfe58e19ab7b7.

Rewritten from sbt/zinc@0e4bb2c
lrytz pushed a commit to lrytz/scala that referenced this issue Nov 5, 2019
Follow-up on scala#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#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.

Rewritten from sbt/zinc@33d2e68
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Aug 24, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

3 participants