docker-it-scala icon indicating copy to clipboard operation
docker-it-scala copied to clipboard

Incompatible with ScalaTest's AsyncTestSuite

Open shawjef3 opened this issue 5 years ago • 0 comments

DockerKit has an implicit ExecutionContext, which along with the one in ScalaTest's AsyncTestSuite causes an ambiguity error. Since DockerKit's ExecutionContext is really only for its own internal calls, it should be made private.

Error:(16, 34) ambiguous implicit values:
 both method executionContext in trait AsyncTestSuite of type => scala.concurrent.ExecutionContext
 and value dockerExecutionContext in trait DockerKit of type => scala.concurrent.ExecutionContext
 match expected type scala.concurrent.ExecutionContext

A workaround is to have each class that uses them provide a disambiguating ExecutionContext. I don't see this as a good solution though, since I expect clients of DockerKit shouldn't be given the option of using its internal ExecutionContext.

shawjef3 avatar Jan 26 '20 18:01 shawjef3