-
Notifications
You must be signed in to change notification settings - Fork 1k
Can't use the master
version of a package
#385
Comments
I'm having trouble reproducing this. Does this look like what you have? If you are working from a public repo, that would help reproduce. original Gopkg.toml [[dependencies]]
branch = "master"
name = "github.com/gorilla/context" original Gopkg.lock memo = "395afa48a6fc987f195bf0c62dfb8b07579932e9aa5bf76884d68e49c1f28712"
[[projects]]
name = "github.com/gorilla/context"
packages = ["."]
revision = "1ea25387ff6f684839d82767c1733ff4d4d15d0a"
version = "v1.1" Update
final Gopkg.lock memo = "395afa48a6fc987f195bf0c62dfb8b07579932e9aa5bf76884d68e49c1f28712"
[[projects]]
branch = "master"
name = "github.com/gorilla/context"
packages = ["."]
revision = "08b5f424b9271eedf6f9f0ce86cb9396ed337a42"
|
@pierrre I'm guessing that, for your project, |
@sdboyer yes, my direct dependency is @carolynvs no sorry, it's a private repository. |
@pierrre If your constraint was the |
(feel free to redact the contents as needed) |
Full [[dependencies]]
branch = "master"
name = "github.com/<redacted>/golang-libraries"
[[dependencies]]
branch = "master"
name = "github.com/certifi/gocertifi"
[[dependencies]]
branch = "master"
name = "github.com/getsentry/raven-go"
[[dependencies]]
branch = "master"
name = "github.com/gorilla/context"
[[dependencies]]
branch = "master"
name = "github.com/gorilla/mux"
[[dependencies]]
branch = "master"
name = "github.com/pkg/errors"
[[dependencies]]
branch = "master"
name = "github.com/streadway/amqp" Full memo = "2fc1b4ded414adf615239746d64b3205021f89b0ef6e7275631d92a3ae189896"
[[projects]]
branch = "master"
name = "github.com/<redacted>/golang-libraries"
packages = ["pkg1","pkg2","pkg3","pkg4","pkg5","pkg6","pkg7","pkg8","pkg9"]
revision = "1f90f4068b30bb5dc0e31d09b46622848e27b3f7"
[[projects]]
name = "github.com/certifi/gocertifi"
packages = ["."]
revision = "03be5e6bb9874570ea7fb0961225d193cbc374c5"
version = "2017.01.23"
[[projects]]
branch = "master"
name = "github.com/getsentry/raven-go"
packages = ["."]
revision = "b68337dbf03e7fbb53d9fd9b63fd09b28e8f13f7"
[[projects]]
name = "github.com/gorilla/context"
packages = ["."]
revision = "1ea25387ff6f684839d82767c1733ff4d4d15d0a"
version = "v1.1"
[[projects]]
branch = "master"
name = "github.com/gorilla/mux"
packages = ["."]
revision = "599cba5e7b6137d46ddf58fb1765f5d928e69604"
[[projects]]
branch = "master"
name = "github.com/pkg/errors"
packages = ["."]
revision = "ff09b135c25aae272398c51a07235b90a75aa4f0"
[[projects]]
branch = "master"
name = "github.com/streadway/amqp"
packages = ["."]
revision = "afe8eee29a74d213b1f3fb2586058157c397da60" @carolynvs Should I also try to write a small project in a public repository ? |
@pierrre looks like your direct dependency is And, I forgot to address your question earlier about why Composer works differently - it's because in Composer (and every other system I'm aware of), the manifest is responsible for both the concept of "REQUIREMENT" and "CONSTRAINT". In dep, the manifest is only responsible for "CONSTRAINT" - the import graph dictates "REQUIREMENT." We believe this to a be a positive thing, in general, as it means less need to futz with the manifest during the course of normal development. However, between that and the difference between package and project, absurd situations arise if we don't limit the scope of constraints to direct dependencies of a project. If you absolutely need to specify the constraint of a transitive dep from your own project, you have two options:
However, before taking either of those steps, I'd say it's worth asking if you actually need to use |
Thank you for your detailed explanation. I was trying to migrate one of my projects to
I didn't understand why I couldn't update transitive dependencies to the latest available version. |
dep status
shows:Gopkg.toml
Gopkg.lock
After I run
dep ensure --update
, this package still doesn't use the latest version.Am I doing something wrong, or is it a bug ?
Thanks
The text was updated successfully, but these errors were encountered: