Skip to content

Scala 2.13.0 rc1 #59

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 3 commits into from
Apr 18, 2019
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 .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ language: scala
scala:
- 2.11.12
- 2.12.8
- 2.13.0-M5
- 2.13.0-RC1
jdk:
- oraclejdk8
- openjdk11
16 changes: 11 additions & 5 deletions build.sbt
Original file line number Diff line number Diff line change
Expand Up @@ -8,19 +8,25 @@ scalaVersion := "2.12.8"

scalacOptions += "-feature"

crossScalaVersions := Seq("2.11.12", "2.12.8", "2.13.0-M5")
crossScalaVersions := Seq("2.11.12", "2.12.8", "2.13.0-RC1")

resolvers += Resolver.mavenLocal

libraryDependencies ++= Seq(
"org.apache.solr" % "solr-solrj" % "7.1.0",
"com.squareup.okhttp3" % "okhttp" % "3.9.1",
"org.scala-lang.modules" %% "scala-parser-combinators" % "1.1.1",
"org.scalatest" %% "scalatest" % "3.0.6-SNAP4" % "test",
"org.mockito" % "mockito-core" % "2.2.22" % "test",
"commons-logging" % "commons-logging" % "1.2" % "runtime"
"org.scalatest" %% "scalatest" % "3.0.8-RC2" % "test",
"org.mockito" % "mockito-core" % "2.2.22" % "test",
"commons-logging" % "commons-logging" % "1.2" % "runtime"
)

libraryDependencies ++= PartialFunction.condOpt(CrossVersion.partialVersion(scalaVersion.value)){
case Some((2, 11)) =>
"org.scala-lang.modules" %% "scala-parser-combinators" % "1.1.1"
case _ =>
"org.scala-lang.modules" %% "scala-parser-combinators" % "1.1.2"
}.toList
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Now, scala-parser-combinators have problem.

on Scala 2.11, version 1.1.2 may run afoul of sbt classpath issue
scala/scala-parser-combinators#197

I made a temporary fix referring to this >> scalikejdbc/scalikejdbc#1001


publishMavenStyle := true

publishTo := {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@ private[scala] object CaseClassMapper {
} else if(clazz == classOf[Float] || clazz == java.lang.Float.TYPE){
0f
} else if(clazz == classOf[Long] || clazz == java.lang.Long.TYPE){
0l
0L
} else if(clazz == classOf[Char] || clazz == java.lang.Character.TYPE){
'\u0000'
} else if(clazz == classOf[Boolean] || clazz == java.lang.Boolean.TYPE){
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ trait QueryBuilderBase[Repr <: QueryBuilderBase[Repr]] {
copy(newId = id)
}

def collection(collection: String) = {
def collection(collection: String): Repr = {
copy(newCollection = collection)
}

Expand Down Expand Up @@ -211,7 +211,7 @@ trait QueryBuilderBase[Repr <: QueryBuilderBase[Repr]] {
}

protected def docToMap(doc: SolrDocument) = {
doc.getFieldNames.asScala.map { key key doc.getFieldValue(key) }.toMap
doc.getFieldNames.asScala.map { key => key -> doc.getFieldValue(key) }.toMap
}

protected def responseToMap(response: QueryResponse): MapQueryResult = {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,6 @@ package com.github.takezoe.solr.scala.async

import java.io.{ByteArrayOutputStream, InputStream}

import scala.compat.Platform

/**
* @author steven
*
Expand Down Expand Up @@ -36,7 +34,7 @@ class UpdatableInputStream extends InputStream {
Some(bytes)
else {
val ret = new Array[Byte](max)
Platform.arraycopy(bytes, 0, ret, 0, max)
java.lang.System.arraycopy(bytes, 0, ret, 0, max)
baos.write(bytes, max, bytes.length - max)
Some(ret)
}
Expand All @@ -58,9 +56,9 @@ class UpdatableInputStream extends InputStream {
0
else {
dequeue(len) match {
case None -1
case Some(bytes)
Platform.arraycopy(bytes, 0, b, off, bytes.length)
case None => -1
case Some(bytes) =>
java.lang.System.arraycopy(bytes, 0, b, off, bytes.length)
bytes.length
}
}
Expand Down