gocqlx: 3.0.2 introduces a breaking change

Hey, I’m getting errors after updating 3.0.1 -> 3.0.2

../../go/pkg/mod/github.com/scylladb/gocqlx/v3@v3.0.2/batchx.go:26:10: b.Batch.SetHostID undefined (type *gocql.Batch has no field or method SetHostID)
../../go/pkg/mod/github.com/scylladb/gocqlx/v3@v3.0.2/queryx.go:155:10: q.Query.SetHostID undefined (type *gocql.Query has no field or method SetHostID)

Should this tag be deleted and released as v4, as it has a breaking change?

About this issue

  • Original URL
  • State: closed
  • Created a year ago
  • Comments: 17

Most upvoted comments

How ?

  • github.com/gocql/gocql v1.7.0
  • github.com/scylladb/gocql v1.15.1

Don’t see how it breaks it, switching to scylladb/gocql was done here - #274

Again, code worked with 3.0.1, and it doesn’t work with 3.0.2. This is called a breaking change. And it doesn’t matter if it requires adding replace or add other changes to the code, it’s still a breaking change. From the go documentation:

The major version must be incremented and the minor and patch versions must be set to zero after a backwards incompatible change is made to the module’s public interface or documented functionality, for example, after a package is removed.

It worked just by the luck, it not supposed to be working, but since API was compatible it was working untll we have introduced and start using API that is not present in gocql/gocql. I am closing it, there is nothing to discuss. Documentation will be updated at https://github.com/scylladb/gocqlx/issues/332

Hi @max-melentyev , in 3.0.2 we bumped gocql version to 1.15.1 and it adds these new methods, are you sure you using the right gocql version?