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

godep save deletes every package from vendor folder and Godeps.json file #512

Closed
kristijan-ujevic opened this issue Sep 9, 2016 · 8 comments

Comments

@kristijan-ujevic
Copy link

Expected behavior

godep save should update vendor folder and Godeps.json file with new packages

Actual behavior

  1. fresh git checkout
  2. godep restore
  3. godep save
  4. everything is deleted

Steps to reproduce behavior

see above

godep version output

godep v74 (linux/amd64/go1.6.2)

go version output

go version go1.6.2 linux/amd64

Contents of Godeps.json file

after running godep save it just contains the head section with no packages

@chnrxn
Copy link

chnrxn commented Nov 10, 2016

This is a critical bug IMO.

@kristijan-ujevic
Copy link
Author

agreed

@freeformz
Copy link

It's likely that there is a problem with your $GOPATH. godep will only do
this if it doesn't find any packages. Also if you are using godep from
brew, make sure to uninstall it as it's known to cause problems.

On Fri, Nov 11, 2016 at 1:44 AM Kristijan Ujević notifications@github.com
wrote:

agreed


You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub
#512 (comment), or mute
the thread
https://github.com/notifications/unsubscribe-auth/AAAAZ7yUSdRfB4R6vJrOF5-LrMDtk4BTks5q9DjvgaJpZM4J4yaz
.

@kristijan-ujevic
Copy link
Author

echo $GOPATH

output:
/home/MyUsername/go

@freeformz
Copy link

Also pwd. Is there any difference in case?
The other thing may be the pkg spec passed to save. By default it is '.'.
If there are no files to analyze in the current directory then Godeps.json
will be blank and everything will be deleted from vendor. What is the
layout of the project?

On Tue, Nov 15, 2016 at 4:22 AM Kristijan Ujević notifications@github.com
wrote:

echo $GOPATH

output:
/home/MyUsername/go


You are receiving this because you commented.

Reply to this email directly, view it on GitHub
#512 (comment), or mute
the thread
https://github.com/notifications/unsubscribe-auth/AAAAZ6Qy-2cvFULARI0o4ZoVOAOtRaYaks5q-aQQgaJpZM4J4yaz
.

@johanoskarsson
Copy link

We're seeing the same problem. We have one codebase but multiple starting points in: project/cmd//main.go. We don't have any .go files in the project root. Unfortunately this seems to confuse godep as described in this issue.

@freeformz
Copy link

I am closing this issue because the repo is going to be archived.

@mhemmings
Copy link

I do fear this repo is being archived way too soon.
Doesn't look like dep is going to be the tool used going forward as it has too many flaws, and vgo isn't ready yet.
Teams still rely on this package, and bugs like this are critical.

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

No branches or pull requests

5 participants