-
Notifications
You must be signed in to change notification settings - Fork 1.2k
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
Fix go.mod to be compatible with go1.13 #1297
Conversation
go.mod
Outdated
@@ -56,7 +56,7 @@ require ( | |||
github.com/sirupsen/logrus v1.4.1 | |||
github.com/stretchr/testify v1.3.0 | |||
github.com/syndtr/gocapability v0.0.0-20180916011248-d98352740cb2 // indirect | |||
github.com/tonistiigi/fsutil v0.0.0-20190819224149-3d2716dd0a4d |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This commit had module related errors when resolving golang.org/x/crypto
; updating fixes it, and the changes from 3d2716dd0a4d to 0f039a052ca1 seem to be fairly minor.
a5abfb7
to
fb5a7c1
Compare
/cc @SamWhited |
The issue with replace is that it's not transitive. Anything importing a package in the buildkit module would not see the replace directive, and would select a different version of containerd than the one required. Put another way: replace is for main packages, not for libraries. |
go.mod
Outdated
@@ -78,3 +78,5 @@ require ( | |||
replace github.com/hashicorp/go-immutable-radix => github.com/tonistiigi/go-immutable-radix v0.0.0-20170803185627-826af9ccf0fe | |||
|
|||
replace github.com/jaguilar/vt100 => github.com/tonistiigi/vt100 v0.0.0-20190402012908-ad4c4a574305 | |||
|
|||
replace github.com/containerd/containerd v1.3.2 => github.com/containerd/containerd v0.0.0-20191014053712-acdcf13d5eaf |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
can we follow master?
#1293
b38c32a
to
9248464
Compare
@SamWhited Thanks! That makes sense. @AkihiroSuda I've made the same changes you made in yours, still works with go1.13 (tested with version 1.13.4). Travis failed at the "Cross" step, but I haven't been able to replicate any failures locally. |
096ff31
to
f03c020
Compare
Please sign your commits following these rules: $ git clone -b "fix-go-mod" [email protected]:zachbadgett/buildkit.git somewhere
$ cd somewhere
$ git rebase -i HEAD~842354378440
editor opens
change each 'pick' to 'edit'
save the file and quit
$ git commit --amend -s --no-edit
$ git rebase --continue # and repeat the amend for each commit
$ git push -f Amending updates the existing PR. You DO NOT need to open a new one. |
99c660e
to
77ec83f
Compare
95f19bd
to
abc28f5
Compare
@AkihiroSuda Tracked down the issue, it was coming from the docker version you wanted to use. There were a couple dependency issues. Issue 1: Issue 2: |
abc28f5
to
814e279
Compare
Be aware that tags should no longer be used from that repository. See microsoft/hcsshim#700
Unfortunately, go mod has no option for a repository to indicate "don't use tags" 😞 |
@thaJeztah buildkit does not have a direct dependency on microsoft/hcsshi. Only indirectly through docker and another library called |
I have the same error when I want to import buildkit via go.mod go: github.com/moby/[email protected] requires
github.com/containerd/[email protected]: invalid pseudo-version: version before v1.3.0 would have negative patch number Any plan to merge the fix ? |
@tonistiigi @tiborvass @thaJeztah PTAL? |
@zachbadgett could you rebase and update the PR with |
814e279
to
76ae5cc
Compare
sorry needs rebase again @tonistiigi PTAL at replace directives? |
76ae5cc
to
b5a6da3
Compare
|
||
replace github.com/containerd/containerd => github.com/containerd/containerd v1.3.1-0.20191217142032-9b5581cc9c5b | ||
|
||
replace github.com/docker/docker => github.com/docker/docker v1.4.2-0.20191210192822-1347481b9eb5 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The versions used in these replace
lines doesn't match the commit-hash used in the require
list above.
On the pseudo-version issues, is there any chance of the relevant upstream projects (containerd and docker, in this case) putting tags like (Without testing...) then go would pick those up, generate useful pseudo-versions, and we could avoid all the issues around |
For containerd there's containerd/containerd#3031 and containerd/containerd#3554 tracking go mod compatibility. |
needs rebase again |
b5a6da3
to
adc8f8b
Compare
|
Signed-off-by: Zach Badgett <[email protected]>
adc8f8b
to
7efdb8a
Compare
My mistake, I thought I ran |
7efdb8a
to
634ee58
Compare
go.mod
Outdated
@@ -1,22 +1,20 @@ | |||
module github.com/moby/buildkit | |||
|
|||
go 1.12 | |||
go 1.11 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
why is this go1.11
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The change to go 1.12
must've been recent; I went over all the changes in the dependencies during rebase, however I missed the version metadata. I've updated it.
Signed-off-by: Zach Badgett <[email protected]>
634ee58
to
29b431a
Compare
@@ -4,19 +4,17 @@ go 1.12 | |||
|
|||
require ( | |||
github.com/BurntSushi/toml v0.3.1 | |||
github.com/Microsoft/go-winio v0.4.14 | |||
github.com/Microsoft/hcsshim v0.8.5 // indirect | |||
github.com/Microsoft/go-winio v0.4.15-0.20190919025122-fc70bd9a86b5 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Where are these commits coming from? If I compare with containerd I don't see same commits. For some of them it isn't a big deal as if we have direct dependency we could bump it (although would be nice to mark it as upgrade in another commit then). But many in here seem to be just containerd dependencies. Or is it really that the old versions didn't build with go1.13?
@tonistiigi : Can we merge this as-is and address other issues in follow-up PRs? |
@AkihiroSuda I'm fine with the replace rules but rolling back deps if they are already too new is going to be a pain. Feel free to carry this with extra commits to adjust containerd dependencies to the correct version to get this merged. And while you are at it, update to Dockerfile as well so we see this(and go.mod validation) in action. |
carried in #1376 |
There was some concern related to using the
replace
directive in c6641fb; not sure I follow it completely.Signed-off-by: Zach Badgett [email protected]