Warning: file_get_contents(/data/phpspider/zhask/data//catemap/2/.net/23.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
将play.api.libs.concurrent.Promise替换为scala.concurrent.Promise时出错_Scala_Playframework_Playframework 2.0 - Fatal编程技术网

将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

我正在尝试从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.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)