Re: [go-nuts] Can go-dockerclient be built with go modules?

2018-08-16 Thread Joseph Lorenzini
Hi Peter,

Thanks that was very helpful. That issue describes my problem exactly.
Frankly, IMHO, the issue isn’t so much modules being buggy as docker being
a project with poorly managed versioning. It’s some of the worst I have
ever see.

For example, I don’t understand why they haven’t added a git tag for
v17.0.5. It makes me wonder whether anyone has asked the docker project if
they are willing to do semver and add a go.mod.

Joe


On Thu, Aug 16, 2018 at 4:55 AM Peter Waller  wrote:

> Another issue worth consulting, https://github.com/golang/go/issues/26208,
> which isn't yet marked as resolved.
>

-- 
You received this message because you are subscribed to the Google Groups 
"golang-nuts" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to golang-nuts+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: [go-nuts] Can go-dockerclient be built with go modules?

2018-08-16 Thread Peter Waller
Another issue worth consulting, https://github.com/golang/go/issues/26208,
which isn't yet marked as resolved.

-- 
You received this message because you are subscribed to the Google Groups 
"golang-nuts" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to golang-nuts+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: [go-nuts] Can go-dockerclient be built with go modules?

2018-08-14 Thread Peter Waller
There are a couple of issues it is useful to be aware of importing when
depending on docker as a module.

1. docker's development is fragmented over various repositories, and
docker/docker isn't tagged. docker/docker (an alias for moby/moby) still
receives code updates imported from the other repositories, but not
releases, here you can see the last one is in 2017:
https://github.com/docker/docker/releases. If you look at
https://github.com/docker/cli/releases you can see there has been a release
a week ago. And if you look at the master branch, it has recent commits.

2. docker's recent tags aren't semver, because of the presence of a leading
zero in `v17.05.x-foo`. But the project does have old semver tags. So what
you're seeing is that a very old version of docker is being pulled in.

It's this old version of docker which is causes an old logrus to be
imported.

So you can get, say, a recent version of docker by running this (or
substitute @master for a specific release tag or git commit).

go get github.com/docker/docker@master


There is a bit more work needed to get it to build, but it is possible.
Sorry I don't have a complete solution immediately handy right now.

On Sat, 11 Aug 2018 at 19:08, Joseph Lorenzini  wrote:

>
> All:
>
> Using vgo, I haven't been able to build a go package with this library.
> Using go 1.10, I can successfully build this library.
>
> https://github.com/fsouza/go-dockerclient
>
> When I attempt to vgo build, I get this error
>
> /Volumes/Repositories/go/pkg/mod/
> github.com/fsouza/go-dockerclient@v1.2.2/internal/archive/archive.go:21:2:
> case-insensitive import collision: "github.com/sirupsen/logrus" and "
> github.com/Sirupsen/logrus"
>
>
> According to logrus project (github.com/sirupsen/logrus), the lowercase
> variant should always be used. So I added, this replace to go.mod.
>
> vgo mod edit -replace=
> github.com/Sirupsen/logrus=github.com/sirupsen/logrus@v1.0.6
>
>
> But then vgo build fails, with this error:
>
> go: github.com/sirupsen/logrus@v1.0.6 used for two different module
> paths (github.com/Sirupsen/logrus and github.com/sirupsen/logrus)
>
> Aside from opening an issue with the library author or forking the
> library, Is there a standard way to handle this kind of problem so that a
> program will build again?
>
> Thanks,
> Joe
>
> --
> You received this message because you are subscribed to the Google Groups
> "golang-nuts" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to golang-nuts+unsubscr...@googlegroups.com.
> For more options, visit https://groups.google.com/d/optout.
>

-- 
You received this message because you are subscribed to the Google Groups 
"golang-nuts" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to golang-nuts+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: [go-nuts] Can go-dockerclient be built with go modules?

2018-08-14 Thread roger peppe
Please try with Go 1.11 rc1.
(You can explicitly enable modules with GO111MODULE=on, or just try
building outside $GOPATH).


On 11 August 2018 at 19:08, Joseph Lorenzini  wrote:
>
> All:
>
> Using vgo, I haven't been able to build a go package with this library.
> Using go 1.10, I can successfully build this library.
>
> https://github.com/fsouza/go-dockerclient
>
> When I attempt to vgo build, I get this error
>
> /Volumes/Repositories/go/pkg/mod/github.com/fsouza/go-dockerclient@v1.2.2/internal/archive/archive.go:21:2:
> case-insensitive import collision: "github.com/sirupsen/logrus" and
> "github.com/Sirupsen/logrus"
>
>
> According to logrus project (github.com/sirupsen/logrus), the lowercase
> variant should always be used. So I added, this replace to go.mod.
>
> vgo mod edit
> -replace=github.com/Sirupsen/logrus=github.com/sirupsen/logrus@v1.0.6
>
>
> But then vgo build fails, with this error:
>
> go: github.com/sirupsen/logrus@v1.0.6 used for two different module
> paths (github.com/Sirupsen/logrus and github.com/sirupsen/logrus)
>
> Aside from opening an issue with the library author or forking the library,
> Is there a standard way to handle this kind of problem so that a program
> will build again?
>
> Thanks,
> Joe
>
> --
> You received this message because you are subscribed to the Google Groups
> "golang-nuts" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to golang-nuts+unsubscr...@googlegroups.com.
> For more options, visit https://groups.google.com/d/optout.

-- 
You received this message because you are subscribed to the Google Groups 
"golang-nuts" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to golang-nuts+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[go-nuts] Can go-dockerclient be built with go modules?

2018-08-11 Thread Joseph Lorenzini

All:

Using vgo, I haven't been able to build a go package with this library. 
Using go 1.10, I can successfully build this library.

https://github.com/fsouza/go-dockerclient

When I attempt to vgo build, I get this error

/Volumes/Repositories/go/pkg/mod/github.com/fsouza/go-dockerclient@v1.2.2/internal/archive/archive.go:21:2:
 
case-insensitive import collision: "github.com/sirupsen/logrus" and 
"github.com/Sirupsen/logrus"


According to logrus project (github.com/sirupsen/logrus), the lowercase 
variant should always be used. So I added, this replace to go.mod.

vgo mod edit 
-replace=github.com/Sirupsen/logrus=github.com/sirupsen/logrus@v1.0.6


But then vgo build fails, with this error:

go: github.com/sirupsen/logrus@v1.0.6 used for two different module 
paths (github.com/Sirupsen/logrus and github.com/sirupsen/logrus)

Aside from opening an issue with the library author or forking the library, 
Is there a standard way to handle this kind of problem so that a program 
will build again?

Thanks,
Joe 

-- 
You received this message because you are subscribed to the Google Groups 
"golang-nuts" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to golang-nuts+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.