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

Introduce StructStringer #3594

Merged
merged 17 commits into from
Oct 30, 2024

Conversation

RZhang05
Copy link
Contributor

@RZhang05 RZhang05 commented Sep 26, 2024

Working towards #3579

Description

Implement onflow/flips#294

Add a simple StructStringer struct interface. It is intended in the future that all types which implement StructStringer can be used in string templates.


  • Targeted PR against feature/string-templates 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 SupunS self-assigned this Oct 1, 2024
@SupunS
Copy link
Member

SupunS commented Oct 1, 2024

@RZhang05 is this ready to be reviewed? or are there any pending changes?

@RZhang05 RZhang05 marked this pull request as ready for review October 1, 2024 22:32
@RZhang05
Copy link
Contributor Author

RZhang05 commented Oct 1, 2024

@RZhang05 is this ready to be reviewed? or are there any pending changes?

It is ready, note that there are some questions left in the code marked with TODO however.

runtime/sema/stringer.go Outdated Show resolved Hide resolved
runtime/sema/type.go Outdated Show resolved Hide resolved
runtime/tests/interpreter/stringer_test.go Outdated Show resolved Hide resolved
runtime/tests/interpreter/stringer_test.go Outdated Show resolved Hide resolved
runtime/tests/interpreter/stringer_test.go Outdated Show resolved Hide resolved
Copy link
Member

@turbolent turbolent left a comment

Choose a reason for hiding this comment

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

Nice work!

runtime/sema/type.go Outdated Show resolved Hide resolved
runtime/sema/type.go Outdated Show resolved Hide resolved
runtime/sema/type.go Outdated Show resolved Hide resolved
runtime/sema/stringer.go Outdated Show resolved Hide resolved
@RZhang05 RZhang05 changed the base branch from master to feature/string-templates October 2, 2024 15:17
Copy link
Member

@turbolent turbolent left a comment

Choose a reason for hiding this comment

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

Great work!

runtime/sema/gen/main.go Outdated Show resolved Hide resolved
runtime/sema/gen/main.go Outdated Show resolved Hide resolved
runtime/sema/gen/main.go Outdated Show resolved Hide resolved
runtime/sema/gen/main.go Outdated Show resolved Hide resolved
runtime/sema/gen/main.go Outdated Show resolved Hide resolved
runtime/sema/type.go Outdated Show resolved Hide resolved
runtime/sema/type.go Outdated Show resolved Hide resolved
runtime/sema/type.go Outdated Show resolved Hide resolved
runtime/sema/type.go Outdated Show resolved Hide resolved
runtime/sema/gen/main.go Outdated Show resolved Hide resolved
@SupunS SupunS deleted the branch onflow:feature/string-templates October 24, 2024 18:40
@SupunS SupunS closed this Oct 24, 2024
@turbolent
Copy link
Member

@SupunS Was this closed by accident?

@SupunS
Copy link
Member

SupunS commented Oct 24, 2024

oh, my bad. I was cleaning up some of my old branches, and must have accidentally deleted the base branch! Thought it was protected. Will revert it.

Restored the and reopened. Sorry about that 🙇

@SupunS SupunS reopened this Oct 24, 2024
@turbolent
Copy link
Member

No worries at all, I was just not sure about the feature branches 👍

Copy link
Member

@turbolent turbolent left a comment

Choose a reason for hiding this comment

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

Great work!

sema/path_type.go Show resolved Hide resolved
tests/checker/stringer_test.go Outdated Show resolved Hide resolved
@turbolent turbolent changed the title Introduce stringer Introduce StructStringer Oct 25, 2024
sema/gen/main.go Outdated Show resolved Hide resolved
sema/type.go Show resolved Hide resolved
@turbolent turbolent merged commit 262de48 into onflow:feature/string-templates Oct 30, 2024
6 of 9 checks passed
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.

3 participants