pote / gpm

Barebones dependency manager for Go.
MIT License
1.19k stars 51 forks source link

Remove -u flag from got get #34

Closed markmandel closed 10 years ago

markmandel commented 10 years ago

This breaks GAE applications that use go, and libraries that use app engine dependencies that are stored in the appengine GOROOT.

You get errors like this:

>> Getting package github.com/smartystreets/goconvey
>> Getting package github.com/jacobsa/oglematchers
>> Getting package github.com/mjibson/goon
>> Setting github.com/jacobsa/oglematchers to version 4fc24f97b5b74022c2a3f4ca7eed57ca29083d3e
package github.com/mjibson/goon
        imports code.google.com/p/goprotobuf/proto: directory "/home/mark/go_appengine/goroot/src/pkg/code.google.com/p/goprotobuf/proto" is not using a known version control system
>> Setting github.com/smartystreets/goconvey to version 13db5bb88b509cb5ac23c1e8624a0ab9e685e083
>> All Done

Let me know if this will break other things, maybe there is an alternate workaround for this issue.

pote commented 10 years ago

The reason of the -u to be there is the following: imagine you at some point want to change the version for a package in your Godeps and you put a newer tag or version hash that didn't exist by the time you installed it in the first place - which should be pretty common - what will happen is that gpm will fail because it won't be able to checkout said version, thus the need to force update of the repos.

I agree we should find a way to work around this in some way, but removing -u I feel breaks a common use case, let's consider other options first and see what we can come up with.

markmandel commented 10 years ago

Yeah, I had a feeling that may be the case (side note: should considering integrating that scenario into the tests, so that travis fails when that happens)

Of course that means that will also never work for the scenario provided, as it fails on those gae dependencies.

Maybe a flag in GPM to turn off the -u is the correct option (have it on by default) could be the easy way to go.

markmandel commented 10 years ago

Agreed this is a bad idea. Closing.