Skip to content
This repository has been archived by the owner on Feb 26, 2019. It is now read-only.

godep save ./... on v54 and go1.6 not creating vendor/ dir #417

Closed
gracedo opened this issue Feb 22, 2016 · 28 comments
Closed

godep save ./... on v54 and go1.6 not creating vendor/ dir #417

gracedo opened this issue Feb 22, 2016 · 28 comments

Comments

@gracedo
Copy link

gracedo commented Feb 22, 2016

I've recently upgraded to Go1.6 and just grabbed the newest Godep v54.

I deleted my Godeps/ and vendor/ dirs to vendor fresh.

rm -rf Godeps/
rm -rf vendor/

godep save ./...

Saw my Godeps.json file significantly modified (added a ton more deps, namely looks like it included all of the aws-sdk-go packages), but no vendor/ dir was created.

Tried a couple of different things. Started over and did not remove previous Godeps/ or vendor/ but just ran godep save ./... --> spit out a ton of these errors:

godep: rewrite: lstat <path-to-project>/advisor-notifications/vendor/github.com/Sirupsen/logrus/examples/basic/basic.go: no such file or directory
godep: rewrite: lstat <path-to-project>/vendor/github.com/Sirupsen/logrus/examples/hook/hook.go: no such file or directory
godep: rewrite: lstat <path-to-project>/vendor/github.com/Sirupsen/logrus/formatters/logstash/logstash.go: no such file or directory
godep: rewrite: lstat <path-to-project>/vendor/github.com/Sirupsen/logrus/hooks/syslog/syslog.go: no such file or directory
godep: rewrite: lstat <path-to-project>/vendor/github.com/aws/aws-sdk-go/aws/awserr/error.go: no such file or directory
godep: rewrite: lstat <path-to-project>/vendor/github.com/aws/aws-sdk-go/aws/awserr/types.go: no such file or directory
godep: rewrite: lstat <path-to-project>/vendor/github.com/aws/aws-sdk-go/aws/awsutil/copy.go: no such file or directory
godep: rewrite: lstat <path-to-project>/vendor/github.com/aws/aws-sdk-go/aws/awsutil/equal.go: no such file or directory
godep: rewrite: lstat <path-to-project>/vendor/github.com/aws/aws-sdk-go/aws/awsutil/path_value.go: no such file or directory

etc...

The same modifications were made to Godeps.json as stated above, but a ton of deps were also deleted from vendor/. I tried building the project on Jenkins with these changes but it failed.

<path-to-project>/vendor/github.com/aws/aws-sdk-go/private/signer/v4
../vendor/github.com/aws/aws-sdk-go/private/signer/v4/v4.go:150: cannot use req.Config.LogLevel.Value() (type "github.com/aws/aws-sdk-go/aws".LogLevelType) as type "<path-to-project>/vendor/github.com/aws/aws-sdk-go/aws".LogLevelType in field value

Not sure what's going on?

@freeformz
Copy link

Did you start out with a godep restore ?

@gracedo
Copy link
Author

gracedo commented Feb 22, 2016

Tried it, but same results

@freeformz
Copy link

The process I've used several times is : https://github.com/tools/godep#migrating-to-vendor

There could be bad revisions being restored though. For instance hashicorp/terraform#5248 needed to update a google cloud library because the code was using a local version and hadn't updated the vendored version yet.

Can you provide a copy of you Godeps/Godeps.json file?

@gracedo
Copy link
Author

gracedo commented Feb 22, 2016

{
    "ImportPath": "github.com/SocialCodeInc/advisor-notifications",
    "GoVersion": "go1.6",
    "Packages": [
        "./..."
    ],
    "Deps": [
        {
            "ImportPath": "github.com/Sirupsen/logrus",
            "Comment": "v0.9.0-3-g3455d89",
            "Rev": "3455d89ac9652295c85db2a98ea32f1d61c380bc"
        },
        {
            "ImportPath": "github.com/SocialCodeInc/go-common/bouncer",
            "Rev": "53c8f79f9ed6a6c7bb93f82d81cba9cb0d601f53"
        },
        {
            "ImportPath": "github.com/SocialCodeInc/go-common/echo",
            "Rev": "53c8f79f9ed6a6c7bb93f82d81cba9cb0d601f53"
        },
        {
            "ImportPath": "github.com/SocialCodeInc/go-common/log",
            "Rev": "53c8f79f9ed6a6c7bb93f82d81cba9cb0d601f53"
        },
        {
            "ImportPath": "github.com/aws/aws-sdk-go/aws",
            "Comment": "v1.1.1-4-g72a68b4",
            "Rev": "72a68b4e5a9c3f6a75813e6d4393b3a21749e9c4"
        },
        {
            "ImportPath": "github.com/aws/aws-sdk-go/private/endpoints",
            "Comment": "v1.1.1-4-g72a68b4",
            "Rev": "72a68b4e5a9c3f6a75813e6d4393b3a21749e9c4"
        },
        {
            "ImportPath": "github.com/aws/aws-sdk-go/private/protocol",
            "Comment": "v1.1.1-4-g72a68b4",
            "Rev": "72a68b4e5a9c3f6a75813e6d4393b3a21749e9c4"
        },
        {
            "ImportPath": "github.com/aws/aws-sdk-go/private/signer/v4",
            "Comment": "v1.1.1-4-g72a68b4",
            "Rev": "72a68b4e5a9c3f6a75813e6d4393b3a21749e9c4"
        },
        {
            "ImportPath": "github.com/aws/aws-sdk-go/private/waiter",
            "Comment": "v1.1.1-4-g72a68b4",
            "Rev": "72a68b4e5a9c3f6a75813e6d4393b3a21749e9c4"
        },
        {
            "ImportPath": "github.com/aws/aws-sdk-go/service/dynamodb",
            "Comment": "v1.1.1-4-g72a68b4",
            "Rev": "72a68b4e5a9c3f6a75813e6d4393b3a21749e9c4"
        },
        {
            "ImportPath": "github.com/aws/aws-sdk-go/service/sns",
            "Comment": "v1.1.1-4-g72a68b4",
            "Rev": "72a68b4e5a9c3f6a75813e6d4393b3a21749e9c4"
        },
        {
            "ImportPath": "github.com/davecgh/go-spew/spew",
            "Rev": "5215b55f46b2b919f50a1df0eaa5886afe4e3b3d"
        },
        {
            "ImportPath": "github.com/evalphobia/logrus_sentry",
            "Comment": "v0.1.0-3-g65f2b21",
            "Rev": "65f2b219f0df0df966a71020752970a4290ebfc8"
        },
        {
            "ImportPath": "github.com/getsentry/raven-go",
            "Rev": "1cc47a9463b90f246a0503d4c2e9a55c9459ced3"
        },
        {
            "ImportPath": "github.com/go-ini/ini",
            "Comment": "v0-48-g060d7da",
            "Rev": "060d7da055ba6ec5ea7a31f116332fe5efa04ce0"
        },
        {
            "ImportPath": "github.com/gobs/pretty",
            "Rev": "fea6a868a0fb8b17bb1869c1ab5b95578ac273f7"
        },
        {
            "ImportPath": "github.com/hydrogen18/stalecucumber",
            "Rev": "9b38526d4bdf8e197c31344777fc28f7f48d250d"
        },
        {
            "ImportPath": "github.com/jmespath/go-jmespath",
            "Comment": "0.2.2",
            "Rev": "3433f3ea46d9f8019119e7dd41274e112a2359a9"
        },
        {
            "ImportPath": "github.com/labstack/echo",
            "Comment": "v1.3-56-gf42af6e",
            "Rev": "f42af6ea9fae26b64fafd30d648b0ffbe880fb11"
        },
        {
            "ImportPath": "github.com/labstack/gommon/color",
            "Comment": "v0.0.3-39-gbfff5bf",
            "Rev": "bfff5bf04688a4048a5cb4dd3b3f0697caaad19c"
        },
        {
            "ImportPath": "github.com/labstack/gommon/log",
            "Comment": "v0.0.3-39-gbfff5bf",
            "Rev": "bfff5bf04688a4048a5cb4dd3b3f0697caaad19c"
        },
        {
            "ImportPath": "github.com/mattn/go-colorable",
            "Rev": "9fdad7c47650b7d2e1da50644c1f4ba7f172f252"
        },
        {
            "ImportPath": "github.com/mattn/go-isatty",
            "Rev": "56b76bdf51f7708750eac80fa38b952bb9f32639"
        },
        {
            "ImportPath": "github.com/mrjones/oauth",
            "Rev": "fdd43ab9ffd4adbedbecf59a0ec6a7e0d3ef3970"
        },
        {
            "ImportPath": "github.com/pmezard/go-difflib/difflib",
            "Rev": "792786c7400a136282c1664665ae0a8db921c6c2"
        },
        {
            "ImportPath": "github.com/stretchr/testify/assert",
            "Comment": "v1.1.3-2-g9f9027f",
            "Rev": "9f9027faeb0dad515336ed2f28317f9f8f527ab4"
        },
        {
            "ImportPath": "golang.org/x/net/context",
            "Rev": "8968c61983e8f51a91b8c0ef25bf739278c89634"
        },
        {
            "ImportPath": "golang.org/x/net/http2",
            "Rev": "8968c61983e8f51a91b8c0ef25bf739278c89634"
        },
        {
            "ImportPath": "golang.org/x/net/websocket",
            "Rev": "8968c61983e8f51a91b8c0ef25bf739278c89634"
        },
        {
            "ImportPath": "golang.org/x/sys/unix",
            "Rev": "833a04a10549a95dc34458c195cbad61bbb6cb4d"
        }
    ]
}

@sunheng
Copy link

sunheng commented Feb 22, 2016

Having the same problem with v54.

godep: cannot save code.google.com/p/google-api-go-client/googleapi/internal/uritemplates at revision '11626ef0c2fd66fd8c9a128f6ae38b77cd101f30': already have code.google.com/p/google-api-go-client/googleapi at revision 11626ef0c2fd66fd8c9a128f6ae38b77cd101f30.

Had to switch the older version to get it resolved.

@freeformz
Copy link

@sunheng that's probably because you have 2 different revs recorded, which is invalid. Fix all Revs to be the same for all code.google.com/p/google-api-go-client/googleapi packages.

@freeformz
Copy link

@gracedo Are you outside of your $GOPATH and/or using symlinks?

@gracedo
Copy link
Author

gracedo commented Feb 22, 2016

@freeformz Nope. Fwiw, I updated aws-sdk-go and did a godep update github.com/aws/aws-sdk-go/... to grab the new revs. But still running into the same errors.

@freeformz
Copy link

@gracedo when the above output says <path-to-project> what is that?

@gracedo
Copy link
Author

gracedo commented Feb 22, 2016

@freeformz I omitted the actual path haha didn't want that extra information being out here :) but I guess it doesn't really matter.. it's $GOPATH/src/github.com/SocialCodeInc/advisor-notifications/

@freeformz
Copy link

@gracedo what is the output of godep version (looking for the entire string).

@gracedo
Copy link
Author

gracedo commented Feb 22, 2016

$ godep version
godep v54 (darwin/amd64/go1.6)

@freeformz
Copy link

Is your fs case sensitive or not? It's part of the output of diskutil info /. I wonder if there is a regression there for some reason.

@gracedo
Copy link
Author

gracedo commented Feb 22, 2016

@freeformz Looks like it's not case-sensitive

   File System Personality:  Journaled HFS+
   Type (Bundle):            hfs
   Name (User Visible):      Mac OS Extended (Journaled)

@freeformz
Copy link

At this point I think I either need access to the code or the full dump of godep save -d -v > out 2>&1 (which can be large) using v54.

@freeformz
Copy link

Actually wait. I got that backwards. So it's not case sensitive. What do you get from the following 2 commands run inside of $GOPATH/src/github.com/SocialCodeInc/advisor-notifications/ (using whichever method you normally use to cd there).

pwd

git rev-parse --show-toplevel

@gracedo
Copy link
Author

gracedo commented Feb 22, 2016

Both still show $GOPATH/src/github.com/SocialCodeInc/advisor-notifications/

@freeformz
Copy link

Hmm. then I'm not really sure what's going on w/o the dump or the ability to reproduce it. Sorry.

@gracedo
Copy link
Author

gracedo commented Feb 22, 2016

So you can't reproduce it after removing Godeps and vendor dirs, and vendoring from scratch?

Here's the dump (ran godep save -v ./... > out 2>&1 after rm -rf Godeps/ vendor/) :
out.TXT

@freeformz
Copy link

I haven't been able to. I've done this now with a bunch of projects w/o incident (aside from stuff that was otherwise inflicted). I need the -d switch added to that, which will add tons of info.

@freeformz
Copy link

Note all of the "skipping untracked file" output. That's telling me that symlinks may be used somewhere.

If you go to cd /Users/grace/code/go/src/github.com/Sirupsen/logrus and run git ls-files --full-name what is the output?

@freeformz
Copy link

Also what is the output of echo $GOPATH ?

@freeformz
Copy link

And also git rev-parse --show-toplevel in the same place that git ls-files --full-name is run.

@gracedo
Copy link
Author

gracedo commented Feb 22, 2016

$ git ls-files --full-name
.gitignore
.travis.yml
CHANGELOG.md
LICENSE
README.md
doc.go
entry.go
entry_test.go
examples/basic/basic.go
examples/hook/hook.go
exported.go
formatter.go
formatter_bench_test.go
formatters/logstash/logstash.go
formatters/logstash/logstash_test.go
hook_test.go
hooks.go
hooks/syslog/README.md
hooks/syslog/syslog.go
hooks/syslog/syslog_test.go
json_formatter.go
json_formatter_test.go
logger.go
logrus.go
logrus_test.go
terminal_bsd.go
terminal_linux.go
terminal_notwindows.go
terminal_solaris.go
terminal_windows.go
text_formatter.go
text_formatter_test.go
writer.go
$ git rev-parse --show-toplevel
/Users/grace/Code/go/src/github.com/Sirupsen/logrus
$ echo $GOPATH
/Users/grace/code/go

Bah, dump is too large at 88MB heh. Here's a zip?
out.TXT.zip

@freeformz
Copy link

So here's the problem: /Users/grace/Code/go/src/github.com/Sirupsen/logrus vs /Users/grace/code/go/src/github.com/Sirupsen/logrus

I added a simple check of == recently.

Please update and try with v55 (just pushed). I bet that fixes it.

@gracedo
Copy link
Author

gracedo commented Feb 23, 2016

@freeformz Ahh, that makes sense.. it's all good now 😄 Thanks! Closing this out

@gracedo gracedo closed this as completed Feb 23, 2016
@freeformz
Copy link

@gracedo thanks for working through this and sorry for all of the back and forth.

@gracedo
Copy link
Author

gracedo commented Feb 23, 2016

@freeformz No worries! Thanks for walking through it with me, glad we figured it out :)

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants