Skip to content

Commit 05327e3

Browse files
committed
fix: correct WIT file path structure for TinyGo components
CRITICAL FIX: TinyGo and wasm-tools expect WIT files in wit/ subdirectory with the original filename rather than flattened as component.wit. Changes: - Modified setup_go_module_action to place WIT file at wit/file-operations.wit - The prepare_workspace_action already handles creating parent directories automatically - This resolves "failed to read path for WIT [wit/file-operations.wit]" errors
1 parent 082d191 commit 05327e3

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

tools/bazel_helpers/file_ops_actions.bzl

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -251,9 +251,11 @@ def setup_go_module_action(ctx, sources, go_mod = None, wit_file = None):
251251
})
252252

253253
if wit_file:
254+
# CRITICAL FIX: TinyGo and wasm-tools expect WIT file in wit/ subdirectory
255+
# with the original filename (file-operations.wit)
254256
config["dependencies"].append({
255257
"source": wit_file,
256-
"destination": "component.wit",
258+
"destination": "wit/file-operations.wit",
257259
"preserve_permissions": False,
258260
})
259261

0 commit comments

Comments
 (0)