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

fix: Don't empty previous contents of build dir #568

Merged
merged 2 commits into from
Nov 7, 2024
Merged

Conversation

mattjohnsonpint
Copy link
Member

Description

In the AssemblyScript SDK, the build script wipes the contents of the build directory clean before writing new files. While this may sound good, there are two side effects that appear when using modus dev:

  • The .wasm file is removed, then re-added. So the runtime will see it as unregister/register, rather than just re-register.
  • Any files the CLI copies to the build folder (namely .env and .env.*) are removed any time a code change is made.

The Go SDK doesn't have this issue, because it doesn't wipe the build directory. It just overwrites as needed.

Removing the file deletion code from the build script will fix the issues and align the two SDKs to have the same behavior.

Checklist

  • Code compiles correctly and linting passes locally
  • For all code changes, an entry added to the CHANGELOG.md file describing and linking to this PR

@mattjohnsonpint mattjohnsonpint requested a review from a team as a code owner November 7, 2024 02:11
@mattjohnsonpint mattjohnsonpint merged commit 3270211 into main Nov 7, 2024
32 checks passed
@mattjohnsonpint mattjohnsonpint deleted the mjp/hyp-2514 branch November 7, 2024 02:13
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

2 participants