golang / dep

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

Gopkg.toml and Gopkg.lock are out of sync -- even after running dep ensure #1227

Closed hillu closed 6 years ago

hillu commented 6 years ago

What version of dep are you using (dep version)?

0.3.1, and master (82b390843af758fd609059154481ddd2f83b1e5d), fetched using go get and built using golang 1.8-1 as shipped with Debian/stretch (amd64).

What dep command did you run?

$ dep ensure -add $INTERNAL_PROJECT
Gopkg.toml and Gopkg.lock are out of sync. Run a plain dep ensure to resync them before attempting to -add
$ dep ensure
$ dep ensure -add $INTERNAL_PROJECT
Gopkg.toml and Gopkg.lock are out of sync. Run a plain dep ensure to resync them before attempting to -add

What did you expect to see?

I would have expected dep ensure to get the files "back in sync" (whatever that means from the perspective with my pure user-hat on).

What did you see instead?

See above, the message keeps appearing.

hillu commented 6 years ago

Is providing the dep hash-inputs output still useful if I replace names of internal projects with pseudonyms?

sdboyer commented 6 years ago

hi, welcome! eek, sorry, this is a surprising outcome, and definitely not one that should be possible.

Is providing the dep hash-inputs output still useful if I replace names of internal projects with pseudonyms?

definitely helpful, yes. probably the best thing to go on at this point.

could you also check to make sure that that bare dep ensure is exiting 0? also, dep ensure -v, so that we can see a little more of what it's doing? you'd have to sanitize that as well, of course - if you'd prefer and are comfortable, you can also DM me on the gophers slack to share it privately.

(whatever that means from the perspective with my pure user-hat on).

yeah...one of many things that needs an FAQ entry. god, i wish i had time to just write docs for a week.

hillu commented 6 years ago

Hi Sam,

I just removed all files that I suspect to belong to dep's internal state and did the following (internal package names have been sanitized):

$ rm -rf Gopkg.lock vendor $GOPATH/pkg
$ ~/dep ensure -v
Root project is "INTERNAL/PROJECT"
 4 transitively valid internal packages
 10 external packages imported from 10 projects
(0)   ✓ select (root)
(1)     ? attempt INTERNAL/DEPENDENCY1 with 1 pkgs; 1 versions to try
(1)         try INTERNAL/DEPENDENCY1@master
(1)     ✓ select INTERNAL/DEPENDENCY1@master w/1 pkgs
(2)     ? attempt INTERNAL/DEPENDENCY3 with 1 pkgs; 1 versions to try
(2)         try INTERNAL/DEPENDENCY3@master
(2)     ✓ select INTERNAL/DEPENDENCY3@master w/1 pkgs
(3)     ? attempt golang.org/x/sys with 1 pkgs; 1 versions to try
(3)         try golang.org/x/sys@master
(3)     ✓ select golang.org/x/sys@master w/2 pkgs
(4)     ? attempt github.com/spf13/pflag with 1 pkgs; 3 versions to try
(4)         try github.com/spf13/pflag@v1.0.0
(4)     ✓ select github.com/spf13/pflag@v1.0.0 w/1 pkgs
(5)     ? attempt github.com/hillu/go-cpulimit with 1 pkgs; 1 versions to try
(5)         try github.com/hillu/go-cpulimit@master
(5)     ✓ select github.com/hillu/go-cpulimit@master w/1 pkgs
(6)     ? attempt github.com/fatih/color with 1 pkgs; 10 versions to try
(6)         try github.com/fatih/color@v1.5.0
(6)     ✓ select github.com/fatih/color@v1.5.0 w/1 pkgs
(7)     ? attempt github.com/mattn/go-isatty with 1 pkgs; 5 versions to try
(7)         try github.com/mattn/go-isatty@v0.0.3
(7)     ✓ select github.com/mattn/go-isatty@v0.0.3 w/1 pkgs
(8)     ? revisit golang.org/x/sys to add 1 pkgs
(8)       ✓ include 1 more pkgs from golang.org/x/sys@master
(8)     ? attempt cloud.google.com/go with 1 pkgs; 19 versions to try
(9)         try cloud.google.com/go@v0.14.0
(9)     ✓ select cloud.google.com/go@v0.14.0 w/1 pkgs
(9)     ? attempt INTERNAL/DEPENDENCY2 with 1 pkgs; 12 versions to try
(10)      try INTERNAL/DEPENDENCY2@master
(10)  ✓ select INTERNAL/DEPENDENCY2@master w/2 pkgs
(10)  ? attempt github.com/shirou/gopsutil with 1 pkgs; 22 versions to try
(11)      try github.com/shirou/gopsutil@v2.17.09
(11)  ✓ select github.com/shirou/gopsutil@v2.17.09 w/2 pkgs
(11)  ? revisit golang.org/x/sys to add 1 pkgs
(12)    ✓ include 1 more pkgs from golang.org/x/sys@master
(11)  ? attempt github.com/StackExchange/wmi with 1 pkgs; 3 versions to try
(13)      try github.com/StackExchange/wmi@master
(13)  ✓ select github.com/StackExchange/wmi@master w/1 pkgs
(12)  ? revisit github.com/shirou/gopsutil to add 1 pkgs
(14)    ✓ include 6 more pkgs from github.com/shirou/gopsutil@v2.17.09
(12)  ? attempt github.com/shirou/w32 with 1 pkgs; 1 versions to try
(15)      try github.com/shirou/w32@master
(15)  ✓ select github.com/shirou/w32@master w/1 pkgs
(13)  ? attempt github.com/hillu/go-yara with 1 pkgs; 6 versions to try
(16)      try github.com/hillu/go-yara@v1.0.3
(16)  ✓ select github.com/hillu/go-yara@v1.0.3 w/1 pkgs
(14)  ? attempt github.com/go-ole/go-ole with 2 pkgs; 10 versions to try
(17)      try github.com/go-ole/go-ole@v1.2.0
(17)  ✓ select github.com/go-ole/go-ole@v1.2.0 w/2 pkgs
(15)  ? attempt github.com/mattn/go-colorable with 1 pkgs; 12 versions to try
(18)      try github.com/mattn/go-colorable@v0.0.9
(18)  ✓ select github.com/mattn/go-colorable@v0.0.9 w/1 pkgs
  ✓ found solution with 24 packages from 15 projects

Solver wall times by segment:
     b-list-versions: 10.424150041s
     b-source-exists:  3.674061541s
         b-list-pkgs:  453.662512ms
              b-gmal:  424.001575ms
         select-atom:    2.677347ms
             satisfy:    2.288117ms
         select-root:    1.474962ms
            new-atom:     468.291µs
  b-deduce-proj-root:     109.138µs
               other:      35.989µs
            add-atom:       11.37µs

  TOTAL: 14.982940883s

(1/15) Wrote github.com/hillu/go-yara@v1.0.3
(2/15) Wrote github.com/hillu/go-cpulimit@master
(3/15) Wrote INTERNAL/DEPENDENCY3@master
(4/15) Wrote INTERNAL/DEPENDENCY1@master
(5/15) Wrote INTERNAL/DEPENDENCY2@master
(6/15) Wrote github.com/mattn/go-isatty@v0.0.3
(7/15) Wrote github.com/shirou/w32@master
(8/15) Wrote github.com/spf13/pflag@v1.0.0
(9/15) Wrote github.com/go-ole/go-ole@v1.2.0
(10/15) Wrote github.com/StackExchange/wmi@master
(11/15) Wrote github.com/mattn/go-colorable@v0.0.9
(12/15) Wrote github.com/shirou/gopsutil@v2.17.09
(13/15) Wrote github.com/fatih/color@v1.5.0
(14/15) Wrote golang.org/x/sys@master
(15/15) Wrote cloud.google.com/go@v0.14.0
$ echo $?
0
$ dep ensure -v -add INTERNAL/DEPENDENCY4
found 4 errors in the package tree:
import path INTERNAL/PROJECT/gopath/pkg/dep/sources/https---github.com-golang-protobuf/protoc-gen-go/testdata had a local import: "./my_test"
/path/to/INTERNAL/PROJECT/gopath/pkg/dep/sources/https---go.googlesource.com-tools/cmd/fiximports/testdata/src/old.com/bad/bad.go:2:43: expected 'package', found 'EOF'
/path/to/INTERNAL/PROJECT/gopath/pkg/dep/sources/https---go.googlesource.com-tools/go/loader/testdata/badpkgdecl.go:1:34: expected 'package', found 'EOF'
import path INTERNAL/PROJECT/gopath/pkg/dep/sources/https---go.googlesource.com-tools/go/gcimporter15/testdata had a local import: "./a"
Gopkg.toml and Gopkg.lock are out of sync. Run a plain dep ensure to resync them before attempting to -add
$ echo $?
1
$ dep hash-inputs

$ dep hash-inputs
-CONSTRAINTS-
INTERNAL/DEPENDENCY1
b-master
INTERNAL/DEPENDENCY2
b-master
INTERNAL/DEPENDENCY3
b-master
github.com/fatih/color
svc-^1.5.0
github.com/hillu/go-cpulimit
b-master
github.com/hillu/go-yara
svc-^1.0.3
github.com/shirou/gopsutil
svc-^2.17.8
github.com/spf13/pflag
svc-^1.0.0
golang.org/x/sys
b-master
-IMPORTS/REQS-
cloud.google.com/go
cloud.google.com/go/bigquery
cloud.google.com/go/bigtable
cloud.google.com/go/bigtable/bttest
cloud.google.com/go/bigtable/internal/cbtconfig
cloud.google.com/go/bigtable/internal/gax
cloud.google.com/go/bigtable/internal/option
cloud.google.com/go/bigtable/internal/stat
cloud.google.com/go/civil
cloud.google.com/go/cmd/go-cloud-debug-agent/internal/breakpoints
cloud.google.com/go/cmd/go-cloud-debug-agent/internal/controller
cloud.google.com/go/cmd/go-cloud-debug-agent/internal/valuecollector
cloud.google.com/go/compute/metadata
cloud.google.com/go/datastore
cloud.google.com/go/debugger/apiv2
cloud.google.com/go/dlp/apiv2beta1
cloud.google.com/go/errorreporting/apiv1beta1
cloud.google.com/go/iam
cloud.google.com/go/iam/admin/apiv1
cloud.google.com/go/internal
cloud.google.com/go/internal/atomiccache
cloud.google.com/go/internal/fields
cloud.google.com/go/internal/optional
cloud.google.com/go/internal/pretty
cloud.google.com/go/internal/rpcreplay/proto/intstore
cloud.google.com/go/internal/rpcreplay/proto/rpcreplay
cloud.google.com/go/internal/testutil
cloud.google.com/go/internal/tracecontext
cloud.google.com/go/internal/version
cloud.google.com/go/language/apiv1
cloud.google.com/go/language/apiv1beta2
cloud.google.com/go/logging
cloud.google.com/go/logging/apiv2
cloud.google.com/go/logging/internal
cloud.google.com/go/logging/internal/testing
cloud.google.com/go/logging/logadmin
cloud.google.com/go/longrunning
cloud.google.com/go/longrunning/autogen
cloud.google.com/go/monitoring/apiv3
cloud.google.com/go/profiler
cloud.google.com/go/profiler/mocks
cloud.google.com/go/pubsub
cloud.google.com/go/pubsub/apiv1
cloud.google.com/go/pubsub/loadtest
cloud.google.com/go/pubsub/loadtest/pb
cloud.google.com/go/spanner
cloud.google.com/go/spanner/admin/database/apiv1
cloud.google.com/go/spanner/admin/instance/apiv1
cloud.google.com/go/spanner/apiv1
cloud.google.com/go/spanner/internal/testutil
cloud.google.com/go/speech/apiv1
cloud.google.com/go/speech/apiv1beta1
cloud.google.com/go/storage
cloud.google.com/go/trace
cloud.google.com/go/trace/apiv1
cloud.google.com/go/trace/testdata/helloworld
cloud.google.com/go/translate
cloud.google.com/go/translate/internal/translate/v2
cloud.google.com/go/videointelligence/apiv1beta1
cloud.google.com/go/videointelligence/apiv1beta2
cloud.google.com/go/vision/apiv1
INTERNAL/DEPENDENCY1
INTERNAL/DEPENDENCY2/crypto/heimdal
INTERNAL/DEPENDENCY2/license
INTERNAL/DEPENDENCY2/thor-license-tool/cmd
github.com/BurntSushi/toml
INTERNAL/DEPENDENCY3
github.com/StackExchange/wmi
github.com/cpuguy83/go-md2man/md2man
github.com/davecgh/go-spew/spew
github.com/davecgh/go-spew/spew/testdata
github.com/fatih/color
github.com/fsnotify/fsnotify
github.com/go-ole/go-ole
github.com/go-ole/go-ole/oleutil
github.com/golang/glog
github.com/golang/mock/gomock
github.com/golang/mock/gomock/mock_matcher
github.com/golang/mock/mockgen/model
github.com/golang/mock/sample
github.com/golang/mock/sample/imp1
github.com/golang/mock/sample/imp2
github.com/golang/mock/sample/imp3
github.com/golang/mock/sample/imp4
github.com/golang/mock/sample/mock_user
github.com/golang/protobuf/descriptor
github.com/golang/protobuf/jsonpb/jsonpb_test_proto
github.com/golang/protobuf/proto
github.com/golang/protobuf/proto/proto3_proto
github.com/golang/protobuf/proto/testdata
github.com/golang/protobuf/protoc-gen-go/descriptor
github.com/golang/protobuf/protoc-gen-go/generator
github.com/golang/protobuf/protoc-gen-go/grpc
github.com/golang/protobuf/protoc-gen-go/plugin
github.com/golang/protobuf/ptypes
github.com/golang/protobuf/ptypes/any
github.com/golang/protobuf/ptypes/duration
github.com/golang/protobuf/ptypes/empty
github.com/golang/protobuf/ptypes/struct
github.com/golang/protobuf/ptypes/timestamp
github.com/golang/protobuf/ptypes/wrappers
github.com/gonuts/commander
github.com/gonuts/flag
github.com/google/go-cmp/cmp
github.com/google/go-cmp/cmp/cmpopts
github.com/google/go-cmp/cmp/internal/diff
github.com/google/go-cmp/cmp/internal/function
github.com/google/go-cmp/cmp/internal/testprotos
github.com/google/go-cmp/cmp/internal/teststructs
github.com/google/go-cmp/cmp/internal/value
github.com/google/pprof/driver
github.com/google/pprof/internal/binutils
github.com/google/pprof/internal/driver
github.com/google/pprof/internal/elfexec
github.com/google/pprof/internal/graph
github.com/google/pprof/internal/measurement
github.com/google/pprof/internal/plugin
github.com/google/pprof/internal/proftest
github.com/google/pprof/internal/report
github.com/google/pprof/internal/symbolizer
github.com/google/pprof/internal/symbolz
github.com/google/pprof/profile
github.com/google/pprof/third_party/svg
github.com/googleapis/gax-go
github.com/hashicorp/hcl
github.com/hashicorp/hcl/hcl/ast
github.com/hashicorp/hcl/hcl/parser
github.com/hashicorp/hcl/hcl/printer
github.com/hashicorp/hcl/hcl/scanner
github.com/hashicorp/hcl/hcl/strconv
github.com/hashicorp/hcl/hcl/token
github.com/hashicorp/hcl/json/parser
github.com/hashicorp/hcl/json/scanner
github.com/hashicorp/hcl/json/token
github.com/hashicorp/hcl/testhelper
github.com/hillu/go-cpulimit
github.com/hillu/go-yara
github.com/ianlancetaylor/demangle
github.com/inconshreveable/mousetrap
github.com/magiconair/properties
github.com/magiconair/properties/assert
github.com/mattn/go-colorable
github.com/mattn/go-isatty
github.com/mitchellh/go-homedir
github.com/mitchellh/mapstructure
github.com/pelletier/go-toml
github.com/pkg/sftp
github.com/pmezard/go-difflib/difflib
github.com/russross/blackfriday
github.com/shirou/gopsutil/cpu
github.com/shirou/gopsutil/host
github.com/shirou/gopsutil/internal/common
github.com/shirou/gopsutil/mem
github.com/shirou/gopsutil/net
github.com/shirou/gopsutil/process
github.com/shirou/w32
github.com/spf13/afero
github.com/spf13/afero/mem
github.com/spf13/cast
github.com/spf13/cobra
github.com/spf13/cobra/cobra/cmd
github.com/spf13/cobra/doc
github.com/spf13/jwalterweatherman
github.com/spf13/pflag
github.com/spf13/viper
github.com/stretchr/objx
github.com/stretchr/testify/assert
github.com/stretchr/testify/http
github.com/stretchr/testify/mock
github.com/stretchr/testify/require
github.com/xordataexchange/crypt/config
go4.org/cloud/cloudlaunch
go4.org/cloud/google/gceutil
go4.org/ctxutil
go4.org/errorutil
go4.org/readerutil
go4.org/reflectutil
go4.org/sort
go4.org/strutil
go4.org/syncutil
go4.org/syncutil/singleflight
go4.org/wkfs
go4.org/wkfs/gcs
go4.org/xdgdir
golang.org/x/build/autocertcache
golang.org/x/crypto/acme
golang.org/x/crypto/acme/autocert
golang.org/x/crypto/blowfish
golang.org/x/crypto/cast5
golang.org/x/crypto/chacha20poly1305/internal/chacha20
golang.org/x/crypto/cryptobyte
golang.org/x/crypto/cryptobyte/asn1
golang.org/x/crypto/curve25519
golang.org/x/crypto/ed25519
golang.org/x/crypto/ed25519/internal/edwards25519
golang.org/x/crypto/hkdf
golang.org/x/crypto/md4
golang.org/x/crypto/nacl/auth
golang.org/x/crypto/nacl/box
golang.org/x/crypto/nacl/secretbox
golang.org/x/crypto/openpgp
golang.org/x/crypto/openpgp/armor
golang.org/x/crypto/openpgp/elgamal
golang.org/x/crypto/openpgp/errors
golang.org/x/crypto/openpgp/packet
golang.org/x/crypto/openpgp/s2k
golang.org/x/crypto/pbkdf2
golang.org/x/crypto/pkcs12/internal/rc2
golang.org/x/crypto/poly1305
golang.org/x/crypto/ripemd160
golang.org/x/crypto/salsa20/salsa
golang.org/x/crypto/scrypt
golang.org/x/crypto/ssh
golang.org/x/crypto/ssh/agent
golang.org/x/crypto/ssh/terminal
golang.org/x/crypto/ssh/testdata
golang.org/x/debug
golang.org/x/debug/arch
golang.org/x/debug/dwarf
golang.org/x/debug/elf
golang.org/x/debug/local
golang.org/x/debug/macho
golang.org/x/debug/remote
golang.org/x/debug/server
golang.org/x/debug/server/protocol
golang.org/x/net/bpf
golang.org/x/net/context
golang.org/x/net/context/ctxhttp
golang.org/x/net/dns/dnsmessage
golang.org/x/net/html
golang.org/x/net/html/atom
golang.org/x/net/http2
golang.org/x/net/http2/hpack
golang.org/x/net/icmp
golang.org/x/net/idna
golang.org/x/net/internal/iana
golang.org/x/net/internal/nettest
golang.org/x/net/internal/socket
golang.org/x/net/internal/timeseries
golang.org/x/net/ipv4
golang.org/x/net/ipv6
golang.org/x/net/lex/httplex
golang.org/x/net/trace
golang.org/x/net/webdav
golang.org/x/net/webdav/internal/xml
golang.org/x/net/websocket
golang.org/x/oauth2
golang.org/x/oauth2/clientcredentials
golang.org/x/oauth2/google
golang.org/x/oauth2/internal
golang.org/x/oauth2/jws
golang.org/x/oauth2/jwt
golang.org/x/sync/errgroup
golang.org/x/sync/semaphore
golang.org/x/sync/syncmap
golang.org/x/sys/plan9
golang.org/x/sys/unix
golang.org/x/sys/windows
golang.org/x/sys/windows/registry
golang.org/x/sys/windows/svc
golang.org/x/sys/windows/svc/debug
golang.org/x/sys/windows/svc/eventlog
golang.org/x/sys/windows/svc/mgr
golang.org/x/text/cases
golang.org/x/text/collate
golang.org/x/text/collate/build
golang.org/x/text/currency
golang.org/x/text/encoding
golang.org/x/text/encoding/charmap
golang.org/x/text/encoding/htmlindex
golang.org/x/text/encoding/ianaindex
golang.org/x/text/encoding/internal
golang.org/x/text/encoding/internal/enctest
golang.org/x/text/encoding/internal/identifier
golang.org/x/text/encoding/japanese
golang.org/x/text/encoding/korean
golang.org/x/text/encoding/simplifiedchinese
golang.org/x/text/encoding/traditionalchinese
golang.org/x/text/encoding/unicode
golang.org/x/text/feature/plural
golang.org/x/text/internal
golang.org/x/text/internal/catmsg
golang.org/x/text/internal/colltab
golang.org/x/text/internal/export/idna
golang.org/x/text/internal/format
golang.org/x/text/internal/gen
golang.org/x/text/internal/number
golang.org/x/text/internal/stringset
golang.org/x/text/internal/tag
golang.org/x/text/internal/testtext
golang.org/x/text/internal/triegen
golang.org/x/text/internal/ucd
golang.org/x/text/internal/utf8internal
golang.org/x/text/language
golang.org/x/text/language/display
golang.org/x/text/message
golang.org/x/text/message/catalog
golang.org/x/text/number
golang.org/x/text/runes
golang.org/x/text/secure/bidirule
golang.org/x/text/transform
golang.org/x/text/unicode/bidi
golang.org/x/text/unicode/cldr
golang.org/x/text/unicode/norm
golang.org/x/text/unicode/rangetable
golang.org/x/text/unicode/runenames
golang.org/x/text/width
golang.org/x/time/rate
golang.org/x/tools/benchmark/parse
golang.org/x/tools/blog
golang.org/x/tools/blog/atom
golang.org/x/tools/cmd/guru
golang.org/x/tools/cmd/guru/serial
golang.org/x/tools/container/intsets
golang.org/x/tools/cover
golang.org/x/tools/go/ast/astutil
golang.org/x/tools/go/buildutil
golang.org/x/tools/go/callgraph
golang.org/x/tools/go/callgraph/cha
golang.org/x/tools/go/callgraph/rta
golang.org/x/tools/go/callgraph/static
golang.org/x/tools/go/gccgoexportdata
golang.org/x/tools/go/gcexportdata
golang.org/x/tools/go/gcimporter15
golang.org/x/tools/go/internal/gccgoimporter
golang.org/x/tools/go/loader
golang.org/x/tools/go/pointer
golang.org/x/tools/go/ssa
golang.org/x/tools/go/ssa/interp
golang.org/x/tools/go/ssa/ssautil
golang.org/x/tools/go/types/typeutil
golang.org/x/tools/godoc
golang.org/x/tools/godoc/analysis
golang.org/x/tools/godoc/dl
golang.org/x/tools/godoc/proxy
golang.org/x/tools/godoc/redirect
golang.org/x/tools/godoc/short
golang.org/x/tools/godoc/static
golang.org/x/tools/godoc/util
golang.org/x/tools/godoc/vfs
golang.org/x/tools/godoc/vfs/gatefs
golang.org/x/tools/godoc/vfs/httpfs
golang.org/x/tools/godoc/vfs/mapfs
golang.org/x/tools/godoc/vfs/zipfs
golang.org/x/tools/imports
golang.org/x/tools/playground
golang.org/x/tools/playground/socket
golang.org/x/tools/present
golang.org/x/tools/refactor/eg
golang.org/x/tools/refactor/importgraph
golang.org/x/tools/refactor/rename
golang.org/x/tools/refactor/satisfy
google.golang.org/api/bigquery/v2
google.golang.org/api/books/v1
google.golang.org/api/calendar/v3
google.golang.org/api/clouddebugger/v2
google.golang.org/api/cloudresourcemanager/v1
google.golang.org/api/cloudtrace/v1
google.golang.org/api/compute/v1
google.golang.org/api/container/v1
google.golang.org/api/dfareporting/v2.7
google.golang.org/api/drive/v2
google.golang.org/api/fitness/v1
google.golang.org/api/gensupport
google.golang.org/api/gmail/v1
google.golang.org/api/google-api-go-generator/internal/disco
google.golang.org/api/googleapi
google.golang.org/api/googleapi/internal/uritemplates
google.golang.org/api/googleapi/transport
google.golang.org/api/internal
google.golang.org/api/iterator
google.golang.org/api/iterator/testing
google.golang.org/api/mirror/v1
google.golang.org/api/monitoring/v3
google.golang.org/api/option
google.golang.org/api/prediction/v1.6
google.golang.org/api/pubsub/v1beta2
google.golang.org/api/storage/v1
google.golang.org/api/support/bundler
google.golang.org/api/tasks/v1
google.golang.org/api/transport
google.golang.org/api/transport/bytestream/internal
google.golang.org/api/transport/grpc
google.golang.org/api/transport/http
google.golang.org/api/urlshortener/v1
google.golang.org/api/youtube/v3
google.golang.org/appengine
google.golang.org/appengine/datastore
google.golang.org/appengine/internal
google.golang.org/appengine/internal/aetesting
google.golang.org/appengine/internal/app_identity
google.golang.org/appengine/internal/base
google.golang.org/appengine/internal/blobstore
google.golang.org/appengine/internal/capability
google.golang.org/appengine/internal/channel
google.golang.org/appengine/internal/datastore
google.golang.org/appengine/internal/image
google.golang.org/appengine/internal/log
google.golang.org/appengine/internal/mail
google.golang.org/appengine/internal/memcache
google.golang.org/appengine/internal/modules
google.golang.org/appengine/internal/remote_api
google.golang.org/appengine/internal/search
google.golang.org/appengine/internal/socket
google.golang.org/appengine/internal/system
google.golang.org/appengine/internal/taskqueue
google.golang.org/appengine/internal/urlfetch
google.golang.org/appengine/internal/user
google.golang.org/appengine/internal/xmpp
google.golang.org/appengine/log
google.golang.org/appengine/memcache
google.golang.org/appengine/socket
google.golang.org/appengine/taskqueue
google.golang.org/appengine/urlfetch
google.golang.org/appengine/user
google.golang.org/genproto/googleapis/api
google.golang.org/genproto/googleapis/api/annotations
google.golang.org/genproto/googleapis/api/configchange
google.golang.org/genproto/googleapis/api/distribution
google.golang.org/genproto/googleapis/api/httpbody
google.golang.org/genproto/googleapis/api/label
google.golang.org/genproto/googleapis/api/metric
google.golang.org/genproto/googleapis/api/monitoredres
google.golang.org/genproto/googleapis/api/serviceconfig
google.golang.org/genproto/googleapis/appengine/logging/v1
google.golang.org/genproto/googleapis/bigtable/admin/v2
google.golang.org/genproto/googleapis/bigtable/v2
google.golang.org/genproto/googleapis/bytestream
google.golang.org/genproto/googleapis/cloud/audit
google.golang.org/genproto/googleapis/cloud/language/v1
google.golang.org/genproto/googleapis/cloud/language/v1beta2
google.golang.org/genproto/googleapis/cloud/speech/v1
google.golang.org/genproto/googleapis/cloud/speech/v1beta1
google.golang.org/genproto/googleapis/cloud/support/common
google.golang.org/genproto/googleapis/cloud/videointelligence/v1beta1
google.golang.org/genproto/googleapis/cloud/videointelligence/v1beta2
google.golang.org/genproto/googleapis/cloud/vision/v1
google.golang.org/genproto/googleapis/datastore/v1
google.golang.org/genproto/googleapis/devtools/clouddebugger/v2
google.golang.org/genproto/googleapis/devtools/clouderrorreporting/v1beta1
google.golang.org/genproto/googleapis/devtools/cloudprofiler/v2
google.golang.org/genproto/googleapis/devtools/cloudtrace/v1
google.golang.org/genproto/googleapis/devtools/source/v1
google.golang.org/genproto/googleapis/iam/admin/v1
google.golang.org/genproto/googleapis/iam/v1
google.golang.org/genproto/googleapis/logging/type
google.golang.org/genproto/googleapis/logging/v2
google.golang.org/genproto/googleapis/longrunning
google.golang.org/genproto/googleapis/monitoring/v3
google.golang.org/genproto/googleapis/privacy/dlp/v2beta1
google.golang.org/genproto/googleapis/pubsub/v1
google.golang.org/genproto/googleapis/rpc/code
google.golang.org/genproto/googleapis/rpc/errdetails
google.golang.org/genproto/googleapis/rpc/status
google.golang.org/genproto/googleapis/spanner/admin/database/v1
google.golang.org/genproto/googleapis/spanner/admin/instance/v1
google.golang.org/genproto/googleapis/spanner/v1
google.golang.org/genproto/googleapis/type/color
google.golang.org/genproto/googleapis/type/date
google.golang.org/genproto/googleapis/type/latlng
google.golang.org/genproto/googleapis/type/money
google.golang.org/genproto/googleapis/type/timeofday
google.golang.org/genproto/protobuf/api
google.golang.org/genproto/protobuf/field_mask
google.golang.org/genproto/protobuf/ptype
google.golang.org/genproto/protobuf/source_context
google.golang.org/grpc
google.golang.org/grpc/benchmark
google.golang.org/grpc/benchmark/grpc_testing
google.golang.org/grpc/benchmark/latency
google.golang.org/grpc/benchmark/stats
google.golang.org/grpc/codes
google.golang.org/grpc/connectivity
google.golang.org/grpc/credentials
google.golang.org/grpc/credentials/oauth
google.golang.org/grpc/examples/helloworld/helloworld
google.golang.org/grpc/examples/helloworld/mock_helloworld
google.golang.org/grpc/examples/route_guide/mock_routeguide
google.golang.org/grpc/examples/route_guide/routeguide
google.golang.org/grpc/grpclb/grpc_lb_v1/messages
google.golang.org/grpc/grpclb/grpc_lb_v1/service
google.golang.org/grpc/grpclog
google.golang.org/grpc/grpclog/glogger
google.golang.org/grpc/health
google.golang.org/grpc/health/grpc_health_v1
google.golang.org/grpc/internal
google.golang.org/grpc/interop
google.golang.org/grpc/interop/grpc_testing
google.golang.org/grpc/keepalive
google.golang.org/grpc/metadata
google.golang.org/grpc/naming
google.golang.org/grpc/peer
google.golang.org/grpc/reflection
google.golang.org/grpc/reflection/grpc_reflection_v1alpha
google.golang.org/grpc/reflection/grpc_testing
google.golang.org/grpc/reflection/grpc_testingv3
google.golang.org/grpc/stats
google.golang.org/grpc/stats/grpc_testing
google.golang.org/grpc/status
google.golang.org/grpc/stress/grpc_testing
google.golang.org/grpc/tap
google.golang.org/grpc/test/codec_perf
google.golang.org/grpc/test/grpc_testing
google.golang.org/grpc/testdata
google.golang.org/grpc/transport
gopkg.in/check.v1
gopkg.in/yaml.v2
-IGNORES-
-OVERRIDES-
-ANALYZER-
dep
1
sdboyer commented 6 years ago

huh. these:

found 4 errors in the package tree:
import path INTERNAL/PROJECT/gopath/pkg/dep/sources/https---github.com-golang-protobuf/protoc-gen-go/testdata had a local import: "./my_test"
/path/to/INTERNAL/PROJECT/gopath/pkg/dep/sources/https---go.googlesource.com-tools/cmd/fiximports/testdata/src/old.com/bad/bad.go:2:43: expected 'package', found 'EOF'
/path/to/INTERNAL/PROJECT/gopath/pkg/dep/sources/https---go.googlesource.com-tools/go/loader/testdata/badpkgdecl.go:1:34: expected 'package', found 'EOF'
import path INTERNAL/PROJECT/gopath/pkg/dep/sources/https---go.googlesource.com-tools/go/gcimporter15/testdata had a local import: "./a"

are...very weird. do you have a GOPATH set up inside of your project directory, which is then within yet another GOPATH?

ibrasho commented 6 years ago

FYI, #1225 is merged now so you should be able to run dep ensure -add and dep ensure -update.

I'm still interested in what is causing this bug though.

hillu commented 6 years ago

@sdboyer yes, indeed. My project has rather complicated GNU Make based build script for several reasons and I have GOPATH set up as $PROJECTBASE/gopath. $PROJECTBASE is then symlinked into the proper location inside that GOPATH, i.e. $PROJECTBASE/gopath/src/INTERNAL/PROJECT is a symlink to $PROJECTBASE.

sdboyer commented 6 years ago

@hillu i'm sorry, but we really can't make any promises about dep working in this kind of scenario. dep's design entails that we not only statically analyze the go files in your project, but that we can make sense of them as a tree, rooted at your Gopkg.toml. symlinks are agents of chao^H^H^H^H^H^H^H^H^H^H^H^H^H^H turn trees into graphs, which generally makes the sort of analysis we need to do difficult, if not undecidable. for this particular case, nesting a GOPATH within a project and then the project itself back within the GOPATH again...i mean, i'm amazed dep runs at all.

hillu commented 6 years ago

@sdboyer I am sorry for mistreating your tool so badly, it was all done with good intentions :-)

I seem to have found a workaround: dep ignores directories that begin with an underscore or dot, so this breaks the cycle introduced by the symlink.

sdboyer commented 6 years ago

@hillu haha, it's OK! you've gotta do what you've gotta do, and some older school Make-based projects definitely can have fs layout requirements that, at least by today's standards, may be quite circuitous. (also, dep/go are particularly hostile to symlinks).

I seem to have found a workaround: dep ignores directories that begin with an underscore or dot, so this breaks the cycle introduced by the symlink.

it does...sort of. even though it "ignores" them in the sense that dep will no longer think it has to honor the imports therein, it will still scan those directories on every single run of the tool, so there is still a performance impact to doing it this way. but correct and possibly somewhat slow is still far, far better than unworkable 😄