-
Notifications
You must be signed in to change notification settings - Fork 293
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
Improve wrapping logic of parameter lists #274
Comments
When we wrap any parameters we should wrap all parameters. I've got an idea for a fix: when we emit the |
We'll need a specialized line wrapper that can backtrack through the buffer and wrap all |
Exactly. And I think we can just require groups to be contiguous. |
A problem with attaching a group ID to |
#532 should help with this |
Thanks, I hate it! public fun ComoseGenerationTestRow(scoped: @Composable RowScope.() -> Unit, unscoped: @Composable
() -> Unit): Unit { I might be angry enough to rage fix this (it broke a test case). |
Here's my idea: a reverse This way we'll call |
Yeah, I recall trying a similar approach back in 2018, buffering the output first to understand whether it will wrap or not, and using that knowledge to output to the real |
The wrapping policy applies unconditionally to lambdas which is not great. public fun mixed(mixed: (
i: Int,
Long,
s: String?,
) -> Unit) These should probably not be subject to the policy and wrap normally. |
Currently we wrap based on the number of parameters, not on the length:
prints this:
when it could be this:
The text was updated successfully, but these errors were encountered: