Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 4 additions & 3 deletions build.sbt
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import sbt.internal.util.ManagedLogger

import org.scalajs.jsenv.nodejs.NodeJSEnv

val usedScalaCompiler = "3.8.3"
val usedScalaCompiler = "3.9.0-RC4"
val usedTastyRelease = usedScalaCompiler
val scala2Version = "2.13.18"

Expand Down Expand Up @@ -37,7 +37,7 @@ inThisBuild(Def.settings(
Developer("sjrd", "Sébastien Doeraene", "sjrdoeraene@gmail.com", url("https://github.com/sjrd/")),
Developer("bishabosha", "Jamie Thompson", "bishbashboshjt@gmail.com", url("https://github.com/bishabosha")),
),
versionPolicyIntention := Compatibility.BinaryAndSourceCompatible,
versionPolicyIntention := Compatibility.BinaryCompatible,
// Ignore dependencies to internal modules whose version is like `1.2.3+4...` (see https://github.com/scalacenter/sbt-version-policy#how-to-integrate-with-sbt-dynver)
versionPolicyIgnoredInternalDependencyVersions := Some("^\\d+\\.\\d+\\.\\d+\\+\\d+".r)
))
Expand Down Expand Up @@ -130,7 +130,8 @@ lazy val tastyQuery =
)
},

tastyMiMaPreviousArtifacts := mimaPreviousArtifacts.value,
// Temporarily disabled until we have a published version of tasty-query that can handle 3.8.x.
// tastyMiMaPreviousArtifacts := mimaPreviousArtifacts.value,
tastyMiMaTastyQueryVersionOverride := Some("1.8.0"),
tastyMiMaConfig ~= { prev =>
import tastymima.intf._
Expand Down
2 changes: 1 addition & 1 deletion project/plugins.sbt
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
addSbtPlugin("org.scala-js" % "sbt-scalajs" % "1.20.2")
addSbtPlugin("org.scala-js" % "sbt-scalajs" % "1.22.0")
addSbtPlugin("org.portable-scala" % "sbt-scalajs-crossproject" % "1.3.2")
addSbtPlugin("org.scalameta" % "sbt-scalafmt" % "2.4.4")

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -297,7 +297,7 @@ private[tasties] object TastyFormat:
* compatibility, but remains backwards compatible, with all
* preceeding `MinorVersion`.
*/
final val MinorVersion: Int = 8
final val MinorVersion: Int = 9

/** Natural Number. The `ExperimentalVersion` allows for
* experimentation with changes to TASTy without committing
Expand All @@ -313,7 +313,7 @@ private[tasties] object TastyFormat:
* is able to read final TASTy documents if the file's
* `MinorVersion` is strictly less than the current value.
*/
final val ExperimentalVersion: Int = 0
final val ExperimentalVersion: Int = 1

/** This method implements a binary relation (`<:<`) between two TASTy versions.
*
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -386,21 +386,22 @@ private[tasties] class TreeUnpickler private (
case PRIVATEqualified | PROTECTEDqualified =>
privateWithin = Some(readWithin(sym))
case ANNOTATION =>
annots ::= readAnnotation()
annots ::= readAnnotationInModifiers()
case _ =>
()
end while

sym.setPrivateWithin(privateWithin).setAnnotations(annots)
end readAnnotationsInModifiers

private def readAnnotation()(using SourceFile): Annotation =
val end = reader.readEnd()
private def readAnnotationInModifiers()(using SourceFile): Annotation =
reader.readEnd()
skipTree() // skip the typeref to the annotation class; we only use the tree
readAnnotation()
end readAnnotationInModifiers

if isCompactAnnotTypeTag(reader.nextByte) then
// #464 Apparently we can have CompactAnnotations anyway?
Annotation.fromAnnotTypeAndArgs(readTrueType(), Nil)
private def readAnnotation()(using SourceFile): Annotation =
if isCompactAnnotTypeTag(reader.nextByte) then Annotation.fromAnnotTypeAndArgs(readTrueType(), Nil)
else Annotation(readTerm)
end readAnnotation

Expand Down Expand Up @@ -1344,8 +1345,8 @@ private[tasties] class TreeUnpickler private (
reader.readByte()
reader.readEnd()
val typ = readTrueType()
val annot = readTerm
AnnotatedType(typ, Annotation(annot))
val annot = readAnnotation()
AnnotatedType(typ, annot)
case ANDtype =>
reader.readByte()
reader.readEnd()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -970,7 +970,7 @@ class SubtypingSuite extends UnrestrictedUnpicklingSuite:
ctx.findTopLevelClass("simple_trees.GenericMethodWithTypeParamDependencies")

val foo = GenericMethodWithTypeParamDependenciesClass.findNonOverloadedDecl(termName("foo"))
val DefDef(_, Right(typeParams) :: Left(Nil) :: Nil, _, _, _$1) = foo.tree.get: @unchecked
val DefDef(_, Right(typeParams) :: Left(Nil) :: Nil, _, _, _) = foo.tree.get: @unchecked

locally {
val List(a, b, c, d) = typeParams.map(_.symbol): @unchecked
Expand Down
8 changes: 4 additions & 4 deletions test-sources/src/main/scala/simple_trees/EvilClassNames.scala
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
package simple_trees

class evil_$_class:
class evil_$_inner
class `evil_$_class`:
class `evil_$_inner`

trait evil_$_trait:
class evil_$_inner
trait `evil_$_trait`:
class `evil_$_inner`

object EvilClassNames:
class SubEvilClass extends evil_$_class
Expand Down
Loading