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

Scala 2.12.6 support #80

Closed
gvolpe opened this issue Jun 27, 2018 · 10 comments · Fixed by profunktor/redis4cats#14
Closed

Scala 2.12.6 support #80

gvolpe opened this issue Jun 27, 2018 · 10 comments · Fixed by profunktor/redis4cats#14

Comments

@gvolpe
Copy link

gvolpe commented Jun 27, 2018

Hi, not sure whether this is a bug on scribe, on tut or just a compatibility issue between these two dependencies. I have a project using sbt-microsites (that uses tut) that uses logback and slf4j. I tried to get rid of these two in favor of scribe but now I have a weird error and I couldn't find much information about it. Here's the diff.

Basically, sbt clean compile works fine but tut fails with the following error:

[SBT] fs2-redis λ tut
[info] Running tut.TutMain /workspace/oss/fs2-redis/site/src/main/tut /workspace/oss/fs2-redis/site/target/scala-2.12/resource_managed/main/jekyll .*\.(md|markdown|txt|htm|html) -Xmax-classfile-name 80 -deprecation -encoding UTF-8 -feature -Ypartial-unification -language:existentials -language:higherKinds -Xplugin:/home/gvolpe/.ivy2/cache/org.spire-math/kind-projector_2.12/jars/kind-projector_2.12-0.9.5.jar
[tut] compiling: /workspace/oss/fs2-redis/site/src/main/tut/streams.md
[error] (run-main-0) java.lang.VerifyError: class scala.tools.nsc.Global overrides final method assert.(ZLscala/Function0;)V
[error] java.lang.VerifyError: class scala.tools.nsc.Global overrides final method assert.(ZLscala/Function0;)V
[error] 	at java.lang.ClassLoader.defineClass1(Native Method)
[error] 	at java.lang.ClassLoader.defineClass(ClassLoader.java:763)
[error] 	at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:142)
[error] 	at java.net.URLClassLoader.defineClass(URLClassLoader.java:467)
[error] 	at java.net.URLClassLoader.access$100(URLClassLoader.java:73)
[error] 	at java.net.URLClassLoader$1.run(URLClassLoader.java:368)
[error] 	at java.net.URLClassLoader$1.run(URLClassLoader.java:362)
[error] 	at java.security.AccessController.doPrivileged(Native Method)
[error] 	at java.net.URLClassLoader.findClass(URLClassLoader.java:361)
[error] 	at java.lang.ClassLoader.loadClass(ClassLoader.java:424)
[error] 	at java.lang.ClassLoader.loadClass(ClassLoader.java:357)
[error] 	at tut.FileIO$.$anonfun$newInterpreter$1(FileIO.scala:62)
[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$2(Syntax.scala:32)
[error] 	at scala.util.DynamicVariable.withValue(DynamicVariable.scala:58)
[error] 	at scala.Console$.withOut(Console.scala:163)
[error] 	at tut.felix.Syntax$IOOps.$anonfun$withOut$1(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] 	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
[error] 	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
[error] 	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
[error] 	at java.lang.reflect.Method.invoke(Method.java:498)
[error] 	at sbt.Run.invokeMain(Run.scala:93)
[error] 	at sbt.Run.run0(Run.scala:87)
[error] 	at sbt.Run.execute$1(Run.scala:65)
[error] 	at sbt.Run.$anonfun$run$4(Run.scala:77)
[error] 	at scala.runtime.java8.JFunction0$mcV$sp.apply(JFunction0$mcV$sp.java:12)
[error] 	at sbt.util.InterfaceUtil$$anon$1.get(InterfaceUtil.scala:10)
[error] 	at sbt.TrapExit$App.run(TrapExit.scala:252)
[error] 	at java.lang.Thread.run(Thread.java:748)
[error] java.lang.RuntimeException: Nonzero exit code: 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:1149)
[error] 	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
[error] 	at java.lang.Thread.run(Thread.java:748)
[error] (microsite / tut) Nonzero exit code: 1
[error] Total time: 1 s, completed Jun 27, 2018 11:49:41 PM

Any ideas?

@darkfrog26
Copy link
Contributor

I'm not sure. I'm using Scala 2.12.6 in most of my projects and Scribe has been running flawlessly there. My best guess would be tut doesn't like something with regard to how Scribe uses Macros, but that's just a guess. I did a search for that error and saw that some other projects have had similar problems (all of them use Macros) but no indicator the cause. Unfortunately that error is incredibly generic.

@darkfrog26
Copy link
Contributor

I presume you've done a full clean before compiling?

@gvolpe
Copy link
Author

gvolpe commented Jun 28, 2018

I thought it might be related to macros but the reason I opened an issue here is because only happens when I add scribe to my dependencies, I'm guessing there must be some macros conflict with tut.

I downgraded to Scala 2.12.4 and the issue remains the same. Answering your last question, yes, I did a full clean and I even deleted all the target folders manually 😄

I'm asking in the sbt-microsites gitter channel as well, will report back as soon as I get some updates, thanks for looking into it.

@darkfrog26
Copy link
Contributor

Let me know if there's something in Scribe I can do to alleviate the symptoms, but I'm pretty sure this is a bug in tut.

@darkfrog26
Copy link
Contributor

@gvolpe, any updates on this?

@gvolpe
Copy link
Author

gvolpe commented Jul 21, 2018

Hi @darkfrog26 , sorry for my absent, been away for a couple of weeks.

I'll try to work it out in these days and will let you know if needs to be re-opened. I've been talking with @tpolecat about it and it might be a bug in tut but still, I need to do more research.

Thanks again for your time!

@gvolpe
Copy link
Author

gvolpe commented Jul 23, 2018

Hi again @darkfrog26 ,

I did ask for help in the scala/contributors channel and apparently what's causing the problem is the scala reflect library. Scribe pulls Scala 2.12.6 and it conflicts with some other libraries that compile against Scala 2.12.4 or prior.

I temporarily fixed the problem by downgrading to Scribe 2.3.0 that is built on top of Scala 2.12.4 and the problem disappears but this is far from ideal.

I'll report back if I have any updates on the matter.

@darkfrog26
Copy link
Contributor

Hmmm, that's a shame. Let me know if there's anything else I can do short of downgrading Scribe. You should try building tut against 2.12.6 and see if that fixes it.

@tpolecat
Copy link

tut 0.6.7 is out for 2.12.6 if you want to try it

@gvolpe
Copy link
Author

gvolpe commented Jul 24, 2018

Thanks @tpolecat will give it a try!

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

Successfully merging a pull request may close this issue.

3 participants