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

ensure Solve(): No versions of honnef.co/go/tools met constraints #1263

Closed
AgrimPrasad opened this issue Oct 13, 2017 · 5 comments
Closed

ensure Solve(): No versions of honnef.co/go/tools met constraints #1263

AgrimPrasad opened this issue Oct 13, 2017 · 5 comments
Labels

Comments

@AgrimPrasad
Copy link

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).

@ibrasho
Copy link
Collaborator

ibrasho commented Oct 13, 2017

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.

@LYY
Copy link

LYY commented Oct 19, 2017

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

@ibrasho
Copy link
Collaborator

ibrasho commented Oct 26, 2017

Did you solve this issue (based on #1285)?

@sdboyer
Copy link
Member

sdboyer commented Oct 27, 2017

i think so, yeah - gonna close this (optimistically)

@sdboyer sdboyer closed this as completed Oct 27, 2017
@AgrimPrasad
Copy link
Author

Sorry, was on vacation this past week. That fixed it indeed, thanks :)

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

No branches or pull requests

4 participants