json4s icon indicating copy to clipboard operation
json4s copied to clipboard

Use of json4s 4.1.0-M6 by other libraries infeasible

Open martin-ockajak opened this issue 1 year ago • 0 comments

Versions

  • json4s: 4.1.0-M6
  • Scala: 3.3.3
  • JDK: 22.0.1

Problem

It seems that the latest release of json4s was compiled using Scala 3.4.2 (a non-LTS version) which makes it infeasible for json4s to be used by other libraries which follow the official compiler version guidelines.

Recent use of Scala 3.4.2 for json4s build seems to be related to this otherwise wonderful effort: https://github.com/json4s/json4s/pull/1460. I understand this might not be fixable at the moment due to the following Scala 3.3.3 compiler bug: https://github.com/scala/scala3/issues/20263. The purpose of this issue is to serve as reminder to downgrade the build to Scala 3.3.x once this compiler bug is hopefully fixed.

When trying to use the latest json4s release in another library which uses the LTS version of the compiler the following error occurs:

[error] error while loading Typeable$package,
[error] class file scala/reflect/Typeable$package.class is broken, reading aborted with class dotty.tools.tasty.UnpickleException
[error] TASTy signature has wrong version.
[error]  expected: {majorVersion: 28, minorVersion: 3}
[error]  found   : {majorVersion: 28, minorVersion: 4}
[error]
[error] This TASTy file was produced by a more recent, forwards incompatible release.
[error] To read this TASTy file, please upgrade your tooling.
[error] The TASTy file was produced by Scala 3.4.2-bin-nonbootstrapped.
[error] error while loading $throws$package,
[error] class file scala/runtime/$throws$package.class is broken, reading aborted with class dotty.tools.tasty.UnpickleException
[error] TASTy signature has wrong version.
[error]  expected: {majorVersion: 28, minorVersion: 3}
[error]  found   : {majorVersion: 28, minorVersion: 4}

Reproduce

Build a project using json4s 4.1.0-M6 with Scala 3.3.x (LTS).

martin-ockajak avatar Jun 25 '24 15:06 martin-ockajak