Comments (7)
Same here with go 1.17
.....
github.com/bufbuild/buf/private/usage/usage.go:30 +0x50
If reporting this issue please do so at (not Homebrew/brew or Homebrew/core):
https://github.com/bufbuild/homebrew-buf/issues
These open issues may also help:
panic: github.com/bufbuild/buf/private code must only be imported by github.com/bufbuild projects https://github.com/bufbuild/homebrew-buf/issues/8
➜ ~ go version
go version go1.17.8 darwin/arm64
from homebrew-buf.
A new release is now available for this https://github.com/bufbuild/buf/releases/tag/v1.1.1
from homebrew-buf.
What version of go are you using? Type go version
from homebrew-buf.
I'm able to reproduce, I believe this is a 1.18 problem. For reference:
Diff:
diff --git a/private/usage/usage.go b/private/usage/usage.go
index 7ea8e925..936d3294 100644
--- a/private/usage/usage.go
+++ b/private/usage/usage.go
@@ -33,6 +33,7 @@ func init() {
func check() error {
buildInfo, ok := debug.ReadBuildInfo()
+ fmt.Printf("%+v\n", buildInfo)
if !ok || buildInfo.Main.Path == "" {
// Detect and allow *.test and __debug_bin* files.
if !strings.HasSuffix(os.Args[0], testSuffix) && !strings.HasPrefix(filepath.Base(os.Args[0]), debugBinPrefix) {
Run go build -ldflags "-s -w" -trimpath -o "buf" "cmd/buf/main.go"
, then run ./buf build
.
On 1.17.8:
&{Path:command-line-arguments Main:{Path:github.com/bufbuild/buf Version:(devel) Sum: Replace:<nil>} Deps:[0xc0001c81c0 0xc0001c8200 0xc0001c8240 0xc0001c8280 0xc0001c82c0 0xc0001c8340 0xc0001c8380 0xc0001c83c0 0xc0001c8400 0xc0001c8440 0xc0001c8480 0xc0001c84c0 0xc0001c8500 0xc0001c8540 0xc0001c8580 0xc0001c85c0 0xc0001c8600 0xc0001c8640 0xc0001c8680 0xc0001c86c0 0xc0001c8700 0xc0001c8740 0xc0001c8780 0xc0001c87c0 0xc0001c8800 0xc0001c8840 0xc0001c8880]}
On 1.18:
go go1.18
path command-line-arguments
dep github.com/bufbuild/buf (devel)
dep github.com/cpuguy83/go-md2man/v2 v2.0.1 h1:r/myEWzV9lfsM1tFLgDyu0atFtJ1fXn261LKYj/3DxU=
dep github.com/gofrs/flock v0.8.1 h1:+gYjHKf32LDeiEEFhQaotPbLuUXjY5ZqxKgXy7n59aw=
dep github.com/gofrs/uuid v4.2.0+incompatible h1:yyYWMnhkhrKwwr8gAOcOCYxOOscHgDS9yZgBrnJfGa0=
dep github.com/golang/groupcache v0.0.0-20210331224755-41bb18bfe9da h1:oI5xCqsCo564l8iNU+DwB5epxmsaqB+rhGL0m5jtYqE=
dep github.com/golang/protobuf v1.5.2 h1:ROPKBNFfQgOUMifHyP+KYbvpjbdoFNs+aK7DXlji0Tw=
dep github.com/jdxcode/netrc v0.0.0-20210204082910-926c7f70242a h1:d4+I1YEKVmWZrgkt6jpXBnLgV2ZjO0YxEtLDdfIZfH4=
dep github.com/jhump/protoreflect v1.11.1-0.20220213155251-0c2aedc66cf4 h1:E2CdxLXYSn6Zrj2+u8DWrwMJW3YZLSWtM/7kIL8OL18=
dep github.com/klauspost/compress v1.15.1 h1:y9FcTHGyrebwfP0ZZqFiaxTaiDnUrGkJkI+f583BL1A=
dep github.com/klauspost/pgzip v1.2.5 h1:qnWYvvKqedOF2ulHpMG72XQol4ILEJ8k2wwRl/Km8oE=
dep github.com/pkg/browser v0.0.0-20210911075715-681adbf594b8 h1:KoWmjvw+nsYOo29YJK9vDA65RGE3NrOnUtO7a+RF9HU=
dep github.com/pkg/profile v1.6.0 h1:hUDfIISABYI59DyeB3OTay/HxSRwTQ8rB/H83k6r5dM=
dep github.com/russross/blackfriday/v2 v2.1.0 h1:JIOH55/0cWyOuilr9/qlrm0BSXldqnqwMsf35Ld67mk=
dep github.com/spf13/cobra v1.4.0 h1:y+wJpx64xcgO1V+RcnwW0LEHxTKRi2ZDPSBjWnrg88Q=
dep github.com/spf13/pflag v1.0.5 h1:iy+VFUOCP1a+8yFto/drg2CJ5u0yRoB7fZw3DKv/JXA=
dep go.opencensus.io v0.23.0 h1:gqCw0LfLxScz8irSi8exQc7fyQ0fKQU/qnC/X8+V/1M=
dep go.uber.org/atomic v1.9.0 h1:ECmE8Bn/WFTYwEW/bpKD3M8VtR/zQVbavAoalC1PYyE=
dep go.uber.org/multierr v1.8.0 h1:dg6GjLku4EH+249NNmoIciG9N/jURbDG+pFlTkhzIC8=
dep go.uber.org/zap v1.21.0 h1:WefMeulhovoZ2sYXz7st6K0sLj7bBhpiFaud4r4zST8=
dep golang.org/x/net v0.0.0-20220225172249-27dd8689420f h1:oA4XRj0qtSt8Yo1Zms0CUlsT3KG69V2UGQWPBxujDmc=
dep golang.org/x/sys v0.0.0-20220310020820-b874c991c1a5 h1:y/woIyUBFbpQGKS0u1aHF/40WUDnek3fPOyD08H5Vng=
dep golang.org/x/term v0.0.0-20210927222741-03fcf44c2211 h1:JGgROgKl9N8DuW20oFS5gxc+lE67/N3FcwmBPMe7ArY=
dep golang.org/x/text v0.3.7 h1:olpwvP2KacW1ZWvsR7uQhoyTYvKAupfQrRGBFM352Gk=
dep google.golang.org/genproto v0.0.0-20220314164441-57ef72a4c106 h1:ErU+UA6wxadoU8nWrsy5MZUVBs75K17zUCsUCIfrXCE=
dep google.golang.org/grpc v1.46.0-dev.0.20220224182858-328efcc9276e h1:eE2IkvDP0l8VYpEWaRxn667VrEOoXwIIZwtjEV7uv0w=
dep google.golang.org/protobuf v1.27.1 h1:SnqbnDw1V7RiZcXPx5MEeqPv2s79L9i7BJUlG/+RurQ=
dep gopkg.in/yaml.v2 v2.4.0 h1:D8xgwECY7CYvx+Y2n4sBz93Jn9JRvxdiyyo8CTfuKaY=
dep gopkg.in/yaml.v3 v3.0.0-20210107192922-496545a6307b h1:h8qDotaEPuJATrMmW04NCwg7v22aHH28wwpauUhK9Oo=
build -compiler=gc
build -ldflags="-s -w"
build CGO_ENABLED=1
build CGO_CFLAGS=
build CGO_CPPFLAGS=
build CGO_CXXFLAGS=
build CGO_LDFLAGS=
build GOARCH=amd64
build GOOS=darwin
build GOAMD64=v1
Note that there is no buildInfo.Main
anymore it seems, which is a breaking change on Go's part (but we won't be able to do anything about it). We need to change this.
from homebrew-buf.
We've filed golang/go#51831 - we will figure out a workaround in the mean time.
from homebrew-buf.
I am using GO 1.18
from homebrew-buf.
This should be fixed now, let us know if there are any other issues.
from homebrew-buf.
Related Issues (10)
- `brew upgrade bufbuild/buf/buf` failing HOT 1
- Fail to install due to missing go.sum entry HOT 1
- missing dot in first path element HOT 1
- Formula depends on Go for building HOT 1
- Fail on brew install buf HOT 2
- brew install buf fail HOT 2
- Error: Your Xcode (12.0) is outdated. HOT 1
- Compilation failure on fresh Solus install HOT 3
- Use GoReleaser to publish homebrew HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from homebrew-buf.