Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

glock save on new repo fails to open GLOCKFILE #7

Closed
joeshaw opened this issue Sep 11, 2014 · 7 comments
Closed

glock save on new repo fails to open GLOCKFILE #7

joeshaw opened this issue Sep 11, 2014 · 7 comments

Comments

@joeshaw
Copy link

joeshaw commented Sep 11, 2014

I decided to go with a fresh checkout for the new command stuff:

$ glock save github.com/joeshaw/envdecode
open /Users/joeshaw/go/src/github.com/joeshaw/envdecode/GLOCKFILE: no such file or directory

If I touched GLOCKFILE before I ran, things worked fine.

(As an aside, it would be nice to run glock save . or glock save ./...)

@robfig
Copy link
Owner

robfig commented Sep 11, 2014

Whoops, I think I was too eager to push it out. I've just pulled back the commit -- the fix for this particular problem is easy, but I also realized that "glock cmd" will not add all of the cmd dependencies.

Sorry for the false alarm. I'll finish it up, w/ a better job testing, over the weekend

@joeshaw
Copy link
Author

joeshaw commented Sep 11, 2014

yep, I just noticed the tool dependency thing as well. Thanks for taking a look into it, it is otherwise working well for me.

@joliver
Copy link

joliver commented Sep 12, 2014

Plus 1 on glock save . vs glock save ./...

@robfig
Copy link
Owner

robfig commented Sep 13, 2014

OK, I just pushed another attempt at "glock cmd" functionality. It seems to work well. Please let me know if you find anything amiss!

Thanks for your help btw

@robfig robfig closed this as completed Sep 13, 2014
@joeshaw
Copy link
Author

joeshaw commented Sep 15, 2014

@robfig Working great, thanks a lot. Now, to switch all my projects over to it 😄

@dmitshur
Copy link

Now, to switch all my projects over to it

Is there an existing way to automatically import similar files (e.g., Godeps) and convert to glock's format?

@robfig
Copy link
Owner

robfig commented Sep 15, 2014

Nothing official; probably I should add a section in the README for that. I think it should be easy:

  1. Get your workspace into a state you want to save (e.g. using godeps restore, or whatever)
  2. "glock save path/to/project"

If you're using godeps copy=false it should just work. If you use godeps with vendoring, then you may have to set the GOPATH so that glock can find the dependencies, eg.

GOPATH=$GOPATH:pwd/_vendor glock save path/to/project

However, I have not tested glock with multiple GOPATHs. If that doesn't work, then I would be willing to fix it. A workaround would be to copy your project into your vendor GOPATH and then use

GOPATH=pwd/_vendor glock save path/to/project

and take the resulting GLOCKFILE

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

Successfully merging a pull request may close this issue.

4 participants