将play.api.libs.concurrent.Promise替换为scala.concurrent.Promise时出错
我正在尝试从Play 2.1.3升级到2.2.0,在尝试编译时出现错误。主要的变化是play.api.libs.concurrent.Promise被弃用,并被指示用scala.concurrent.Promise替换它。编译错误如下: 错误消息:将play.api.libs.concurrent.Promise替换为scala.concurrent.Promise时出错,scala,playframework,playframework-2.0,Scala,Playframework,Playframework 2.0,我正在尝试从Play 2.1.3升级到2.2.0,在尝试编译时出现错误。主要的变化是play.api.libs.concurrent.Promise被弃用,并被指示用scala.concurrent.Promise替换它。编译错误如下: 错误消息: WebSocketJoin.scala:23: object creation impossible, since method fold in trait Iteratee of type [B](folder: play.api.libs.ite
WebSocketJoin.scala:23: object creation impossible, since method fold in trait Iteratee of type [B](folder: play.api.libs.iteratee.Step[A,B] => scala.concurrent.Future[B])(implicit ec: scala.concurrent.ExecutionContext)scala.concurrent.Future[B] is not defined
[error] def wrap(delegate: Iteratee[A, B]): Iteratee[A, B] = new Iteratee[A, B] {
[error] ^
[error] one error found
[error] (adapter-api/compile:compile) Compilation failed
代码:
我在博客文章中发布的联接迭代器/枚举器对现在在Play2.2.0中可用,名为
Play.api.libs.iteratee.Concurrent.joined
。切换到该选项,您可以从代码库中删除上述代码
顺便说一下,要修复代码,请修改第24行的方法以接受隐式ExecutionContext。Play 2.2更改了iteratee API,使许多东西现在都接受异常上下文:
def fold[C](folder: (Step[A, B]) => Future[C])(implicit ec: ExecutionContext)
我在博客文章中发布的联接迭代器/枚举器对现在在Play2.2.0中可用,名为
Play.api.libs.iteratee.Concurrent.joined
。切换到该选项,您可以从代码库中删除上述代码
顺便说一下,要修复代码,请修改第24行的方法以接受隐式ExecutionContext。Play 2.2更改了iteratee API,使许多东西现在都接受异常上下文:
def fold[C](folder: (Step[A, B]) => Future[C])(implicit ec: ExecutionContext)