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

Broken in 1.19 #1

Closed
shawnsmithdev opened this issue Sep 12, 2022 · 4 comments
Closed

Broken in 1.19 #1

shawnsmithdev opened this issue Sep 12, 2022 · 4 comments
Assignees
Labels
bug Something isn't working not my fault don't look at me (dependency, compiler, etc)

Comments

@shawnsmithdev
Copy link
Owner

This breaks in 1.19. It is a mystery.

sps@hikari:~/gosrc/wbtree$ git status
On branch main
Your branch is up to date with 'origin/main'.

nothing to commit, working tree clean
sps@hikari:~/gosrc/wbtree$ go version
go version go1.18.6 linux/amd64
sps@hikari:~/gosrc/wbtree$ go test -v
=== RUN   TestTreeGet
--- PASS: TestTreeGet (0.00s)
=== RUN   TestTreeReplace
--- PASS: TestTreeReplace (0.00s)
=== RUN   TestTreeInsert
--- PASS: TestTreeInsert (0.19s)
=== RUN   TestTree2Get
--- PASS: TestTree2Get (0.00s)
=== RUN   TestTree2Replace
--- PASS: TestTree2Replace (0.00s)
=== RUN   TestTree2Insert
--- PASS: TestTree2Insert (0.25s)
=== RUN   TestTree2Remove
--- PASS: TestTree2Remove (0.34s)
=== RUN   TestTree2ForEach
--- PASS: TestTree2ForEach (0.19s)
PASS
ok  	github.com/shawnsmithdev/wbtree	0.971s
sps@hikari:~/gosrc/wbtree$ rm ~/opt/go && ln -s ~/opt/go1.19 ~/opt/go
sps@hikari:~/gosrc/wbtree$ go version
go version go1.19 linux/amd64
sps@hikari:~/gosrc/wbtree$ go test -v
# github.com/shawnsmithdev/wbtree [github.com/shawnsmithdev/wbtree.test]
./tree.go:277:11: internal compiler error: method Cmp on *uint8 not found

Please file a bug report including a short program that triggers the error.
https://go.dev/issue/new
FAIL	github.com/shawnsmithdev/wbtree [build failed]
@shawnsmithdev
Copy link
Owner Author

I'm far from certain but I suspect this may be the cause...

golang/go#54243

and the incoming fix

golang/go@16c2b36

@shawnsmithdev shawnsmithdev self-assigned this Sep 12, 2022
@shawnsmithdev shawnsmithdev added bug Something isn't working pending Pending something external like a dependency bug fix labels Sep 12, 2022
@shawnsmithdev
Copy link
Owner Author

I failed to notice that there actually has been a 1.19.1 release. I should, you know, check if that fix is in.

@shawnsmithdev shawnsmithdev removed the pending Pending something external like a dependency bug fix label Sep 12, 2022
@shawnsmithdev
Copy link
Owner Author

That... doesn't seem to fix it? Hmm. Is it a different compiler bug, of which there seem to have been several in go1.19? The fact remains that in go1.18 this code compiles and tests fine, so either it is a compiler bug, or there is some code that is invalid in some way that 1.18 improperly allowed, but it literally says "internal" compiler error, so I suspect its the former.

sps@hikari:~/gosrc/wbtree$ go test -v
# github.com/shawnsmithdev/wbtree [github.com/shawnsmithdev/wbtree.test]
./tree.go:277:11: internal compiler error: method Cmp on *uint8 not found

Please file a bug report including a short program that triggers the error.
https://go.dev/issue/new
FAIL	github.com/shawnsmithdev/wbtree [build failed]
sps@hikari:~/gosrc/wbtree$ go version
go version go1.19.1 linux/amd64

@shawnsmithdev shawnsmithdev pinned this issue Sep 12, 2022
@shawnsmithdev
Copy link
Owner Author

shawnsmithdev commented Nov 22, 2022

Well something happened between then and now, as of go1.19.3 this works again, closing this issue.

sps@hikari:~/gosrc/wbtree$ git pull
Already up to date.
sps@hikari:~/gosrc/wbtree$ git status
On branch main
Your branch is up to date with 'origin/main'.

nothing to commit, working tree clean
sps@hikari:~/gosrc/wbtree$ go version
go version go1.19.3 linux/amd64
sps@hikari:~/gosrc/wbtree$ go test -v
=== RUN   TestTreeGet
--- PASS: TestTreeGet (0.00s)
=== RUN   TestTreeReplace
--- PASS: TestTreeReplace (0.00s)
=== RUN   TestTreeInsert
--- PASS: TestTreeInsert (0.18s)
=== RUN   TestTree2Get
--- PASS: TestTree2Get (0.00s)
=== RUN   TestTree2Replace
--- PASS: TestTree2Replace (0.00s)
=== RUN   TestTree2Insert
--- PASS: TestTree2Insert (0.23s)
=== RUN   TestTree2Remove
--- PASS: TestTree2Remove (0.34s)
=== RUN   TestTree2ForEach
--- PASS: TestTree2ForEach (0.17s)
PASS
ok  	github.com/shawnsmithdev/wbtree	0.923s

@shawnsmithdev shawnsmithdev added the not my fault don't look at me (dependency, compiler, etc) label Nov 22, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working not my fault don't look at me (dependency, compiler, etc)
Projects
None yet
Development

No branches or pull requests

1 participant