-
Notifications
You must be signed in to change notification settings - Fork 18.1k
doc: document that now that js is a GOOS that can break existing packages #26329
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
This is an unfortunate consequence of adding |
CC @andybons |
js is now an operating system, like windows, as far as go build is concerned
https://github.com/golang/go/blob/master/src/go/build/syslist.go#L7
So any file ending with _js will be ignored unless you've set GOOS=js
…On 12 July 2018 at 00:02, Vojtech Vitek ***@***.***> wrote:
I found a build regression when building a large monorepo when trying out
Go 1.11-beta1.
Please check out this repo: github.com/VojtechVitek/go1.11, the simplest
reproducer I came up with.
Go 1.10.3
$ go version
go version go1.10.3 darwin/amd64
$ go run main.go
OK
Go 1.11-beta1
$ go version
go version go1.11beta1 darwin/amd64
$ go run main.go
# command-line-arguments
./main.go:11:6: undefined: addons.CustomJS
Looks like Go 1.11-beta1 ignores the addons/custom_js.go
<https://github.com/VojtechVitek/go1.11/blob/master/addons/custom_js.go>
file for some reason.
Is _js.go suffix somehow magical now because of the js/wasm support?
Is this intended? I don't think I saw this in the Go 1.11 DRAFT release
notes <https://tip.golang.org/doc/go1.11>.
Thanks!
System details
go version go1.11beta1 darwin/amd64
GOARCH="amd64"
GOBIN=""
GOCACHE="/Users/vojtechvitek/Library/Caches/go-build"
GOEXE=""
GOHOSTARCH="amd64"
GOHOSTOS="darwin"
GOOS="darwin"
GOPATH="/Users/vojtechvitek/go"
GOPROXY=""
GORACE=""
GOROOT="/usr/local/go"
GOTMPDIR=""
GOTOOLDIR="/usr/local/go/pkg/tool/darwin_amd64"
GCCGO="gccgo"
CC="clang"
CXX="clang++"
CGO_ENABLED="1"
CGO_CFLAGS="-g -O2"
CGO_CPPFLAGS=""
CGO_CXXFLAGS="-g -O2"
CGO_FFLAGS="-g -O2"
CGO_LDFLAGS="-g -O2"
PKG_CONFIG="pkg-config"
GOGCCFLAGS="-fPIC -m64 -pthread -fno-caret-diagnostics -Qunused-arguments -fmessage-length=0 -fdebug-prefix-map=/var/folders/hr/5zb8r0yx4sv4_1dc0rlccflm0000gn/T/go-build846962860=/tmp/go-build -gno-record-gcc-switches -fno-common"
VGOMODROOT=""
GOROOT/bin/go version: go version go1.11beta1 darwin/amd64
GOROOT/bin/go tool compile -V: compile version go1.11beta1
uname -v: Darwin Kernel Version 17.4.0: Sun Dec 17 09:19:54 PST 2017; root:xnu-4570.41.2~1/RELEASE_X86_64
ProductName: Mac OS X
ProductVersion: 10.13.3
BuildVersion: 17D47
lldb --version: lldb-902.0.79.2
Swift-4.1
—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub
<#26329>, or mute the thread
<https://github.com/notifications/unsubscribe-auth/AAAcA7GUsB4xFF8jyKsb3xtJJHl11X7Gks5uFgVogaJpZM4VLMv4>
.
|
Documenting for others, since the issue was renamed: Issue: Go 1.11 ignores *_js.go files when building the source code(unless you explicitly build for Fix: Rename *_js.go files to *_javascript.go or similar |
Change https://golang.org/cl/123416 mentions this issue: |
I found a build regression when building a large monorepo when trying out Go 1.11-beta1.
Please check out this repo: github.com/VojtechVitek/go1.11, the simplest reproducer I came up with.
Go 1.10.3
Go 1.11-beta1
Looks like Go 1.11-beta1 ignores the addons/custom_js.go file for some reason.
Is
_js.go
suffix somehow magical now because of the js/wasm support?Is this intended? I don't think I saw this in the Go 1.11 DRAFT release notes.
Thanks!
System details
The text was updated successfully, but these errors were encountered: