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

Clean up types in cadence package #1204

Merged
merged 5 commits into from
Nov 5, 2021
Merged

Conversation

turbolent
Copy link
Member

@turbolent turbolent commented Oct 29, 2021

Description

While reviewing #1202 I noticed some tech debt

  • Fix naming: Rename cadence.Function to cadence.FunctionType to be consistent with the naming for other types in the package
  • Remove unused cadence.Variable and cadence.ResourcePointer. I don't know why they were there
  • Fix method receiver names

  • 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 dsainati1 and SupunS October 29, 2021 14:53
@turbolent turbolent self-assigned this Oct 29, 2021
@codecov-commenter
Copy link

codecov-commenter commented Oct 29, 2021

Codecov Report

Merging #1204 (2223bab) into master (55d91b9) will increase coverage by 0.00%.
The diff coverage is 50.00%.

Impacted file tree graph

@@           Coverage Diff           @@
##           master    #1204   +/-   ##
=======================================
  Coverage   77.45%   77.46%           
=======================================
  Files         273      273           
  Lines       34766    34764    -2     
=======================================
  Hits        26929    26929           
+ Misses       6762     6760    -2     
  Partials     1075     1075           
Flag Coverage Δ
unittests 77.46% <50.00%> (+<0.01%) ⬆️

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

Impacted Files Coverage Δ
runtime/convertTypes.go 79.15% <0.00%> (ø)
types.go 75.40% <0.00%> (+1.21%) ⬆️
encoding/json/decode.go 73.18% <100.00%> (ø)
encoding/json/encode.go 93.42% <100.00%> (ø)

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 55d91b9...2223bab. Read the comment docs.

@dsainati1
Copy link
Contributor

While working on #1202 I also noticed that some primitive static types (namely PrimitiveStaticTypeAuthAccount, PrimitiveStaticTypePublicAccount, PrimitiveStaticTypeAuthAccountContracts, PrimitiveStaticTypePublicAccountContracts and PrimitiveStaticTypeDeployedContract) have no equivalent in the cadence package. Is this intentional or is this also some residual tech debt?

@turbolent
Copy link
Member Author

@dsainati1 No, this is not intentional, they are missing. Good catch!

@turbolent turbolent force-pushed the bastian/cadence-types-cleanup branch from 96f18e5 to 2223bab Compare November 5, 2021 21:02
@turbolent turbolent merged commit 4348c5d into master Nov 5, 2021
@turbolent turbolent deleted the bastian/cadence-types-cleanup branch November 5, 2021 21:17
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.

4 participants