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

Replace builders with generated traits on ObjectBuilder #1417

Draft
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

jf2048
Copy link
Member

@jf2048 jf2048 commented Dec 11, 2022

Alternate solution to #1391. Tested with gtk4 it removes around 40,000 lines of code.

I had to remove builder_postprocess too. For that I would like to somehow come up with a way to fold the setup into FromGlibPtr and FromValue.

@jf2048 jf2048 force-pushed the builder-traits branch 3 times, most recently from 17e6a81 to 37eb9a1 Compare December 11, 2022 04:35
module_name, analysis.name
"\tpub use super::{}::{}BuilderExt;",
module_name,
analysis.builder_trait_prefix()
Copy link
Member

Choose a reason for hiding this comment

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

Can't this return the actual builder trait name instead?

Copy link
Member Author

Choose a reason for hiding this comment

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

Which one? I had to do something like this because otherwise it gets the same conflicts as with the normal trait names (e.g. ObjectExt WindowExt ApplicationExt, etc)

Copy link
Member

@sdroege sdroege left a comment

Choose a reason for hiding this comment

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

Looks generally good to me, nice cleanup :)
Can you create a PR to show the changes before we merge this here?

@jf2048
Copy link
Member Author

jf2048 commented Dec 12, 2022

I think something needs to be done in gtk-rs-core about the missing builder_postprocess first

@jf2048
Copy link
Member Author

jf2048 commented Dec 12, 2022

Sorry meant gtk3-rs and gtk4-rs, those seem to be the only places using it

@sdroege
Copy link
Member

sdroege commented Jan 5, 2023

@jf2048 @bilelmoussaoui What's the plan/status here?

@jf2048
Copy link
Member Author

jf2048 commented Jan 21, 2023

It is a real pain to modify that wrapper macro to do what we need to do here

@jf2048
Copy link
Member Author

jf2048 commented Jan 21, 2023

gtk-rs/gtk-rs-core#916

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