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

Remove support for importing/exporting and JSON encoding/decoding path links and cadence type #2248

Merged

Conversation

turbolent
Copy link
Member

Closes #2208
Closes #2167

Description

#260 has added support for importing/exporting path link values into/from the interpreter, as well as encoding to/decoding from JSON.

This was likely only done because the Playground rendered storage contents in its UI by exporting stored values. Since then, storage inspection has changed and does not rely on this feature anymore.

Path links are only stored in storage, but are not first-class values.
Remove

  • cadence type definition
  • Interpreter import/export
  • JSON encoding/decoding

  • Targeted PR against master branch
  • Linked to Github issue with discussion and accepted design OR link to spec that describes this work
  • Code follows the standards mentioned here
  • Updated relevant documentation
  • Re-reviewed Files changed in the Github PR explorer
  • Added appropriate labels

@turbolent turbolent requested review from sideninja and a team January 13, 2023 22:33
@turbolent turbolent self-assigned this Jan 13, 2023
@turbolent turbolent requested a review from fxamacker January 13, 2023 22:33
@codecov
Copy link

codecov bot commented Jan 13, 2023

Codecov Report

Merging #2248 (c94c080) into master (4be8295) will decrease coverage by 0.01%.
The diff coverage is n/a.

@@            Coverage Diff             @@
##           master    #2248      +/-   ##
==========================================
- Coverage   77.70%   77.69%   -0.02%     
==========================================
  Files         309      309              
  Lines       65815    65793      -22     
==========================================
- Hits        51142    51116      -26     
- Misses      12895    12898       +3     
- Partials     1778     1779       +1     
Flag Coverage Δ
unittests 77.69% <ø> (-0.02%) ⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.

Impacted Files Coverage Δ
encoding/json/decode.go 88.12% <ø> (-0.06%) ⬇️
encoding/json/encode.go 94.42% <ø> (-0.11%) ⬇️
runtime/convertValues.go 82.88% <ø> (-0.13%) ⬇️
values.go 66.59% <ø> (-0.04%) ⬇️
runtime/environment.go 90.73% <0.00%> (-1.47%) ⬇️

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.

@github-actions
Copy link

Cadence Benchstat comparison

This branch with compared with the base branch onflow:master commit 2ed0f28
The command for i in {1..N}; do go test ./... -run=XXX -bench=. -benchmem -shuffle=on; done was used.
Bench tests were run a total of 7 times on each branch.

Collapsed results for better readability

@turbolent turbolent merged commit 5cab1bd into master Jan 16, 2023
@turbolent turbolent deleted the bastian/remove-path-link-encoding-decoding-export-import branch January 16, 2023 18:21
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Add static type for Cadence external PathLink value
3 participants