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

Tweak codegen process for example bundles used by wasme init #219

Open
Sodman opened this issue Oct 30, 2020 · 0 comments
Open

Tweak codegen process for example bundles used by wasme init #219

Sodman opened this issue Oct 30, 2020 · 0 comments
Labels
enhancement New feature or request

Comments

@Sodman
Copy link
Member

Sodman commented Oct 30, 2020

Is your feature request related to a problem? Please describe.
Today, the wasme init command will use the byte-arrays found in the tools/wasme/cli/pkg/cmd/initialize folder. For example, the assemblyscript one is here.

The problem here is that when PRs are made which change the examples but code-gen is not run, the wasme binary produced may not have the latest changes.

Also, when codegen is run, the diff between two large byte arrays isn't particularly helpful to have.

Describe the solution you'd like
We should refactor the CI process so that on release, codegen is run and that latest codegen freshly run against master on release should be what ends up being packaged into the released binaries.

We can also add these bytes files to the .gitignore file and remove them from the repo, removing the overhead from diffs / PRs.

Describe alternatives you've considered
We also looked into checking for diffs in codegen as a PR check, and blocking the PR if it doesn't match up. Unfortunately there appear to be some minor environment-specific effects affecting the exact byte array output, depending on which machine it's built on. Having it built by CI will ultimately be more consistent.

Additional context
Note that because of the issues described above, the *2gobytes.go files are explicitly ignored by the codegen diff check that's currently gating PRs.

@Sodman Sodman added the enhancement New feature or request label Oct 30, 2020
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

No branches or pull requests

1 participant