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 builder API with partial object API #1147

Closed
12 tasks done
hannobraun opened this issue Sep 28, 2022 · 2 comments · Fixed by #1452
Closed
12 tasks done

Replace builder API with partial object API #1147

hannobraun opened this issue Sep 28, 2022 · 2 comments · Fixed by #1452
Labels
topic: core Issues relating to core geometry, operations, algorithms type: development Work to ease development or maintenance, without direct effect on features or bugs

Comments

@hannobraun
Copy link
Owner

hannobraun commented Sep 28, 2022

As part of my work on #1079, I've introduced a new [partial object API]. Please follow that link to learn more about it, there's quite a bit of documentation. This API grew out of the builder API and is designed to replace it. But so far, only some parts of the builder API have been converted into the partial object API. I expect that parts of the builder API will still exist when I finish #1079.

Eventually, all of the builder API should be migrated over. The following list reflects the current progress:

If anyone is interested in taking a look, here's the process I've been using to migrate parts of the builder API:

  1. Copy a sub-module from builder to partial::objects.
  2. Update the builder structs to match the style and capability of the partial object structs:
    • Change their name.
    • Make sure all of their fields are optional and reflect the fields of their full object variant.
    • Add with_ methods for all of their fields.
    • Replace all of their build_ methods with as_ and from_ methods.
    • Give them a single build methods that is the only code that has access to Stores.
  3. Integrate them into partial object infrastructure (Partial, HasPartial, MaybePartial).

If in doubt, use the existing partial object API as a template, and always feel free to ask questions here.

@hannobraun hannobraun added type: development Work to ease development or maintenance, without direct effect on features or bugs topic: core Issues relating to core geometry, operations, algorithms labels Sep 28, 2022
@hannobraun
Copy link
Owner Author

I've replaced CycleBuilder with PartialCycle in #1169 and updated the list in the issue description.

@hannobraun
Copy link
Owner Author

hannobraun commented Oct 21, 2022

That this isn't finished is causing me some trouble with other work. I'm going to start finishing this now.

Oops, this is the wrong issue. Please disregard.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
topic: core Issues relating to core geometry, operations, algorithms type: development Work to ease development or maintenance, without direct effect on features or bugs
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant