Skip to content
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

Using @FieldMap generates uncompiled code due to missing import #479

Closed
ricardorlg opened this issue Nov 10, 2023 · 2 comments
Closed

Using @FieldMap generates uncompiled code due to missing import #479

ricardorlg opened this issue Nov 10, 2023 · 2 comments
Assignees
Labels
bug Something isn't working

Comments

@ricardorlg
Copy link

ricardorlg commented Nov 10, 2023

Ktorfit version

1.10.0

What happened and how can we reproduce this issue?

On the latest release, the wildcard imports were removed, but this causes the import of Parameters is not applied, so when using @FieldMap, the generated code doesn't compile.

Example:

    @POST("/v1/url")
    @FormUrlEncoded
    fun confirm(
        @FieldMap requestData: Map<String,Any?>,
        @HeaderMap headers: Map<String, String>,
    ): Response<ResponseBody>

generates all code correct, but there is no import for Parameters.build

What did you expect to happen?

Add the correct import or allow again the wildcard

Is there anything else we need to know about?

I think this bug was introduced on #472

@ricardorlg ricardorlg added the bug Something isn't working label Nov 10, 2023
@Foso Foso self-assigned this Nov 15, 2023
@Foso
Copy link
Owner

Foso commented Nov 15, 2023

Thank you for your bug report!

@Foso Foso linked a pull request Nov 15, 2023 that will close this issue
1 task
@Foso Foso removed a link to a pull request Nov 15, 2023
1 task
@Foso
Copy link
Owner

Foso commented Nov 15, 2023

It's fixed with 1.10.1

@Foso Foso closed this as completed Nov 16, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants