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

[V2]: List of changes #232

Open
dkropachev opened this issue Aug 8, 2024 · 0 comments
Open

[V2]: List of changes #232

dkropachev opened this issue Aug 8, 2024 · 0 comments
Assignees

Comments

@dkropachev
Copy link
Collaborator

Purpose

This issue is here to open discussion for what changes should get into v2

Changes (CONFIRMED)

  1. Change module name to github.com/scylladb/gocql

Changes (PROPESED)

  1. 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 #161 it is a breaking change.

What to do:

  1. Update module name in go.mod to github.com/scylladb/gocql
  2. Change all imports in all the files from github.com/gocql/gocql to github.com/scylladb/gocql
  3. 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/
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

No branches or pull requests

1 participant