-
Couldn't load subscription status.
- Fork 1.4k
ZIO Test: Fix Naming Conflict with TestAspect#ignore #2184
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
Conversation
| } | ||
|
|
||
| final def ignored[L, E, S](spec: ZSpec[environment.TestEnvironment, E, L, S]): ZIO[Any, Nothing, Boolean] = { | ||
| final def isFailed[L, E, S](spec: ZSpec[environment.TestEnvironment, E, L, S]): ZIO[Any, Nothing, Boolean] = |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Was that also conflicting?
Maybe failedWith should be renamed too for consistency?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
These combinators are only used in the internal test suite for ZIO Test. Once I renamed ignore to ignored I created another conflict with an internal combinator used here so I changed that to isIgnored and then just changed the other internal combinators for consistency. Yes I think we could rename failedWith too. Let me do that now.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actually realized several of those combinators are not being used anymore now that the tests that relied on them have been migrated to ZIO Test so was able to remove them entirely.
|
Worthwhile reviewing the others at the same time and being consistent about naming and avoiding name clashes. |
|
I went through everything else in the package object. The only other potential issues are see are:
|
|
Changed |
* rename ignore * cleanup * rename fail to failed
Currently we have
ignorein the ZIO Test package object that creates an ignored test result andTestAspect#ignore. If you do some common wildcard imports like below this creates a naming conflict so you can't useTestAspect#ignorewithout hiding things / aliasing things / using a qualified name, which is not very nice. In my experienceTestAspect#ignoreis relatively commonly used versusignorein the package object is quite uncommonly used. This PR changes theignorein the package object toignoredto avoid the conflict.