-
Notifications
You must be signed in to change notification settings - Fork 16
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
Rename StorageID related types, vars, and funcs #322
Merged
fxamacker
merged 7 commits into
main
from
fxamacker/rename-id-and-related-functions-and-types
Jul 6, 2023
Merged
Rename StorageID related types, vars, and funcs #322
fxamacker
merged 7 commits into
main
from
fxamacker/rename-id-and-related-functions-and-types
Jul 6, 2023
Conversation
This file contains 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
Renamed types: - StorageID to SlabID - StorageIndex to SlabIndex - StorageIDStorable to SlabIDStorable - StorageIDError to SlabIDError - and etc. Renamed functions: - ID() to SlabID() in Slab interface - Array.StorageID() to Array.SlabID() - OrderedMap.StorageID() to OrderedMap.SlabID() - DecodeStorageIDStorable() to DecodeSlabIDStorable() - NewStorageID() to NewSlabID() - GenerateStorageID() to GenerateSlabID() - and etc. Renamed variables: - CBORTagStorageID to CBORTagSlabID - and etc.
ramtinms
approved these changes
Jul 6, 2023
fxamacker
added
the
breaking change
changes to API that can break programs using Atree's API
label
Jul 6, 2023
Codecov Report
@@ Coverage Diff @@
## main #322 +/- ##
==========================================
- Coverage 64.73% 64.47% -0.27%
==========================================
Files 14 14
Lines 8045 8075 +30
==========================================
- Hits 5208 5206 -2
- Misses 2160 2191 +31
- Partials 677 678 +1
|
Currently, in order to create StorableSlab, user needs to: - generate SlabID from storage - create new StorableSlab - store created StorableSlab in storage This commit unexports StorableSlab fields and adds NewStorableSlab(). With this change, user can simply call NewStorableSlab().
ValueID identifies atree Array and OrderedMap while SlabID identifies slab in storage. SlabID should only be used to retrieve, store, and remove slab in storage.
turbolent
approved these changes
Jul 6, 2023
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
👌
Rename ID to ValueID
Refactor creating new StorableSlab
Unexport `SlabID` fields to prevent misuse
fxamacker
added a commit
to onflow/cadence
that referenced
this pull request
Jul 7, 2023
This commit updates Cadence to use new Atree API - Array.SlabID() - OrderedMap.SlabID() - SlabID - SlabIndex - etc. For more info, see Atree PRs: - onflow/atree#322 - onflow/atree#323 - onflow/atree#324
fxamacker
added a commit
to onflow/cadence
that referenced
this pull request
Jul 7, 2023
This commit updates Cadence to use new Atree API - Array.SlabID() - OrderedMap.SlabID() - SlabID - SlabIndex - etc. For more info, see Atree PRs: - onflow/atree#322 - onflow/atree#323 - onflow/atree#324
6 tasks
turbolent
pushed a commit
to onflow/cadence
that referenced
this pull request
Jan 26, 2024
This commit updates Cadence to use new Atree API - Array.SlabID() - OrderedMap.SlabID() - SlabID - SlabIndex - etc. For more info, see Atree PRs: - onflow/atree#322 - onflow/atree#323 - onflow/atree#324
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
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.
Updates #296 #292 onflow/flow-go#1744
Updates PR #321 and more context at #321 (comment)
Description
Renamed types:
Renamed functions:
Renamed variables:
main
branchFiles changed
in the Github PR explorer