Skip to content

issue: gocql import results in discrepancy due to replace not cascading to users of magic  #128

@Lutherwaves

Description

@Lutherwaves

Check Existing Issues

  • I have searched the existing issues and discussions.

Expected Behavior

Expected behavior is for the correct upstream dependencies to automatically be pulled using go's built package manager.

Actual Behavior

Users of magic must explicitly set replace github.com/gocql/gocql => github.com/scylladb/gocql v1.17.0

Steps to Reproduce

  1. go get github.com/tink3rlabs/magic inside a service
  2. Make sure the service go.mod doesn't have the gocql replace directive
  3. go build will result in
# github.com/scylladb/gocqlx/v3
../../go/pkg/mod/github.com/scylladb/gocqlx/v3@v3.0.4/batchx.go:21:20: s.Session.Batch undefined (type *gocql.Session has no field or method Batch)
../../go/pkg/mod/github.com/scylladb/gocqlx/v3@v3.0.4/batchx.go:28:20: s.Session.Batch undefined (type *gocql.Session has no field or method Batch)
../../go/pkg/mod/github.com/scylladb/gocqlx/v3@v3.0.4/batchx.go:35:20: s.Session.Batch undefined (type *gocql.Session has no field or method Batch)
../../go/pkg/mod/github.com/scylladb/gocqlx/v3@v3.0.4/batchx.go:42:17: b.Batch.GetRequestTimeout undefined (type *gocql.Batch has no field or method GetRequestTimeout)
../../go/pkg/mod/github.com/scylladb/gocqlx/v3@v3.0.4/batchx.go:48:10: b.Batch.SetRequestTimeout undefined (type *gocql.Batch has no field or method SetRequestTimeout)
../../go/pkg/mod/github.com/scylladb/gocqlx/v3@v3.0.4/batchx.go:57:10: b.Batch.SetHostID undefined (type *gocql.Batch has no field or method SetHostID)
../../go/pkg/mod/github.com/scylladb/gocqlx/v3@v3.0.4/batchx.go:136:28: cannot use cons (variable of uint16 type gocql.Consistency) as gocql.SerialConsistency value in argument to b.Batch.SerialConsistency
../../go/pkg/mod/github.com/scylladb/gocqlx/v3@v3.0.4/queryx.go:154:17: q.Query.GetRequestTimeout undefined (type *gocql.Query has no field or method GetRequestTimeout)
../../go/pkg/mod/github.com/scylladb/gocqlx/v3@v3.0.4/queryx.go:160:10: q.Query.SetRequestTimeout undefined (type *gocql.Query has no field or method SetRequestTimeout)
../../go/pkg/mod/github.com/scylladb/gocqlx/v3@v3.0.4/queryx.go:169:10: q.Query.SetHostID undefined (type *gocql.Query has no field or method SetHostID)
../../go/pkg/mod/github.com/scylladb/gocqlx/v3@v3.0.4/queryx.go:169:10: too many errors

Logs & Screenshots

github.com/scylladb/gocqlx/v3

../../go/pkg/mod/github.com/scylladb/gocqlx/v3@v3.0.4/batchx.go:21:20: s.Session.Batch undefined (type *gocql.Session has no field or method Batch)
../../go/pkg/mod/github.com/scylladb/gocqlx/v3@v3.0.4/batchx.go:28:20: s.Session.Batch undefined (type *gocql.Session has no field or method Batch)
../../go/pkg/mod/github.com/scylladb/gocqlx/v3@v3.0.4/batchx.go:35:20: s.Session.Batch undefined (type *gocql.Session has no field or method Batch)
../../go/pkg/mod/github.com/scylladb/gocqlx/v3@v3.0.4/batchx.go:42:17: b.Batch.GetRequestTimeout undefined (type *gocql.Batch has no field or method GetRequestTimeout)
../../go/pkg/mod/github.com/scylladb/gocqlx/v3@v3.0.4/batchx.go:48:10: b.Batch.SetRequestTimeout undefined (type *gocql.Batch has no field or method SetRequestTimeout)
../../go/pkg/mod/github.com/scylladb/gocqlx/v3@v3.0.4/batchx.go:57:10: b.Batch.SetHostID undefined (type *gocql.Batch has no field or method SetHostID)
../../go/pkg/mod/github.com/scylladb/gocqlx/v3@v3.0.4/batchx.go:136:28: cannot use cons (variable of uint16 type gocql.Consistency) as gocql.SerialConsistency value in argument to b.Batch.SerialConsistency
../../go/pkg/mod/github.com/scylladb/gocqlx/v3@v3.0.4/queryx.go:154:17: q.Query.GetRequestTimeout undefined (type *gocql.Query has no field or method GetRequestTimeout)
../../go/pkg/mod/github.com/scylladb/gocqlx/v3@v3.0.4/queryx.go:160:10: q.Query.SetRequestTimeout undefined (type *gocql.Query has no field or method SetRequestTimeout)
../../go/pkg/mod/github.com/scylladb/gocqlx/v3@v3.0.4/queryx.go:169:10: q.Query.SetHostID undefined (type *gocql.Query has no field or method SetHostID)
../../go/pkg/mod/github.com/scylladb/gocqlx/v3@v3.0.4/queryx.go:169:10: too many errors

Additional Information

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions