dave08
02/14/2023, 12:15 PMclass Foo : IFoo
instead of fun Foo() = object : Foo
?simon.vergauwen
02/14/2023, 12:17 PMlike TestResource and the Kotest integration... I was wondering if all that could be pulled out into some libraries that could be re-used?This has been extracted into the official Kotest Arrow integration library already โบ๏ธ https://github.com/kotest/kotest-extensions-arrow
why not just use theI'm not advocating againstinstead ofclass Foo : IFoo
?fun Foo() = object : Foo
class Foo : IFoo
but I like using fun
because I can do turn it into suspend fun
if I have too, or return Either
, etc in case I need to validate some configuration when creating the instance.simon.vergauwen
02/14/2023, 12:19 PMIFoo
and FooImpl
๐คฃdave08
02/14/2023, 12:21 PMsimon.vergauwen
02/14/2023, 12:22 PMdave08
02/14/2023, 12:23 PMfun FooImpl()..
, just as much as class Foo
... but I have to admin I do have a tendency for `Impl`s... and functions look funny with that ๐dave08
02/14/2023, 12:26 PMdave08
02/14/2023, 12:27 PMdave08
02/14/2023, 12:28 PMsimon.vergauwen
02/14/2023, 12:31 PMsimon.vergauwen
02/14/2023, 12:32 PMdave08
02/14/2023, 12:34 PMsimon.vergauwen
02/14/2023, 12:37 PMReplaceWith
/ alt+enter
). Only some very obscure APIs will not be able to be automated, but we've added in the deprecation method to please contact us if you heavily rely on them.
But we'll be sure to also reference it on the new website ๐ Thanks for the suggestion โบ๏ธsimon.vergauwen
02/14/2023, 12:38 PM@Deprecated
methods in 1.x.x
it's extremely unlikely you won't be able to fully automatically migrate to 1.2.x and be source-compatible with 2.x.x.dave08
02/14/2023, 12:46 PMdave08
02/14/2023, 12:47 PMsimon.vergauwen
02/14/2023, 12:48 PMval conn: TestResource<Connection> =
is incorrect though in the KDoc, it should probably be LazyMountableExtension
๐คdave08
02/14/2023, 12:52 PMdave08
02/14/2023, 12:52 PMsimon.vergauwen
02/14/2023, 12:52 PMsimon.vergauwen
02/14/2023, 12:53 PMdave08
02/14/2023, 12:58 PMsimon.vergauwen
02/14/2023, 12:59 PMdave08
02/14/2023, 1:00 PMdave08
02/14/2023, 1:01 PMsimon.vergauwen
02/14/2023, 1:01 PMdave08
02/14/2023, 1:01 PMdave08
02/14/2023, 1:02 PMio.kotest.extensions:kotest-extension-arrow:
dependency.dave08
02/14/2023, 1:04 PMdave08
02/14/2023, 1:16 PMsimon.vergauwen
02/14/2023, 1:18 PMdave08
02/14/2023, 1:27 PMsimon.vergauwen
02/14/2023, 1:29 PMEmil Kantis
02/14/2023, 4:11 PMfun Foo() = object : Foo
๐
Is there any caveats to doing it? Is it more expensive to create an anonymous object than multiple instances of a predefined class for instance? Not really sure what happens under the hood ๐simon.vergauwen
02/14/2023, 4:19 PMpackage$bla$Foo
name at compile time.Imran/Malic
02/14/2023, 7:21 PMImran/Malic
02/14/2023, 7:26 PMio.kotest.extensions:kotest-extension-arrow:_
package I dont really understand the purpose of it other than grouping all apiโs together but since kotest favours modularity I dont see how this applies. But I might not understand the dedicated purpose you mentioned, can you rephrase ๐Imran/Malic
02/14/2023, 7:27 PMThe API is slightly improved to what is in the repo, and the KDoc offers minimal documentation. I noticed that@simon.vergauwen good catch ๐ missed that oneis incorrect though in the KDoc, it should probably beval conn: TestResource<Connection> =
๐คLazyMountableExtension
dave08
02/15/2023, 3:55 AM