Delta Builder Fluent API #4
Loading…
x
Reference in New Issue
Block a user
No description provided.
Delete Branch "chore/delta-format-standardization"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Overview
This MR standardizes delta creation across the codebase by introducing and consistently using the
DeltaBuilder
fluent API. This change improves code consistency, type safety, and maintainability by providing a single, well-tested way to create deltas.Key Changes
Core Changes
DeltaBuilder
class with a fluent API for delta creationcreateDelta
factory function as the primary way to create deltasnew Delta(...)
instantiationsTransaction Handling
inTransaction()
method toDeltaBuilder
Negation System
negate()
method toDeltaBuilder
_negates
consistentlyType Safety
Testing
DeltaBuilder
Migration Notes
createDelta()
inTransaction()
negate()
Impact
Related Issues
Checklist
Screenshots (if applicable)
N/A - API changes only
Additional Notes
This change makes the codebase more maintainable by providing a single, consistent way to create deltas. The fluent API makes the code more readable and reduces the chance of errors in delta creation.
@ -0,0 +4,4 @@
Replace each delta instantiation with a fluent call to createDelta from delta builder
- pass creator and host as arguments to createDelta
- use setProperty where appropriate
I wasn't specific enough here, It didn't get
setProperty
on the first pass, but in the IDE it was able to catch on to the pattern and tab through to convert pairs ofaddPointer
into singlesetProperty
calls