Skip to content
This repository was archived by the owner on Jan 5, 2023. It is now read-only.

Bump to latest version of golang.org/x/tools#314

Merged
max-schaefer merged 4 commits intogithub:mainfrom
smowton:smowton/admin/bump-golang-tools
Sep 7, 2020
Merged

Bump to latest version of golang.org/x/tools#314
max-schaefer merged 4 commits intogithub:mainfrom
smowton:smowton/admin/bump-golang-tools

Conversation

@smowton
Copy link
Contributor

@smowton smowton commented Aug 27, 2020

This fixes 23 projects that currently fail to build with go-1.15, but introduces a new segfault with 23 other projects:

Akagi201/cryptotrader
BurntSushi/xgb
U-Network/UNetwork
antonvw/wex
ardanlabs/gotraining
azer/boxcars-archived
bazelbuild/rules_go
csunny/argo
fguisso/lnstore
g-airport/tech-stack
google/google-ctf
gophercon/2017-talks
heedy/heedy
jamesjarvis/code-practise
jenkins-zh/wechat-backend
kisom/gocrypto
kubernetes-sigs/apiserver-network-proxy
mengzhuo/intrinsic
nikitavoloboev/small-workflows
parkr/dotfiles
raydac/mvn-golang
sevki/q9p
visualfc/liteide

Will investigate the cause of the segfault -- golang.org/x/tools is released very frequently, so this may just be a question of finding a particular build that exhibits neither problem.

require (
golang.org/x/mod v0.2.0
golang.org/x/tools v0.0.0-20200302225559-9b52d559c609
github.com/ChrisTrenkamp/goxpath v0.0.0-20190607011252-c5096ec8773d
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This seems strange to me.
Why is goxpath included here?
In my XPath PR I included tests for many different libraries, so there should probably either be more XPath libraries or none, I guess?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Appears to be an indirect dependency of golang.org/x/tools, not something I directly introduced

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ok, I was worried I messed something up in my PR^^

In earlier versions of golang/x/tools these would be omitted entirely; now they can result in ast.File structures whose ast.Package field is zero (NoPos), and in my experience these contain no information in their other fields either.
@smowton
Copy link
Contributor Author

smowton commented Sep 3, 2020

Found the cause of the new segfaults -- the way files without a package declaration are represented has changed. This indicates a fragment of Go and is unlikely to be interesting for our analyses (and is evidently rare), so I've added a commit ignoring such files. I'll now test this on lgtm.com again.

These weren't previously reported as part of the comment text, but are as of the latest version of golang.org/x/tools
@smowton
Copy link
Contributor Author

smowton commented Sep 3, 2020

@github/codeql-go LGTM eval shows this fixes 27 projects with go-1.15. After this there are 11 post-go-1.13 regressions left, with no common cause except 5 projects complaining about a malformed go.mod containing a line like go 1.13.5. Therefore I think this should be good to merge if we're happy with the workarounds in the latter two commits.

@smowton smowton requested a review from a team September 4, 2020 12:46
Copy link
Contributor

@max-schaefer max-schaefer left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, thanks!

@max-schaefer max-schaefer merged commit 52a6591 into github:main Sep 7, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants