Go: go version go1.9.1 darwin/amd64
OS: Mac OS X 10.12.6
What I did: dep ensure -v
What I expected to see: honnef.co/go/tools files should be downloaded to vendor directory
What I saw instead: master: Could not introduce honnef.co/go/tools@master, as its subpackage honnef.co/go/tools does not contain usable Go code (*build.NoGoError).. (Package is required by (root).)
Full command line output:
dep ensure -v
Root project is "github.com/bitgaming/platform-build/golang/app"
54 transitively valid internal packages
4 external packages imported from 4 projects
(0) โ select (root)
(1) ? attempt github.com/axw/gocov with 1 pkgs; 3 versions to try
(1) try github.com/axw/gocov@master
(1) โ select github.com/axw/gocov@master w/4 pkgs
(2) ? attempt honnef.co/go/tools with 1 pkgs; 4 versions to try
(2) try honnef.co/go/[email protected]
(3) โ honnef.co/go/[email protected] not allowed by constraint master:
(3) master from (root)
(2) try honnef.co/go/tools@master
(3) โ honnef.co/go/tools at master has problem subpkg(s):
(3) honnef.co/go/tools has err (*build.NoGoError); required by (root).
(2) try honnef.co/go/tools@errcheck
(3) โ honnef.co/go/tools@errcheck not allowed by constraint master:
(3) master from (root)
(2) try honnef.co/go/[email protected]
(3) โ honnef.co/go/[email protected] not allowed by constraint master:
(3) master from (root)
(2) โ no more versions of honnef.co/go/tools to try; begin backtrack
(1) โ backtrack: no more versions of github.com/axw/gocov to try
โ solving failed
Solver wall times by segment:
b-list-versions: 12.71768422s
b-source-exists: 2.462257602s
b-list-pkgs: 303.083454ms
b-deduce-proj-root: 188.054964ms
b-gmal: 155.915964ms
select-root: 4.48384ms
new-atom: 230.756ยตs
satisfy: 223.828ยตs
select-atom: 131.35ยตs
unselect: 67.643ยตs
b-matches: 11.905ยตs
b-pair-rev: 10.647ยตs
backtrack: 4.77ยตs
other: 4.515ยตs
b-pair-version: 1.576ยตs
TOTAL: 15.832167034s
ensure Solve(): No versions of honnef.co/go/tools met constraints:
2017.1: Could not introduce honnef.co/go/[email protected], as it is not allowed by constraint master from project github.com/bitgaming/platform-build/golang/app.
master: Could not introduce honnef.co/go/tools@master, as its subpackage honnef.co/go/tools does not contain usable Go code (*build.NoGoError).. (Package is required by (root).)
errcheck: Could not introduce honnef.co/go/tools@errcheck, as it is not allowed by constraint master from project github.com/bitgaming/platform-build/golang/app.
release.2017.1: Could not introduce honnef.co/go/[email protected], as it is not allowed by constraint master from project github.com/bitgaming/platform-build/golang/app.
Gopkg.tml file:
required = ["honnef.co/go/tools", "github.com/axw/gocov/gocov", "github.com/bitgaming/migrate", "github.com/bitgaming/pq2gorm"]
[[constraint]]
name = "honnef.co/go/tools"
branch = "master"
[[constraint]]
name = "github.com/axw/gocov"
branch = "master"
[[constraint]]
name = "github.com/gemnasium/migrate"
branch = "master"
source = "github.com/bitgaming/migrate"
[[constraint]]
name = "github.com/wantedly/pq2gorm"
branch = "master"
source = "github.com/bitgaming/pq2gorm"
Note that the project where I ran dep ensure does not have any go source code, and is only used to get the above vendored files (which are then used in a base Docker image).
You can only require a package that has actual Go code. Try honnef.co/go/tools/cmd/staticcheck instead. It'll still fetch the whole project.
@ibrasho I also have same problem on github.com/selvatico/go-mocket.
Go: go version go1.8.3 darwin/amd64
OS: Mac OS X 10.12.6
What I did: dep ensure -v
The go-mocket pakcage has Go code in it root path.
Full outputs:
Root project is "gitlab.mysite.org/myprj/myapp"
16 transitively valid internal packages
22 external packages imported from 15 projects
(0) โ select (root)
(1) ? attempt github.com/robfig/cron with 1 pkgs; 4 versions to try
(1) try github.com/robfig/cron@v1
(2) โ github.com/robfig/cron@v1 not allowed by constraint master:
(2) master from (root)
(1) try github.com/robfig/cron@master
(1) โ select github.com/robfig/cron@master w/1 pkgs
(2) ? attempt github.com/Selvatico/go-mocket with 1 pkgs; 6 versions to try
(2) try github.com/Selvatico/[email protected]
(2) โ select github.com/Selvatico/[email protected] w/1 pkgs
(3) ? attempt golang.org/x/net with 2 pkgs; 5 versions to try
(3) try golang.org/x/net@master
(3) โ select golang.org/x/net@master w/3 pkgs
(4) ? attempt github.com/jinzhu/gorm with 2 pkgs; 7 versions to try
(4) try github.com/jinzhu/[email protected]
(5) โ github.com/jinzhu/[email protected] not allowed by constraint master:
(5) master from (root)
(4) try github.com/jinzhu/gorm@master
(4) โ select github.com/jinzhu/gorm@master w/2 pkgs
(5) ? attempt github.com/jinzhu/inflection with 1 pkgs; 1 versions to try
(5) try github.com/jinzhu/inflection@master
(5) โ select github.com/jinzhu/inflection@master w/1 pkgs
(6) ? attempt github.com/nicksnyder/go-i18n with 1 pkgs; 13 versions to try
(6) try github.com/nicksnyder/[email protected]
(6) โ select github.com/nicksnyder/[email protected] w/4 pkgs
(7) ? attempt gopkg.in/yaml.v2 with 1 pkgs; 1 versions to try
(7) try gopkg.in/yaml.v2@v2
(7) โ select gopkg.in/yaml.v2@v2 w/1 pkgs
(8) ? attempt github.com/ethereum/go-ethereum with 3 pkgs; 144 versions to try
(8) try github.com/ethereum/go-ethereum@2
(9) โ github.com/ethereum/go-ethereum@2 not allowed by constraint ^1.7.2:
(9) ^1.7.2 from (root)
(8) try github.com/ethereum/[email protected]
(8) โ select github.com/ethereum/[email protected] w/12 pkgs
(9) ? revisit golang.org/x/net to add 1 pkgs
(9) โ include 1 more pkgs from golang.org/x/net@master
(9) ? attempt github.com/rcrowley/go-metrics with 1 pkgs; 3 versions to try
(10) try github.com/rcrowley/go-metrics@master
(10) โ select github.com/rcrowley/go-metrics@master w/1 pkgs
(10) ? attempt gopkg.in/karalabe/cookiejar.v2 with 1 pkgs; 1 versions to try
(11) try gopkg.in/karalabe/cookiejar.v2@v2
(11) โ select gopkg.in/karalabe/cookiejar.v2@v2 w/1 pkgs
(11) ? attempt github.com/rs/cors with 1 pkgs; 5 versions to try
(12) try github.com/rs/[email protected]
(12) โ select github.com/rs/[email protected] w/1 pkgs
(12) ? attempt github.com/labstack/echo with 2 pkgs; 51 versions to try
(13) try github.com/labstack/[email protected]
(13) โ select github.com/labstack/[email protected] w/2 pkgs
(13) ? attempt github.com/valyala/fasttemplate with 1 pkgs; 1 versions to try
(14) try github.com/valyala/fasttemplate@master
(14) โ select github.com/valyala/fasttemplate@master w/1 pkgs
(14) ? attempt github.com/valyala/bytebufferpool with 1 pkgs; 1 versions to try
(15) try github.com/valyala/bytebufferpool@master
(15) โ select github.com/valyala/bytebufferpool@master w/1 pkgs
(15) ? attempt golang.org/x/crypto with 1 pkgs; 1 versions to try
(16) try golang.org/x/crypto@master
(16) โ select golang.org/x/crypto@master w/2 pkgs
(16) ? attempt github.com/google/uuid with 1 pkgs; 6 versions to try
(17) try github.com/google/[email protected]
(18) โ github.com/google/[email protected] not allowed by constraint master:
(18) master from (root)
(17) try github.com/google/[email protected]
(18) โ github.com/google/[email protected] not allowed by constraint master:
(18) master from (root)
(17) try github.com/google/uuid@v0
(18) โ github.com/google/uuid@v0 not allowed by constraint master:
(18) master from (root)
(17) try github.com/google/uuid@master
(17) โ select github.com/google/uuid@master w/1 pkgs
(17) ? attempt github.com/btcsuite/btcd with 1 pkgs; 15 versions to try
(18) try github.com/btcsuite/btcd@master
(18) โ select github.com/btcsuite/btcd@master w/1 pkgs
(18) ? attempt github.com/pelletier/go-toml with 1 pkgs; 14 versions to try
(19) try github.com/pelletier/[email protected]
(19) โ select github.com/pelletier/[email protected] w/1 pkgs
(19) ? attempt github.com/dgrijalva/jwt-go with 1 pkgs; 16 versions to try
(20) try github.com/dgrijalva/[email protected]
(20) โ select github.com/dgrijalva/[email protected] w/1 pkgs
(20) ? attempt github.com/selvatico/go-mocket with 1 pkgs; 6 versions to try
(21) try github.com/selvatico/[email protected]
(22) โ github.com/selvatico/go-mocket at v1.0.4 has problem subpkg(s):
(22) github.com/selvatico/go-mocket is missing; required by (root).
(21) try github.com/selvatico/[email protected]
(22) โ github.com/selvatico/[email protected] not allowed by constraint master:
(22) master from (root)
(21) try github.com/selvatico/[email protected]
(22) โ github.com/selvatico/[email protected] not allowed by constraint master:
(22) master from (root)
(21) try github.com/selvatico/[email protected]
(22) โ github.com/selvatico/[email protected] not allowed by constraint master:
(22) master from (root)
(21) try github.com/selvatico/[email protected]
(22) โ github.com/selvatico/[email protected] not allowed by constraint master:
(22) master from (root)
(21) try github.com/selvatico/go-mocket@master
(22) โ github.com/selvatico/go-mocket at master has problem subpkg(s):
(22) github.com/selvatico/go-mocket is missing; required by (root).
(21) โ no more versions of github.com/selvatico/go-mocket to try; begin backtrack
(20) โ backtrack: no more versions of github.com/dgrijalva/jwt-go to try
(19) โ backtrack: no more versions of github.com/pelletier/go-toml to try
(18) โ backtrack: no more versions of github.com/btcsuite/btcd to try
(17) โ backtrack: no more versions of github.com/google/uuid to try
(16) โ backtrack: no more versions of golang.org/x/crypto to try
(15) โ backtrack: no more versions of github.com/valyala/bytebufferpool to try
(14) โ backtrack: no more versions of github.com/valyala/fasttemplate to try
(13) โ backtrack: no more versions of github.com/labstack/echo to try
(12) โ backtrack: no more versions of github.com/rs/cors to try
(11) โ backtrack: no more versions of gopkg.in/karalabe/cookiejar.v2 to try
(10) โ backtrack: no more versions of github.com/rcrowley/go-metrics to try
(9) โ backtrack: popped 1 pkgs from golang.org/x/net
(8) โ backtrack: no more versions of github.com/ethereum/go-ethereum to try
(7) โ backtrack: no more versions of gopkg.in/yaml.v2 to try
(6) โ backtrack: no more versions of github.com/nicksnyder/go-i18n to try
(5) โ backtrack: no more versions of github.com/jinzhu/inflection to try
(4) โ backtrack: no more versions of github.com/jinzhu/gorm to try
(3) โ backtrack: no more versions of golang.org/x/net to try
(2) โ backtrack: no more versions of github.com/Selvatico/go-mocket to try
(1) โ backtrack: no more versions of github.com/robfig/cron to try
โ solving failed
Solver wall times by segment:
b-list-versions: 41.144853545s
b-list-pkgs: 12.607451578s
b-source-exists: 5.073125893s
b-gmal: 2.673074752s
satisfy: 16.14891ms
select-atom: 11.951999ms
unselect: 11.626839ms
select-root: 3.693499ms
new-atom: 855.794ยตs
b-deduce-proj-root: 242.882ยตs
backtrack: 109.445ยตs
b-pair-rev: 88.499ยตs
b-matches: 24.735ยตs
b-pair-version: 22.505ยตs
other: 15.735ยตs
add-atom: 3.985ยตs
TOTAL: 1m1.543290595s
ensure Solve(): No versions of github.com/selvatico/go-mocket met constraints:
v1.0.4: Could not introduce github.com/selvatico/[email protected], as its subpackage github.com/selvatico/go-mocket is missing. (Package is required by (root).)
v1.0.3: Could not introduce github.com/selvatico/[email protected], as it is not allowed by constraint master from project gitlab.mysite.org/myprj/myapp.
v1.0.2: Could not introduce github.com/selvatico/[email protected], as it is not allowed by constraint master from project gitlab.mysite.org/myprj/myapp.
v1.0.1: Could not introduce github.com/selvatico/[email protected], as it is not allowed by constraint master from project gitlab.mysite.org/myprj/myapp.
v1.0.0: Could not introduce github.com/selvatico/[email protected], as it is not allowed by constraint master from project gitlab.mysite.org/myprj/myapp.
master: Could not introduce github.com/selvatico/go-mocket@master, as its subpackage github.com/selvatico/go-mocket is missing. (Package is required by (root).)
Gopkg.tml file:
[[constraint]]
name = "github.com/alecthomas/kingpin"
version = "2.2.5"
[[constraint]]
name = "github.com/stretchr/testify"
version = "1.1.4"
[[constraint]]
name = "github.com/sirupsen/logrus"
version = "1.0.3"
[[constraint]]
name = "github.com/labstack/echo"
version = "3.2.3"
[[constraint]]
name = "github.com/jinzhu/gorm"
branch = "master"
[[constraint]]
name = "github.com/rifflock/lfshook"
version = "1.7.0"
[[constraint]]
name = "github.com/ethereum/go-ethereum"
version = "1.7.2"
[[constraint]]
name = "github.com/google/uuid"
branch = "master"
[[constraint]]
name = "github.com/nicksnyder/go-i18n"
version = "1.8.1"
[[constraint]]
name = "github.com/robfig/cron"
branch = "master"
[[constraint]]
name = "github.com/selvatico/go-mocket"
branch = "master"
Did you solve this issue (based on #1285)?
i think so, yeah - gonna close this (optimistically)
Sorry, was on vacation this past week. That fixed it indeed, thanks :)
Most helpful comment
You can only require a package that has actual Go code. Try
honnef.co/go/tools/cmd/staticcheckinstead. It'll still fetch the whole project.