golang / dep

Go dependency management tool experiment (deprecated)
https://golang.github.io/dep/
BSD 3-Clause "New" or "Revised" License
12.84k stars 1.05k forks source link

workflow: moving from gvt to dep #679

Closed nathany closed 7 years ago

nathany commented 7 years ago

What version of Go are you using (go version)?

What operating system and processor architecture are you using?

go version go1.8.3 darwin/amd64 dep v0.1.0-ish 7885eaee569e21f6f8ad372ee628ce11b478f556 (Tue May 30) gvt (Nov 18 2016)

What did you do?

dep init an existing project

What did you expect to see?

Utilizing my old vendor/manifest (gvt) to lock things in without a huge diff in my vendor folder?

Well maybe I didn't really expect to see that, but something along those lines would be nice. šŸ˜‰

I'd like to switch to dep without huge changes to the dependencies in the project so that those can be upgraded incrementally. Also, I think that will help with team buy-in of a new tool.

What did you see instead?

Following dependencies were not found in GOPATH. Dep will use the most recent versions of these projects.
  github.com/aws/aws-sdk-go
  github.com/go-resty/resty
  github.com/gorilla/handlers
  github.com/icrowley/fake
  github.com/sethgrid/pester
  github.com/twinj/uuid
  github.com/pmezard/go-difflib

So I undid the changes dep made, fetched those repos and tried gvt restore. Then I got some new ones:

Following dependencies were not found in GOPATH. Dep will use the most recent versions of these projects.
  github.com/go-ini/ini
  github.com/jmespath/go-jmespath

After all that, I'm still seeing a huge diff in my vendor folder. I think that's an issue with gvt restore or my expectations of it. It doesn't seem to be using the commit SHAs in my vendor/manifest to make the repositories in my $GOPATH align with what's in vendor.

Scanning the files below reveals that the commit SHAs don't align.

ref #138 ref #186 @FiloSottile

vendor/manifest

{
    "version": 0,
    "dependencies": [
        {
            "importpath": "github.com/PuerkitoBio/goquery",
            "repository": "https://github.com/PuerkitoBio/goquery",
            "vcs": "git",
            "revision": "3cb3b8656883c2cc3deb9c643d93ea6e5157e425",
            "branch": "master",
            "notests": true
        },
        {
            "importpath": "github.com/Sirupsen/logrus",
            "repository": "https://github.com/Sirupsen/logrus",
            "vcs": "git",
            "revision": "61e43dc76f7ee59a82bdf3d71033dc12bea4c77d",
            "branch": "master",
            "notests": true
        },
        {
            "importpath": "github.com/andybalholm/cascadia",
            "repository": "https://github.com/andybalholm/cascadia",
            "vcs": "git",
            "revision": "349dd0209470eabd9514242c688c403c0926d266",
            "branch": "master",
            "notests": true
        },
        {
            "importpath": "github.com/aws/aws-sdk-go/aws",
            "repository": "https://github.com/aws/aws-sdk-go",
            "vcs": "git",
            "revision": "baba9e786eae5ba978f2007f8e718557b29157c8",
            "branch": "master",
            "path": "aws",
            "notests": true
        },
        {
            "importpath": "github.com/aws/aws-sdk-go/private/protocol",
            "repository": "https://github.com/aws/aws-sdk-go",
            "vcs": "git",
            "revision": "baba9e786eae5ba978f2007f8e718557b29157c8",
            "branch": "master",
            "path": "private/protocol",
            "notests": true
        },
        {
            "importpath": "github.com/aws/aws-sdk-go/service/kinesis",
            "repository": "https://github.com/aws/aws-sdk-go",
            "vcs": "git",
            "revision": "baba9e786eae5ba978f2007f8e718557b29157c8",
            "branch": "master",
            "path": "/service/kinesis",
            "notests": true
        },
        {
            "importpath": "github.com/aws/aws-sdk-go/service/sqs",
            "repository": "https://github.com/aws/aws-sdk-go",
            "vcs": "git",
            "revision": "a5b389b7b05c59adf7ac44f50d0d8be6e0c85710",
            "branch": "master",
            "path": "/service/sqs",
            "notests": true
        },
        {
            "importpath": "github.com/aws/aws-sdk-go/service/sts",
            "repository": "https://github.com/aws/aws-sdk-go",
            "vcs": "git",
            "revision": "baba9e786eae5ba978f2007f8e718557b29157c8",
            "branch": "master",
            "path": "service/sts",
            "notests": true
        },
        {
            "importpath": "github.com/aws/aws-sdk-go/vendor/github.com/go-ini/ini",
            "repository": "https://github.com/aws/aws-sdk-go",
            "vcs": "git",
            "revision": "baba9e786eae5ba978f2007f8e718557b29157c8",
            "branch": "master",
            "path": "vendor/github.com/go-ini/ini",
            "notests": true
        },
        {
            "importpath": "github.com/aws/aws-sdk-go/vendor/github.com/jmespath/go-jmespath",
            "repository": "https://github.com/aws/aws-sdk-go",
            "vcs": "git",
            "revision": "baba9e786eae5ba978f2007f8e718557b29157c8",
            "branch": "master",
            "path": "vendor/github.com/jmespath/go-jmespath",
            "notests": true
        },
        {
            "importpath": "github.com/braintree/manners",
            "repository": "https://github.com/braintree/manners",
            "vcs": "git",
            "revision": "82a8879fc5fd0381fa8b2d8033b19bf255252088",
            "branch": "master",
            "notests": true
        },
        {
            "importpath": "github.com/corpix/uarand",
            "repository": "https://github.com/corpix/uarand",
            "vcs": "git",
            "revision": "1d58d0383c4d7a4697f63d1097d466864c9ab6d3",
            "branch": "master",
            "notests": true
        },
        {
            "importpath": "github.com/dahernan/backoff",
            "repository": "https://github.com/dahernan/backoff",
            "vcs": "git",
            "revision": "16994679f40f16943ebe2f96cb96aa9c89913f1a",
            "branch": "master",
            "notests": true
        },
        {
            "importpath": "github.com/dgrijalva/jwt-go",
            "repository": "https://github.com/dgrijalva/jwt-go",
            "vcs": "git",
            "revision": "2268707a8f0843315e2004ee4f1d021dc08baedf",
            "branch": "master",
            "notests": true
        },
        {
            "importpath": "github.com/gemnasium/migrate/driver",
            "repository": "https://github.com/gemnasium/migrate",
            "vcs": "git",
            "revision": "0e161f43df9892cb6f29f16cdbc98b50caa12d55",
            "branch": "master",
            "path": "driver",
            "notests": true
        },
        {
            "importpath": "github.com/gemnasium/migrate/file",
            "repository": "https://github.com/gemnasium/migrate",
            "vcs": "git",
            "revision": "0e161f43df9892cb6f29f16cdbc98b50caa12d55",
            "branch": "master",
            "path": "file",
            "notests": true
        },
        {
            "importpath": "github.com/gemnasium/migrate/migrate",
            "repository": "https://github.com/gemnasium/migrate",
            "vcs": "git",
            "revision": "0e161f43df9892cb6f29f16cdbc98b50caa12d55",
            "branch": "master",
            "path": "/migrate",
            "notests": true
        },
        {
            "importpath": "github.com/gemnasium/migrate/pipe",
            "repository": "https://github.com/gemnasium/migrate",
            "vcs": "git",
            "revision": "0e161f43df9892cb6f29f16cdbc98b50caa12d55",
            "branch": "master",
            "path": "pipe",
            "notests": true
        },
        {
            "importpath": "github.com/go-resty/resty",
            "repository": "https://github.com/go-resty/resty",
            "vcs": "git",
            "revision": "ef723efa2a1b4fcdbafb5b1e7c6cf42065519728",
            "branch": "master",
            "notests": true
        },
        {
            "importpath": "github.com/go-sql-driver/mysql",
            "repository": "https://github.com/go-sql-driver/mysql",
            "vcs": "git",
            "revision": "2e00b5cd70399450106cec6431c2e2ce3cae5034",
            "branch": "master",
            "notests": true
        },
        {
            "importpath": "github.com/gocql/gocql",
            "repository": "https://github.com/gocql/gocql",
            "vcs": "git",
            "revision": "4d2d1ac71932f7c4a6c7feb0d654462e4116c58b",
            "branch": "master",
            "notests": true
        },
        {
            "importpath": "github.com/golang/snappy",
            "repository": "https://github.com/golang/snappy",
            "vcs": "git",
            "revision": "7db9049039a047d955fe8c19b83c8ff5abd765c7",
            "branch": "master",
            "notests": true
        },
        {
            "importpath": "github.com/gorilla/context",
            "repository": "https://github.com/gorilla/context",
            "vcs": "git",
            "revision": "08b5f424b9271eedf6f9f0ce86cb9396ed337a42",
            "branch": "master",
            "notests": true
        },
        {
            "importpath": "github.com/gorilla/handlers",
            "repository": "https://github.com/gorilla/handlers",
            "vcs": "git",
            "revision": "13d73096a474cac93275c679c7b8a2dc17ddba82",
            "branch": "master",
            "notests": true
        },
        {
            "importpath": "github.com/gorilla/mux",
            "repository": "https://github.com/gorilla/mux",
            "vcs": "git",
            "revision": "599cba5e7b6137d46ddf58fb1765f5d928e69604",
            "branch": "master",
            "notests": true
        },
        {
            "importpath": "github.com/hailocab/go-hostpool",
            "repository": "https://github.com/hailocab/go-hostpool",
            "vcs": "git",
            "revision": "e80d13ce29ede4452c43dea11e79b9bc8a15b478",
            "branch": "master",
            "notests": true
        },
        {
            "importpath": "github.com/hashicorp/golang-lru",
            "repository": "https://github.com/hashicorp/golang-lru",
            "vcs": "git",
            "revision": "0a025b7e63adc15a622f29b0b2c4c3848243bbf6",
            "branch": "master",
            "notests": true
        },
        {
            "importpath": "github.com/herenow/go-crate",
            "repository": "https://github.com/herenow/go-crate",
            "vcs": "git",
            "revision": "2338d3626906d73552c99ac3780ad675dfd1af11",
            "branch": "master",
            "notests": true
        },
        {
            "importpath": "github.com/icrowley/fake",
            "repository": "https://github.com/icrowley/fake",
            "vcs": "git",
            "revision": "3b3219b5a6684b64a425535d9a9a20bd92a4e062",
            "branch": "master",
            "notests": true
        },
        {
            "importpath": "github.com/jmoiron/sqlx",
            "repository": "https://github.com/jmoiron/sqlx",
            "vcs": "git",
            "revision": "f980a91bdc37abef88269b8f122d7de6352102f5",
            "branch": "master",
            "notests": true
        },
        {
            "importpath": "github.com/kelseyhightower/envconfig",
            "repository": "https://github.com/kelseyhightower/envconfig",
            "vcs": "git",
            "revision": "8bf4bbfc795e2c7c8a5ea47b707453ed019e2ad4",
            "branch": "master",
            "notests": true
        },
        {
            "importpath": "github.com/lib/pq",
            "repository": "https://github.com/lib/pq",
            "vcs": "git",
            "revision": "67c3f2a8884c9b1aac5503c8d42ae4f73a93511c",
            "branch": "master",
            "notests": true
        },
        {
            "importpath": "github.com/mattn/go-sqlite3",
            "repository": "https://github.com/mattn/go-sqlite3",
            "vcs": "git",
            "revision": "ce9149a3c941c30de51a01dbc5bc414ddaa52927",
            "branch": "master",
            "notests": true
        },
        {
            "importpath": "github.com/newrelic/go-agent",
            "repository": "https://github.com/newrelic/go-agent",
            "vcs": "git",
            "revision": "60ed7aa03a85a1355b4189f66e23604de8f27d57",
            "branch": "master",
            "notests": true
        },
        {
            "importpath": "github.com/sethgrid/pester",
            "repository": "https://github.com/sethgrid/pester",
            "vcs": "git",
            "revision": "2c5fb962da6113d0968907fd81dba3ca35151d1c",
            "branch": "master",
            "notests": true
        },
        {
            "importpath": "github.com/stretchr/testify",
            "repository": "https://github.com/stretchr/testify",
            "vcs": "git",
            "revision": "4d4bfba8f1d1027c4fdbe371823030df51419987",
            "branch": "master",
            "notests": true
        },
        {
            "importpath": "github.com/twinj/uuid",
            "repository": "https://github.com/twinj/uuid",
            "vcs": "git",
            "revision": "7bbe408d339787c56ec15568c947c0959db1b275",
            "branch": "master",
            "notests": true
        },
        {
            "importpath": "golang.org/x/net/context",
            "repository": "https://go.googlesource.com/net",
            "vcs": "git",
            "revision": "f2499483f923065a842d38eb4c7f1927e6fc6e6d",
            "branch": "master",
            "path": "/context",
            "notests": true
        },
        {
            "importpath": "golang.org/x/net/html",
            "repository": "https://go.googlesource.com/net",
            "vcs": "git",
            "revision": "f2499483f923065a842d38eb4c7f1927e6fc6e6d",
            "branch": "master",
            "path": "html",
            "notests": true
        },
        {
            "importpath": "golang.org/x/net/idna",
            "repository": "https://go.googlesource.com/net",
            "vcs": "git",
            "revision": "6b27048ae5e6ad1ef927e72e437531493de612fe",
            "branch": "master",
            "path": "idna",
            "notests": true
        },
        {
            "importpath": "golang.org/x/net/publicsuffix",
            "repository": "https://go.googlesource.com/net",
            "vcs": "git",
            "revision": "6b27048ae5e6ad1ef927e72e437531493de612fe",
            "branch": "master",
            "path": "/publicsuffix",
            "notests": true
        },
        {
            "importpath": "golang.org/x/sync/errgroup",
            "repository": "https://go.googlesource.com/sync",
            "vcs": "git",
            "revision": "450f422ab23cf9881c94e2db30cac0eb1b7cf80c",
            "branch": "master",
            "path": "/errgroup",
            "notests": true
        },
        {
            "importpath": "golang.org/x/sys/unix",
            "repository": "https://go.googlesource.com/sys",
            "vcs": "git",
            "revision": "d75a52659825e75fff6158388dddc6a5b04f9ba5",
            "branch": "master",
            "path": "/unix",
            "notests": true
        },
        {
            "importpath": "golang.org/x/text/encoding",
            "repository": "https://go.googlesource.com/text",
            "vcs": "git",
            "revision": "ece019dcfd29abcf65d0d1dfe145e8faad097640",
            "branch": "master",
            "path": "encoding",
            "notests": true
        },
        {
            "importpath": "golang.org/x/text/internal/gen",
            "repository": "https://go.googlesource.com/text",
            "vcs": "git",
            "revision": "ece019dcfd29abcf65d0d1dfe145e8faad097640",
            "branch": "master",
            "path": "internal/gen",
            "notests": true
        },
        {
            "importpath": "golang.org/x/text/internal/tag",
            "repository": "https://go.googlesource.com/text",
            "vcs": "git",
            "revision": "ece019dcfd29abcf65d0d1dfe145e8faad097640",
            "branch": "master",
            "path": "internal/tag",
            "notests": true
        },
        {
            "importpath": "golang.org/x/text/internal/utf8internal",
            "repository": "https://go.googlesource.com/text",
            "vcs": "git",
            "revision": "ece019dcfd29abcf65d0d1dfe145e8faad097640",
            "branch": "master",
            "path": "internal/utf8internal",
            "notests": true
        },
        {
            "importpath": "golang.org/x/text/language",
            "repository": "https://go.googlesource.com/text",
            "vcs": "git",
            "revision": "ece019dcfd29abcf65d0d1dfe145e8faad097640",
            "branch": "master",
            "path": "language",
            "notests": true
        },
        {
            "importpath": "golang.org/x/text/runes",
            "repository": "https://go.googlesource.com/text",
            "vcs": "git",
            "revision": "ece019dcfd29abcf65d0d1dfe145e8faad097640",
            "branch": "master",
            "path": "runes",
            "notests": true
        },
        {
            "importpath": "golang.org/x/text/transform",
            "repository": "https://go.googlesource.com/text",
            "vcs": "git",
            "revision": "ece019dcfd29abcf65d0d1dfe145e8faad097640",
            "branch": "master",
            "path": "transform",
            "notests": true
        },
        {
            "importpath": "golang.org/x/text/unicode/cldr",
            "repository": "https://go.googlesource.com/text",
            "vcs": "git",
            "revision": "ece019dcfd29abcf65d0d1dfe145e8faad097640",
            "branch": "master",
            "path": "unicode/cldr",
            "notests": true
        },
        {
            "importpath": "gopkg.in/airbrake/gobrake.v2",
            "repository": "https://gopkg.in/airbrake/gobrake.v2",
            "vcs": "git",
            "revision": "668876711219e8b0206e2994bf0a59d889c775aa",
            "branch": "master",
            "notests": true
        },
        {
            "importpath": "gopkg.in/gemnasium/logrus-airbrake-hook.v2",
            "repository": "https://gopkg.in/gemnasium/logrus-airbrake-hook.v2",
            "vcs": "git",
            "revision": "bfee1239d796830ca346767650cce5ba90d58c57",
            "branch": "master",
            "notests": true
        },
        {
            "importpath": "gopkg.in/inf.v0",
            "repository": "https://gopkg.in/inf.v0",
            "vcs": "git",
            "revision": "3887ee99ecf07df5b447e9b00d9c0b2adaa9f3e4",
            "branch": "master",
            "notests": true
        },
        {
            "importpath": "gopkg.in/olivere/elastic.v5",
            "repository": "https://gopkg.in/olivere/elastic.v5",
            "vcs": "git",
            "revision": "4ba548ef864c4198c5f2961828fd7c0c987a8b9d",
            "branch": "master",
            "notests": true
        }
    ]
}

Gopkg.toml

[[projects]]
  branch = "master"
  name = "github.com/Sirupsen/logrus"
  packages = ["."]
  revision = "3ec0642a7fb6488f65b06f9040adc67e3990296a"

[[projects]]
  branch = "master"
  name = "github.com/aws/aws-sdk-go"
  packages = ["aws","aws/awserr","aws/awsutil","aws/client","aws/client/metadata","aws/corehandlers","aws/credentials","aws/credentials/ec2rolecreds","aws/credentials/endpointcreds","aws/credentials/stscreds","aws/defaults","aws/ec2metadata","aws/endpoints","aws/request","aws/session","aws/signer/v4","private/protocol","private/protocol/json/jsonutil","private/protocol/jsonrpc","private/protocol/query","private/protocol/query/queryutil","private/protocol/rest","private/protocol/xml/xmlutil","service/kinesis","service/sqs","service/sts"]
  revision = "a202fff91075d482fbeb32f98322a4b39126bc92"

[[projects]]
  branch = "master"
  name = "github.com/braintree/manners"
  packages = ["."]
  revision = "82a8879fc5fd0381fa8b2d8033b19bf255252088"

[[projects]]
  branch = "master"
  name = "github.com/corpix/uarand"
  packages = ["."]
  revision = "1d58d0383c4d7a4697f63d1097d466864c9ab6d3"

[[projects]]
  branch = "master"
  name = "github.com/dahernan/backoff"
  packages = ["."]
  revision = "16994679f40f16943ebe2f96cb96aa9c89913f1a"

[[projects]]
  branch = "master"
  name = "github.com/davecgh/go-spew"
  packages = ["spew"]
  revision = "5215b55f46b2b919f50a1df0eaa5886afe4e3b3d"

[[projects]]
  branch = "master"
  name = "github.com/dgrijalva/jwt-go"
  packages = ["."]
  revision = "2268707a8f0843315e2004ee4f1d021dc08baedf"

[[projects]]
  branch = "master"
  name = "github.com/gemnasium/migrate"
  packages = ["driver","driver/postgres","file","migrate","migrate/direction","pipe"]
  revision = "0e161f43df9892cb6f29f16cdbc98b50caa12d55"

[[projects]]
  branch = "master"
  name = "github.com/go-ini/ini"
  packages = ["."]
  revision = "afbc45e87f3ba324c532d12c71918ef52e0fb194"

[[projects]]
  branch = "master"
  name = "github.com/go-resty/resty"
  packages = ["."]
  revision = "7a8134d8718193eb857994adee49d73a302e7718"

[[projects]]
  branch = "master"
  name = "github.com/gorilla/context"
  packages = ["."]
  revision = "1c83b3eabd45b6d76072b66b746c20815fb2872d"

[[projects]]
  branch = "master"
  name = "github.com/gorilla/handlers"
  packages = ["."]
  revision = "a4043c62cc2329bacda331d33fc908ab11ef0ec3"

[[projects]]
  branch = "master"
  name = "github.com/gorilla/mux"
  packages = ["."]
  revision = "599cba5e7b6137d46ddf58fb1765f5d928e69604"

[[projects]]
  branch = "master"
  name = "github.com/hashicorp/golang-lru"
  packages = [".","simplelru"]
  revision = "0a025b7e63adc15a622f29b0b2c4c3848243bbf6"

[[projects]]
  branch = "master"
  name = "github.com/icrowley/fake"
  packages = ["."]
  revision = "9f67e8561905ff9c2b64fdd801ee70cf852b3b89"

[[projects]]
  branch = "master"
  name = "github.com/jmespath/go-jmespath"
  packages = ["."]
  revision = "bd40a432e4c76585ef6b72d3fd96fb9b6dc7b68d"

[[projects]]
  branch = "master"
  name = "github.com/jmoiron/sqlx"
  packages = [".","reflectx"]
  revision = "d9bd385d68c068f1fabb5057e3dedcbcbb039d0f"

[[projects]]
  branch = "master"
  name = "github.com/kelseyhightower/envconfig"
  packages = ["."]
  revision = "8bf4bbfc795e2c7c8a5ea47b707453ed019e2ad4"

[[projects]]
  branch = "master"
  name = "github.com/lib/pq"
  packages = [".","oid"]
  revision = "2704adc878c21e1329f46f6e56a1c387d788ff94"

[[projects]]
  branch = "master"
  name = "github.com/newrelic/go-agent"
  packages = [".","_integrations/nrgorilla/v1","internal","internal/jsonx","internal/logger","internal/sysinfo","internal/utilization"]
  revision = "60ed7aa03a85a1355b4189f66e23604de8f27d57"

[[projects]]
  branch = "master"
  name = "github.com/pmezard/go-difflib"
  packages = ["difflib"]
  revision = "792786c7400a136282c1664665ae0a8db921c6c2"

[[projects]]
  branch = "master"
  name = "github.com/sethgrid/pester"
  packages = ["."]
  revision = "4f4c0a67b6496764028e1ab9fd8dfb630282ed2f"

[[projects]]
  branch = "master"
  name = "github.com/stretchr/objx"
  packages = ["."]
  revision = "cbeaeb16a013161a98496fad62933b1d21786672"

[[projects]]
  branch = "master"
  name = "github.com/stretchr/testify"
  packages = ["assert","mock","require"]
  revision = "4d4bfba8f1d1027c4fdbe371823030df51419987"

[[projects]]
  branch = "master"
  name = "github.com/twinj/uuid"
  packages = ["."]
  revision = "7bbe408d339787c56ec15568c947c0959db1b275"

[[projects]]
  branch = "master"
  name = "golang.org/x/net"
  packages = ["idna","publicsuffix"]
  revision = "3da985ce5951d99de868be4385f21ea6c2b22f24"

[[projects]]
  branch = "master"
  name = "golang.org/x/sys"
  packages = ["unix"]
  revision = "9ccfe848b9db8435a24c424abbc07a921adf1df5"

[[projects]]
  branch = "master"
  name = "golang.org/x/text"
  packages = ["internal/gen","internal/triegen","internal/ucd","secure/bidirule","transform","unicode/bidi","unicode/cldr","unicode/norm","unicode/rangetable"]
  revision = "470f45bf29f4147d6fbd7dfd0a02a848e49f5bf4"

[solve-meta]
  analyzer-name = "dep"
  analyzer-version = 1
  inputs-digest = "c5dc717bd5645fac67b903d48d39da0102f172b33ec35b1aedae6388d1f3be85"
  solver-name = "gps-cdcl"
  solver-version = 1
carolynvs commented 7 years ago

@nathany We would like to have init recognize and import config from other tools (see epic #186) but that isn't implemented yet. I'm hoping once #500 is merged, which adds support for importers, someone can tackle gvt. šŸ˜€