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.
Is your feature request related to a problem? Please describe. Today, the
wasme init
command will use the byte-arrays found in thetools/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.