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

Sync feature/string-templates branch with master #3626

Merged
merged 87 commits into from
Oct 18, 2024

Conversation

SupunS
Copy link
Member

@SupunS SupunS commented Oct 18, 2024

Conflicts:

commit 1772f4345bab48b0cdc713b8e0fad0b322ca6ecb (HEAD -> supun/string-templates, upstream/supun/string-templates, feature/string-templates)
Merge: 3208a5d3d 0bb1b6964
Author: Supun Setunga <[email protected]>
Date:   Fri Oct 18 09:51:20 2024 -0700

    Merge branch 'master' of https://github.com/onflow/cadence into feature/string-templates

diff --git a/ast/string_template_test.go b/ast/string_template_test.go
index c6167aaff..ebfc9e422 100644
--- a/ast/string_template_test.go
+++ b/ast/string_template_test.go
@@ -22,6 +22,7 @@ import (
        "testing"
 
        "github.com/stretchr/testify/assert"
+
        "github.com/turbolent/prettier"
 )
 
diff --git a/sema/check_string_template_expression.go b/sema/check_string_template_expression.go
index 6cbd8d80e..44aa746d0 100644
--- a/sema/check_string_template_expression.go
+++ b/sema/check_string_template_expression.go
@@ -18,7 +18,7 @@
 
 package sema
 
-import "github.com/onflow/cadence/runtime/ast"
+import "github.com/onflow/cadence/ast"
 
 // All number types, addresses, path types, bool, strings and characters are supported in string template
 func isValidStringTemplateValue(valueType Type) bool {

  • 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

SupunS and others added 30 commits September 10, 2024 12:43
Add tests for enum usage as transaction parameters
Always return parser errors gracefully
Allow validation of `Account.capabilities.get/borrow/publish`
Fix runtime type of Account_Inbox_claim() function
Currently, some migration tests reuse storage for migration.
It can lead to tests failing when the storage cache gets
out of sync with underlying storage.

For example:
1. Use storage 1 to store valueA in public domain directly.
2. Use storage 2 to store valueB in public domain via
   ExecuteTransaction().
3. Reuse storage 1 for migration.  Here, migration
   only sees valueA from cache instead of both values.

This commit prevents out-of-sync issues by creating new
runtime.Storage for migrations instead of reusing old storage.
turbolent and others added 22 commits October 15, 2024 13:18
Co-authored-by: Supun Setunga <[email protected]>
Explain the reason for support parsing legacy restricted types
Move  subdirectories under `runtime` to top level
Move tests under `runtime` to `tests` directory
@SupunS SupunS self-assigned this Oct 18, 2024
Copy link

Cadence Benchstat comparison

This branch with compared with the base branch onflow:feature/string-templates commit 3208a5d
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

@SupunS SupunS marked this pull request as ready for review October 18, 2024 16:58
@SupunS SupunS merged commit a185a42 into feature/string-templates Oct 18, 2024
7 of 9 checks passed
@SupunS SupunS deleted the supun/string-templates branch October 18, 2024 17:02
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