Open hichamboushaba opened 1 year ago
Sorry for the late reply — I just got back from a vacation so catching up on things.
Thanks for investigating this issue! Unfortunately, Intellij's support for expect
/actual
ing type aliases isn't great. I created a YouTrack issue for this, so please star/follow along. I linked this new issue within the one that you linked.
In addition to the type mismatch errors - I tried implementing a remote mediator and I could get the code to compile. I got the following issues when extending the RemoteMediator
class:
internal class PagingRemoteMediator: RemoteMediator<String, Post>() // RemoteMediator doesn't have a constructor
internal class PagingRemoteMediator: RemoteMediator<String, Post> // RemoteMediator must be invoked as a constructor
@danailalexiev Good catch! That should be fixed in the next release by https://github.com/cashapp/multiplatform-paging/pull/46.
Same for compose multiplatform paging, i get type mismatches all over https://github.com/cashapp/multiplatform-paging/tree/main-3.2.0-alpha05.
Hey, first of all, thanks for working on this, it's great to see the multiplatform ecosystem growing daily.
While integrating this library into a personal project, the IDE shows many "type mismatch" errors in the common code, I tried different combinations of Kotlin/AGP/AS and even Intellij IDEA versions, and the same happens in all of them. An example of the errors is:
To investigate this, I cloned the main repo to try the sample app, and while it didn't occur when the library was imported as a project, it occurred when I updated the sample app to import the "module dependency` instead. I also tried composite builds as an attempt to fix the issue in my project, but it didn't solve the issue.
This error looks similar to this bug report https://youtrack.jetbrains.com/issue/KT-46691/MPP-Type-mismatch-for-hierarchically-commonized-typealiases#focus=Comments-27-4921124.0-0, maybe the applied fix works only when referencing the module as a
project
and not as amodule dependency
.