Skip to content

Commit

Permalink
Merge pull request #657 from xuwei-k/scala-3
Browse files Browse the repository at this point in the history
  • Loading branch information
dwijnand authored Sep 6, 2021
2 parents bcfa54c + da4caf8 commit d283ed3
Show file tree
Hide file tree
Showing 6 changed files with 13 additions and 10 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ jobs:
with:
java-version: ${{ matrix.java }}
- uses: coursier/cache-action@v6
- run: "sbt test mimaReportBinaryIssues 'set sbtplugin/scriptedSbt := \"1.2.8\"' 'scripted sbt-mima-plugin/minimal'"
- run: "sbt +test mimaReportBinaryIssues 'set sbtplugin/scriptedSbt := \"1.2.8\"' 'scripted sbt-mima-plugin/minimal'"
testFunctional:
needs: build
strategy:
Expand Down
3 changes: 2 additions & 1 deletion build.sbt
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@ commands += Command.command("testStaging") { state =>
}

val scala213 = "2.13.6"
val scala3 = "3.0.2"

val root = project.in(file(".")).settings(
name := "mima",
Expand All @@ -39,7 +40,7 @@ val munit = "org.scalameta" %% "munit" % "0.7.29"

val core = project.settings(
name := "mima-core",
crossScalaVersions += scala213,
crossScalaVersions ++= Seq(scala213, scala3),
libraryDependencies += munit % Test,
testFrameworks += new TestFramework("munit.Framework"),
MimaSettings.mimaSettings,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -279,11 +279,12 @@ object MimaUnpickler {
var idx = 0
var res = 0L
var b = 0L
do {
while({
b = data(idx).toLong
idx += 1
res = (res << 7) + (b & 0x7f)
} while ((b & 0x80) != 0L)
(b & 0x80) != 0L
}) ()
res.toInt
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,10 +12,11 @@ final class PickleBuffer(val bytes: Array[Byte]) {
def readLongNat(): Long = {
var b = 0L
var x = 0L
do {
while({
b = readByte().toLong
x = (x << 7) + (b & 0x7f)
} while ((b & 0x80) != 0L)
(b & 0x80) != 0L
}) ()
x
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,8 +30,8 @@ class Signature(private val signature: String) {
newer.isEmpty || // ignore losing signature on constructors
signature.endsWith(newer.tail) // ignore losing the 1st (outer) param (.tail drops the leading '(')

// a method that takes no parameters and returns Object can have no signature
override def toString = if (signature.isEmpty) "<missing>" else signature
// a method that takes no parameters and returns Object can have no signature
override def toString = if (signature.isEmpty) "<missing>" else signature
}

object Signature {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -122,7 +122,7 @@ object TastyUnpickler {
if (nextByte == SELFDEF) skipTree(readByte()) // self
val classes = new ListBuffer[ClsDef]
val meths = new ListBuffer[DefDef]
doUntil(end)(readByte match {
doUntil(end)(readByte() match {
case TYPEDEF => readTypeDef() match { case clsDef: ClsDef => classes += clsDef case _ => }
case DEFDEF => meths += readDefDef()
case tag => skipTree(tag)
Expand Down Expand Up @@ -354,7 +354,7 @@ object TastyUnpickler {

final case class SimpleName(raw: String) extends Name
final case class ObjectName(base: Name) extends Name
final case class TypeName private (base: Name) extends Name
final case class TypeName private[TastyUnpickler] (base: Name) extends Name
final case class QualifiedName(qual: Name, sep: SimpleName, sel: SimpleName) extends Name

final case class UniqueName(qual: Name, sep: SimpleName, num: Int) extends Name
Expand Down

0 comments on commit d283ed3

Please sign in to comment.