You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
KotlinPoet 1.x used to replace space characters with newline characters whenever a given line of code exceeded the length limit. This usually led to better code formatting, but could also lead to compilation errors in generated code. Non-breaking spaces could be marked by the · character, but the discoverability of this feature wasn’t great.
KotlinPoet 2.0 does not wrap spaces, even if the line of code they occur in exceeds the length limit. The newly introduced ♢ character can be used to mark spaces that are safe to wrap, which can improve code formatting. The · character has been preserved for compatibility, but its behavior is now equivalent to a regular space character.
Ktorfit version
2.2.0
What happened and how can we reproduce this issue?
For this function in my network interface:
It is converted to code below by ksp plugin:
The
User-Agent
field contains an unexpected newline, which results in a compilation error.What did you expect to happen?
No newline will be generated.
Is there anything else we need to know about?
No response
The text was updated successfully, but these errors were encountered: