scala / bug

Scala 2 bug reports only. Please, no questions — proper bug reports only.
https://scala-lang.org
230 stars 21 forks source link

TASTy reader should support Scala 3.4 #12932

Closed SethTisue closed 4 months ago

SethTisue commented 5 months ago

@bishabosha now that 3.4 seems like it could be imminent (3.4.0-RC2 is on Maven Central), could you make sure that the Scala 2 TASTy reader supports it...? We'd like to ship Scala 2.13.13 with 3.4 support in the TASTy reader.

bishabosha commented 5 months ago

On it!

bishabosha commented 5 months ago

Point of discussion here: 3.4.x is going to be laying the groundwork for Zinc pipelining support in Scala 3. That means a Scala 2 build with pipelining turned on is going to only see TASTy files on the classpath from an upstream Scala 3 project. This means that the current way of looking for the TASTY attribute in a classfile isn't going to work (there will be no classfiles).

So if we want to seriously support pipelining then we will need to make deeper cuts in the Scala 2 compiler to change classpath scanning to account for these TASTy only cases - see https://github.com/lampepfl/dotty/pull/17594

See https://github.com/scala/scala/pull/10670 for an implementation that seems to work (mixing directory and jar classpaths)