Skip to content
This repository has been archived by the owner on Jul 11, 2023. It is now read-only.

modules in vendor/ diverge from requirements #197

Open
orangecms opened this issue May 24, 2021 · 4 comments
Open

modules in vendor/ diverge from requirements #197

orangecms opened this issue May 24, 2021 · 4 comments
Labels
bug Something isn't working

Comments

@orangecms
Copy link
Member

orangecms commented May 24, 2021

I tried to build webboot with Go 1.16 and ran into some issues.

First I just did the same as before: cd cmds/webboot/; go build .
That errored, it would require a Go module.

Then I converted webboot to a Go module - go mod init gave the go.{mod,sum} files as expected.
However, go mod vendor yields:

go: finding module for package github.com/u-root/NiChrome/pkg/wpa/passphrase
go: finding module for package github.com/gizak/termui/v3
go: finding module for package github.com/u-root/u-root/pkg/boot/util
go: finding module for package github.com/gizak/termui/v3/widgets
go: found github.com/gizak/termui/v3 in github.com/gizak/termui/v3 v3.1.0
go: found github.com/gizak/termui/v3/widgets in github.com/gizak/termui/v3 v3.1.0
go: found github.com/u-root/NiChrome/pkg/wpa/passphrase in github.com/u-root/NiChrome v0.0.0-20190815003313-250f4770a25b
go: finding module for package github.com/u-root/u-root/pkg/boot/util
github.com/u-root/webboot/pkg/bootiso imports
        github.com/u-root/u-root/pkg/boot/util: module github.com/u-root/u-root@latest found (v7.0.0+incompatible), but does not contain package github.com/u-root/u-root/pkg/boot/util

Indeed, pkg/bootiso/bootiso.go imports github.com/u-root/u-root/pkg/boot/util, which is not in vendor/. The current u-root version that is vendored is something older. I don't understand yet why webboot could build with Go 1.15. I assume it just looked at my ~/go/src/github.com/u-root/u-root directory instead of vendor/ (although it shouldn't, as I understand it..?).

I attempted an upgrade thusly, and ran go get -u github.com/u-root/u-root@master, which errors:

go get: github.com/u-root/u-root@0b4edb935d5b9b58fccfa8b2c1fccfd17a831366 (v0.0.0-20210524171041-0b4edb935d5b) requires github.com/u-root/[email protected]+incompatible, not github.com/u-root/u-root@0b4edb935d5b9b58fccfa8b2c1fccfd17a831366 (v0.0.0-20210524171041-0b4edb935d5b)

I do not understand what this means, and it's hard to search for hints.

Trying dep ensure or dep ensure --update yields:

dep ensure --update
Solving failure: No versions of github.com/cenkalti/backoff met constraints:
        v4.1.0: Could not introduce github.com/cenkalti/[email protected], as its subpackage github.com/cenkalti/backoff/v4 is missing. (Package is required by github.com/u-root/u-root@master.)
        v4.0.2: Could not introduce github.com/cenkalti/[email protected], as its subpackage github.com/cenkalti/backoff/v4 is missing. (Package is required by github.com/u-root/u-root@master.)
... -- ( repetitive output omitted here ) --
        v2.1.0: Could not introduce github.com/cenkalti/[email protected], as its subpackage github.com/cenkalti/backoff/v4 is missing. (Package is required by github.com/u-root/u-root@master.)
        v2.0.0: Could not introduce github.com/cenkalti/[email protected], as its subpackage github.com/cenkalti/backoff/v4 is missing. (Package is required by github.com/u-root/u-root@master.)
        v1.1.0: Could not introduce github.com/cenkalti/[email protected], as its subpackage github.com/cenkalti/backoff/v4 is missing. (Package is required by github.com/u-root/u-root@master.)
        v1.0.0: Could not introduce github.com/cenkalti/[email protected], as its subpackage github.com/cenkalti/backoff/v4 is missing. (Package is required by github.com/u-root/u-root@master.)
        v4: Could not introduce github.com/cenkalti/backoff@v4, as its subpackage github.com/cenkalti/backoff/v4 is missing. (Package is required by github.com/u-root/u-root@master.)
        development: Could not introduce github.com/cenkalti/backoff@development, as its subpackage github.com/cenkalti/backoff/v4 is missing. (Package is required by github.com/u-root/u-root@master.)
        master: Could not introduce github.com/cenkalti/backoff@master, as its subpackage github.com/cenkalti/backoff/v4 is missing. (Package is required by github.com/u-root/u-root@master.)
        v2: Could not introduce github.com/cenkalti/backoff@v2, as its subpackage github.com/cenkalti/backoff/v4 is missing. (Package is required by github.com/u-root/u-root@master.)
        v3: Could not introduce github.com/cenkalti/backoff@v3, as its subpackage github.com/cenkalti/backoff/v4 is missing. (Package is required by github.com/u-root/u-root@master.)

Any idea would be welcome.

@bjakobson
Copy link
Member

Did you ever find a solution? I can hack at it in the next few days if not, but my skills are a little rusty.. :)

@hugelgupf
Copy link
Member

hugelgupf commented May 28, 2021 via email

@rjoleary
Copy link
Contributor

rjoleary commented Jun 3, 2021

Sorry, this might have been me in: #198

Without deleting u-root from the vendor directory, webboot won't build. It would use the u-root in GOPATH and the u-root in the vendor directory at the same time resulting in duplicate symbols. Perhaps it was the wrong thing to do, but we could not think of anything better.

@rjoleary
Copy link
Contributor

rjoleary commented Jun 3, 2021

Oh, but I see #198 is newer than this issue, so I may have fixed it.

@rjoleary rjoleary added the bug Something isn't working label Jun 3, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

4 participants