Hi,
I’m trying to upgrade from 3.9.4 to 3.10.5 and get compilation failure in an old scala code.
I will try to describe in a short exemple
The code complaining is here :
def trackRequest(sessionParam: String, maxDuration: FiniteDuration = 3.minutes): ChainBuilder = {
exec((ctx: ScenarioContext, next: Action) => TrackProgress(sessionParam, ctx.coreComponents.statsEngine, next))
}
The TrackProgress trait is as follow (simplified) :
private case class TrackProgress(sessionParam: String, statsEngine: StatsEngine, next: Action) extends ChainableAction with NameGen {
override def name: String = genName(getClass.getName)
override def execute(session: Session): Unit = {
//do some complexe stuff here but compilation is ok
next
}
}
The compilation error code is as follow :
[ERROR] HandledProgrammationEventWatcher.scala:65: overloaded method exec with alternatives:
(execs: Iterable[io.gatling.core.action.builder.Executable])io.gatling.core.structure.ChainBuilder <and>
(head: io.gatling.core.action.builder.Executable,tail: io.gatling.core.action.builder.Executable*)io.gatling.core.structure.ChainBuilder <and>
(sessionFunction: io.gatling.core.session.Expression[io.gatling.core.session.Session])io.gatling.core.structure.ChainBuilder
cannot be applied to ((io.gatling.core.structure.ScenarioContext, io.gatling.core.action.Action) => HandledProgrammationEventWatcher.this.TrackProgress)
[ERROR] one error found
I see that chainbleaction et exec trait code has changed but cannot make it compile.
I need to stand with scala code from now
Thank you in advance if you can propose input to dig