Colly: unable to use version => 2.0.0

Created on 8 Jan 2020  Â·  14Comments  Â·  Source: gocolly/colly

Gopkg.toml
`[[constraint]]
name = "github.com/gavv/httpexpect"
version = "2.0.2"

[[constraint]]
name = "github.com/gocolly/colly"
version = "2.0.1"

[[constraint]]
name = "github.com/onsi/ginkgo"
version = "1.11.0"

[[constraint]]
name = "github.com/onsi/gomega"
version = "1.8.1"

[prune]
go-tests = true
unused-packages = true`

When I run following on above Gopkg.toml with version 2.0.0 or 2.0.1
dep ensure

and getting following error

Solving failure: No versions of github.com/gocolly/colly met constraints: v1.2.0: Could not introduce github.com/gocolly/[email protected], as it is not allowed by constraint ^2.0.1 from project github.com/mytheresa/coeus. v2.0.1: "github.com/gocolly/colly" imports "github.com/gocolly/colly/v2/storage", which contains malformed code: no package exists at "github.com/gocolly/colly/v2/storage" v2.0.0: Could not introduce github.com/gocolly/[email protected], as it is not allowed by constraint ^2.0.1 from project github.com/mytheresa/coeus. v1.1.0: Could not introduce github.com/gocolly/[email protected], as it is not allowed by constraint ^2.0.1 from project github.com/mytheresa/coeus. v1.0.0: Could not introduce github.com/gocolly/[email protected], as it is not allowed by constraint ^2.0.1 from project github.com/mytheresa/coeus. master: Could not introduce github.com/gocolly/colly@master, as it is not allowed by constraint ^2.0.1 from project github.com/mytheresa/coeus.

I tried also to use 2.0.0

go info:
sh-3.2$ go version
go version go1.11.1 darwin/amd64

I also tried with Go version 1.12.0 but no luck

$ dep ensure dep: WARNING: Unknown field in manifest: prune ensure Solve(): No versions of github.com/gocolly/colly met constraints: v2.0.1: "github.com/gocolly/colly" imports "github.com/gocolly/colly/v2/debug", which contains malformed code: no package exists at "github.com/gocolly/colly/v2/debug" v2.0.0: "github.com/gocolly/colly" imports "github.com/gocolly/colly/v2/debug", which contains malformed code: no package exists at "github.com/gocolly/colly/v2/debug" v1.2.0: Could not introduce github.com/gocolly/[email protected], as it is not allowed by constraint ^2.0.0 from project github.com/mytheresa/coeus. v1.1.0: Could not introduce github.com/gocolly/[email protected], as it is not allowed by constraint ^2.0.0 from project github.com/mytheresa/coeus. v1.0.0: Could not introduce github.com/gocolly/[email protected], as it is not allowed by constraint ^2.0.0 from project github.com/mytheresa/coeus. master: Could not introduce github.com/gocolly/colly@master, as it is not allowed by constraint ^2.0.0 from project github.com/mytheresa/coeus.

Most helpful comment

The whole pipeline is broken because https://proxy.golang.org/github.com/gocolly/colly/@v/list returns old versions. Details are given in #417

@jinro79 it is same on golang version 1.12

https://proxy.golang.org/github.com/gocolly/colly/v2/@v/list

All 14 comments

I am running into the same issue. As a workaround I forked the repo and followed the directions in https://blog.golang.org/v2-go-modules to setup the v2/ folders and copy in the necessary files.

I also found this issue and it looks like colly v2 works fine with go version 1.12.

The whole pipeline is broken because https://proxy.golang.org/github.com/gocolly/colly/@v/list returns old versions. Details are given in https://github.com/gocolly/colly/issues/417

@jinro79 it is same on golang version 1.12

@hunzai thanks for the clarification.

The whole pipeline is broken because https://proxy.golang.org/github.com/gocolly/colly/@v/list returns old versions. Details are given in #417

@jinro79 it is same on golang version 1.12

https://proxy.golang.org/github.com/gocolly/colly/v2/@v/list

@sky126 you are right. @hunzai try to use github.com/gocolly/colly/v2 in your gopkg.toml.

@asciimoo @sky126 github.com/gocolly/colly/v2 is not allowed in Gopkg.toml.
The following issues were found in Gopkg.toml: ✗ the name for "github.com/gocolly/colly/v2" should be changed to "github.com/gocolly/colly"

@hunzai i'm not familiar with gopkg.toml but it works well with the newly introduced go modules. Have you tried it?

@hunzai i'm not familiar with gopkg.toml but it works well with the newly introduced go modules. Have you tried it?

you mean using go mod ? which is for Golang verions > 1.12 ? . If yes then dep will fail for any project using go < 12.0

1.12.0 was introduced almost a year ago, I don't think it is a huge requirement. But, you can also use the latest master if you can't upgrade your go package.

UPDATE
Go module support added in 1.11

package

sorry my bad , yes it was added 1.11. I am not sure how to use this package. For sure I don't want to clone git and manually manage dependencies. The project I am using is running in CI which it updates dependencies simply using dep ensure

I've checked github.com/gavv/httpexpect they are also in v2 and I can't see difference how they handle version bump. The only difference is that they have a v2 branch and colly only has a tag. Is httpexpect works well in your environment?

I've checked github.com/gavv/httpexpect they are also in v2 and I can't see difference how they handle version bump. The only difference is that they have a v2 branch and colly only has a tag. Is httpexpect works well in your environment?

thanks @asciimoo github.com/gocolly/colly/v2 basically worked find with go mod. All good - cheers!

@hunzai great, thanks for the feedback.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

0verbyte picture 0verbyte  Â·  5Comments

andystroz picture andystroz  Â·  3Comments

icamys picture icamys  Â·  3Comments

ascode picture ascode  Â·  3Comments

killernova picture killernova  Â·  6Comments