This is an automated email from the ASF dual-hosted git repository.
rabbah pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/incubator-openwhisk.git
The following commit(s) were added to refs/heads/master by this push:
new f9112ed Fix a few compilation accidents (#4505)
f9112ed is described below
commit f9112edff1575b757b78d166f0384f6c91aef3d9
Author: Iulian Dragos <[email protected]>
AuthorDate: Tue Jun 4 22:06:50 2019 +0200
Fix a few compilation accidents (#4505)
* Add explicit return type on a few implicit values.
Implicit values without an explicit return types are not guaranteed to
work. They may or may not compile, depending on compilation order and they are
going to be disallowed in future versions of Scala. This confuses IntelliJ as
well.
* Make Exec public since it's being used from tests.
The call to Exec.isBinaryCode in ActionContainer.scala is from a different
package and normally not visible at the call site. Due to scala/bug#11554 this
may compile sometimes.
---
.../src/main/scala/org/apache/openwhisk/core/entity/Exec.scala | 2 +-
.../main/scala/org/apache/openwhisk/core/entity/ExecManifest.scala | 7 ++++---
.../scala/org/apache/openwhisk/core/entity/WhiskActivation.scala | 2 +-
.../src/main/scala/org/apache/openwhisk/http/ErrorResponse.scala | 2 +-
4 files changed, 7 insertions(+), 6 deletions(-)
diff --git
a/common/scala/src/main/scala/org/apache/openwhisk/core/entity/Exec.scala
b/common/scala/src/main/scala/org/apache/openwhisk/core/entity/Exec.scala
index f228e2e..9abe51f 100644
--- a/common/scala/src/main/scala/org/apache/openwhisk/core/entity/Exec.scala
+++ b/common/scala/src/main/scala/org/apache/openwhisk/core/entity/Exec.scala
@@ -227,7 +227,7 @@ protected[core] case class SequenceExecMetaData(components:
Vector[FullyQualifie
override def size = components.map(_.size).reduceOption(_ + _).getOrElse(0.B)
}
-protected[core] object Exec extends ArgNormalizer[Exec] with
DefaultJsonProtocol {
+object Exec extends ArgNormalizer[Exec] with DefaultJsonProtocol {
val maxSize: ByteSize = 48.MB
val sizeLimit = loadConfigOrThrow[ByteSize](ConfigKeys.execSizeLimit)
diff --git
a/common/scala/src/main/scala/org/apache/openwhisk/core/entity/ExecManifest.scala
b/common/scala/src/main/scala/org/apache/openwhisk/core/entity/ExecManifest.scala
index 60fe587..af69084 100644
---
a/common/scala/src/main/scala/org/apache/openwhisk/core/entity/ExecManifest.scala
+++
b/common/scala/src/main/scala/org/apache/openwhisk/core/entity/ExecManifest.scala
@@ -343,12 +343,13 @@ protected[core] object ExecManifest {
private val defaultSplitter = "([a-z0-9]+):default".r
}
- protected[entity] implicit val imageNameSerdes = jsonFormat3(ImageName.apply)
+ protected[entity] implicit val imageNameSerdes: RootJsonFormat[ImageName] =
jsonFormat3(ImageName.apply)
- protected[entity] implicit val stemCellSerdes = {
+ protected[entity] implicit val stemCellSerdes: RootJsonFormat[StemCell] = {
import org.apache.openwhisk.core.entity.size.serdes
jsonFormat2(StemCell.apply)
}
- protected[entity] implicit val runtimeManifestSerdes =
jsonFormat8(RuntimeManifest)
+ protected[entity] implicit val runtimeManifestSerdes:
RootJsonFormat[RuntimeManifest] = jsonFormat8(RuntimeManifest)
+
}
diff --git
a/common/scala/src/main/scala/org/apache/openwhisk/core/entity/WhiskActivation.scala
b/common/scala/src/main/scala/org/apache/openwhisk/core/entity/WhiskActivation.scala
index ee19b77..17ff6d0 100644
---
a/common/scala/src/main/scala/org/apache/openwhisk/core/entity/WhiskActivation.scala
+++
b/common/scala/src/main/scala/org/apache/openwhisk/core/entity/WhiskActivation.scala
@@ -153,7 +153,7 @@ object WhiskActivation
val stateField = "state"
val valueField = "value"
- protected[entity] implicit val instantSerdes = new RootJsonFormat[Instant] {
+ protected[entity] implicit val instantSerdes: RootJsonFormat[Instant] = new
RootJsonFormat[Instant] {
def write(t: Instant) = t.toEpochMilli.toJson
def read(value: JsValue) =
diff --git
a/common/scala/src/main/scala/org/apache/openwhisk/http/ErrorResponse.scala
b/common/scala/src/main/scala/org/apache/openwhisk/http/ErrorResponse.scala
index a877630..b448459 100644
--- a/common/scala/src/main/scala/org/apache/openwhisk/http/ErrorResponse.scala
+++ b/common/scala/src/main/scala/org/apache/openwhisk/http/ErrorResponse.scala
@@ -253,7 +253,7 @@ object ErrorResponse extends Directives with
DefaultJsonProtocol {
case _ => ErrorResponse(status.defaultMessage, transid)
}
- implicit val serializer = new RootJsonFormat[ErrorResponse] {
+ implicit val serializer: RootJsonFormat[ErrorResponse] = new
RootJsonFormat[ErrorResponse] {
def write(er: ErrorResponse) = JsObject("error" -> er.error.toJson, "code"
-> er.code.meta.id.toJson)
def read(v: JsValue) =