Skip to content

Clueless error message #24233

@tribbloid

Description

@tribbloid

Compiler version

3.3.6

Minimized code

N/A, bug triggered by bytecode

To reproduce, checkout https://github.com/tribbloid/dottyspike/blob/5099a9e880bc419ec92771a0dd317332e71834c9/ recursively and compile it

Output

[Error] : error while loading package,
  class file /home/peng/git/dottyspike/six-scala/module/spark/build/classes/scala/main/ai/acyclic/six/spark/package.class is broken (version 52.0),
  please check the JDK compatibility of your Scala version (3.3.6),
  reading aborted with class dotty.tools.tasty.UnpickleException:
  TASTy signature has wrong version.
 expected: {majorVersion: 28, minorVersion: 3}
 found   : {majorVersion: 28, minorVersion: 7}

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.7.1.
one error found

Expectation

This error message revealed at least 2 problem:

  1. The first part asked to "check the JDK compatibility", but the JDK of majorVersion 28 either doesn't exist or is out of production a long time ago. In my environment, the project is compiled using JDK 17 everywhere.

  2. The second part reported that "The TASTy file was produced by Scala 3.7.1", but it is clearly suggested that the only compiler involved is Scala 3.3.6

The compiler should submit a consistency failure error automatically through telemetry in case it happened

Metadata

Metadata

Assignees

No one assigned

    Labels

    area:reportingError reporting including formatting, implicit suggestions, etcbetter-errorsIssues concerned with improving confusing/unhelpful diagnostic messagesgood first issuePerfect for someone who wants to get started contributingitype:bug

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions