fix(wash): only generate tinygo when wit-dir present #1246
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.
Feature or Problem
Golang projects built by wash which have
wasm32-wasi-preview1
set as theirwasm_target
(inwasmcloud.toml
) fail to build due to gobindgen (i.e.
wit-bindgen-go
) being run on them.While the wasmcloud ecosystem is WIT-first, it is possible to build preview1/preview2 components without WIT (i.e. with the legacy Smithy ecosystem), and projects that are built in that way should not have bindgen run on them.
This commit improves the check to use
wit_world
to determine whether to run go-based bindgenRelated Issues
#1241
Release Information
next
Consumer Impact
templates built with tinygo that are using legacy smithy interfaces will build when using
wasm_target = "wasm32-wasi-preview1"
)Testing
Unit Test(s)
Acceptance or Integration
There's a test that caught this failure --
integration_build_tinygo_actor_unsigned
Manual Verification
Verified manually