-
Notifications
You must be signed in to change notification settings - Fork 44
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Import for <ERROR TYPE: MyResponse<List<AppObjectResponse>, Unit>> not found #682
Comments
Thank you for the report! I tried to reproduce it, but i was not able yet |
Ktorfit does not generate implementations for all interfaces that are located in another module, even if they do not have generics |
Can you please try to reproduce it with the Multiplatform project https://github.com/Foso/Ktorfit/tree/master/example/MultiplatformExample . I want to find a fix for that bug, but when i use the classes everything is working fine. #634 seems to be the same issue |
Hej Jens, I just started playing around with Ktorfit today, but I'm running into the same issue here. The project structure is like this
The following is part of my server and app
And I then also define a dependency on the project, of course
Now take my For example, the following works fine:
But the moment I change the return type of my function, I get the same errors as shared above. I've tried Let me know if you could use any other information, or if I can be of assistance. I've been dabbling with KSP and KotlinPoet for the last few months. I'll see if I can find the time to maybe set up a test environment and do some root cause analysis :) Kotlin 2.0.21 and Ktorfit 2.2.0 btw, only using |
The issue seems to be fixed by adding the main source dir of the external common module to commonMain. This is what I added to my
This isn't a pretty fix, but at least KSP can now resolve the classes we're trying to reference. |
Ktorfit version
2.1.0
What happened and how can we reproduce this issue?
Hello. At the moment I have a problem. I have a cross-platform application on 2 platforms. I wrote my own wrapper for respons in generics, but at the compilation stage I get an error. The wrapper class is in another module. Please help me solve this problem
What did you expect to happen?
Happy code generation
Is there anything else we need to know about?
I am using this implementation in an android project. Everything works correctly in it
The text was updated successfully, but these errors were encountered: