ericchiang / go-acme

A Let's Encrypt client for Go
Apache License 2.0
219 stars 14 forks source link

Suggest reverting encoding/base64 vendoring #10

Closed alexzorin closed 9 years ago

alexzorin commented 9 years ago

In 9be29647abbc951311fa6ec4c0f8f8c99c41970c you vendored encoding/base64, but what this means is that the entire golang repo gets cloned, which takes quite a while to download.

Suggest either just requiring 1.5+ or if not, copying the required code into an internal package.

ericchiang commented 9 years ago

When do you have to grab golang/go? Cloning or doing development on this repo doesn't require cloning golang/go. The only time you'd need it would be to add another dependency.

I'd rather have one method for vendoring rather than maintain different strategies for golang/go and square/go-jose .

alexzorin commented 9 years ago

The specific repro I have is when attempting to vendor this package using Godep:

$ ls
main.go

$ less main.go
package main

import (
        "github.com/ericchiang/letsencrypt"
)

func main() {
        letsencrypt.NewClient("")
}

$ godep save
godep: cannot find package "github.com/golang/go/src/encoding/base64" in any of:
        /usr/local/go/src/github.com/golang/go/src/encoding/base64 (from $GOROOT)
        /home/alex/devel/go/src/github.com/golang/go/src/encoding/base64 (from $GOPATH)
godep: error loading dependencies

To be honest, I am not sure if this is instead a problem with Godep (but I don't think so, the real stdlib is at $GOROOT/src/encoding/base64). Anyway, I could not vendor this package without reverting the base64 commit.

ericchiang commented 9 years ago

Ah. Yeah that's not good. I'll investigate how godep works for packages within packages and try to figure out a solution.

On Friday, November 27, 2015, Alex Zorin notifications@github.com wrote:

The specific repro I have is when attempting to vendor this package using Godep:

$ ls main.go

$ less main.go package main

import ( "github.com/ericchiang/letsencrypt" )

func main() { letsencrypt.NewClient("") }

$ godep save godep: cannot find package "github.com/golang/go/src/encoding/base64" in any of: /usr/local/go/src/github.com/golang/go/src/encoding/base64 (from $GOROOT) /home/alex/devel/go/src/github.com/golang/go/src/encoding/base64 (from $GOPATH) godep: error loading dependencies

To be honest, I am not sure if this is instead a problem with Godep (but I don't think so, that github URL is a separate namespace to the true stdlib). Anyway, I could not vendor this package without reverting the base64 commit.

— Reply to this email directly or view it on GitHub https://github.com/ericchiang/letsencrypt/issues/10#issuecomment-160241756 .

ericchiang commented 9 years ago

Alright, there you go.

Sorry about that one. I realize I haven't actually used godep to import a project with a Godeps directory. Thanks for reporting!