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

Initial binding cleanup using generics #5408

Merged
merged 9 commits into from
Jan 20, 2025

Conversation

Jacalz
Copy link
Member

@Jacalz Jacalz commented Jan 14, 2025

Description:

I honestly should be studying but I couldn't hold my self back with this one. The cleanup gains are too substantial.

For #5378

Checklist:

  • Tests included.
  • Lint and formatter run with no errors.
  • Tests all pass.

@Jacalz Jacalz changed the title Binding cleanup generic Initial binding cleanup using generic Jan 14, 2025
@coveralls
Copy link

coveralls commented Jan 14, 2025

Coverage Status

coverage: 59.034% (-0.2%) from 59.189%
when pulling 04ae66f on Jacalz:binding-cleanup-generic
into d7eeddc on fyne-io:develop.

@Jacalz Jacalz changed the title Initial binding cleanup using generic Initial binding cleanup using generics Jan 15, 2025
@Jacalz Jacalz requested a review from andydotxyz January 15, 2025 21:29
Copy link
Member

@andydotxyz andydotxyz left a comment

Choose a reason for hiding this comment

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

Thanks for this, it looks good indeed - cool stuff.

I've made a comment inline as the test changes seem unnecessary.

On a side note (unimportant) the gen script could have been updated to generate all the API in its original place leading to a clearer diff. With this approach we have to rely on the tests to verify that the function signatures are the same as they were before.

var wg sync.WaitGroup
wg.Add(n)
Copy link
Member

Choose a reason for hiding this comment

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

Isn't this considered bad practice? I thought I read you should only increment as each item is added

Copy link
Member

Choose a reason for hiding this comment

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

Anyhow I'd be tempted to say that in a refactor like this I'd prefer to see no test changes ;)

Copy link
Member Author

Choose a reason for hiding this comment

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

Yeah, this seems like some sort of thing that I accidentally committed after some race fix testing. I have no idea what is the best practice. The official example adds one at a time but I also can't find anything to say that adding them all at once would be bad. It is certainly faster 😅

@Jacalz
Copy link
Member Author

Jacalz commented Jan 20, 2025

Thanks. Yeah, I noticed that too late and the test change was not meant to be there. Will fix :)

@Jacalz Jacalz requested a review from andydotxyz January 20, 2025 19:20
Copy link
Member

@andydotxyz andydotxyz left a comment

Choose a reason for hiding this comment

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

Sweet thanks so much!

@Jacalz Jacalz merged commit 8726c8b into fyne-io:develop Jan 20, 2025
12 checks passed
@Jacalz Jacalz deleted the binding-cleanup-generic branch January 20, 2025 20:59
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.

3 participants