Typechecking, fixes, and more with v1.1.0
v1.1.0 is a massive update composed of 117 commits that improves Seam as a product and as a development project.
Changes to how you use Seam:
- Added property and class typechecking/autofill using the new solver for
New() - Added
Scope:CleanInnerScopes() - Fixed bug with StateManager when bucket instance destroys early
- Fixed missing, outdated, and misleading parts of docs
Changes behind the scenes:
- Restructured constructors in Seam behind-the-scenes for improved readability and conciseness, cutting each constructor by an average of 16% lines of code.
- Added CI with unit tests to ensure broken code doesn't get shipped.
- Swapped from Trove to Bucket for backend cleanup
- Updated backend signal module to fix bug
- Replaced backend Oklab module for more readable one from Praxis
- Converted codebase to use Oxomo Games' coding conventions
- Moved docs to Seam repository to unify everything (this also means docs are now open-source)
The most outstanding change here is the autofill and typechecking capabilities added to New. Huge thanks to the contributors that made this possible! This works with building new instances or hydrating existing ones.
You'll notice, though, a lot of changes are behind the scenes. Much of what was done improved readability and stability.
The biggest change is to how constructors are written. Not only is it much easier to read, but the amount of code to write a constructor has been reduced:
OnAttached: 27 -> 19
OnAttributeChanged: 56 -> 48
OnChanged: 30 -> 24
OnEvent: 58 -> 49
StyleSheet: 342 -> 274
Attribute: 104 -> 88
Children: 124 -> 111
Component: 52 -> 48
Destroyed: 31 -> 19
EventSequence: 143 -> 120
FollowAttribute: 84 -> 77
FollowProperty: 84 -> 77
Lifetime: 37 -> 25
New: 78 -> 65
Tags: 39 -> 27
Scope: 220 -> 175
Spring: 275 -> 257
Tween: 190 -> 173
Bezier: 232 -> 205
Computed: 165 -> 152
ForPairs: 72 -> 57
Rendered: 98 -> 84
Resource: 149 -> 126
Value: 250 -> 228
GetValue: 36 -> 29
Inspect: 33 -> 28
IsComponent: 30 -> 25
IsState: 37 -> 32
LockValue: 29 -> 21
SetValue: 30 -> 25
Total reduction from constructor modules: 505 lines (13.2%). Average reduction per constructor: 16.9%.
That being said, this readability improvement comes at the cost at doing inheritance over composability. In the future, I want to stop using metatables entirely and still keep the syntax that Seam currently has. I'm open to any ideas for this, please let me know in my OSS server!
Make sure to update Seam to get the newest changes!