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

Upgrade wagon and add tests #93

Open
wants to merge 3 commits into
base: master
Choose a base branch
from

Conversation

silasdavis
Copy link

@silasdavis silasdavis commented Oct 8, 2019

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.

Signed-off-by: Silas Davis <[email protected]>
@silasdavis silasdavis force-pushed the upgrade-wagon branch 2 times, most recently from ddb6181 to 562dcda Compare October 9, 2019 18:47
Signed-off-by: Silas Davis <[email protected]>
@silasdavis silasdavis changed the title Upgrade wagon Upgrade wagon and add tests Oct 9, 2019
@@ -442,12 +442,12 @@ func (c *SSAFunctionCompiler) Compile(importTypeIDs []int) {
c.PushStack(targetValueID)
}

case "current_memory":
case "memory.size":
Copy link
Author

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

Copy link
Contributor

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.

@iwasaki-kenta
Copy link
Contributor

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.

@rkeene rkeene added the enhancement New feature or request label Oct 24, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants