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

Update following go modules to their newest proper version #91

Merged
merged 1 commit into from
Feb 27, 2023

Conversation

cjeker
Copy link
Contributor

@cjeker cjeker commented Feb 24, 2023

   golang.org/x/crypto v0.6.0
    golang.org/x/sys v0.5.0

Especially golang.org/x/sys needs to be kept up to date since systems do change over time.
On OpenBSD anything using older golang.org/x/sys will soon have major issues because of syscall limitations.

    golang.org/x/crypto v0.6.0
    golang.org/x/sys v0.5.0
@benjojo benjojo merged commit cc9cdbf into bgp:master Feb 27, 2023
@0x4A6F
Copy link

0x4A6F commented Mar 2, 2023

I'm getting following error trying to build 0.5.1 with go1.16 (as referenced in go.mod):

Building subPackage ./cmd/rtrdump
# golang.org/x/sys/unix
vendor/golang.org/x/sys/unix/syscall.go:83:16: unsafe.Slice requires go1.17 or later (-lang was set to go1.16; check go.mod)
vendor/golang.org/x/sys/unix/syscall_linux.go:2271:9: unsafe.Slice requires go1.17 or later (-lang was set to go1.16; check go.mod)
vendor/golang.org/x/sys/unix/syscall_unix.go:118:7: unsafe.Slice requires go1.17 or later (-lang was set to go1.16; check go.mod)
vendor/golang.org/x/sys/unix/sysvshm_unix.go:33:7: unsafe.Slice requires go1.17 or later (-lang was set to go1.16; check go.mod)

Setting go.mod to go1.17 and running go mod tidy fixes this for me.

@qbit
Copy link

qbit commented Mar 2, 2023

This seems to be related to different build modes:

qbit@europa[0]:~/src/stayrtr(tags/v0.5.1)% go build --mod=readonly ./...
qbit@europa[0]:~/src/stayrtr(tags/v0.5.1)% go build --mod=vendor ./...  
go: inconsistent vendoring in /home/qbit/src/stayrtr:
        github.com/google/[email protected]: is explicitly required in go.mod, but not marked as explicit in vendor/modules.txt
        github.com/prometheus/[email protected]: is explicitly required in go.mod, but not marked as explicit in vendor/modules.txt
        github.com/sirupsen/[email protected]: is explicitly required in go.mod, but not marked as explicit in vendor/modules.txt
        github.com/stretchr/[email protected]: is explicitly required in go.mod, but not marked as explicit in vendor/modules.txt
        golang.org/x/[email protected]: is explicitly required in go.mod, but not marked as explicit in vendor/modules.txt
        golang.org/x/[email protected]: is explicitly required in go.mod, but not marked as explicit in vendor/modules.txt

        To ignore the vendor directory, use -mod=readonly or -mod=mod.
        To sync the vendor directory, run:
                go mod vendor
qbit@europa[1]:~/src/stayrtr(tags/v0.5.1)% 

readonly works as expected.

@qbit
Copy link

qbit commented Mar 2, 2023

Hm, I see now that my error is different.

@qbit
Copy link

qbit commented Mar 2, 2023

OK, to reproduce one can do:

git checkout v0.5.1
go mod vendor
go build -mod=vendor ./...

@qbit
Copy link

qbit commented Mar 2, 2023

It seems the newer sys package requires a bump to be > go1.16.

@benjojo
Copy link
Collaborator

benjojo commented Mar 2, 2023

Weird, since the CI builds using 1.16

@benjojo
Copy link
Collaborator

benjojo commented Mar 2, 2023

image

Nevermind, clearly whatever is limiting the version in CI doesnt work

benjojo added a commit that referenced this pull request Mar 2, 2023
@cjeker cjeker deleted the update_go_mod branch December 19, 2023 16:23
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

Successfully merging this pull request may close these issues.

4 participants