-
Notifications
You must be signed in to change notification settings - Fork 60
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
Module keeps the name github.com/gocql/gocql #161
Comments
@avelanarius do you know what was the original reason for this desicion? |
I don't know whether that was the reason as I didn't make the decision, but if I had to guess it would be because of the ability to affect third-party modules. If you use the Being able to |
@karol-kokoszka is @piodul reasoning enough for your or the module name is still something we should consider changing in your opinion? |
This is true. However, it is still possible if the ScyllaDB fork of gocql changes the name of the module to, for example:
The replace directive would then be:
This approach would have been preferable from the beginning. A different module name does not prevent the use of the replace directive. By changing the module name, we confirm that our gocql driver is not just a temporary repository with the intention to merge everything upstream and close the fork. Based on the comparison (apache/cassandra-gocql-driver@master...scylladb:gocql:master), the fork is 189 commits ahead of the master. It doesn't seem likely that these changes will be merged upstream. With the current approach of keeping the original module name, if a project (let's call it Project A) depends on github.com/scylladb/gocql via the replace directive, and another project (Project B) wants to use Project A as a dependency, Project B might also need to include the replace directive. This can lead to confusion and complexity, especially as the dependency tree grows. Using a separate module name would make documentation easier to navigate and discover via tools like pkg.go.dev. |
If we would have the module name This change is rather no invasive. End user can keep the replace directive even if the module name is changed. |
makes sense, @roydahan FYI |
BTW, what version does it advertise then? For example, is it now 1.14.1 in the STARTUP message? This is critical. |
Thx. One thing to consider is versioning and the upcoming change to v3, we can possibly connect all these together just for the ease of differentiation for users. |
@roydahan , to make it clear, did we decide to change it to |
I think it's the ideal option and name, but depends on your findings of what's needed to be done. |
Changing module name is a breaking change, users will have to remove "replace" directive from
@karol-kokoszka , @sylwiaszunejko , @roydahan , @Lorak-mmk are you guys ok with that |
I'm not very familiar with go and gocql - I don't know what stability guarantees gocql has, I don't know if semver should be used here properly as it is in Rust (because if it is, we can make a breaking change, but we need to increase major version number), and I don't know what are the typical expectations of a Go library in this regard. |
@dkropachev What you say differs a lot from the conclusion that @karol-kokoszka had before |
I took gocqlx and changed it to use gocql with changed module name, and end up wtih following error:
If I remove |
The problem here is that the go mod is looking for old version of scylladb/gocql which is tagged with 1.14.2. This version still keeps the old module name.
Out of curiousity I've made another test where I forked the github.com/scylladb/gocql repo to https://github.com/karol-kokoszka/gocql , changed the module name and created explicit tag Having that imported to go.mod of gocqlx in replace directive works fine
and the
The repo keeps the new module name: |
@karol-kokoszka , looks like there is some issue in module proxy server. I have started a new repo, making sure it does have exactly same tags as
Then I have pushed commit to
Then I went to gocqlx and updated it to use
And run
As you can see it ended up in failure and
|
We checked the issue again with @dkropachev . After applying this change, I end up with the same error.
It appears that changing the module name may be the breaking change here indeed. |
To sum up. replace directive is not the alternative to import with the new module name. |
Great, now we established that it is a breaking change, only proper way to release it is to make it part of major change. |
ScyllaDB fork of gocql driver, keeps the module name of the origin.
See
gocql/go.mod
Line 1 in 3c32c6c
It leads to the situation, where whenever someone wants to add the dependency, cannot simply
go get github.com/scylladb/gocql
, but must use replace directive as described herehttps://github.com/scylladb/gocql/blob/master/README.md#installation
Why is that ?
Is the intention to keep this module temporary and to merge everything to the upstream ?
Otherwise, why we cannot have the separate name of the module ?
I.e. it would allow to read the documentation via https://pkg.go.dev/search?q=gocql&m=package
User may face problems having the module A that is dependent to github.com/scylladb/gocql and trying to make the dependency to A from another project.
The text was updated successfully, but these errors were encountered: