Conversation
Codecov Report❌ Patch coverage is Additional details and impacted files@@ Coverage Diff @@
## master #74 +/- ##
==========================================
- Coverage 89.53% 89.02% -0.52%
==========================================
Files 42 45 +3
Lines 7437 7471 +34
==========================================
- Hits 6659 6651 -8
- Misses 462 485 +23
- Partials 316 335 +19
🚀 New features to boost your workflow:
|
472e27b to
9d0fc80
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Refactor: Reorganize project structure
Summary
This PR reorganizes the project codebase to reduce clutter in the root folder and improve maintainability. The changes introduce two new sub-packages (
ssztypesandreflection) that logically group related functionality.Changes
New Package:
ssztypes/Contains SSZ type system components:
typecache.go- Type descriptor caching and resolutionssztags.go- SSZ struct tag parsing (ssz-size, ssz-max, dynssz-*, etc.)compatibility.go- FastSSZ interface compatibility checks (renamed fromfastssz.go)descriptor.go- Type descriptor definitions (SszType, TypeDescriptor, FieldDescriptor, etc.)typewrapper.go- TypeWrapper descriptor extraction helpersunion.go- CompatibleUnion descriptor extraction helpersNew Package:
reflection/Contains reflection-based SSZ processing:
marshal.go- Reflection-based SSZ marshalingunmarshal.go- Reflection-based SSZ unmarshalingtreeroot.go- Hash tree root calculation via reflectionsszsize.go- Dynamic size calculationcommon.go- Shared ReflectionCtx for coordinating reflection operationsRoot Package Cleanup
dynssz.gooptions.gofor DynSsz configuration optionstypewrapper.gowith publicTypeWrapper[D, T]generic typeunion.gowith publicCompatibleUnion[T]generic typeconst.go,utils.go,wrapper.goUpdated Dependencies
All internal imports in
codegen/,spectests/, anddynssz-gen/have been updated to use the new package paths.Benefits
ssztypes) is isolated from reflection processing (reflection)Migration
This is an internal refactoring. The public API exposed by the
dynsszpackage remains unchanged. Users importing onlygithub.com/pk910/dynamic-sszwill not need to make any changes.Users who import internal types directly may need to update imports:
github.com/pk910/dynamic-ssz/ssztypesgithub.com/pk910/dynamic-ssz/reflection