cmd/go: GOOS=js GOARCH=wasm go build -o [non-empty parent dir] ./... fails on Windows host #37472
Labels
arch-wasm
WebAssembly issues
FrozenDueToAge
NeedsInvestigation
Someone must examine and confirm this is a valid issue and not a duplicate of an existing one.
OS-JS
OS-Windows
What version of Go are you using (
go version
)?Does this issue reproduce with the latest release?
Yes
What operating system and processor architecture are you using (
go env
)?go env
OutputWhat did you do?
I was checking out the changes in #14295 and they work great most of the time, but I might have found an edge case where they fail.
The changes in #14295 work great with regular GOOS and GOARCH on non-empty directories (nice work!):
But doesn't work with GOOS=js GOARCH=wasm
It works great with GOOS=js GOARCH=wasm if I make a new directory:
And it works great if I rebuild into the bin directory:
Is this intended to work with non-empty parent directories of the binaries? Why does it work with GOOS=windows GOARCH=amd64 but not GOOS=js GOARCH=wasm?
My directory structure lives inside $GOPATH at ~/Polyapp_Apps/gocode/src/gitlab.com/polyapp-open-source/poly/testdata because, setting the exact issue aside, I'm writing some tools to make linting, testing, building, and running my multi-arch. programs a bit easier.
Here are my test files in order of the directory structure. Some files have perhaps changed a bit since I ran the commands above - I don't recall if the test file existed before
testdata/cmd/hello/main.go
testdata/cmd/hello/main_test.go
testdata/cmd/wasm1/main_js_wasm.go
testdata/cmd/wasm2/main_js_wasm.go
testdata/cmd/wasm3/main.go
testdata/cmd/main.go
The text was updated successfully, but these errors were encountered: