Skip to content
This repository has been archived by the owner on Sep 9, 2020. It is now read-only.

dep ensure breaks git submodule #1997

Closed
dt opened this issue Aug 30, 2018 · 2 comments
Closed

dep ensure breaks git submodule #1997

dt opened this issue Aug 30, 2018 · 2 comments

Comments

@dt
Copy link

dt commented Aug 30, 2018

What version of dep are you using (dep version)?

v0.5.0

What dep command did you run?

$ ls vendor/.git
vendor/.git

$ ./bin/dep ensure -v
found 1 errors in the package tree:
import path github.com/cockroachdb/cockroach/c-deps/protobuf/benchmarks/go had local imports: "../tmp", "../tmp/datasets/google_message1/proto2", "../tmp/datasets/google_message1/proto3", "../tmp/datasets/google_message2", "../tmp/datasets/google_message3", "../tmp/datasets/google_message4"
# Bringing vendor into sync
(1/1) Wrote vitess.io/vitess (from https://github.com/cockroachdb/vitess)@no-flag-names-parens: hash of vendored tree didn't match digest in Gopkg.lock

$ ls vendor/.git
ls: vendor/.git: No such file or directory

What did you expect to see?

vendor/.git preserved.

What did you see instead?

$ ls vendor/.git
ls: vendor/.git: No such file or directory
@sdboyer
Copy link
Member

sdboyer commented Sep 4, 2018

Ah, i thought i'd kept this behavior in when switching over to the new system for writing out vendor. It would appear not.

i'll have a look. We need a small fixup release, anyway.

benesch added a commit to benesch/dep that referenced this issue Sep 5, 2018
The previous code was attempting to copy the .git directory into
vendor/vendor/.git, i.e., with an extra level of nesting. It was
then failing to notice the error because it was only reporting errors of
type *os.LinkError.

Fix the bug by removing the layer of nesting and reporting all errors.

Fix golang#1997.
@markus-wa
Copy link

Is there a v0.5.1 coming with this fix any time soon?

lhauspie pushed a commit to lhauspie/dep that referenced this issue Apr 9, 2019
The previous code was attempting to copy the .git directory into
vendor/vendor/.git, i.e., with an extra level of nesting. It was
then failing to notice the error because it was only reporting errors of
type *os.LinkError.

Fix the bug by removing the layer of nesting and reporting all errors.

Fix golang#1997.
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