Skip to content
This repository has been archived by the owner on Feb 15, 2023. It is now read-only.

Error on livesql binlog.go #364

Open
soniyj opened this issue Apr 29, 2020 · 5 comments
Open

Error on livesql binlog.go #364

soniyj opened this issue Apr 29, 2020 · 5 comments

Comments

@soniyj
Copy link

soniyj commented Apr 29, 2020

Hello tried to follow the steps in your example at

https://github.com/samsarahq/thunder/tree/master/example

But got an error while getting the module

thunder@v0.5.0/livesql/binlog.go:108:3: cannot use &replication.BinlogSyncerConfig literal (type *replication.BinlogSyncerConfig) as type replication.BinlogSyncerConfig in argument to replication.NewBinlogSyncer

I would like to use your framework in one of our projects, would you mind to have a look?

Thanks.

@jrcichra
Copy link

jrcichra commented Oct 7, 2020

Just hit the same issue. go.mod:

module github.com/jrcichra/loxodonta/server

go 1.15

require (
	github.com/go-sql-driver/mysql v1.5.0 // indirect
	github.com/gogo/protobuf v1.3.1 // indirect
	github.com/gorilla/websocket v1.4.2 // indirect
	github.com/graphql-go/graphql v0.7.9 // indirect
	github.com/rakyll/statik v0.1.7 // indirect
	github.com/samsarahq/go v0.0.0-20191220233105-8077c9fbaed5 // indirect
	github.com/samsarahq/thunder v0.5.0
	github.com/siddontang/go-mysql v1.1.0 // indirect
	golang.org/x/sync v0.0.0-20200930132711-30421366ff76 // indirect
)

@jrcichra
Copy link

jrcichra commented Oct 7, 2020

Looks like this project runs CI against Go 1.10.

I tried porting it to Go modules / Go 1.15 but ran into several issues once I got it moved / deleted vendor.

justin@justin-3900x:~/git/loxodonta/server$ go build
package github.com/jrcichra/loxodonta/server
	imports github.com/jrcichra/thunder/graphql/schemabuilder
	../../../go/pkg/mod/github.com/jrcichra/thunder@v0.5.1-0.20201007035304-f56fb1d2f331/graphql/schemabuilder/input.go:12:2: use of internal package github.com/samsarahq/thunder/internal not allowed
package github.com/jrcichra/loxodonta/server
	imports github.com/jrcichra/thunder/livesql
	../../../go/pkg/mod/github.com/jrcichra/thunder@v0.5.1-0.20201007035304-f56fb1d2f331/livesql/marshal.go:10:2: use of internal package github.com/samsarahq/thunder/internal/fields not allowed

@jrcichra
Copy link

jrcichra commented Oct 7, 2020

@soniyj If this is still relevant to you, go ahead and try my fork:

go get github.com/jrcichra/thunder@c82d2fa57e8a14f2e6d7ff76b4ad583d5058134d

I changed around the syntax in the problem area until I could get it to compile in my Go 1.15 project which uses this lib.

And change the username to mine: jrcichra. I made a PR to hopefully to help understand why this is an issue. The code Go is complaining about looks correct to me; although I'm not very experienced with Go pre-modules.

@soniyj
Copy link
Author

soniyj commented Oct 7, 2020

hello @jrcichra thanks for the answer after such a long time.

Yes it is as soon as I have time I will check it.

Thanks

@amonks
Copy link
Contributor

amonks commented Feb 16, 2021

I don't know about this bug in particular, but for what it's worth, we are using 4e12de3 successfully with go 1.15, but we vendor all our go modules, so your mileage may vary:

go 1.15

replace github.com/samsarahq/thunder => ./vendor/github.com/samsarahq/thunder

We should definitely update the CI target. I'll see if I can get that done.


EDIT: updating CI target to 1.15 in #450.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants