+
Skip to content

Conversation

ShikaSD
Copy link
Contributor

@ShikaSD ShikaSD commented Oct 9, 2019

Multiplatform / framework implementation of MVICore.

Consists of several steps:

  • Move current implementation of MVICore to mpp module without any dependencies
    Source / Sink / Cancellable types
    Binder
    BaseFeature / ActorReducerFeature / ReducerFeature
    ⬜️ Middleware
  • Setup build and publishing for mpp modules
  • Create a wrapped version for RxJava based on mpp implementation
  • Deprecate current implementation and replace it with typealiases to help with migration
  • Implement wrapped versions for coroutines and Reaktive
  • Document changes

@ShikaSD ShikaSD requested a review from zsoltk April 14, 2020 14:51
id 'org.jetbrains.kotlin.multiplatform'
}

kotlin {

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

How about iosX64 and iosArm64 targest?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We can always add more, probably there's also watchos or such?

@@ -0,0 +1,43 @@
package com.badoo.mvicore.common

interface Sink<T> {

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please enable the Kotlin | Style issues | Type parameter can have 'in' or 'out' variance check, set to Weak Wraning.
The T parameter can be in.

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Also please check all other places. Having in and out properly specified is very important.

import com.badoo.mvicore.common.Source

interface Connector<Out, In> {
operator fun invoke(source: Source<out Out>): Source<In>

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The Source should have out specified. Not here.


import com.badoo.mvicore.common.Source

interface Connector<Out, In> {

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Same here <out Out, in In>

operator fun invoke(): Source<Action>
}

interface Actor<State, Action, Effect> {

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm curious how coroutines and Reactive interop will look like?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

you can check rx interop, I am pretty sure reaktive will be close

}

companion object {
fun manual() = ManualLifecycle()

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We already have public ManualLifecycle class that can be instantiated directly. Do we want this duplication?

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

Successfully merging this pull request may close these issues.

2 participants

点击 这是indexloc提供的php浏览器服务,不要输入任何密码和下载