aiidziis
04/12/2021, 2:53 PMmvikotlin:sample
application I had an assumption that tests are working on iOS as well. When cloning repository I found that tests are enabled only for android and js targets. What would it take to get the same tests running for iOS target as well?iamsteveholmes
04/15/2021, 5:34 PMimport kotlinx.coroutines.CoroutineDispatcher
internal actual val mainDispatcher: CoroutineDispatcher get() = throw NotImplementedError()
internal actual val ioDispatcher: CoroutineDispatcher get() = throw NotImplementedError()
Arkadii Ivanov
04/15/2021, 9:16 PMiamsteveholmes
04/23/2021, 4:47 PMjulian
05/01/2021, 9:32 PMA tiny abstraction over Rx is used instead.Does this mean that MVIKotlin has a dependency on a Java-only library e.g. RxJava? Or does it mean MVIKotlin has a custom Reactive Extensions implementation of its own? Or something else?
Brady Aiello
05/04/2021, 9:36 PMlehakorshun
05/18/2021, 8:56 AMMike
05/29/2021, 1:08 PMjulian
06/02/2021, 11:55 PMtodo-app-android
directory as an existing project in Android Studio. But I got a Gradle exception about a missing wrapper task. How should I do this? What's the correct way to import todo-app-android
into Android Studio?Nikola Milovic
06/03/2021, 7:39 AMjulian
06/03/2021, 6:11 PMBotond Varsányi
06/07/2021, 2:12 PMRobert Munro
06/24/2021, 11:19 AMStore.states
and MviView.events
use rx style Subjects (com.arkivanov.mvikotlin.rx.Disposable|Observer) - so just checking if i need mvikotlin-rx dependency for this? or am i missing something?Robert Munro
06/25/2021, 12:36 PMmaskipli
06/29/2021, 5:47 PMcocoapods {
summary = "Shared Module"
homepage = "Link to the Shared Module homepage"
ios.deploymentTarget = "14.1"
frameworkName = "shared"
podfile = project.file("../iosApp/Podfile")
}
sourceSets {
sourceSets["iOSMain"].dependencies {
implementation(Ktor.clientIos)
implementation(MVIKotlin.kotlin)
implementation(Decompose.decompose)
}
sourceSets["commonMain"].dependencies {
implementation(MVIKotlin.kotlin)
implementation(Decompose.decompose)
}
}
why i can't access class of MVI from ios project, like
ObservableValue, LifecycleRegistryKt
sample from https://github.com/JetBrains/compose-jb/tree/master/examples/todoappiamsteveholmes
07/04/2021, 8:28 PMe: org.jetbrains.kotlin.util.KotlinFrontEndException: Front-end Internal error: Failed to analyze declaration Intent
File being compiled: (9,5) in .../store/CharacterListStore.kt
The root cause java.lang.AssertionError was thrown at: org.jetbrains.kotlin.resolve.lazy.descriptors.AbstractLazyMemberScope.getContributedClassifier(AbstractLazyMemberScope.kt:75)
...then....
Caused by: java.lang.AssertionError: Recursion detected on input: Intent under LockBasedStorageManager@33ccfc53 (TopDownAnalyzer for JVM)
...and later in the stacktrace I find:
at io.realm.compiler.IrUtilsKt.getHasRealmModelInterface(IrUtils.kt:90)
at io.realm.compiler.RealmModelSyntheticCompanionExtension.getSyntheticCompanionObjectNameIfNeeded(RealmModelSyntheticCompanionExtension.kt:45)
And here is the "offending" code:
interface CharacterListStore : Store<Intent, State, Nothing> {
sealed class Intent {
data class Delete(val id: Long) : Intent()
object Loaded : Intent()
}
data class State(
val characters: List<Character> = emptyList(),
val selectedCharacterId: Long? = null,
)
}
Tiago Nunes
07/05/2021, 12:19 PMmaskipli
07/07/2021, 9:17 AMmvikotlin-extensions-coroutines
kotlin.IllegalStateException: There is no event loop. Use runBlocking { ... } to start one.
kfun:kotlin.Throwable#<init>(kotlin.String?){} + 95
kfun:kotlin.Exception#<init>(kotlin.String?){} + 93
kfun:kotlin.RuntimeException#<init>(kotlin.String?){} + 93
kfun:kotlin.IllegalStateException#<init>(kotlin.String?){} + 93
kfun:kotlinx.coroutines.takeEventLoop#internal + 532
kfun:kotlinx.coroutines.DefaultExecutor#dispatch(kotlin.coroutines.CoroutineContext;kotlinx.coroutines.Runnable){} + 204
kfun:kotlinx.coroutines.NativeMainDispatcher.dispatch#internal + 275
kfun:kotlinx.coroutines.internal#resumeCancellableWith__at__kotlin.coroutines.Continuation<0:0>(kotlin.Result<0:0>;kotlin.Function1<kotlin.Throwable,kotlin.Unit>?){0§<kotlin.Any?>} + 1275
kfun:kotlinx.coroutines.intrinsics#startCoroutineCancellable__at__kotlin.coroutines.SuspendFunction1<0:0,0:1>(0:0;kotlin.coroutines.Continuation<0:1>;kotlin.Function1<kotlin.Throwable,kotlin.Unit>?){0§<kotlin.Any?>;1§<kotlin.Any?>} + 671
kfun:kotlinx.coroutines.intrinsics#startCoroutineCancellable$default__at__kotlin.coroutines.SuspendFunction1<0:0,0:1>(0:0;kotlin.coroutines.Continuation<0:1>;kotlin.Function1<kotlin.Throwable,kotlin.Unit>?;kotlin.Int){0§<kotlin.Any?>;1§<kotlin.Any?>} + 370
kfun:kotlinx.coroutines.CoroutineStart#invoke(kotlin.coroutines.SuspendFunction1<0:0,0:1>;0:0;kotlin.coroutines.Continuation<0:1>){0§<kotlin.Any?>;1§<kotlin.Any?>} + 693
kfun:kotlinx.coroutines.AbstractCoroutine#start(kotlinx.coroutines.CoroutineStart;0:0;kotlin.coroutines.SuspendFunction1<0:0,1:0>){0§<kotlin.Any?>} + 162
kfun:kotlinx.coroutines#launch__at__kotlinx.coroutines.CoroutineScope(kotlin.coroutines.CoroutineContext;kotlinx.coroutines.CoroutineStart;kotlin.coroutines.SuspendFunction1<kotlinx.coroutines.CoroutineScope,kotlin.Unit>){}kotlinx.coroutines.Job + 666
kfun:kotlinx.coroutines#launch$default__at__kotlinx.coroutines.CoroutineScope(kotlin.coroutines.CoroutineContext?;kotlinx.coroutines.CoroutineStart?;kotlin.coroutines.SuspendFunction1<kotlinx.coroutines.CoroutineScope,kotlin.Unit>;kotlin.Int){}kotlinx.coroutines.Job + 697
kfun:com.arkivanov.mvikotlin.extensions.coroutines.SuspendExecutor#handleAction(1:1){} + 364
kfun:com.arkivanov.mvikotlin.main.store.DefaultStore.<init>$lambda-0#internal + 281
kfun:com.arkivanov.mvikotlin.main.store.DefaultStore.$<init>$lambda-0$FUNCTION_REFERENCE$1.invoke#internal + 97
kfun:com.arkivanov.mvikotlin.main.store.DefaultStore.$<init>$lambda-0$FUNCTION_REFERENCE$1.$<bridge-UNNN>invoke(-1:0){}#internal + 97
kfun:com.arkivanov.mvikotlin.core.store.SimpleBootstrapper#invoke(){} + 686
kfun:com.arkivanov.mvikotlin.main.store.DefaultStore#<init>(1:3;com.arkivanov.mvikotlin.core.store.Bootstrapper<1:1>?;kotlin.Function0<com.arkivanov.mvikotlin.core.store.Executor<1:0,1:1,1:3,1:2,1:4>>;com.arkivanov.mvikotlin.core.store.Reducer<1:3,1:2>){} + 1682
kfun:com.arkivanov.mvikotlin.main.store.DefaultStoreFactory#create(kotlin.String?;0:3;com.arkivanov.mvikotlin.core.store.Bootstrapper<0:1>?;kotlin.Function0<com.arkivanov.mvikotlin.core.store.Executor<0:0,0:1,0:3,0:2,0:4>>;com.arkivanov.mvikotlin.core.store.Reducer<0:3,0:2>){0§<kotlin.Any>;1§<kotlin.Any>;2§<kotlin.Any>;3§<kotlin.Any>;4§<kotlin.Any>}com.arkivanov.mvikotlin.core.store.Store<0:0,0:3,0:4> + 476
Laurence Muller
07/08/2021, 5:23 PMNikola Milovic
07/13/2021, 9:42 AMtrashcoder
07/22/2021, 6:37 PMLaurence Muller
07/24/2021, 6:26 PMArkadii Ivanov
07/26/2021, 10:44 PM3.0.0
, and I have a question/concern. You may noticed, SuspendExecutor
has its executeIntent
and executeAction
methods defined as suspend
. The base class SuspendExecutor
accepts mainContext
, which is usually Dispatchers.Main
. Both methods are automatically called from inside launch
, which has one important effect. The execution is always scheduled, and so is not synchronous. This may have some unwanted or unpredictable behaviours. The SuspendBootstrapper
is affected as well.
I have an idea - to go the same way as ViewModel
and its viewModelScope
. We can make all methods non-suspend
, add val scope: CoroutineScope
to the SuspendExecutor
class, and let inheritors decide whether they need to switch context or not. The usage will be as on the screenshot (diff change in the sample TodoListStoreFactory
).
Please let me know what do you think. Maybe I'm missing something?Laurence Muller
07/28/2021, 2:00 PMFrancis Mariano
07/30/2021, 6:09 PMFrancis Mariano
08/03/2021, 3:10 PMFrancis Mariano
08/04/2021, 6:40 PMfun create(): PopularMoviesStore =
object : PopularMoviesStore,
Store<Intent, State, Nothing> by storeFactory.create(
name = "PopularMoviesStore",
initialState = State(),
executorFactory = ::ExecutorImpl,
reducer = ReducerImpl
) {}
But in ::ExecutorImpl there is a type mismatch.
Required:
PopularMoviesStore.Intent
Found:
PopularMoviesStoreFactory.Result
Can anyone help me?Francis Mariano
08/06/2021, 9:26 PMbenkuly
08/09/2021, 10:06 AMbenkuly
08/09/2021, 10:06 AMArkadii Ivanov
08/09/2021, 10:08 AM