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

Update go-cassandra-native-protocol dependency #116

Closed
StevenLacerda opened this issue Apr 26, 2023 · 4 comments · Fixed by #124
Closed

Update go-cassandra-native-protocol dependency #116

StevenLacerda opened this issue Apr 26, 2023 · 4 comments · Fixed by #124

Comments

@StevenLacerda
Copy link

IHAC that ran into an issue with what looks like a dependency issue in go-cassandra-native-protocol:

# github.com/datastax/cql-proxy/parser
/go/pkg/mod/github.com/datastax/[email protected]/parser/metadata.go:28:71: undefined: datatype.NewSetType
/go/pkg/mod/github.com/datastax/[email protected]/parser/metadata.go:46:71: undefined: datatype.NewSetType
/go/pkg/mod/github.com/datastax/[email protected]/parser/metadata.go:61:71: undefined: datatype.NewSetType
/go/pkg/mod/github.com/datastax/[email protected]/parser/metadata.go:73:71: undefined: datatype.NewSetType
/go/pkg/mod/github.com/datastax/[email protected]/parser/metadata.go:99:96: undefined: datatype.NewMapType
/go/pkg/mod/github.com/datastax/[email protected]/parser/metadata.go:130:87: undefined: datatype.NewListType
/go/pkg/mod/github.com/datastax/[email protected]/parser/metadata.go:131:87: undefined: datatype.NewListType

@absurdfarce FYI

@absurdfarce
Copy link
Collaborator

Re-posting comments from analysis of the above from elsewhere.

Looks like the problem here is that the dependency on go-cassandra-native-protocol is pretty old now. Specifically it's from before this commit which changes around a few function names.

If an application is using gocql-astra they'll bring in cql-proxy (for SCB handling) which in turn will bring in this older version of go-cassandra-native-protocol. If the application in question is already using a more recent version of go-cassandra-native-protocol from somewhere else you could quite possibly wind up with the build errors referenced above.

Safest bet is probably to update cql-proxy to use the latest go-cassandra-native-protocol.

Longer-term we can also look at decoupling cql-proxy from gocql-astra along the lines of what's discussed here.

@absurdfarce
Copy link
Collaborator

Note that there's a similar issue for astra-client-go. cql-proxy currently brings in 2.2.9 of this lib while most recent is 2.2.48.

@synedra
Copy link

synedra commented Jun 2, 2023

If one is in this predicament, how can they adjust the code to work correctly? I'm writing example code for the astra UI and I'm running into this. Can I just pull in a newer version of go-cassandra-latest-protocol? Should I back gocql-astra up to an earlier version? I'd like to get this solved today even if it's a hacky patchy answer.

Thanks

@absurdfarce
Copy link
Collaborator

@synedra For the case which brought on this ticket the solution was to remove the explicit dependency on go-cassandra-native-protocol and use the version that comes in via cql-proxy by way of gocql-astra. It's definitely both hacky and patchy but it should get you unstuck.

You'll likely have some code changes if you were using the most recent go-cassandra-native-protocol due to some changes to the API in versions between what cql-proxy brings along and whatever's on HEAD... but any such changes should be fairly minor.

cc @joao-r-reis

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

Successfully merging a pull request may close this issue.

3 participants