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

[0.24] Ignore missing comma in parameter list parse error for contract updates #1711

Merged

Conversation

turbolent
Copy link
Member

@turbolent turbolent commented Jun 10, 2022

Closes #1710


  • 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 self-assigned this Jun 10, 2022
@github-actions
Copy link

github-actions bot commented Jun 10, 2022

Cadence Benchstat comparison

This branch with compared with the base branch onflow:master commit f4bc9b2
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.

Results

old.txtnew.txt
time/opdelta
CheckContractInterfaceFungibleTokenConformance-2145µs ± 3%149µs ± 7%~(p=0.318 n=7+7)
ContractInterfaceFungibleToken-244.0µs ± 2%45.0µs ±10%~(p=0.535 n=7+7)
InterpretRecursionFib-22.94ms ± 4%2.93ms ± 6%~(p=1.000 n=7+7)
NewInterpreter/new_interpreter-21.16µs ± 2%1.16µs ± 3%~(p=0.753 n=7+6)
NewInterpreter/new_sub-interpreter-22.46µs ± 4%2.50µs ± 3%~(p=0.209 n=7+7)
ParseArray-28.98ms ± 4%9.15ms ± 4%~(p=0.181 n=7+6)
ParseDeploy/byte_array-213.7ms ± 3%13.8ms ± 5%~(p=0.535 n=7+7)
ParseDeploy/decode_hex-21.21ms ± 4%1.24ms ± 5%~(p=0.209 n=7+7)
ParseFungibleToken/With_memory_metering-2217µs ± 3%226µs ±11%~(p=0.165 n=7+7)
ParseFungibleToken/Without_memory_metering-2167µs ± 6%170µs ± 5%~(p=0.628 n=7+6)
ParseInfix-27.91µs ± 4%7.91µs ± 3%~(p=1.000 n=7+6)
QualifiedIdentifierCreation/One_level-22.45ns ± 3%2.45ns ± 4%~(p=0.836 n=7+6)
QualifiedIdentifierCreation/Three_levels-2145ns ± 3%153ns ± 8%+5.65%(p=0.001 n=7+7)
RuntimeFungibleTokenTransfer-21.19ms ±22%1.26ms ±29%~(p=0.259 n=7+7)
RuntimeResourceDictionaryValues-26.76ms ± 5%6.81ms ± 6%~(p=0.620 n=7+7)
Transfer-292.4ns ± 3%95.4ns ± 5%~(p=0.165 n=7+7)
 
alloc/opdelta
CheckContractInterfaceFungibleTokenConformance-266.3kB ± 0%66.3kB ± 0%~(p=1.000 n=7+7)
ContractInterfaceFungibleToken-226.7kB ± 0%26.7kB ± 0%~(all equal)
InterpretRecursionFib-21.25MB ± 0%1.25MB ± 0%~(p=0.141 n=5+7)
NewInterpreter/new_interpreter-2872B ± 0%872B ± 0%~(all equal)
NewInterpreter/new_sub-interpreter-21.38kB ± 0%1.38kB ± 0%~(all equal)
ParseArray-22.80MB ± 2%2.81MB ± 2%~(p=0.535 n=7+7)
ParseDeploy/byte_array-24.45MB ± 3%4.48MB ± 3%~(p=0.165 n=7+7)
ParseDeploy/decode_hex-2214kB ± 0%214kB ± 0%~(p=0.469 n=7+7)
ParseFungibleToken/With_memory_metering-236.3kB ± 0%36.3kB ± 0%~(p=0.611 n=7+7)
ParseFungibleToken/Without_memory_metering-236.3kB ± 0%36.3kB ± 0%~(p=0.793 n=7+7)
ParseInfix-22.17kB ± 0%2.17kB ± 0%~(p=0.179 n=7+7)
QualifiedIdentifierCreation/One_level-20.00B 0.00B ~(all equal)
QualifiedIdentifierCreation/Three_levels-264.0B ± 0%64.0B ± 0%~(all equal)
RuntimeFungibleTokenTransfer-2237kB ± 1%236kB ± 0%~(p=0.620 n=7+7)
RuntimeResourceDictionaryValues-22.25MB ± 0%2.25MB ± 0%~(p=0.902 n=7+7)
Transfer-248.0B ± 0%48.0B ± 0%~(all equal)
 
allocs/opdelta
CheckContractInterfaceFungibleTokenConformance-21.07k ± 0%1.07k ± 0%~(all equal)
ContractInterfaceFungibleToken-2460 ± 0%460 ± 0%~(all equal)
InterpretRecursionFib-223.8k ± 0%23.8k ± 0%~(all equal)
NewInterpreter/new_interpreter-212.0 ± 0%12.0 ± 0%~(all equal)
NewInterpreter/new_sub-interpreter-240.0 ± 0%40.0 ± 0%~(all equal)
ParseArray-270.0k ± 0%70.0k ± 0%~(p=0.592 n=7+7)
ParseDeploy/byte_array-2105k ± 0%105k ± 0%~(p=0.592 n=7+7)
ParseDeploy/decode_hex-278.0 ± 0%78.0 ± 0%~(all equal)
ParseFungibleToken/With_memory_metering-21.06k ± 0%1.06k ± 0%~(all equal)
ParseFungibleToken/Without_memory_metering-21.06k ± 0%1.06k ± 0%~(all equal)
ParseInfix-266.0 ± 0%66.0 ± 0%~(all equal)
QualifiedIdentifierCreation/One_level-20.00 0.00 ~(all equal)
QualifiedIdentifierCreation/Three_levels-22.00 ± 0%2.00 ± 0%~(all equal)
RuntimeFungibleTokenTransfer-24.52k ± 0%4.52k ± 0%~(p=1.000 n=7+7)
RuntimeResourceDictionaryValues-237.6k ± 0%37.6k ± 0%~(p=1.000 n=7+7)
Transfer-21.00 ± 0%1.00 ± 0%~(all equal)
 

Copy link
Member

@SupunS SupunS left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM!

@turbolent turbolent force-pushed the bastian/1710-ignore-missing-comma-during-contract-update branch from fc7488f to bb21268 Compare June 10, 2022 18:09
@turbolent turbolent changed the base branch from master to v0.24 June 10, 2022 18:10
@codecov
Copy link

codecov bot commented Jun 10, 2022

Codecov Report

Merging #1711 (bb21268) into v0.24 (858865b) will decrease coverage by 0.01%.
The diff coverage is 65.51%.

@@            Coverage Diff             @@
##            v0.24    #1711      +/-   ##
==========================================
- Coverage   77.00%   76.99%   -0.02%     
==========================================
  Files         292      292              
  Lines       61187    61211      +24     
==========================================
+ Hits        47117    47129      +12     
- Misses      12459    12469      +10     
- Partials     1611     1613       +2     
Flag Coverage Δ
unittests 76.99% <65.51%> (-0.02%) ⬇️

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

Impacted Files Coverage Δ
runtime/parser2/errors.go 19.17% <12.50%> (-1.72%) ⬇️
runtime/runtime.go 86.47% <83.33%> (-0.04%) ⬇️
runtime/parser2/function.go 73.63% <100.00%> (+0.39%) ⬆️
runtime/parser2/parser.go 91.18% <0.00%> (-0.76%) ⬇️

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 858865b...bb21268. Read the comment docs.

@turbolent turbolent changed the title Ignore missing comma in parameter list parse error for contract updates [0.24] Ignore missing comma in parameter list parse error for contract updates Jun 10, 2022
@turbolent turbolent merged commit a8f3156 into v0.24 Jun 10, 2022
@turbolent turbolent deleted the bastian/1710-ignore-missing-comma-during-contract-update branch June 10, 2022 18:21
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Contracts with parsing problem cannot be updated
3 participants