Skip to content

Commit d7762b1

Browse files
committed
fix: resolve Go multi-file component compilation issues
- Include both main.go and utils.go in simple_test example to fix 'undefined function' errors - Restore proper main.go path detection in TinyGo compilation logic - TinyGo now correctly finds functions across multiple Go files in same package - Multi-file test demonstrates proper multi-Go file component development - Resolves CI build failures for Go components
1 parent f5ab3f7 commit d7762b1

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

examples/go_component/BUILD.bazel

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -90,10 +90,10 @@ go_wasm_component(
9090
world = "wasi:cli/command",
9191
)
9292

93-
# Simple test without WIT bindings to isolate asyncify issues
93+
# Multi-file test demonstrating TinyGo compilation with multiple Go source files
9494
go_wasm_component(
9595
name = "simple_test",
96-
srcs = ["main.go"],
96+
srcs = ["main.go", "utils.go"], # Include both main.go and utils.go
9797
adapter = "//wasm/adapters:wasi_snapshot_preview1",
9898
go_mod = "go.mod",
9999
optimization = "debug",

0 commit comments

Comments
 (0)