Description
reproduction steps
using Scala 2.13.4 and 3.0.0-M2,
$ mm A.scala B.scala
==> A.scala <==
package foo
class A
==> B.scala <==
package bar
class B extends foo.A
$ scalac3 A.scala
$ scalac -2.13.4 -Ytasty-reader B.scala
error: error while loading A, class file './foo/A.class' is broken
(class scala.tools.tasty.UnpickleException/TASTy signature has wrong version.
expected: 24.0
found : 25.1)
B.scala:3: error: illegal inheritance;
self-type bar.B does not conform to foo.A's selftype foo.A
class B extends foo.A
^
2 errors
problem
I wasn't expecting 3.0.0-M2 to make the Tasty Reader functionality just shipped in 2.13.4 be unusable (@bishabosha's baby.)
notes
(Originally reported indirectly by @mpilquist.)
What to do? What to do immediately for the last pre-releases of Scala 3 doesn't matter so much. But what's important are the releases after that: minor releases (3.1/3.2), patch releases (3.0.1/3.0.2), and any pre-releases those might have.
@sjrd gave some thought as to whether it would be possible to untangle the tasty reader from living inside the compiler, such that it can be released outside of Scala's release cadence. But largely it wasn't initially pursued because the requirements overreach what the plugin infrastructure allows for.
I (@dwijnand) think we might be able to manage this sufficiently well by making sure that any Scala 3 release that bumps the format (just minor releases, I think/hope) is preceded by a 2.13 release that can parse it. But @smarter had some resistance to such coupling.
Any more ideas or thoughts?