[V2]: List of changes
Purpose
This issue is here to open discussion for what changes should get into v2
Changes (CONFIRMED)
- Change module name to
github.com/scylladb/gocql
Changes (PROPESED)
- Change package layout
Changes description
Change module name
Change the following in go.mod:
module github.com/gocql/gocql
To
module github.com/scylladb/gocql
As it is established in https://github.com/scylladb/gocql/issues/161 it is a breaking change.
What to do:
- Update module name in
go.modtogithub.com/scylladb/gocql - Change all imports in all the files from
github.com/gocql/gocqltogithub.com/scylladb/gocql - Update examples
Change package layout
Current mostly flat structure creates a problem of dependancy cycles because data structures and interfaces are defined in the same module with code.
As result in the gocql module you can't use a code from the other module that returns or consumes types defined in gocql.
Example:
Say I want to move common_test.go to a testutils package to make test methods public to make it possible to reuse them from different packages.
If I do that testutils is going to contain gocql definitions, and therefore can't be used by gocql due to the dependancy cycle.
To solve it we need to evacuate type definitions that have no significant logic (Cluster. Session and Query are definitely do not go anywhere) on them to a separate package, overall package structure can look like this:
types/
testutils/
compression/lz4/
compression/snappy/
scyllacloud/
policies/
internal/