Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ZIO Mock used as not a test dependency #1032

Open
xQwexx opened this issue Nov 23, 2022 · 1 comment
Open

ZIO Mock used as not a test dependency #1032

xQwexx opened this issue Nov 23, 2022 · 1 comment

Comments

@xQwexx
Copy link

xQwexx commented Nov 23, 2022

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,

@vigoo
Copy link
Collaborator

vigoo commented Nov 23, 2022

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants