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

Canonical repo address is inconsistent with module path #3

Open
KateGo520 opened this issue Jul 30, 2020 · 4 comments
Open

Canonical repo address is inconsistent with module path #3

KateGo520 opened this issue Jul 30, 2020 · 4 comments

Comments

@KateGo520
Copy link

The github.com/KillingSpark/sparkzstd repo used the module, but the module path is set to github.com/killingspark/sparkzstd.
This means that the canonical github repo address now conflicts with canonical go import packages.

It is now very easy for downstream consumers (which used GOPATH mode) to accidentally add imports to upper-case "github.com/KillingSpark/sparkzstd/..." packages. This will create many pitfalls and break the module users. They may encounter errors:

go: downloading github.com/KillingSpark/sparkzstd v0.0.0-20190429053545-8961c737b70e
go: github.com/KillingSpark/sparkzstd upgrade => v0.0.0-20190429053545-8961c737b70e
go get: github.com/KillingSpark/sparkzstd@v0.0.0-20190429053545-8961c737b70e: parsing go.mod:
        module declares its path as: github.com/killingspark/sparkzstd
                but was required as: github.com/KillingSpark/sparkzstd 

Solution

  1. Fix the module path:
    Rename the module path to ”github.com/KillingSpark/sparkzstd”.
    https://github.com/KillingSpark/sparkzstd/blob/master/go.mod#L1
module github.com/KillingSpark/sparkzstd 
  1. Tell the user in the README document to use "github.com/killingspark/sparkzstd" as import path.
@KateGo520
Copy link
Author

@KillingSpark Could you help me review this issue? Thx :p

@KillingSpark
Copy link
Owner

I hate that capitalized letters in a github name cause this much trouble when using go, I had this issue a while ago with my own and others packages too.

I could fix this, but to be completely honest, I do not recommend to use this package but to use the one of klauspost here. It has better decompression performance and provides compression too.

@KateGo520
Copy link
Author

KateGo520 commented Aug 4, 2020

@KillingSpark Thank you for your reply! I'll take a look at the other package you recommended. : D

@KillingSpark
Copy link
Owner

I should propably update the Readme with that disclaimer tbh :D

I do not recommend to use this package but to use the one of klauspost here. It has better decompression performance and provides compression too.

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

2 participants