Skip to content

Commit

Permalink
support Scala 3.6 in TASTy reader
Browse files Browse the repository at this point in the history
Co-authored-by: Seth Tisue <seth@tisue.net>
  • Loading branch information
bishabosha and SethTisue committed Oct 21, 2024
1 parent 40829b8 commit 7b4e080
Show file tree
Hide file tree
Showing 5 changed files with 7 additions and 9 deletions.
2 changes: 1 addition & 1 deletion project/DottySupport.scala
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ import sbt.librarymanagement.{
* Settings to support validation of TastyUnpickler against the release of dotty with the matching TASTy version
*/
object TastySupport {
val supportedTASTyRelease = "3.5.2-RC2" // TASTY: 28.5-1
val supportedTASTyRelease = "3.6.1" // TASTY: 28.6-0
val scala3Compiler = "org.scala-lang" % "scala3-compiler_3" % supportedTASTyRelease
val scala3Library = "org.scala-lang" % "scala3-library_3" % supportedTASTyRelease

Expand Down
4 changes: 1 addition & 3 deletions src/compiler/scala/tools/nsc/tasty/TastyUnpickler.scala
Original file line number Diff line number Diff line change
Expand Up @@ -71,9 +71,7 @@ object TastyUnpickler {
/** When Scala 3 is in an RC phase for a new minor version, we put here the TASTy of that Minor,
* otherwise it should be empty.
*/
final val toolOverrides: List[TastyVersion] = List(
TastyVersion(28, 5, 1) // 3.5.0-RC4 // TODO: remove this when 3.5.0 is released
)
final val toolOverrides: List[TastyVersion] = List()

private def asScala3Compiler(version: TastyVersion): String =
if (version.major == 28) {
Expand Down
4 changes: 2 additions & 2 deletions src/compiler/scala/tools/tasty/TastyFormat.scala
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@

package scala.tools.tasty

// revision: https://github.com/scala/scala3/commit/5189e6854ad1dacc3454542c2f124f5bcb7e2a9c
// revision: https://github.com/scala/scala3/commit/24bff2a019afcf0f45ddfd3af6b213e7e228471c
object TastyFormat {

/** The first four bytes of a TASTy file, followed by four values:
Expand All @@ -36,7 +36,7 @@ object TastyFormat {
* compatibility, but remains backwards compatible, with all
* preceding `MinorVersion`.
*/
final val MinorVersion: Int = 5
final val MinorVersion: Int = 6

/** Natural Number. The `ExperimentalVersion` allows for
* experimentation with changes to TASTy without committing
Expand Down
4 changes: 2 additions & 2 deletions test/tasty/pos/src-2/tastytest/TestArrayAnnot.scala
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,9 @@ package tastytest
object TestArrayAnnot {
def test = {
forceAnnots[
Tagged,
Tagged,
SuppressWarnings,
"new SuppressWarnings(Array.type.apply[String]((Array[String]{\"xyz\", \"foo\"}: String*))(reflect#ClassTag.type.apply[String](classOf[java.lang.String])))"
"new SuppressWarnings(value = Array.type.apply[String]((Array[String]{\"xyz\", \"foo\"}: String*))(reflect#ClassTag.type.apply[String](classOf[java.lang.String])))"
]
}
}
2 changes: 1 addition & 1 deletion test/tasty/run/src-2/tastytest/TestEnum.scala
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ object TestEnum extends Suite("TestEnum") {

final class Colour(name: String, ordinal: Int) extends Enum[Colour](name, ordinal)

object Colour extends EnumCompanion[Colour] {
object Colour extends EnumCompanion[Colour](implicitly)() {
val Red = new Colour("Red", 0)
val Green = new Colour("Green", 1)
val Blue = new Colour("Blue", 2)
Expand Down

0 comments on commit 7b4e080

Please sign in to comment.