rst/positronic_net — Issue #5: Compilation Error.
Author: wpoosanguansit
Created: 2012-02-17 16:34:06+00:00
State: open

Hi,

I am not really sure if this is from my set up or something else. I tried to upgrade to scala 2.9.1 by using ant. When I run it, I get this error:

[scalac] java.lang.Error: T in class PropertyLens cannot be instantiated from org.positronicnet.util.PropertyLens[TData,TProp]
[scalac]	at scala.tools.nsc.symtab.SymbolTable.abort(SymbolTable.scala:34)
[scalac]	at scala.tools.nsc.symtab.Types$AsSeenFromMap.throwError$1(Types.scala:3489)
[scalac]	at scala.tools.nsc.symtab.Types$AsSeenFromMap.instParam$1(Types.scala:3492)
[scalac]	at scala.tools.nsc.symtab.Types$AsSeenFromMap.toInstance$1(Types.scala:3504)
[scalac]	at scala.tools.nsc.symtab.Types$AsSeenFromMap.apply(Types.scala:3520)
[scalac]	at scala.tools.nsc.symtab.Types$AsSeenFromMap.apply(Types.scala:3389)
[scalac]	at scala.tools.nsc.symtab.Types$TypeMap$$anonfun$mapOverArgs$1.apply(Types.scala:3211)
[scalac]	at scala.tools.nsc.symtab.Types$TypeMap$$anonfun$mapOverArgs$1.apply(Types.scala:3207)
[scalac]	at scala.tools.nsc.symtab.Types$class.map2Conserve(Types.scala:4980)
[scalac]	at scala.tools.nsc.symtab.SymbolTable.map2Conserve(SymbolTable.scala:13)
[scalac]	at scala.tools.nsc.symtab.Types$TypeMap.mapOverArgs(Types.scala:3207)
[scalac]	at scala.tools.nsc.symtab.Types$TypeMap.mapOver(Types.scala:3114)
[scalac]	at scala.tools.nsc.symtab.Types$AsSeenFromMap.apply(Types.scala:3522)
[scalac]	at scala.tools.nsc.symtab.Types$AsSeenFromMap.apply(Types.scala:3389)
[scalac]	at scala.tools.nsc.symtab.Types$TypeMap.mapOver(Types.scala:3130)
[scalac]	at scala.tools.nsc.symtab.Types$AsSeenFromMap.apply(Types.scala:3522)
[scalac]	at scala.tools.nsc.symtab.Types$Type.asSeenFrom(Types.scala:546)
[scalac]	at scala.tools.nsc.symtab.Types$Type.computeMemberType(Types.scala:575)
[scalac]	at scala.tools.nsc.symtab.Symbols$MethodSymbol.typeAsMemberOf(Symbols.scala:1853)
[scalac]	at scala.tools.nsc.symtab.Types$Type.memberType(Types.scala:566)
[scalac]	at scala.tools.nsc.symtab.Types$SingleType.underlying(Types.scala:1163)
[scalac]	at scala.tools.nsc.symtab.Types$SingletonType.widen(Types.scala:1045)
[scalac]	at scala.tools.nsc.transform.ExplicitOuter$ExplicitOuterTransformer.transform(ExplicitOuter.scala:489)
[scalac]	at scala.tools.nsc.ast.Trees$Transformer.transform(Trees.scala:837)
[scalac]	at scala.tools.nsc.transform.TypingTransformers$TypingTransformer.transform(TypingTransformers.scala:53)
[scalac]	at scala.tools.nsc.transform.ExplicitOuter$OuterPathTransformer.transform(ExplicitOuter.scala:257)
[scalac]	at scala.tools.nsc.transform.ExplicitOuter$ExplicitOuterTransformer.transform(ExplicitOuter.scala:521)
[scalac]	at scala.tools.nsc.ast.Trees$Transformer$$anonfun$transformTrees$1.apply(Trees.scala:873)
[scalac]	at scala.tools.nsc.ast.Trees$Transformer$$anonfun$transformTrees$1.apply(Trees.scala:873)
[scalac]	at scala.collection.immutable.List.loop$1(List.scala:117)
[scalac]	at scala.collection.immutable.List.mapConserve(List.scala:133)
[scalac]	at scala.tools.nsc.ast.Trees$Transformer.transformTrees(Trees.scala:873)
[scalac]	at scala.tools.nsc.ast.Trees$Transformer.transform(Trees.scala:837)
[scalac]	at scala.tools.nsc.transform.TypingTransformers$TypingTransformer.transform(TypingTransformers.scala:53)
[scalac]	at scala.tools.nsc.transform.ExplicitOuter$OuterPathTransformer.transform(ExplicitOuter.scala:257)
[scalac]	at scala.tools.nsc.transform.ExplicitOuter$ExplicitOuterTransformer.transform(ExplicitOuter.scala:521)
[scalac]	at scala.tools.nsc.ast.Trees$Transformer.transform(Trees.scala:799)
[scalac]	at scala.tools.nsc.transform.TypingTransformers$TypingTransformer.transform(TypingTransformers.scala:53)
[scalac]	at scala.tools.nsc.transform.ExplicitOuter$OuterPathTransformer.transform(ExplicitOuter.scala:257)
[scalac]	at scala.tools.nsc.transform.ExplicitOuter$ExplicitOuterTransformer.transform(ExplicitOuter.scala:521)
[scalac]	at scala.tools.nsc.ast.Trees$Transformer$$anonfun$transform$5.apply(Trees.scala:783)
[scalac]	at scala.tools.nsc.ast.Trees$Transformer$$anonfun$transform$5.apply(Trees.scala:781)
[scalac]	at scala.tools.nsc.ast.Trees$Transformer.atOwner(Trees.scala:899)
[scalac]	at scala.tools.nsc.transform.TypingTransformers$TypingTransformer.atOwner(TypingTransformers.scala:38)
[scalac]	at scala.tools.nsc.transform.TypingTransformers$TypingTransformer.atOwner(TypingTransformers.scala:31)
[scalac]	at scala.tools.nsc.ast.Trees$Transformer.transform(Trees.scala:780)
[scalac]	at scala.tools.nsc.transform.TypingTransformers$TypingTransformer.transform(TypingTransformers.scala:53)
[scalac]	at scala.tools.nsc.transform.ExplicitOuter$OuterPathTransformer.transform(ExplicitOuter.scala:257)
[scalac]	at scala.tools.nsc.transform.ExplicitOuter$ExplicitOuterTransformer.transform(ExplicitOuter.scala:480)
[scalac]	at scala.tools.nsc.ast.Trees$Transformer$$anonfun$transformStats$1.apply(Trees.scala:891)
[scalac]	at scala.tools.nsc.ast.Trees$Transformer$$anonfun$transformStats$1.apply(Trees.scala:889)
[scalac]	at scala.collection.immutable.List.loop$1(List.scala:117)
[scalac]	at scala.collection.immutable.List.mapConserve(List.scala:133)
[scalac]	at scala.tools.nsc.ast.Trees$Transformer.transformStats(Trees.scala:889)
[scalac]	at scala.tools.nsc.ast.Trees$Transformer.transform(Trees.scala:797)
[scalac]	at scala.tools.nsc.transform.TypingTransformers$TypingTransformer.scala$tools$nsc$transform$TypingTransformers$TypingTransformer$$super$transform(TypingTransformers.scala:49)
[scalac]	at scala.tools.nsc.transform.TypingTransformers$TypingTransformer$$anonfun$transform$1.apply(TypingTransformers.scala:49)
[scalac]	at scala.tools.nsc.transform.TypingTransformers$TypingTransformer$$anonfun$transform$1.apply(TypingTransformers.scala:49)
[scalac]	at scala.tools.nsc.ast.Trees$Transformer.atOwner(Trees.scala:899)
[scalac]	at scala.tools.nsc.transform.TypingTransformers$TypingTransformer.atOwner(TypingTransformers.scala:38)
[scalac]	at scala.tools.nsc.transform.TypingTransformers$TypingTransformer.atOwner(TypingTransformers.scala:31)
[scalac]	at scala.tools.nsc.transform.TypingTransformers$TypingTransformer.transform(TypingTransformers.scala:49)
[scalac]	at scala.tools.nsc.transform.ExplicitOuter$OuterPathTransformer.transform(ExplicitOuter.scala:257)
[scalac]	at scala.tools.nsc.transform.ExplicitOuter$ExplicitOuterTransformer.transform(ExplicitOuter.scala:460)
[scalac]	at scala.tools.nsc.ast.Trees$Transformer.transformTemplate(Trees.scala:875)
[scalac]	at scala.tools.nsc.ast.Trees$Transformer$$anonfun$transform$2.apply(Trees.scala:767)
[scalac]	at scala.tools.nsc.ast.Trees$Transformer$$anonfun$transform$2.apply(Trees.scala:766)
[scalac]	at scala.tools.nsc.ast.Trees$Transformer.atOwner(Trees.scala:899)
[scalac]	at scala.tools.nsc.transform.TypingTransformers$TypingTransformer.atOwner(TypingTransformers.scala:38)
[scalac]	at scala.tools.nsc.transform.TypingTransformers$TypingTransformer.atOwner(TypingTransformers.scala:31)
[scalac]	at scala.tools.nsc.ast.Trees$Transformer.transform(Trees.scala:765)
[scalac]	at scala.tools.nsc.transform.TypingTransformers$TypingTransformer.transform(TypingTransformers.scala:53)
[scalac]	at scala.tools.nsc.transform.ExplicitOuter$OuterPathTransformer.transform(ExplicitOuter.scala:257)
[scalac]	at scala.tools.nsc.transform.ExplicitOuter$ExplicitOuterTransformer.transform(ExplicitOuter.scala:521)
[scalac]	at scala.tools.nsc.ast.Trees$Transformer$$anonfun$transformStats$1.apply(Trees.scala:891)
[scalac]	at scala.tools.nsc.ast.Trees$Transformer$$anonfun$transformStats$1.apply(Trees.scala:889)
[scalac]	at scala.collection.immutable.List.loop$1(List.scala:117)
[scalac]	at scala.collection.immutable.List.mapConserve(List.scala:133)
[scalac]	at scala.tools.nsc.ast.Trees$Transformer.transformStats(Trees.scala:889)
[scalac]	at scala.tools.nsc.ast.Trees$Transformer$$anonfun$transform$1.apply(Trees.scala:761)
[scalac]	at scala.tools.nsc.ast.Trees$Transformer$$anonfun$transform$1.apply(Trees.scala:761)
[scalac]	at scala.tools.nsc.ast.Trees$Transformer.atOwner(Trees.scala:899)
[scalac]	at scala.tools.nsc.transform.TypingTransformers$TypingTransformer.atOwner(TypingTransformers.scala:38)
[scalac]	at scala.tools.nsc.transform.TypingTransformers$TypingTransformer.atOwner(TypingTransformers.scala:31)
[scalac]	at scala.tools.nsc.ast.Trees$Transformer.transform(Trees.scala:760)
[scalac]	at scala.tools.nsc.transform.TypingTransformers$TypingTransformer.scala$tools$nsc$transform$TypingTransformers$TypingTransformer$$super$transform(TypingTransformers.scala:49)
[scalac]	at scala.tools.nsc.transform.TypingTransformers$TypingTransformer$$anonfun$transform$2.apply(TypingTransformers.scala:51)
[scalac]	at scala.tools.nsc.transform.TypingTransformers$TypingTransformer$$anonfun$transform$2.apply(TypingTransformers.scala:51)
[scalac]	at scala.tools.nsc.ast.Trees$Transformer.atOwner(Trees.scala:899)
[scalac]	at scala.tools.nsc.transform.TypingTransformers$TypingTransformer.atOwner(TypingTransformers.scala:38)
[scalac]	at scala.tools.nsc.transform.TypingTransformers$TypingTransformer.atOwner(TypingTransformers.scala:31)
[scalac]	at scala.tools.nsc.transform.TypingTransformers$TypingTransformer.transform(TypingTransformers.scala:51)
[scalac]	at scala.tools.nsc.transform.ExplicitOuter$OuterPathTransformer.transform(ExplicitOuter.scala:257)
[scalac]	at scala.tools.nsc.transform.ExplicitOuter$ExplicitOuterTransformer.transform(ExplicitOuter.scala:521)
[scalac]	at scala.tools.nsc.ast.Trees$Transformer.transformUnit(Trees.scala:892)
[scalac]	at scala.tools.nsc.transform.ExplicitOuter$ExplicitOuterTransformer.scala$tools$nsc$transform$ExplicitOuter$ExplicitOuterTransformer$$super$transformUnit(ExplicitOuter.scala:529)
[scalac]	at scala.tools.nsc.transform.ExplicitOuter$ExplicitOuterTransformer$$anonfun$transformUnit$1.apply(ExplicitOuter.scala:529)
[scalac]	at scala.tools.nsc.transform.ExplicitOuter$ExplicitOuterTransformer$$anonfun$transformUnit$1.apply(ExplicitOuter.scala:529)
[scalac]	at scala.tools.nsc.symtab.SymbolTable.atPhase(SymbolTable.scala:95)
[scalac]	at scala.tools.nsc.transform.ExplicitOuter$ExplicitOuterTransformer.transformUnit(ExplicitOuter.scala:529)
[scalac]	at scala.tools.nsc.transform.ExplicitOuter$ExplicitOuterTransformer.transformUnit(ExplicitOuter.scala:318)
[scalac]	at scala.tools.nsc.transform.Transform$Phase.apply(Transform.scala:30)
[scalac]	at scala.tools.nsc.Global$GlobalPhase.applyPhase(Global.scala:329)
[scalac]	at scala.tools.nsc.Global$GlobalPhase$$anonfun$run$1.apply(Global.scala:297)
[scalac]	at scala.tools.nsc.Global$GlobalPhase$$anonfun$run$1.apply(Global.scala:297)
[scalac]	at scala.collection.Iterator$class.foreach(Iterator.scala:660)
[scalac]	at scala.collection.mutable.ListBuffer$$anon$1.foreach(ListBuffer.scala:316)
[scalac]	at scala.tools.nsc.Global$GlobalPhase.run(Global.scala:297)
[scalac]	at scala.tools.nsc.transform.ExplicitOuter$Phase.run(ExplicitOuter.scala:539)
[scalac]	at scala.tools.nsc.Global$Run.compileSources(Global.scala:953)
[scalac]	at scala.tools.nsc.Global$Run.compile(Global.scala:1038)
[scalac]	at scala.tools.ant.Scalac.executeInternal(Scalac.scala:629)
[scalac]	at scala.tools.ant.Scalac.execute(Scalac.scala:577)
[scalac]	at org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:291)
[scalac]	at sun.reflect.GeneratedMethodAccessor4.invoke(Unknown Source)
[scalac]	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
[scalac]	at java.lang.reflect.Method.invoke(Method.java:597)
[scalac]	at org.apache.tools.ant.dispatch.DispatchUtils.execute(DispatchUtils.java:106)
[scalac]	at org.apache.tools.ant.Task.perform(Task.java:348)
[scalac]	at org.apache.tools.ant.Target.execute(Target.java:390)
[scalac]	at org.apache.tools.ant.Target.performTasks(Target.java:411)
[scalac]	at org.apache.tools.ant.Project.executeSortedTargets(Project.java:1399)
[scalac]	at org.apache.tools.ant.Project.executeTarget(Project.java:1368)
[scalac]	at org.apache.tools.ant.helper.DefaultExecutor.executeTargets(DefaultExecutor.java:41)
[scalac]	at org.eclipse.ant.internal.launching.remote.EclipseDefaultExecutor.executeTargets(EclipseDefaultExecutor.java:32)
[scalac]	at org.apache.tools.ant.Project.executeTargets(Project.java:1251)
[scalac]	at org.eclipse.ant.internal.launching.remote.InternalAntRunner.run(InternalAntRunner.java:424)
[scalac]	at org.eclipse.ant.internal.launching.remote.InternalAntRunner.main(InternalAntRunner.java:138)

I am not sure if it is my setup because now I tried to generate your project jar file for 2.9.1 it gives me and error on sbt publish-local saying

target/src_managed/main/scala/org/positronicnet/libresources/TR.scala:3: object android is not a member of package
[error] import _root_.android.view.View

So it is a double whammy for me. Thank you for your help or suggestion.