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

Type check transaction role declarations #2257

Conversation

turbolent
Copy link
Member

@turbolent turbolent commented Jan 18, 2023

Work towards #2177


  • 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

runtime/sema/type.go Outdated Show resolved Hide resolved
Copy link
Contributor

@dreamsmasher dreamsmasher left a comment

Choose a reason for hiding this comment

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

LGTM, just some nitpicks

runtime/sema/errors.go Show resolved Hide resolved
runtime/tests/checker/transactions_test.go Show resolved Hide resolved
runtime/tests/checker/transactions_test.go Show resolved Hide resolved
runtime/sema/check_transaction_declaration.go Show resolved Hide resolved
runtime/sema/check_transaction_declaration.go Show resolved Hide resolved
runtime/sema/check_transaction_declaration.go Outdated Show resolved Hide resolved
Base automatically changed from bastian/extended-transaction-format to feature/extended-transaction-format January 18, 2023 18:00
@github-actions
Copy link

Cadence Benchstat comparison

This branch with compared with the base branch onflow:feature/extended-transaction-format commit 67589aa
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

@codecov
Copy link

codecov bot commented Jan 18, 2023

Codecov Report

Merging #2257 (bb6beba) into feature/extended-transaction-format (3c0ba24) will increase coverage by 0.08%.
The diff coverage is 86.51%.

@@                           Coverage Diff                           @@
##           feature/extended-transaction-format    #2257      +/-   ##
=======================================================================
+ Coverage                                77.69%   77.77%   +0.08%     
=======================================================================
  Files                                      309      309              
  Lines                                    65863    66095     +232     
=======================================================================
+ Hits                                     51170    51404     +234     
+ Misses                                   12913    12907       -6     
- Partials                                  1780     1784       +4     
Flag Coverage Δ
unittests 77.77% <86.51%> (+0.08%) ⬆️

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

Impacted Files Coverage Δ
runtime/compiler/compiler.go 55.35% <0.00%> (-0.60%) ⬇️
runtime/interpreter/interpreter_transaction.go 97.29% <0.00%> (-2.71%) ⬇️
runtime/common/declarationkind.go 79.82% <50.00%> (-1.09%) ⬇️
runtime/sema/type.go 89.52% <60.00%> (-0.40%) ⬇️
runtime/parser/transaction.go 77.15% <63.63%> (-2.41%) ⬇️
runtime/sema/elaboration.go 74.13% <70.00%> (-0.10%) ⬇️
runtime/sema/checker.go 92.14% <89.47%> (-0.11%) ⬇️
runtime/sema/check_transaction_declaration.go 95.79% <95.23%> (+11.18%) ⬆️
runtime/ast/visitor.go 84.82% <100.00%> (+0.27%) ⬆️
runtime/sema/check_array_expression.go 100.00% <100.00%> (ø)
... and 19 more

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

@dsainati1
Copy link
Contributor

#2257 (comment) linking this in case it got missed

@turbolent
Copy link
Member Author

Realized there's a problem with resource-kinded fields in roles: onflow/flips#41 (comment).

Does not block this PR, but necessitates a follow-up PR

@turbolent
Copy link
Member Author

@dsainati1 Sorry I missed that comment, thanks for bumping it 👍

runtime/sema/check_transaction_declaration.go Show resolved Hide resolved
runtime/sema/check_transaction_declaration.go Outdated Show resolved Hide resolved
runtime/sema/check_transaction_declaration.go Outdated Show resolved Hide resolved
runtime/tests/checker/transactions_test.go Outdated Show resolved Hide resolved
@turbolent turbolent requested a review from SupunS January 23, 2023 23:29
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.

Looks good! Thanks for the refactoring!

Just have one question regarding the checker/test.

runtime/sema/check_transaction_declaration.go Outdated Show resolved Hide resolved
runtime/tests/checker/transactions_test.go Show resolved Hide resolved
@turbolent turbolent merged commit fa2c9fe into feature/extended-transaction-format Jan 24, 2023
@turbolent turbolent deleted the bastian/extended-transaction-format-2 branch January 24, 2023 20:50
@turbolent turbolent restored the bastian/extended-transaction-format-2 branch January 24, 2023 21:56
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.

None yet

4 participants