-
Notifications
You must be signed in to change notification settings - Fork 120
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
Upgrade wagon and add tests #93
base: master
Are you sure you want to change the base?
Conversation
Signed-off-by: Silas Davis <[email protected]>
ddb6181
to
562dcda
Compare
Signed-off-by: Silas Davis <[email protected]>
562dcda
to
0b74cb1
Compare
Signed-off-by: Silas Davis <[email protected]>
@@ -442,12 +442,12 @@ func (c *SSAFunctionCompiler) Compile(importTypeIDs []int) { | |||
c.PushStack(targetValueID) | |||
} | |||
|
|||
case "current_memory": | |||
case "memory.size": |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We could avoid the strings in this switch if upstream merges: go-interpreter/wagon#172
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Agreed; I left a suggestion comment over in go-interpreter/wagon#172. It's not absolutely mandatory, though regardless of whichever option is chosen for converting an opcode into a string, we should definitely incorporate the change int a separate PR.
Thanks a lot for the PR! Merged in #89 just recently; would love to start incorporating tests into the CI cycle. Let me know when you're able to rebase and then LGTM. Happy with the Makefile approach, which is what we take for other projects we have in the organization. |
edit: oops I missed this: https://github.com/perlin-network/life/pull/89/files. I think the tests still have value so I can rebase once #89 is merged if you want to accept these changes
This helps alleviate a lot of downstream pain with replace directives needed for transitive wagon dep.
I also found it slightly painful to run tests so I have added a makefile and also a github actions config. To enable this you would need to join the github actions beta here: https://github.com/features/actions
Makefiles are a little arcane, but they are quite standard in Go and I feel like a better tool for the job than the current python script. Let me know if you think that script could be removed or if you want me to tweak the makefile approach.
I've added the test suite as a git submodule so
make test
will now generate wast and run tests provided you have wast2json on your path.