zio-aws icon indicating copy to clipboard operation
zio-aws copied to clipboard

ZIO Mock used as not a test dependency

Open xQwexx opened this issue 2 years ago • 1 comments

I run into a problem where I got two conflicting zio-test version in my project. And root cause was that "dev.zio" %% "zio-aws-sqs" requiring the zio-mock as a non test dependency: libraryDependencies += "dev.zio" %% "zio-mock" % zioMockLibraryVersion.value, Could this be replaced with: libraryDependencies += "dev.zio" %% "zio-mock" % zioMockLibraryVersion.value % Test,

xQwexx avatar Nov 23 '22 09:11 xQwexx

It is not using it for testing, it provides zio-mock definitions for the generated services so it cannot be a test dependency.

I believe the right thing to do would be to expose the mocks in a separate artifact (like zio-aws-s3 without depending on zio-mock and zio-aws-s3-mocks with the generated mocks). Originally I did not do this because zio-aws is already publishing about 1000 artifacts in one run (~350 aws services, 3 scala versions) and this would double that.

vigoo avatar Nov 23 '22 09:11 vigoo