xxfast
05/23/2024, 3:44 PMkotlinx-rpc
working with square's molecule so that I can do something like
class TopStoriesService(..) : RPC {
override suspend fun state(
initialState: TopStoriesState,
events: Flow<TopStoriesEvent>,
) : Flow<TopStoriesState> = moleculeFlow(RecompositionMode.Immediate) {
TopStoriesDomain(initialState, events, webService)
}
}
@Composable
fun TopStoriesDomain(
initialState: TopStoriesState,
events: Flow<TopStoriesEvent>,
webService: NyTimesWebService,
): TopStoriesState { .. }
But unfortunately running into an internal compiler error here (full trace pasted in thread 🧵)
Caused by: java.lang.RuntimeException: Exception while generating code for:
FUN name:TopStoriesDomain visibility:public modality:FINAL <> (initialState:io.github.xxfast.nytimes.shared.domains.topStories.TopStoriesState, events:kotlinx.coroutines.flow.Flow<io.github.xxfast.nytimes.shared.domains.topStories.TopStoriesEvent>, webService:io.github.xxfast.nytimes.server.api.NyTimesWebService) returnType:io.github.xxfast.nytimes.shared.domains.topStories.TopStoriesState
Not sure which of the two compiler plugins is causing this issue. 🤔 Does anyone have any clue?xxfast
05/23/2024, 3:47 PMxxfast
05/24/2024, 7:06 AMAlexander Sysoev
05/27/2024, 9:00 AM