Skip to content

sbt 1.8 incompatible with PlayNonBlockingInteractionMode - replace it with bgRun #11527

@mkurz

Description

@mkurz

Starting with sbt 1.8.0-RC1 our scripted tests fail with (see #11441):

[info] [error] a.a.ActorSystemImpl - Internal server error, sending 500 response
[info] java.lang.IllegalStateException: Tried to create logger for closed LoggerContext
[info] 	at sbt.util.LoggerContext$LoggerContextImpl.logger(LoggerContext.scala:148)
[info] 	at sbt.internal.LogManager$.defaultLogger(LogManager.scala:193)
[info] 	at sbt.internal.LogManager$DefaultLogManager.apply(LogManager.scala:143)
[info] 	at sbt.internal.LogManager$.$anonfun$construct$1(LogManager.scala:73)
[info] 	at sbt.std.Streams$$anon$2$$anon$3.log(Streams.scala:198)
[info] 	at sbt.std.TaskStreams.log(Streams.scala:71)
[info] 	at sbt.std.TaskStreams.log$(Streams.scala:71)
[info] 	at sbt.std.Streams$$anon$2$$anon$3.log$lzycompute(Streams.scala:157)
[info] 	at sbt.std.Streams$$anon$2$$anon$3.log(Streams.scala:157)
[info] 	at sbt.EvaluateTask$.log$1(EvaluateTask.scala:393)

This is caused by sbt/sbt#6992 which now closes the the log after a task ran, which is the case when using non blocking mode, which immediately exits.

So I don't really know how to work around that. However I think the correct solution would be to remove PlayNonBlockingInteractionMode and use bgRun instead, which is available since sbt 1.0 (and thankfully we dropped sbt 0.13.x in the main branch).
Unfortunately bgRun does not work out of the box for Play... There was an issue already, where Renato suggested to redefine the bgRun task to make it work with Play. I had a look and agree this is probably the way to go.

Metadata

Metadata

Assignees

Type

No type
No fields configured for issues without a type.

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions