question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

TASTy signature has wrong version error

See original GitHub issue

Ideally, I don’t think this should really ever surface to the user. For example, a minified version of a script I have is currently causing this:

// using scala 3
import $dep.`com.lihaoyi::requests:0.6.9`

object LatestVersion extends App {

  val metadataLoc = ""
  val creds = ""

  val existingResponse = requests.get(
    metadataLoc,
    headers = Map(
      "Authorization" -> s"Basic: $creds"
    )
  )

}

And when I try to scala-cli run <file> you see the following:

❯ scala-cli run Request.scala
Compiling project (Scala 3.1.0, JVM)
Compiled project (Scala 3.1.0, JVM)
error while loading Typeable$package$,
class file scala/reflect/Typeable$package.class is broken, reading aborted with class dotty.tools.tasty.UnpickleException
TASTy signature has wrong version.
 expected: {majorVersion: 28, minorVersion: 0}
 found   : {majorVersion: 28, minorVersion: 1}

This TASTy file was produced by a more recent, forwards incompatible release.
To read this TASTy file, please upgrade your tooling.
The TASTy file was produced by Scala 3.1.0-bin-nonbootstrapped.
error while loading Quotes$package$,
class file scala/quoted/Quotes$package.class is broken, reading aborted with class dotty.tools.tasty.UnpickleException
TASTy signature has wrong version.
 expected: {majorVersion: 28, minorVersion: 0}
 found   : {majorVersion: 28, minorVersion: 1}

This TASTy file was produced by a more recent, forwards incompatible release.
To read this TASTy file, please upgrade your tooling.
The TASTy file was produced by Scala 3.1.0-bin-nonbootstrapped.
error while loading Expr$,
class file scala/quoted/runtime/Expr.class is broken, reading aborted with class dotty.tools.tasty.UnpickleException
TASTy signature has wrong version.
 expected: {majorVersion: 28, minorVersion: 0}
 found   : {majorVersion: 28, minorVersion: 1}

This TASTy file was produced by a more recent, forwards incompatible release.
To read this TASTy file, please upgrade your tooling.
The TASTy file was produced by Scala 3.1.0-bin-nonbootstrapped.
object Expr does not have a member method quote while compiling /var/folders/fq/nx_jsnyd6550xp03czx898d40000gn/T/runner_3.jar_sources3990067349970980520/scala/cli/runner/Stacktrace.tasty
Exception in thread "main" dotty.tools.dotc.core.TypeError: object Expr does not have a member method quote
        at dotty.tools.dotc.core.Denotations$Denotation.requiredSymbol(Denotations.scala:306)
        at dotty.tools.dotc.core.Denotations$Denotation.requiredMethod(Denotations.scala:313)
        at dotty.tools.dotc.core.Definitions.QuotedRuntime_exprQuote(Definitions.scala:797)
        at dotty.tools.dotc.transform.SymUtils$.isQuote(SymUtils.scala:237)
        at dotty.tools.dotc.CompilationUnit$Force.traverse(CompilationUnit.scala:139)
        at dotty.tools.dotc.CompilationUnit$.apply(CompilationUnit.scala:107)
        at dotty.tools.dotc.CompilationUnit$.apply(CompilationUnit.scala:98)
        at dotty.tools.dotc.fromtasty.ReadTasty.compilationUnit$1(ReadTasty.scala:42)
        at dotty.tools.dotc.fromtasty.ReadTasty.readTASTY(ReadTasty.scala:70)
        at dotty.tools.dotc.fromtasty.ReadTasty.runOn$$anonfun$1(ReadTasty.scala:25)
        at scala.collection.immutable.List.flatMap(List.scala:293)
        at dotty.tools.dotc.fromtasty.ReadTasty.runOn(ReadTasty.scala:25)
        at dotty.tools.dotc.Run.runPhases$4$$anonfun$4(Run.scala:205)
        at scala.runtime.function.JProcedure1.apply(JProcedure1.java:15)
        at scala.runtime.function.JProcedure1.apply(JProcedure1.java:10)
        at scala.collection.ArrayOps$.foreach$extension(ArrayOps.scala:1323)
        at dotty.tools.dotc.Run.runPhases$5(Run.scala:215)
        at dotty.tools.dotc.Run.compileUnits$$anonfun$1(Run.scala:223)
        at scala.runtime.java8.JFunction0$mcV$sp.apply(JFunction0$mcV$sp.scala:18)
        at dotty.tools.dotc.util.Stats$.maybeMonitored(Stats.scala:67)
        at dotty.tools.dotc.Run.compileUnits(Run.scala:230)
        at dotty.tools.dotc.Run.compileUnits(Run.scala:172)
        at dotty.tools.dotc.fromtasty.TASTYRun.compile(TASTYRun.scala:11)
        at dotty.tools.dotc.Driver.doCompile(Driver.scala:39)
        at dotty.tools.dotc.Driver.process(Driver.scala:199)
        at dotty.tools.dotc.Driver.process(Driver.scala:167)
        at dotty.tools.dotc.Driver.process(Driver.scala:179)
        at scala.tasty.inspector.TastyInspector$.inspectFiles(TastyInspector.scala:103)
        at scala.tasty.inspector.TastyInspector$.inspectAllTastyFiles(TastyInspector.scala:52)
        at scala.tasty.inspector.TastyInspector$.inspectTastyFiles(TastyInspector.scala:27)
        at org.virtuslab.stacktraces.core.StacktracesInspector$.inspectStackTrace(StacktracesInspector.scala:25)
        at scala.cli.runner.Stacktraces$.$anonfun$1(Stacktraces.scala:28)
        at scala.collection.immutable.List.flatMap(List.scala:293)
        at scala.cli.runner.Stacktraces$.convertToPrettyStackTrace(Stacktraces.scala:37)
        at scala.cli.runner.Stacktrace$.print(Stacktrace.scala:14)
        at scala.cli.runner.StackTracePrinter.printException(StackTracePrinter.scala:91)
        at scala.cli.runner.Runner$.main(Runner.scala:22)
        at scala.cli.runner.Runner.main(Runner.scala)

I’d wager that a user won’t have any clue what this error means. To be honest, I don’t even understand how there is a mismatch here and I’m also unsure where 3.1.0-bin-nonbootstrapped is actually coming from.

Issue Analytics

  • State:closed
  • Created 2 years ago
  • Comments:6 (6 by maintainers)

github_iconTop GitHub Comments

1reaction
tpasternakcommented, Dec 31, 2021

Thank you for reporting. Btw I found the example can be even shorter:

// using scala "3.1.0"

object LatestVersion extends App {
  throw new RuntimeException("")
}
0reactions
lwronskicommented, May 4, 2022

The above exception was thrown from pretty-stacktraces which was removed in ScalaCLI 0.1.5. So, this exception shouldn’t occur again.

Read more comments on GitHub >

github_iconTop Results From Across the Web

TASTy signature has wrong version. · Issue #827 - GitHub
class is broken, reading aborted with class dotty.tools.tasty.UnpickleException [error] TASTy signature has wrong version. [error] expected: { ...
Read more >
dotty.tools.tasty.UnpickleException - JetBrains YouTrack
dotty.tools.tasty.UnpickleException : TASTy signature has wrong version. Steps to reproduce the issue: import sbt project that depends on scala 3.0.0 final ...
Read more >
Using a Scala 3 Library in a Scala 2.13 Project - Stack Overflow
I try to use my Scala 3 Library in my Scala 2.13 Project. I get the following exception: (class scala.tools.tasty.UnpickleException/TASTy ...
Read more >
Strange errors compiling almond with scala 3.1.0 - Question
I have reported strange errors with Scala 3.1.0 that happen when building Almond ... UnpickleException/TASTy signature has wrong version.
Read more >
Scala signature package has wrong version expected: 5.0 found
There was no previous installation of Scala SDK (it's my first experience with Scala at all). What could be a reason for these...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found