fix(compute/serve): skip build if --file
set
#1200
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Fixes #1198
The
compute build
command was being invoked even when the user passed their own Wasm binary viacompute serve --file <PATH/TO/WASM/BINARY>
. This is unnecessary because if you're passing--file
then you're indicating that you're not using the Fastly CLI to compile your code as you already have a binary to be used from elsewhere (whether that's an unsupported language like Zig or you have a completely separate build step).I've modified the
compute serve
command to skip thecompute build
if--file
is set, and I've also removed some older code where (for some reason) when we were runningcompute build
(even thoughcompute serve --file
was set) we were passing through a flag to thecompute build
command to get it to skip validating the expected./bin/main.wasm
output, which isn't needed anymore if we just skip the build process entirely.