shapeshifter-dispatcher icon indicating copy to clipboard operation
shapeshifter-dispatcher copied to clipboard

v3.0.1 is missing go.sum file

Open certaintls opened this issue 3 years ago • 3 comments

When you check out the latest stable (v3.0.1), and go install, you would get the error below

vscode ➜ /workspaces/shapeshifter-dispatcher (main ✗) $ go install
common/pt_extras/parsers.go:30:2: missing go.sum entry for module providing package github.com/OperatorFoundation/Optimizer-go/Optimizer/v3 (imported by github.com/OperatorFoundation/shapeshifter-dispatcher/common/pt_extras); to add:
        go get github.com/OperatorFoundation/shapeshifter-dispatcher/common/pt_extras
transports/transports.go:36:2: missing go.sum entry for module providing package github.com/OperatorFoundation/Replicant-go/Replicant/v3 (imported by github.com/OperatorFoundation/shapeshifter-dispatcher/transports); to add:
        go get github.com/OperatorFoundation/shapeshifter-dispatcher/transports
transports/transports.go:37:2: missing go.sum entry for module providing package github.com/OperatorFoundation/Shadow-go/shadow/v3 (imported by github.com/OperatorFoundation/shapeshifter-dispatcher/transports); to add:
        go get github.com/OperatorFoundation/shapeshifter-dispatcher/transports
transports/transports.go:38:2: missing go.sum entry for module providing package github.com/OperatorFoundation/Starbridge-go/Starbridge/v3 (imported by github.com/OperatorFoundation/shapeshifter-dispatcher/transports); to add:
        go get github.com/OperatorFoundation/shapeshifter-dispatcher/transports
common/pt_extras/pt_extras.go:37:2: missing go.sum entry for module providing package github.com/OperatorFoundation/shapeshifter-ipc/v3 (imported by github.com/OperatorFoundation/shapeshifter-dispatcher); to add:
        go get github.com/OperatorFoundation/shapeshifter-dispatcher
common/pt_extras/parsers.go:33:2: missing go.sum entry for module providing package github.com/kataras/golog (imported by github.com/OperatorFoundation/shapeshifter-dispatcher); to add:
        go get github.com/OperatorFoundation/shapeshifter-dispatcher
modes/stun_udp/stun_udp.go:41:2: missing go.sum entry for module providing package github.com/willscott/goturn (imported by github.com/OperatorFoundation/shapeshifter-dispatcher/modes/stun_udp); to add:
        go get github.com/OperatorFoundation/shapeshifter-dispatcher/modes/stun_udp
modes/stun_udp/stun_udp.go:35:2: missing go.sum entry for module providing package github.com/willscott/goturn/common (imported by github.com/OperatorFoundation/shapeshifter-dispatcher/modes/stun_udp); to add:
        go get github.com/OperatorFoundation/shapeshifter-dispatcher/modes/stun_udp
transports/transports.go:39:2: missing go.sum entry for module providing package golang.org/x/net/proxy (imported by github.com/OperatorFoundation/shapeshifter-dispatcher/common/pt_extras); to add:
        go get github.com/OperatorFoundation/shapeshifter-dispatcher/common/pt_extras

certaintls avatar Jul 25 '22 05:07 certaintls

I see go.mod and go.sum are in .gitingore . They should be committed. See https://stackoverflow.com/a/53852916/1966269

certaintls avatar Jul 25 '22 12:07 certaintls

Thank you for catching this. The .gitignore has been corrected and go.mod and go.sum are both present and accounted for. This will be included in the next release.

consuelita avatar Jul 28 '22 19:07 consuelita

While we are happy to make this change and add the go.sum back because you have requested us to do so, I wanted to comment that this was not a mistake, but rather a philosophical agreement on whether go.sum files should be committed. The origin of this "best practice" in Go is from the Golang FAQ, which references a single Tweet, "FAQ: Should I check go.sum into git? A: Generally yes. With it, anyone with your sources doesn't have to trust other GitHub repositories and custom import path owners. Something better is coming, but in the meantime it's the same model as hashes in lock files." (https://twitter.com/FiloSottile/status/1029404663358087173)

In our experience as a team, the particular way that go.sum files are implemented causes more problems than it adds in value. My recommendation is therefore to not add go.sum files to git unless you have a specific reason to do so. In this case, our reason to do so is that a user has requested that we provide go.sum files, which is a good enough reason for me.

blanu avatar Jul 28 '22 20:07 blanu