-
Notifications
You must be signed in to change notification settings - Fork 642
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
io.kotlintest.Result conflicts with kotlin.Result #898
Comments
This is a good point. It's a breaking change for anyone who uses custom matchers though. Perhaps we do it and bump to version 4.0. Or maybe we do it in 3.4 (releasing in the next few days) and deprecate Result buying us some time. |
+1 for introducing an alias and deprecating the current Result right away. With that perhaps there are other changes to Result that were suggested at some point? One pain point (to me) is having to specify both |
Please, feed back as much as you can so I can make all the improvements at
once for the 3.4 release.
…On Wed, 17 Jul 2019 at 13:10, Łukasz Wasylkowski ***@***.***> wrote:
+1 for introducing an alias and deprecating the current Result right away.
With that perhaps there are other changes to Result that were suggested at
some point? One pain point (to me) is having to specify both failure and negated
failure messages. Also the messages are evaluated eagerly, which is less
flexible than providing them in functions for example.
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub
<#898>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/AAFVSGRZQWAKWWLG4CF4DRLP75OAHANCNFSM4IETACIQ>
.
|
Ok so in 3.4 Result is now MatcherResult, and it explicitly allows functions to keep them lazy. |
I realized that |
Yes good spot.
…On Wed, 4 Sep 2019, 08:33 Felix Sonntag, ***@***.***> wrote:
I realized that io.kotlintest.Result is now replaced with MatcherResult
It would be great to update the docs, as it is explicitly used there for
writing custom matchers
—
You are receiving this because you modified the open/close state.
Reply to this email directly, view it on GitHub
<#898>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/AAFVSGQGWOOEROZ2WE7HBNLQH62LFANCNFSM4IETACIQ>
.
|
Kotlin's
kotlin.Result
class is being resolved without an import. So for example copy-pasting sample custom matcher fails, because IDE doesn't prompt for import, and implictly uses Kotlin's Result.Since the library is dedicated for Kotlin language, perhaps it'd make sense to rename
io.kotlintest.Result
to e.g.TestResult
orAssertionResult
to avoid the clash. It's not a big problem right now, but as inline classes graduate from experimental, I expect more usages ofkotlin.Result
, and the issue might become annoyingThe text was updated successfully, but these errors were encountered: