Skip to content

Commit 0a6db47

Browse files
committed
fix(templates/http-go): Remove scheduler flag from http-go build command
This removes the `-scheduler=none` flag from the build command in the http-go template. Including this flag prevents Spin applications using `http.Transport` from compiling. ``` ❯ spin build Building component http-roundtrip-test with `tinygo build -target=wasip1 -gc=leaking -scheduler=none -buildmode=c-shared -no-debug -o main.wasm .` /opt/homebrew/Cellar/tinygo/0.35.0/src/net/http/transfer.go:213:2: attempted to start a goroutine without a scheduler Error: Build command for component http-roundtrip-test failed with status Exited(1) ``` Signed-off-by: Adam Reese <[email protected]>
1 parent 771282e commit 0a6db47

File tree

4 files changed

+4
-4
lines changed

4 files changed

+4
-4
lines changed

crates/componentize/tests/go-case/spin.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,4 +12,4 @@ allowed_http_hosts = []
1212
[component.trigger]
1313
route = "/..."
1414
[component.build]
15-
command = "tinygo build -target=wasi -gc=leaking -no-debug -o main.wasm main.go"
15+
command = "tinygo build -target=wasip1 -gc=leaking -buildmode=c-shared -no-debug -o main.wasm ."

templates/http-go/content/spin.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,5 +14,5 @@ component = "{{project-name | kebab_case}}"
1414
source = "main.wasm"
1515
allowed_outbound_hosts = []
1616
[component.{{project-name | kebab_case}}.build]
17-
command = "tinygo build -target=wasip1 -gc=leaking -scheduler=none -buildmode=c-shared -no-debug -o main.wasm ."
17+
command = "tinygo build -target=wasip1 -gc=leaking -buildmode=c-shared -no-debug -o main.wasm ."
1818
watch = ["**/*.go", "go.mod"]

templates/http-go/metadata/snippets/component.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,6 @@ component = "{{project-name | kebab_case}}"
66
source = "{{ output-path }}/main.wasm"
77
allowed_outbound_hosts = []
88
[component.{{project-name | kebab_case}}.build]
9-
command = "tinygo build -target=wasip1 -gc=leaking -scheduler=none -buildmode=c-shared -no-debug -o main.wasm ."
9+
command = "tinygo build -target=wasip1 -gc=leaking -buildmode=c-shared -no-debug -o main.wasm ."
1010
workdir = "{{ output-path }}"
1111
watch = ["**/*.go", "go.mod"]

templates/redis-go/content/spin.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,4 +17,4 @@ component = "{{project-name | kebab_case}}"
1717
source = "main.wasm"
1818
allowed_outbound_hosts = []
1919
[component.{{project-name | kebab_case}}.build]
20-
command = "tinygo build -target=wasi -gc=leaking -no-debug -o main.wasm main.go"
20+
command = "tinygo build -target=wasip1 -gc=leaking -buildmode=c-shared -no-debug -o main.wasm ."

0 commit comments

Comments
 (0)