Skip to content
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

x/xerrors: fails to compile on tip #32246

Closed
artyom opened this issue May 25, 2019 · 12 comments
Closed

x/xerrors: fails to compile on tip #32246

artyom opened this issue May 25, 2019 · 12 comments

Comments

@artyom
Copy link
Member

@artyom artyom commented May 25, 2019

What version of Go are you using (go version)?

$ go version
go version devel +385b2e0cac Fri May 24 21:34:53 2019 +0000 darwin/amd64

Does this issue reproduce with the latest release?

Yes

What operating system and processor architecture are you using (go env)?

go env Output
$ go env
GO111MODULE=""
GOARCH="amd64"
GOBIN=""
GOCACHE="/Users/artyom/Library/Caches/go-build"
GOENV="/Users/artyom/Library/Preferences/go/env"
GOEXE=""
GOFLAGS="-ldflags=-w"
GOHOSTARCH="amd64"
GOHOSTOS="darwin"
GONOPROXY=""
GONOSUMDB=""
GOOS="darwin"
GOPATH="/Users/artyom/go"
GOPROXY="https://proxy.golang.org"
GOROOT="/Users/artyom/Repositories/go"
GOSUMDB="sum.golang.org"
GOTMPDIR=""
GOTOOLDIR="/Users/artyom/Repositories/go/pkg/tool/darwin_amd64"
GCCGO="gccgo"
AR="ar"
CC="clang"
CXX="clang++"
CGO_ENABLED="1"
GOMOD="/tmp/foo/go.mod"
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/lb/3rk8rqs53czgb4v35w_342xc0000gn/T/go-build219175411=/tmp/go-build -gno-record-gcc-switches -fno-common"

What did you do?

https://play.golang.org/p/CqTSV8-Wcg0

What did you expect to see?

Program compiles.

What did you see instead?

foo ¶ go build
# golang.org/x/xerrors
/Users/artyom/go/pkg/mod/golang.org/x/xerrors@v0.0.0-20190513163551-3ee3066db522/adaptor_go1_13.go:16:14: undefined: errors.Frame
/Users/artyom/go/pkg/mod/golang.org/x/xerrors@v0.0.0-20190513163551-3ee3066db522/format_go1_13.go:12:18: undefined: errors.Formatter
@cuonglm
Copy link
Contributor

@cuonglm cuonglm commented May 25, 2019

Changes in master was reverted in 3e2c522#diff-c93f2f0db26f58ae432e8d8f1dc9bd73

@agnivade
Copy link
Contributor

@agnivade agnivade commented May 27, 2019

@neild @mpvl - Shouldn't the changes in xerrors be also reverted ?

@agnivade agnivade changed the title xerrors: fails to compile on tip x/xerrors: fails to compile on tip May 27, 2019
@gopherbot gopherbot added this to the Unreleased milestone May 27, 2019
@agnivade agnivade added the NeedsFix label May 27, 2019
@zchee
Copy link
Contributor

@zchee zchee commented May 28, 2019

@agnivade
I was send CL but still review status(actually no reply...)
https://go-review.googlesource.com/c/xerrors/+/177379

@agnivade
Copy link
Contributor

@agnivade agnivade commented May 28, 2019

Thanks. Replied.

@zchee
Copy link
Contributor

@zchee zchee commented May 28, 2019

@agnivade
Thanks reply, will fix

@gopherbot
Copy link

@gopherbot gopherbot commented May 28, 2019

Change https://golang.org/cl/177379 mentions this issue: xerrors: Revert "xerrors: redirect to go1.13 primitives for 1.13"

@mpx
Copy link
Contributor

@mpx mpx commented Jun 27, 2019

ping/fyi @neild @jba

xerrors can't be built on the recently released go1.13beta1 (and tip) since errors.{Frame,Formatter} were reverted in 3e2c522.

@zchee
Copy link
Contributor

@zchee zchee commented Jun 27, 2019

@mpx Thanks comment.

And yes, has been released go1.13beta1 but this version can't compiling xerrors package.
It might be many Gophers will confused, and will post meaningless issues to Go mainline repository.

I know that the discussion of the next error package implementation proposal takes a long time. also I know still discussing.
However, If reason of my CLs is still not merged because of that discuss, I think we should first to make the master branch compilable. After that, should be some proposal reimplemented to xerrors or implements to the Go core.

also ping @rsc, @ianlancetaylor @bradfitz

@xaionaro
Copy link

@xaionaro xaionaro commented Jul 1, 2019

Is there any (hacky) workaround for now?

Update: looks like this helped:

~/go/src/golang.org/x/xerrors$ git revert d61658bd2e18010be0e21349cc92b1b706e35146
@zchee
Copy link
Contributor

@zchee zchee commented Jul 2, 2019

@xaionaro

Just go get -u -m(if you use devel, -d) -v golang.org/x/xerrors@0421b64034aa326c388bbb256730b518991d36ae which my CL hash.

@gopherbot
Copy link

@gopherbot gopherbot commented Jul 3, 2019

Change https://golang.org/cl/184937 mentions this issue: xerrors: update to current 1.13

@xaionaro
Copy link

@xaionaro xaionaro commented Jul 7, 2019

@zchee: thank you. Added:

golang.org/x/xerrors v0.0.0-20190528162220-0421b64034aa

to my go.mod and it helped.

@ilpianista ilpianista mentioned this issue Oct 16, 2019
1 of 2 tasks complete
mratsim added a commit to status-im/nim-libp2p that referenced this issue Feb 6, 2020
mratsim added a commit to status-im/nim-libp2p that referenced this issue Feb 6, 2020
* Set up CI with Azure Pipelines

[skip ci]

* Fix %PLATFORM%

* Add Azure badge

* Try to make nimble happy with windows PATH

* rename steps [skip ci]

* Mixed up posix/windows in pipeline

* add missing ARCH: x86 to Linux32

* Linux "32bit" CI was actually 64-bit, remove it from now

* Try to workaround path issues in windows

* More crazy path workarounds + display gcc version (debug win 32-bit)

* keep the bash workaround in

* mingw path as separate task

* Let's start a fresh day bout against Azure

* fix powershell variable interpolation

* make all scripts verbose to debug MacOS Go libp2p daemon script

* Don't test on Azure macOS, xerrors issue due to Go version:
- libp2p/go-libp2p-daemon#139
- status-im/nimbus-eth2#397
- golang/go#32246

* polish + reduce verbosity [skip ci]
@golang golang locked and limited conversation to collaborators Jul 16, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
7 participants
You can’t perform that action at this time.