Skip to content
This repository has been archived by the owner on Apr 13, 2021. It is now read-only.

Reapplying PR #198 on 0.6.x branch #207

Merged
merged 2 commits into from
Feb 25, 2018
Merged

Conversation

metasim
Copy link
Contributor

@metasim metasim commented Jan 18, 2018

Fixes #206. Same feature as #198.

NB: Scripted tests don't seem to be working on this branch (even before this merge).

@metasim
Copy link
Contributor Author

metasim commented Feb 8, 2018

@tpolecat Should I nag about this? Or is that annoying? :-)

@tpolecat
Copy link
Owner

tpolecat commented Feb 8, 2018

No, nagging is good. Thanks. Now that doobie 0.5.0 is out I'll try to spend some time on tut.

@bguseman
Copy link

I need this, too!

@tpolecat tpolecat merged commit 6630b92 into tpolecat:series/0.6.x Feb 25, 2018
@tpolecat
Copy link
Owner

You can test 0.6.3-M1 if you like.

@metasim
Copy link
Contributor Author

metasim commented Feb 26, 2018

@tpolecat Doesn't work with Scala 2.11 as the project Scala version (required for Spark users).

My plugins.sbt is thus:

resolvers += Resolver.bintrayIvyRepo("tpolecat", "sbt-plugins")
resolvers += Resolver.bintrayIvyRepo("tpolecat", "maven")
addSbtPlugin("org.tpolecat" % "tut-plugin" % "0.6.3-M1")

On update it fails trying to resolve the tut-core library here:

 http://dl.bintray.com/tpolecat/maven/org/tpolecat/tut-core_2.11/0.6.3-M1/tut-core_2.11-0.6.3-M1.pom

so I tried switching to 0.6.3-M5:

resolvers += Resolver.bintrayIvyRepo("tpolecat", "sbt-plugins")
resolvers += Resolver.bintrayIvyRepo("tpolecat", "maven")
addSbtPlugin("org.tpolecat" % "tut-plugin" % "0.6.3-M5")

and now update resolves fine, but when I run sbt tut I get this, which smells of a compiler library version mismatch:

sbt:RasterFrames> tut
[info] Compiling 1 Scala source to /Users/sfitch/Coding/OSS/raster-frames/target/scala-2.11/classes ...
[info] Done compiling.
[info] Running (fork) tut.TutMain /Users/sfitch/Coding/OSS/raster-frames/src/main/tut /Users/sfitch/Coding/OSS/raster-frames/target/scala-2.11/tut .*\.(md|markdown|txt|htm|html) -feature -deprecation
[info] [tut] compiling: /Users/sfitch/Coding/OSS/raster-frames/src/main/tut/apps/geotrellis-ops.md
[error] java.lang.NoClassDefFoundError: scala/reflect/internal/AnnotationInfos$ErroneousAnnotation$
[error] 	at scala.tools.nsc.interpreter.ReplGlobal$$anon$1.newTyper(ReplGlobal.scala:34)
[error] 	at scala.tools.nsc.typechecker.Namers$Namer.<init>(Namers.scala:58)
[error] 	at scala.tools.nsc.typechecker.Namers$NormalNamer.<init>(Namers.scala:50)
[error] 	at scala.tools.nsc.typechecker.Namers$class.newNamer(Namers.scala:51)
[error] 	at scala.tools.nsc.interpreter.ReplGlobal$$anon$1.newNamer(ReplGlobal.scala:23)
[error] 	at scala.tools.nsc.typechecker.Analyzer$namerFactory$$anon$1.apply(Analyzer.scala:43)
[error] 	at scala.tools.nsc.Global$GlobalPhase.applyPhase(Global.scala:430)
[error] 	at scala.tools.nsc.Global$GlobalPhase$$anonfun$run$1.apply(Global.scala:397)
[error] 	at scala.tools.nsc.Global$GlobalPhase$$anonfun$run$1.apply(Global.scala:397)
[error] 	at scala.collection.Iterator$class.foreach(Iterator.scala:891)
[error] 	at scala.collection.AbstractIterator.foreach(Iterator.scala:1334)
[error] 	at scala.tools.nsc.Global$GlobalPhase.run(Global.scala:397)
[error] 	at scala.tools.nsc.Global$Run.compileUnitsInternal(Global.scala:1625)
[error] 	at scala.tools.nsc.Global$Run.compileUnits(Global.scala:1610)
[error] 	at scala.tools.nsc.Global$Run.compileSources(Global.scala:1605)
[error] 	at scala.tools.nsc.interpreter.IMain.scala$tools$nsc$interpreter$IMain$$_initialize(IMain.scala:121)
[error] 	at scala.tools.nsc.interpreter.IMain.global$lzycompute(IMain.scala:149)
[error] 	at scala.tools.nsc.interpreter.IMain.global(IMain.scala:148)
[error] 	at scala.tools.nsc.interpreter.IMain.compile(IMain.scala:525)
[error] 	at scala.tools.nsc.interpreter.IMain.interpret(IMain.scala:519)
[error] 	at scala.tools.nsc.interpreter.IMain.interpret(IMain.scala:517)
[error] 	at tut.Tut$$anonfun$tut$Tut$$interp$1$$anonfun$apply$16$$anonfun$apply$17$$anonfun$apply$18$$anonfun$apply$19$$anonfun$apply$20.apply(Tut.scala:52)
[error] 	at tut.Tut$$anonfun$tut$Tut$$interp$1$$anonfun$apply$16$$anonfun$apply$17$$anonfun$apply$18$$anonfun$apply$19$$anonfun$apply$20.apply(Tut.scala:52)
[error] 	at tut.felix.IO$Primitive.unsafePerformIO(IO.scala:76)
[error] 	at tut.felix.IO$Compute.loop$1(IO.scala:117)
[error] 	at tut.felix.IO$Compute.unsafePerformIO(IO.scala:125)
[error] 	at tut.felix.Syntax$IOOps$$anonfun$withOut$1$$anonfun$apply$3.apply(Syntax.scala:32)
[error] 	at scala.util.DynamicVariable.withValue(DynamicVariable.scala:58)
[error] 	at scala.Console$.withOut(Console.scala:65)
[error] 	at tut.felix.Syntax$IOOps$$anonfun$withOut$1.apply(Syntax.scala:32)
[error] 	at tut.felix.IO$Primitive.unsafePerformIO(IO.scala:76)
[error] 	at tut.felix.IO$Compute.loop$1(IO.scala:121)
[error] 	at tut.felix.IO$Compute.unsafePerformIO(IO.scala:125)
[error] 	at tut.TutMain$.main(TutMain.scala:8)
[error] 	at tut.TutMain.main(TutMain.scala)
[error] Caused by: java.lang.ClassNotFoundException: scala.reflect.internal.AnnotationInfos$ErroneousAnnotation$
[error] 	at java.net.URLClassLoader.findClass(URLClassLoader.java:381)
[error] 	at java.lang.ClassLoader.loadClass(ClassLoader.java:424)
[error] 	at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:331)
[error] 	at java.lang.ClassLoader.loadClass(ClassLoader.java:357)
[error] 	... 35 more
[error] Exception in thread "main" java.lang.NoClassDefFoundError: scala/reflect/internal/AnnotationInfos$ErroneousAnnotation$
[error] 	at scala.tools.nsc.interpreter.ReplGlobal$$anon$1.newTyper(ReplGlobal.scala:34)
[error] 	at scala.tools.nsc.typechecker.Namers$Namer.<init>(Namers.scala:58)
[error] 	at scala.tools.nsc.typechecker.Namers$NormalNamer.<init>(Namers.scala:50)
[error] 	at scala.tools.nsc.typechecker.Namers$class.newNamer(Namers.scala:51)
[error] 	at scala.tools.nsc.interpreter.ReplGlobal$$anon$1.newNamer(ReplGlobal.scala:23)
[error] 	at scala.tools.nsc.typechecker.Analyzer$namerFactory$$anon$1.apply(Analyzer.scala:43)
[error] 	at scala.tools.nsc.Global$GlobalPhase.applyPhase(Global.scala:430)
[error] 	at scala.tools.nsc.Global$GlobalPhase$$anonfun$run$1.apply(Global.scala:397)
[error] 	at scala.tools.nsc.Global$GlobalPhase$$anonfun$run$1.apply(Global.scala:397)
[error] 	at scala.collection.Iterator$class.foreach(Iterator.scala:891)
[error] 	at scala.collection.AbstractIterator.foreach(Iterator.scala:1334)
[error] 	at scala.tools.nsc.Global$GlobalPhase.run(Global.scala:397)
[error] 	at scala.tools.nsc.Global$Run.compileUnitsInternal(Global.scala:1625)
[error] 	at scala.tools.nsc.Global$Run.compileUnits(Global.scala:1610)
[error] 	at scala.tools.nsc.Global$Run.compileSources(Global.scala:1605)
[error] 	at scala.tools.nsc.interpreter.IMain.compileSourcesKeepingRun(IMain.scala:388)
[error] 	at scala.tools.nsc.interpreter.IMain$ReadEvalPrint.compileAndSaveRun(IMain.scala:804)
[error] 	at scala.tools.nsc.interpreter.IMain$ReadEvalPrint.compile(IMain.scala:763)
[error] 	at scala.tools.nsc.interpreter.IMain$Request.compile$lzycompute(IMain.scala:939)
[error] 	at scala.tools.nsc.interpreter.IMain$Request.compile(IMain.scala:934)
[error] 	at scala.tools.nsc.interpreter.IMain.compile(IMain.scala:531)
[error] 	at scala.tools.nsc.interpreter.IMain.interpret(IMain.scala:519)
[error] 	at scala.tools.nsc.interpreter.IMain.interpret(IMain.scala:517)
[error] 	at tut.Tut$$anonfun$tut$Tut$$interp$1$$anonfun$apply$16$$anonfun$apply$17$$anonfun$apply$18$$anonfun$apply$19$$anonfun$apply$20.apply(Tut.scala:52)
[error] 	at tut.Tut$$anonfun$tut$Tut$$interp$1$$anonfun$apply$16$$anonfun$apply$17$$anonfun$apply$18$$anonfun$apply$19$$anonfun$apply$20.apply(Tut.scala:52)
[error] 	at tut.felix.IO$Primitive.unsafePerformIO(IO.scala:76)
[error] 	at tut.felix.IO$Compute.loop$1(IO.scala:117)
[error] 	at tut.felix.IO$Compute.unsafePerformIO(IO.scala:125)
[error] 	at tut.felix.Syntax$IOOps$$anonfun$withOut$1$$anonfun$apply$3.apply(Syntax.scala:32)
[error] 	at scala.util.DynamicVariable.withValue(DynamicVariable.scala:58)
[error] 	at scala.Console$.withOut(Console.scala:65)
[error] 	at tut.felix.Syntax$IOOps$$anonfun$withOut$1.apply(Syntax.scala:32)
[error] 	at tut.felix.IO$Primitive.unsafePerformIO(IO.scala:76)
[error] 	at tut.felix.IO$Compute.loop$1(IO.scala:121)
[error] 	at tut.felix.IO$Compute.unsafePerformIO(IO.scala:125)
[error] 	at tut.TutMain$.main(TutMain.scala:8)
[error] 	at tut.TutMain.main(TutMain.scala)
[error] Caused by: java.lang.ClassNotFoundException: scala.reflect.internal.AnnotationInfos$ErroneousAnnotation$
[error] 	at java.net.URLClassLoader.findClass(URLClassLoader.java:381)
[error] 	at java.lang.ClassLoader.loadClass(ClassLoader.java:424)
[error] 	at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:331)
[error] 	at java.lang.ClassLoader.loadClass(ClassLoader.java:357)
[error] 	... 37 more
[error] java.lang.RuntimeException: Nonzero exit code returned from runner: 1
[error] 	at scala.sys.package$.error(package.scala:27)
[error] 	at tut.TutPlugin$.$anonfun$tutOne$1(TutPlugin.scala:149)
[error] 	at scala.util.Success.foreach(Try.scala:249)
[error] 	at tut.TutPlugin$.tutOne(TutPlugin.scala:149)
[error] 	at tut.TutPlugin$.$anonfun$projectSettings$19(TutPlugin.scala:72)
[error] 	at scala.Function1.$anonfun$compose$1(Function1.scala:44)
[error] 	at sbt.internal.util.$tilde$greater.$anonfun$$u2219$1(TypeFunctions.scala:39)
[error] 	at sbt.std.Transform$$anon$4.work(System.scala:66)
[error] 	at sbt.Execute.$anonfun$submit$2(Execute.scala:262)
[error] 	at sbt.internal.util.ErrorHandling$.wideConvert(ErrorHandling.scala:16)
[error] 	at sbt.Execute.work(Execute.scala:271)
[error] 	at sbt.Execute.$anonfun$submit$1(Execute.scala:262)
[error] 	at sbt.ConcurrentRestrictions$$anon$4.$anonfun$submitValid$1(ConcurrentRestrictions.scala:174)
[error] 	at sbt.CompletionService$$anon$2.call(CompletionService.scala:36)
[error] 	at java.util.concurrent.FutureTask.run(FutureTask.java:266)
[error] 	at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
[error] 	at java.util.concurrent.FutureTask.run(FutureTask.java:266)
[error] 	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
[error] 	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
[error] 	at java.lang.Thread.run(Thread.java:745)
[error] (tut) Nonzero exit code returned from runner: 1
[error] Total time: 6 s, completed Feb 26, 2018 8:42:20 AM

@tpolecat
Copy link
Owner

Hm, nothing has changed in the 2.11 version and the scripted tests use it. I just did a sample project with 2.11 and it works for me. Can you make a reproduction?

@metasim
Copy link
Contributor Author

metasim commented Feb 26, 2018

You likely have tut-core cached locally. Are you seeing tut-core published per this path?:

http://dl.bintray.com/tpolecat/maven/org/tpolecat/tut-core_2.11/0.6.3-M1/tut-core_2.11-0.6.3-M1.pom

@tpolecat
Copy link
Owner

It works with M5 … no point trying M1

sbt:tt> tut
[info] Updating ...
[info] downloading http://dl.bintray.com/tpolecat/maven/org/tpolecat/tut-core_2.11/0.6.3-M5/tut-core_2.11-0.6.3-M5.jar ...
[info] 	[SUCCESSFUL ] org.tpolecat#tut-core_2.11;0.6.3-M5!tut-core_2.11.jar (668ms)

@tpolecat
Copy link
Owner

tpolecat commented Mar 1, 2018

@metasim can you confirm or deny that this patch works? The fork test runs in 2.11 and passes.

@metasim
Copy link
Contributor Author

metasim commented Mar 1, 2018

@tpolecat No, it doesn't work for me, but I haven't had time to determine why. I need to blow away my ivy cache, incrementally remove plugins, etc. to figure out what's going on. I can just file another PR if it does end up having something to do with tut.

@metasim
Copy link
Contributor Author

metasim commented Mar 1, 2018

PS: Doesn't work with M5 because I get the exception above.

@tpolecat
Copy link
Owner

tpolecat commented Mar 1, 2018

But it works ok with 0.6.2?

@metasim
Copy link
Contributor Author

metasim commented Mar 1, 2018

0.6.2 worked in sbt 0.13.13 with Scala 2.11.12.

This (0.6.3-M5) is failing with

  • sbt 1.1.1 (which implies scalaVersion := "2.12.4" for the plugins)
  • scalaVersion := "2.11.12" for the project

@tpolecat
Copy link
Owner

tpolecat commented Mar 1, 2018

Ok. The fork test passes for sbt 1.1.1 with scala 2.11.12 so I'm not sure where to go. If you can make a reproduction I'll certainly try to chase it down.

@metasim metasim deleted the fix-206 branch March 5, 2018 13:32
@metasim
Copy link
Contributor Author

metasim commented Mar 5, 2018

@tpolecat Thanks for you patience with this. I refactored my build (for other reasons), breaking it up into more subprojects, and now it works. My guess is that one of the other plugins I was using was colliding with it, but not really pressing enough for me to go back and diagnose it. So I say let's call this done. Thanks again for all your help.

@tpolecat
Copy link
Owner

tpolecat commented Mar 5, 2018

Great!

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants