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

Avoid indirect links for go modules #541

Closed
jdknives opened this issue Oct 9, 2020 · 1 comment
Closed

Avoid indirect links for go modules #541

jdknives opened this issue Oct 9, 2020 · 1 comment
Assignees

Comments

@jdknives
Copy link
Member

jdknives commented Oct 9, 2020

Currently go.mod lists a few dependencies such as

  • boltdb
  • nhooyr
  • wireguard

with indirect links that redirect to Github repositories of the dependency. (nhooyr.io/websocket redirects to https://github.com/nhooyr/websocket) If possible, we should use the direct links in the first place instead of the indirect links. @SkycoinSynth suspects that using indirect links increases the likelihood that things could break for Chinese users otherwise.

@nkryuchkov
Copy link
Contributor

GitHub repositories of the listed dependencies contain go.mods declaring no GitHub repository as module:

https://github.com/nhooyr/websocket/blob/master/go.mod#L1
https://github.com/etcd-io/bbolt/blob/master/go.mod#L1
https://github.com/WireGuard/wireguard-go/blob/master/go.mod#L1

Therefore, when using GitHub repositories as imports, go mod returns errors like this:

go: github.com/nhooyr/[email protected]: parsing go.mod:
        module declares its path as: nhooyr.io/websocket
                but was required as: github.com/nhooyr/websocket

@nkryuchkov nkryuchkov self-assigned this Oct 9, 2020
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