You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Please answer these questions before submitting your issue. Thanks!
What did you do?
go run _foo.go
What did you expect to see?
compile & run the file
I know that go run will ignore build constraints on the target files, so I was surprised that it ignored the file with the underscore. This was made doubly confusing because the error message is confusingly saying there's no go files in the directory, but with go run, I'm not building "everything in the directory" like I would with go build, I'm building a specific set of files, so the error message is misleading.
What did you see instead?
~/src/foo/bar (master)$ go run _make.go
package main: no Go files in /Users/nate/src/foo/bar
Does this issue reproduce with the latest release (go1.8.3)?
yes
System details
go version devel +eab99a8d54 Mon Jun 26 21:12:22 2017 +0000 darwin/amd64
GOARCH="amd64"
GOBIN=""
GOEXE=""
GOHOSTARCH="amd64"
GOHOSTOS="darwin"
GOOS="darwin"
GOPATH="/Users/finchnat"
GORACE=""
GOROOT="/Users/finchnat/src/github.com/golang/go"
GOTOOLDIR="/Users/finchnat/src/github.com/golang/go/pkg/tool/darwin_amd64"
GCCGO="gccgo"
CC="clang"
GOGCCFLAGS="-fPIC -m64 -pthread -fno-caret-diagnostics -Qunused-arguments -fmessage-length=0 -fdebug-prefix-map=/var/folders/ch/4d1vgsv17jq0b3yfmnkl9thdk0jm7d/T/go-build471231850=/tmp/go-build -gno-record-gcc-switches -fno-common"
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"
GOROOT/bin/go version: go version devel +eab99a8d54 Mon Jun 26 21:12:22 2017 +0000 darwin/amd64
GOROOT/bin/go tool compile -V: compile version devel +eab99a8d54 Mon Jun 26 21:12:22 2017 +0000 X:framepointer
uname -v: Darwin Kernel Version 16.7.0: Thu Jun 15 17:36:27 PDT 2017; root:xnu-3789.70.16~2/RELEASE_X86_64
ProductName: Mac OS X
ProductVersion: 10.12.6
BuildVersion: 16G29
lldb --version: lldb-370.0.42
Swift-3.1
The text was updated successfully, but these errors were encountered:
Please answer these questions before submitting your issue. Thanks!
What did you do?
go run _foo.go
What did you expect to see?
compile & run the file
I know that go run will ignore build constraints on the target files, so I was surprised that it ignored the file with the underscore. This was made doubly confusing because the error message is confusingly saying there's no go files in the directory, but with go run, I'm not building "everything in the directory" like I would with go build, I'm building a specific set of files, so the error message is misleading.
What did you see instead?
~/src/foo/bar (master)$ go run _make.go
package main: no Go files in /Users/nate/src/foo/bar
Does this issue reproduce with the latest release (go1.8.3)?
yes
System details
The text was updated successfully, but these errors were encountered: