golang / dep

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

No versions of github.com/mediocregopher/radix met constraints #2216

Closed JinYuSha0 closed 4 years ago

JinYuSha0 commented 4 years ago

I want to use the iris framework in the project directory use dep init and dep ensure but the following error occurs when I run it.

vendor\github.com\kataras\iris\view\django.go:194:27: pongo2.RegisterTag(tagName, fn) used as value
vendor\github.com\kataras\iris\view\django.go:222:19: undefined: pongo2.NewLocalFileSystemLoader
vendor\github.com\kataras\iris\view\django.go:227:22: too many arguments in call to pongo2.NewSet
vendor\github.com\kataras\iris\view\django.go:280:22: too many arguments in call to pongo2.NewSet
        have (string, *tDjangoAssetLoader)
        want (string)
vendor\github.com\kataras\iris\view\jet.go:101:7: s.Set.Delims undefined (type *jet.Set has no field or method Delims)

I found a solution from github (https://github.com/kataras/iris/issues/1143#issuecomment-442648265).

Yes, if you remove dep and use go modules it is working, if you are still using dep for whatever reasons you can fix it by copy-pasting these two files inside your $GOPATH/src/github.com/kataras/iris folder: Gopkg.toml & Gopkg.lock and run dep ensure again.

And i try it,the following problems have occurred

Solving failure: No versions of github.com/mediocregopher/radix met constraints:
        v3.4.0: Could not introduce github.com/mediocregopher/radix@v3.4.0 due to multiple problematic subpackages:
        Subpackage github.com/mediocregopher/radix/v3 is missing. (Package is required by (root).)      Subpackage github.com/mediocregopher/radix/v3/resp/resp2 is missing. (Package is required by (root).)
        v3.3.2: Could not introduce github.com/mediocregopher/radix@v3.3.2 due to multiple problematic subpackages:
        Subpackage github.com/mediocregopher/radix/v3/resp/resp2 is missing. (Package is required by (root).)   Subpackage github.com/mediocregopher/radix/v3 is missing. (Package is required by (root).)
        v3.3.1: Could not introduce github.com/mediocregopher/radix@v3.3.1 due to multiple problematic subpackages:
        Subpackage github.com/mediocregopher/radix/v3 is missing. (Package is required by (root).)      Subpackage github.com/mediocregopher/radix/v3/resp/resp2 is missing. (Package is required by (root).)
        v3.3.0: Could not introduce github.com/mediocregopher/radix@v3.3.0 due to multiple problematic subpackages:
        Subpackage github.com/mediocregopher/radix/v3 is missing. (Package is required by (root).)      Subpackage github.com/mediocregopher/radix/v3/resp/resp2 is missing. (Package is required by (root).)
        v3.2.3: Could not introduce github.com/mediocregopher/radix@v3.2.3 due to multiple problematic subpackages:
        Subpackage github.com/mediocregopher/radix/v3 is missing. (Package is required by (root).)      Subpackage github.com/mediocregopher/radix/v3/resp/resp2 is missing. (Package is required by (root).)
        v3.2.2: Could not introduce github.com/mediocregopher/radix@v3.2.2 due to multiple problematic subpackages:
        Subpackage github.com/mediocregopher/radix/v3 is missing. (Package is required by (root).)      Subpackage github.com/mediocregopher/radix/v3/resp/resp2 is missing. (Package is required by (root).)
        v3.2.1: Could not introduce github.com/mediocregopher/radix@v3.2.1 due to multiple problematic subpackages:
        Subpackage github.com/mediocregopher/radix/v3/resp/resp2 is missing. (Package is required by (root).)   Subpackage github.com/mediocregopher/radix/v3 is missing. (Package is required by (root).)
        v3.2.0: Could not introduce github.com/mediocregopher/radix@v3.2.0 due to multiple problematic subpackages:
        Subpackage github.com/mediocregopher/radix/v3 is missing. (Package is required by (root).)      Subpackage github.com/mediocregopher/radix/v3/resp/resp2 is missing. (Package is required by (root).)
        v3.1.0: Could not introduce github.com/mediocregopher/radix@v3.1.0 due to multiple problematic subpackages:
        Subpackage github.com/mediocregopher/radix/v3 is missing. (Package is required by (root).)      Subpackage github.com/mediocregopher/radix/v3/resp/resp2 is missing. (Package is required by (root).)
        v3.0.1: Could not introduce github.com/mediocregopher/radix@v3.0.1 due to multiple problematic subpackages:
        Subpackage github.com/mediocregopher/radix/v3 is missing. (Package is required by (root).)      Subpackage github.com/mediocregopher/radix/v3/resp/resp2 is missing. (Package is required by (root).)
        v3.0.0: Could not introduce github.com/mediocregopher/radix@v3.0.0 due to multiple problematic subpackages:
        Subpackage github.com/mediocregopher/radix/v3 is missing. (Package is required by (root).)      Subpackage github.com/mediocregopher/radix/v3/resp/resp2 is missing. (Package is required by (root).)
        master: Could not introduce github.com/mediocregopher/radix@master due to multiple problematic subpackages:
        Subpackage github.com/mediocregopher/radix/v3 is missing. (Package is required by (root).)      Subpackage github.com/mediocregopher/radix/v3/resp/resp2 is missing. (Package is required by (root).)
        trace-docompleted-action: Could not introduce github.com/mediocregopher/radix@trace-docompleted-action due to multiple problematic subpackages:
        Subpackage github.com/mediocregopher/radix/v3 is missing. (Package is required by (root).)      Subpackage github.com/mediocregopher/radix/v3/resp/resp2 is missing. (Package is required by (root).)

what should I do?

theckman commented 4 years ago

Because they adopted Modules / SIV you can no longer use dep.

JinYuSha0 commented 4 years ago

@theckman Thank you for your answer,golang dependency mechanism is too immature.