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/tools/go/packages: TestJSON fails on Go 1.10 #28609

Closed
bradfitz opened this issue Nov 6, 2018 · 5 comments
Closed

x/tools/go/packages: TestJSON fails on Go 1.10 #28609

bradfitz opened this issue Nov 6, 2018 · 5 comments
Labels
FrozenDueToAge help wanted NeedsFix The path to resolution is known, but the work has not been done. Soon This needs to be done soon. (regressions, serious bugs, outages) Testing An issue that has been verified to require only test changes, not just a test failure.
Milestone

Comments

@bradfitz
Copy link
Contributor

bradfitz commented Nov 6, 2018

The x/tools tests are broken for Go 1.10.

Please fix or t.Skip if they're not relevant:

https://storage.googleapis.com/go-build-log/1ae73979/linux-amd64_de64fb44.log

--- FAIL: TestJSON (0.17s)
    --- FAIL: TestJSON/GOPATH (0.17s)
    	packages_test.go:1312: wrong JSON: got <<{
    			"ID": "golang.org/fake/a",
    			"Name": "a",
    			"PkgPath": "golang.org/fake/a",
    			"GoFiles": [
    				"a.go"
    			],
    			"CompiledGoFiles": [
    				"a.go"
    			]
    		}
    		{
    			"ID": "golang.org/fake/b",
    			"Name": "b",
    			"PkgPath": "golang.org/fake/b",
    			"GoFiles": [
    				"b.go"
    			],
    			"CompiledGoFiles": [
    				"b.go"
    			],
    			"Imports": {
    				"golang.org/fake/a": "golang.org/fake/a"
    			}
    		}
    		{
    			"ID": "golang.org/fake/d",
    			"Name": "d",
    			"PkgPath": "golang.org/fake/d",
    			"GoFiles": [
    				"d.go"
    			],
    			"CompiledGoFiles": [
    				"d.go"
    			],
    			"Imports": {
    				"golang.org/fake/b": "golang.org/fake/b"
    			}
    		}
    		{
    			"ID": "golang.org/fake/c",
    			"Name": "c",
    			"PkgPath": "golang.org/fake/c",
    			"GoFiles": [
    				"c.go"
    			],
    			"CompiledGoFiles": [
    				"c.go"
    			],
    			"Imports": {
    				"golang.org/fake/b": "golang.org/fake/b"
    			}
    		}
    		>>, want <<{
    			"ID": "golang.org/fake/a",
    			"Name": "a",
    			"PkgPath": "golang.org/fake/a",
    			"GoFiles": [
    				"a.go"
    			],
    			"CompiledGoFiles": [
    				"a.go"
    			]
    		}
    		{
    			"ID": "golang.org/fake/b",
    			"Name": "b",
    			"PkgPath": "golang.org/fake/b",
    			"GoFiles": [
    				"b.go"
    			],
    			"CompiledGoFiles": [
    				"b.go"
    			],
    			"Imports": {
    				"golang.org/fake/a": "golang.org/fake/a"
    			}
    		}
    		{
    			"ID": "golang.org/fake/c",
    			"Name": "c",
    			"PkgPath": "golang.org/fake/c",
    			"GoFiles": [
    				"c.go"
    			],
    			"CompiledGoFiles": [
    				"c.go"
    			],
    			"Imports": {
    				"golang.org/fake/b": "golang.org/fake/b"
    			}
    		}
    		{
    			"ID": "golang.org/fake/d",
    			"Name": "d",
    			"PkgPath": "golang.org/fake/d",
    			"GoFiles": [
    				"d.go"
    			],
    			"CompiledGoFiles": [
    				"d.go"
    			],
    			"Imports": {
    				"golang.org/fake/b": "golang.org/fake/b"
    			}
    		}
    		>>
    	packages_test.go:1351: Package 2 has ID "golang.org/fake/d" want "golang.org/fake/c"
    	packages_test.go:1354: Package "golang.org/fake/d" has Name "d" want "c"
    	packages_test.go:1351: Package 3 has ID "golang.org/fake/c" want "golang.org/fake/d"
    	packages_test.go:1354: Package "golang.org/fake/c" has Name "c" want "d"
FAIL
FAIL	golang.org/x/tools/go/packages	22.059s
@bradfitz bradfitz added Testing An issue that has been verified to require only test changes, not just a test failure. help wanted NeedsFix The path to resolution is known, but the work has not been done. Soon This needs to be done soon. (regressions, serious bugs, outages) labels Nov 6, 2018
@gopherbot gopherbot added this to the Unreleased milestone Nov 6, 2018
@bradfitz bradfitz modified the milestones: Unreleased, Go1.12 Nov 6, 2018
@vikramcse
Copy link

@bradfitz I would like to work on this issue

@bradfitz
Copy link
Contributor Author

bradfitz commented Nov 6, 2018

@vikramcse, you don't need to ask permission. Just send a fix if you have a fix.

@bradfitz
Copy link
Contributor Author

bradfitz commented Nov 7, 2018

This passes sometimes and fails other times.

Best way to reproduce:

$ GOROOT=$HOME/go1.10 go test -short -v -run=JSON -count=20

Probably some map enumeration order thing?

@gopherbot
Copy link

Change https://golang.org/cl/148637 mentions this issue: go/packages: skip TestJSON before Go 1.11

gopherbot pushed a commit to golang/tools that referenced this issue Nov 8, 2018
Updates golang/go#28609
Updates golang/go#28676

Change-Id: Id0fbc6cb0ce14aed9b20afcd0488708df33d5a62
Reviewed-on: https://go-review.googlesource.com/c/148637
Run-TryBot: Brad Fitzpatrick <bradfitz@golang.org>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
@gopherbot
Copy link

Change https://golang.org/cl/148880 mentions this issue: go/packages: fix flaky TestJSON and reenable it on Go 1.10

@golang golang locked and limited conversation to collaborators Nov 12, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
FrozenDueToAge help wanted NeedsFix The path to resolution is known, but the work has not been done. Soon This needs to be done soon. (regressions, serious bugs, outages) Testing An issue that has been verified to require only test changes, not just a test failure.
Projects
None yet
Development

No branches or pull requests

4 participants