Skip to content

Enabled cross build with Scala 3.x for core #657

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Sep 6, 2021
Merged
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
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