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

Kotlin generated message's contructor respect fields declaration order #1997

Merged

Conversation

oldergod
Copy link
Member

@oldergod oldergod commented Jun 22, 2021

I hesitated using a sealed class something like sealed class FieldOrOneOf but didn't; could be convinced otherwise...
Split in 2 commits.

Here is the before after of how fields were ordered.

Before

fields
extensions
flatOneOfs
boxedOneOfs

After

(everything).sortBy { it.location.line }

@oldergod oldergod requested a review from swankjesse June 22, 2021 19:33
@oldergod oldergod mentioned this pull request Jun 22, 2021
12 tasks
@oldergod oldergod force-pushed the bquenaudon.2021-06-22.respectdeclarationorderinconstructor branch from 3c8b3e8 to 5061ac8 Compare June 22, 2021 20:33
Copy link
Collaborator

@swankjesse swankjesse left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, this is rad.

@oldergod oldergod merged commit 14e0813 into master Jun 22, 2021
@oldergod oldergod deleted the bquenaudon.2021-06-22.respectdeclarationorderinconstructor branch June 22, 2021 22:14
MehdiAghajani pushed a commit to MehdiAghajani/wire that referenced this pull request Dec 26, 2021
square#1997)

* regenerated tests

* regenerated tests

* Kotlin generated message's contructor respect fields declaration order
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants