-
Notifications
You must be signed in to change notification settings - Fork 127
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
goalng 1.21.0 have error not supper #90
Comments
I'm seeing this as well:
|
Same here :( |
@lukeroth Any recommendations about what I might be doing incorrectly? (P.S. great project!) |
To add a bit more - this started happening after upgrading from Go 1.20 to 1.21. I will also note that this is on macOS (I'm on macOS 13.5), and I'm not sure if other OS's are affected the same way. So, it appears it's something related to use with Go 1.21. I've used this project (agree, great!) for several years now, and with several Go versions, first time I've seen a breakage that I can remember. Going back to Go 1.20.7 alleviated the problem for me. |
@chris Timely update and advice! Thanks so much. Can confirm, 1.20 works! |
In the most recent release notes, https://tip.golang.org/doc/go1.21, it says:
It looks like 1.21 is reporting an error for something that was already incorrect but wasn't caught until now; we will need to wrap the C error types in Go error types here to declare this method. |
OK, I've wrapped the CPLErr / OGRErr in a Go type to prevent these errors. Builds and passes tests on Go 1.21, GDAL 3.6.4. |
@lukeroth thanks for the quick fix - verified it resolves the compile errors for me. |
../../../go/pkg/mod/github.com/lukeroth/gdal@v0.0.0-20230422025444-05e99f726ff9/gdal.go:44:11: cannot define new methods on non-local type C.CPLErr
The text was updated successfully, but these errors were encountered: