A small tip about dependency "github.com/ccding/go-stun/stun" #434

Closed
opened 2025-12-29 01:29:09 +01:00 by adam · 1 comment
Owner

Originally created by @Rick-xuy on GitHub (Feb 19, 2023).

There is a require line in go.mod pointing to module github.com/ccding/go-stun/stun.

https://github.com/juanfont/headscale/blob/main/go.mod#L7

github.com/ccding/go-stun/stun v0.0.0-20200514191101-4dc67bcdb029

It is a submodule version introduced by mistake. Ccding/go-stun firstly created go.mod under directory stun and then the go.mod was moved to root directory. However, submodule github.com/ccding/go-stun/stun is therefore cached by GOPROXY.

Depending on this submodule will limit the update of package github.com/ccding/go-stun/stun. Downstream should depend on root module instead of submodule to import package github.com/ccding/go-stun/stun. To get rid of it, run go mod edit -droprequire github.com/ccding/go-stun/stun, go get github.com/ccding/go-stun@v0.1.4, go mod tidy should work.

Originally created by @Rick-xuy on GitHub (Feb 19, 2023). There is a require line in go.mod pointing to module `github.com/ccding/go-stun/stun`. <br> <https://github.com/juanfont/headscale/blob/main/go.mod#L7> ``` github.com/ccding/go-stun/stun v0.0.0-20200514191101-4dc67bcdb029 ``` It is a submodule version introduced by mistake. `Ccding/go-stun` firstly created `go.mod` under directory `stun` and then the `go.mod` was moved to root directory. However, submodule `github.com/ccding/go-stun/stun` is therefore cached by GOPROXY. <br> Depending on this submodule will limit the update of package `github.com/ccding/go-stun/stun`. Downstream should depend on root module instead of submodule to import package `github.com/ccding/go-stun/stun`. To get rid of it, run `go mod edit -droprequire github.com/ccding/go-stun/stun`, `go get github.com/ccding/go-stun@v0.1.4`, `go mod tidy` should work.
adam added the bug label 2025-12-29 01:29:09 +01:00
adam closed this issue 2025-12-29 01:29:09 +01:00
Author
Owner

@kradalby commented on GitHub (May 10, 2023):

We do not depend on this anymore, thanks for the notice.

@kradalby commented on GitHub (May 10, 2023): We do not depend on this anymore, thanks for the notice.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/headscale#434