When i delete vendor, Gopkg.lock.
Im use "dep ensure -v"
Dep update cli to v1.22.0
And get new dependency
[[projects]]
digest = "1:141635a36d65611d06a05ec1d17be950e386426b6540169fe7c9476df41f6493"
name = "github.com/cpuguy83/go-md2man"
packages = ["md2man"]
pruneopts = ""
revision = "7762f7e404f8416dfa1d9bb6a8c192aa9acb4d19"
version = "v1.0.10"
[[projects]]
digest = "1:42a59e0ee70c485f96de4a30f86f88266d50b50f918053dec798f0cb2b4b7a88"
name = "github.com/shurcooL/sanitized_anchor_name"
packages = ["."]
pruneopts = ""
revision = "7bfe4c7ecddb3666a94b053b422cdd8f5aaa3615"
version = "v1.0.0"
[[projects]]
digest = "1:87dffed114a34c714199c74e15c04ecb1c332c669f63f722220a5e4e6eb2ef52"
name = "github.com/russross/blackfriday"
packages = ["."]
pruneopts = ""
revision = "d3b5b032dc8e8927d31a5071b56e14c89f045135"
version = "v2.0.1"
After when i start my service i has some errors
server_1 | Error while building:
server_1 | # gitlab.xxx.com/yyy/zzz/vendor/github.com/cpuguy83/go-md2man/md2man
server_1 | vendor/github.com/cpuguy83/go-md2man/md2man/md2man.go:11:16: undefined: blackfriday.EXTENSION_NO_INTRA_EMPHASIS
server_1 | vendor/github.com/cpuguy83/go-md2man/md2man/md2man.go:12:16: undefined: blackfriday.EXTENSION_TABLES
server_1 | vendor/github.com/cpuguy83/go-md2man/md2man/md2man.go:13:16: undefined: blackfriday.EXTENSION_FENCED_CODE
server_1 | vendor/github.com/cpuguy83/go-md2man/md2man/md2man.go:14:16: undefined: blackfriday.EXTENSION_AUTOLINK
server_1 | vendor/github.com/cpuguy83/go-md2man/md2man/md2man.go:15:16: undefined: blackfriday.EXTENSION_SPACE_HEADERS
server_1 | vendor/github.com/cpuguy83/go-md2man/md2man/md2man.go:16:16: undefined: blackfriday.EXTENSION_FOOTNOTES
server_1 | vendor/github.com/cpuguy83/go-md2man/md2man/md2man.go:17:16: undefined: blackfriday.EXTENSION_TITLEBLOCK
server_1 | vendor/github.com/cpuguy83/go-md2man/md2man/md2man.go:19:29: too many arguments to conversion to blackfriday.Markdown: blackfriday.Markdown(doc, renderer, extensions)
server_1 | vendor/github.com/cpuguy83/go-md2man/md2man/roff.go:19:9: cannot use &roffRenderer literal (type *roffRenderer) as type blackfriday.Renderer in return argument:
server_1 | *roffRenderer does not implement blackfriday.Renderer (missing RenderFooter method)
server_1 | vendor/github.com/cpuguy83/go-md2man/md2man/roff.go:102:11: undefined: blackfriday.LIST_TYPE_ORDERED
server_1 | vendor/github.com/cpuguy83/go-md2man/md2man/roff.go:102:11: too many errors
server_1 |
To fix that i find in https://github.com/spf13/cobra/issues/917#issuecomment-518857368
Add in toml
[[override]]
name = "github.com/russross/blackfriday"
version = "1.5.2"
If anyone is failing to get aws-lambda-go, refer to https://github.com/aws/aws-lambda-go/issues/231#issuecomment-529913053
This should be fixed now. Use v1.22.1
@asahasrabuddhe What should I do to get v1.22.1? Using go get ... gives the same problems with md2man.go
@asahasrabuddhe My bad, something was cached on my end (or not) but now it builds correctly. Sorry
Should I close this?
Hi. Dep not working for this PR.
$ go version
go version go1.11.5 darwin/amd64
$
$ dep version
dep:
version : v0.5.4
build date : 2019-07-01
git hash : 1f7c19e
go version : go1.12.6
go compiler : gc
platform : darwin/amd64
features : ImportDuringSolve=false
main.go
package main
import (
"os"
"github.com/urfave/cli"
)
func main() {
app := cli.NewApp()
app.Flags = []cli.Flag{
cli.StringFlag{
Name: "config, c",
},
}
app.Action = func(c *cli.Context) error {
return nil
}
app.Run(os.Args)
}
$ dep init
Using ^1.22.0 as constraint for direct dep github.com/urfave/cli
Locking in v1.22.0 (bfe2e92) for direct dep github.com/urfave/cli
Locking in v1.0.10 (7762f7e) for transitive dep github.com/cpuguy83/go-md2man
Locking in v2.0.1 (d3b5b03) for transitive dep github.com/russross/blackfriday
Locking in v1.0.0 (7bfe4c7) for transitive dep github.com/shurcooL/sanitized_anchor_name
# Gopkg.toml example
#
# Refer to https://golang.github.io/dep/docs/Gopkg.toml.html
# for detailed Gopkg.toml documentation.
#
# required = ["github.com/user/thing/cmd/thing"]
# ignored = ["github.com/user/project/pkgX", "bitbucket.org/user/project/pkgA/pkgY"]
#
# [[constraint]]
# name = "github.com/user/project"
# version = "1.0.0"
#
# [[constraint]]
# name = "github.com/user/project2"
# branch = "dev"
# source = "github.com/myfork/project2"
#
# [[override]]
# name = "github.com/x/y"
# version = "2.4.0"
#
# [prune]
# non-go = false
# go-tests = true
# unused-packages = true
[[constraint]]
name = "github.com/urfave/cli"
version = "1.22.0"
[prune]
go-tests = true
unused-packages = true
$ go run main.go
# ./vendor/github.com/cpuguy83/go-md2man/md2man
vendor/github.com/cpuguy83/go-md2man/md2man/md2man.go:11:16: undefined: blackfriday.EXTENSION_NO_INTRA_EMPHASIS
vendor/github.com/cpuguy83/go-md2man/md2man/md2man.go:12:16: undefined: blackfriday.EXTENSION_TABLES
vendor/github.com/cpuguy83/go-md2man/md2man/md2man.go:13:16: undefined: blackfriday.EXTENSION_FENCED_CODE
vendor/github.com/cpuguy83/go-md2man/md2man/md2man.go:14:16: undefined: blackfriday.EXTENSION_AUTOLINK
vendor/github.com/cpuguy83/go-md2man/md2man/md2man.go:15:16: undefined: blackfriday.EXTENSION_SPACE_HEADERS
vendor/github.com/cpuguy83/go-md2man/md2man/md2man.go:16:16: undefined: blackfriday.EXTENSION_FOOTNOTES
vendor/github.com/cpuguy83/go-md2man/md2man/md2man.go:17:16: undefined: blackfriday.EXTENSION_TITLEBLOCK
vendor/github.com/cpuguy83/go-md2man/md2man/md2man.go:19:29: too many arguments to conversion to blackfriday.Markdown: blackfriday.Markdown(doc, renderer, extensions)
vendor/github.com/cpuguy83/go-md2man/md2man/roff.go:19:9: cannot use roffRenderer literal (type *roffRenderer) as type blackfriday.Renderer in return argument:
*roffRenderer does not implement blackfriday.Renderer (missing RenderFooter method)
vendor/github.com/cpuguy83/go-md2man/md2man/roff.go:102:11: undefined: blackfriday.LIST_TYPE_ORDERED
vendor/github.com/cpuguy83/go-md2man/md2man/roff.go:102:11: too many errors
I'm change version to 1.22.1, but i have now error:
$ dep ensure
dep ensure
Solving failure: No versions of github.com/cpuguy83/go-md2man met constraints:
v1.0.10: Could not introduce github.com/cpuguy83/[email protected], as its subpackage github.com/cpuguy83/go-md2man/v2/md2man is missing. (Package is required by github.com/urfave/[email protected].)
v1.0.9: Could not introduce github.com/cpuguy83/[email protected], as its subpackage github.com/cpuguy83/go-md2man/v2/md2man is missing. (Package is required by github.com/urfave/[email protected].)
v1.0.8: Could not introduce github.com/cpuguy83/[email protected], as its subpackage github.com/cpuguy83/go-md2man/v2/md2man is missing. (Package is required by github.com/urfave/[email protected].)
v1.0.7: Could not introduce github.com/cpuguy83/[email protected], as its subpackage github.com/cpuguy83/go-md2man/v2/md2man is missing. (Package is required by github.com/urfave/[email protected].)
v1.0.6: Could not introduce github.com/cpuguy83/[email protected], as its subpackage github.com/cpuguy83/go-md2man/v2/md2man is missing. (Package is required by github.com/urfave/[email protected].)
v1.0.5: Could not introduce github.com/cpuguy83/[email protected], as its subpackage github.com/cpuguy83/go-md2man/v2/md2man is missing. (Package is required by github.com/urfave/[email protected].)
v1.0.4: Could not introduce github.com/cpuguy83/[email protected], as its subpackage github.com/cpuguy83/go-md2man/v2/md2man is missing. (Package is required by github.com/urfave/[email protected].)
v1.0.3: Could not introduce github.com/cpuguy83/[email protected], as its subpackage github.com/cpuguy83/go-md2man/v2/md2man is missing. (Package is required by github.com/urfave/[email protected].)
v1.0.2: Could not introduce github.com/cpuguy83/[email protected], as its subpackage github.com/cpuguy83/go-md2man/v2/md2man is missing. (Package is required by github.com/urfave/[email protected].)
v1.0.1: Could not introduce github.com/cpuguy83/[email protected], as its subpackage github.com/cpuguy83/go-md2man/v2/md2man is missing. (Package is required by github.com/urfave/[email protected].)
v1: Could not introduce github.com/cpuguy83/go-md2man@v1, as its subpackage github.com/cpuguy83/go-md2man/v2/md2man is missing. (Package is required by github.com/urfave/[email protected].)
master: Could not introduce github.com/cpuguy83/go-md2man@master, as its subpackage github.com/cpuguy83/go-md2man/v2/md2man is missing. (Package is required by github.com/urfave/[email protected].)
6_fix_char_escaping: Could not introduce github.com/cpuguy83/go-md2man@6_fix_char_escaping, as its subpackage github.com/cpuguy83/go-md2man/v2/md2man is missing. (Package is required by github.com/urfave/[email protected].)
fix_rawhtml: Could not introduce github.com/cpuguy83/go-md2man@fix_rawhtml, as its subpackage github.com/cpuguy83/go-md2man/v2/md2man is missing. (Package is required by github.com/urfave/[email protected].)
release-1.0: Could not introduce github.com/cpuguy83/[email protected], as its subpackage github.com/cpuguy83/go-md2man/v2/md2man is missing. (Package is required by github.com/urfave/[email protected].)
We are using v2 of the go-md2man library. As the error indicates, there is no v2 tag which correctly resolves our requirement of v2. Please open an issue over there. Once they add the tag, this should work smoothly.
EDIT:
Just a tip, I'd consider migrating to Go Modules as soon as possible. Dependency managers such as Glide and Dep are no longer supported by Go and moving forward most of the packages would offer support for Go Modules. Moving now would save a considerable amount of time and effort in the future!
The migration is as easy as executing two commands at your project folder. Read these links for further assistance:
https://starkandwayne.com/blog/switching-to-go-modules/
https://vsupalov.com/switch-to-go-modules/
Failing on v1.22.2 for me.
I notice that if I don't specify a version 1.22.0 is selected, which works great and doesn't have that bug. Anything above fails.
I forked the project and updated my gopkg.toml to use a branch (called test) that is just a copy of the v1.22.2 tag
[[override]]
name = "github.com/urfave/cli"
source = "gitlab.com/anycompany/forks/cli.git"
branch = "test"
[prune]
go-tests = true
unused-packages = true
this is the log :
(17) ? attempt github.com/cpuguy83/go-md2man with 1 pkgs; 16 versions to try
(25) try github.com/cpuguy83/[email protected]
(26) โ github.com/cpuguy83/go-md2man at v2.0.0 has problem subpkg(s):
(26) github.com/cpuguy83/go-md2man/v2/md2man is missing; required by github.com/urfave/cli (from gitlab.com/anycompany/forks/cli.git)@test.
(25) try github.com/cpuguy83/[email protected]
(26) โ github.com/cpuguy83/go-md2man at v1.0.10 has problem subpkg(s):
(26) github.com/cpuguy83/go-md2man/v2/md2man is missing; required by github.com/urfave/cli (from gitlab.com/anycompany/forks/cli.git)@test.
(25) try github.com/cpuguy83/[email protected]
(26) โ github.com/cpuguy83/go-md2man at v1.0.9 has problem subpkg(s):
(26) github.com/cpuguy83/go-md2man/v2/md2man is missing; required by github.com/urfave/cli (from gitlab.com/anycompany/forks/cli.git)@test.
(25) try github.com/cpuguy83/[email protected]
(26) โ github.com/cpuguy83/go-md2man at v1.0.8 has problem subpkg(s):
(26) github.com/cpuguy83/go-md2man/v2/md2man is missing; required by github.com/urfave/cli (from gitlab.com/anycompany/forks/cli.git)@test.
(25) try github.com/cpuguy83/[email protected]
(26) โ github.com/cpuguy83/go-md2man at v1.0.7 has problem subpkg(s):
(26) github.com/cpuguy83/go-md2man/v2/md2man is missing; required by github.com/urfave/cli (from gitlab.com/anycompany/forks/cli.git)@test.
(25) try github.com/cpuguy83/[email protected]
(26) โ github.com/cpuguy83/go-md2man at v1.0.6 has problem subpkg(s):
(26) github.com/cpuguy83/go-md2man/v2/md2man is missing; required by github.com/urfave/cli (from gitlab.com/anycompany/forks/cli.git)@test.
(25) try github.com/cpuguy83/[email protected]
(26) โ github.com/cpuguy83/go-md2man at v1.0.5 has problem subpkg(s):
(26) github.com/cpuguy83/go-md2man/v2/md2man is missing; required by github.com/urfave/cli (from gitlab.com/anycompany/forks/cli.git)@test.
(25) try github.com/cpuguy83/[email protected]
(26) โ github.com/cpuguy83/go-md2man at v1.0.4 has problem subpkg(s):
(26) github.com/cpuguy83/go-md2man/v2/md2man is missing; required by github.com/urfave/cli (from gitlab.com/anycompany/forks/cli.git)@test.
(25) try github.com/cpuguy83/[email protected]
(26) โ github.com/cpuguy83/go-md2man at v1.0.3 has problem subpkg(s):
(26) github.com/cpuguy83/go-md2man/v2/md2man is missing; required by github.com/urfave/cli (from gitlab.com/anycompany/forks/cli.git)@test.
(25) try github.com/cpuguy83/[email protected]
(26) โ github.com/cpuguy83/go-md2man at v1.0.2 has problem subpkg(s):
(26) github.com/cpuguy83/go-md2man/v2/md2man is missing; required by github.com/urfave/cli (from gitlab.com/anycompany/forks/cli.git)@test.
(25) try github.com/cpuguy83/[email protected]
(26) โ github.com/cpuguy83/go-md2man at v1.0.1 has problem subpkg(s):
(26) github.com/cpuguy83/go-md2man/v2/md2man is missing; required by github.com/urfave/cli (from gitlab.com/anycompany/forks/cli.git)@test.
(25) try github.com/cpuguy83/go-md2man@v1
(26) โ github.com/cpuguy83/go-md2man at v1 has problem subpkg(s):
(26) github.com/cpuguy83/go-md2man/v2/md2man is missing; required by github.com/urfave/cli (from gitlab.com/anycompany/forks/cli.git)@test.
(25) try github.com/cpuguy83/go-md2man@master
(26) โ github.com/cpuguy83/go-md2man at master has problem subpkg(s):
(26) github.com/cpuguy83/go-md2man/v2/md2man is missing; required by github.com/urfave/cli (from gitlab.com/anycompany/forks/cli.git)@test.
(25) try github.com/cpuguy83/go-md2man@6_fix_char_escaping
(26) โ github.com/cpuguy83/go-md2man at 6_fix_char_escaping has problem subpkg(s):
(26) github.com/cpuguy83/go-md2man/v2/md2man is missing; required by github.com/urfave/cli (from gitlab.com/anycompany/forks/cli.git)@test.
(25) try github.com/cpuguy83/go-md2man@fix_rawhtml
(26) โ github.com/cpuguy83/go-md2man at fix_rawhtml has problem subpkg(s):
(26) github.com/cpuguy83/go-md2man/v2/md2man is missing; required by github.com/urfave/cli (from gitlab.com/anycompany/forks/cli.git)@test.
(25) try github.com/cpuguy83/[email protected]
(26) โ github.com/cpuguy83/go-md2man at release-1.0 has problem subpkg(s):
(26) github.com/cpuguy83/go-md2man/v2/md2man is missing; required by github.com/urfave/cli (from gitlab.com/anycompany/forks/cli.git)@test.
(25) โ no more versions of github.com/cpuguy83/go-md2man to try; begin backtrack
(24) โ backtrack: no more versions of github.com/urfave/cli (from gitlab.com/anycompany/forks/cli.git) to try
(16) ? continue github.com/urfave/cli (from gitlab.com/anycompany/forks/cli.git) with 1 pkgs; 1 more versions to try
(24) try github.com/urfave/cli (from gitlab.com/anycompany/forks/cli.git)@rm
(25) โ github.com/urfave/cli (from gitlab.com/anycompany/forks/cli.git)@rm not allowed by constraint test:
(25) test from (root)
(24) โ backtrack: no more versions of github.com/urfave/cli (from gitlab.com/anycompany/forks/cli.git) to try
(23) โ backtrack: no more versions of github.com/pkg/errors to try
(22) โ backtrack: no more versions of golang.org/x/text to try
(21) โ backtrack: no more versions of github.com/lib/pq to try
(20) โ backtrack: popped 6 pkgs from golang.org/x/net
(19) โ backtrack: no more versions of github.com/stellar/go-xdr to try
(18) โ backtrack: no more versions of golang.org/x/net to try
(17) โ backtrack: popped 1 pkgs from google.golang.org/grpc
(16) โ backtrack: popped 2 pkgs from github.com/golang/protobuf
(15) โ backtrack: popped 2 pkgs from golang.org/x/crypto
(14) โ backtrack: no more versions of github.com/stellar/go to try
(13) โ backtrack: popped 1 pkgs from google.golang.org/genproto
(12) โ backtrack: no more versions of google.golang.org/grpc to try
(11) โ backtrack: popped 8 pkgs from github.com/golang/protobuf
(10) โ backtrack: no more versions of gitlab.com/anycompany/anycompany-go to try
(9) โ backtrack: popped 5 pkgs from github.com/golang/protobuf
(8) โ backtrack: popped 2 pkgs from google.golang.org/genproto
(7) โ backtrack: no more versions of github.com/grpc-ecosystem/grpc-gateway to try
(6) โ backtrack: no more versions of github.com/golang/protobuf to try
(5) โ backtrack: no more versions of google.golang.org/genproto to try
(4) โ backtrack: no more versions of gitlab.com/anycompany/brandvno/proto.git to try
(3) โ backtrack: no more versions of golang.org/x/sys to try
(2) โ backtrack: no more versions of golang.org/x/crypto to try
(1) โ backtrack: no more versions of gopkg.in/yaml.v3 to try
โ solving failed
Solver wall times by segment:
b-list-versions: 22.444556657s
b-source-exists: 4.74946577s
b-list-pkgs: 1.8224442s
b-gmal: 1.069367125s
b-deduce-proj-root: 1.027141637s
unselect: 33.156029ms
select-atom: 33.035278ms
satisfy: 31.906559ms
new-atom: 886.773ยตs
select-root: 487.051ยตs
backtrack: 283.368ยตs
add-atom: 82.468ยตs
other: 43.958ยตs
TOTAL: 31.212856873s
Solving failure: No versions of github.com/cpuguy83/go-md2man met constraints:
v2.0.0: Could not introduce github.com/cpuguy83/[email protected], as its subpackage github.com/cpuguy83/go-md2man/v2/md2man is missing. (Package is required by github.com/urfave/cli (from gitlab.com/anycompany/forks/cli.git)@test.)
v1.0.10: Could not introduce github.com/cpuguy83/[email protected], as its subpackage github.com/cpuguy83/go-md2man/v2/md2man is missing. (Package is required by github.com/urfave/cli (from gitlab.com/anycompany/forks/cli.git)@test.)
v1.0.9: Could not introduce github.com/cpuguy83/[email protected], as its subpackage github.com/cpuguy83/go-md2man/v2/md2man is missing. (Package is required by github.com/urfave/cli (from gitlab.com/anycompany/forks/cli.git)@test.)
v1.0.8: Could not introduce github.com/cpuguy83/[email protected], as its subpackage github.com/cpuguy83/go-md2man/v2/md2man is missing. (Package is required by github.com/urfave/cli (from gitlab.com/anycompany/forks/cli.git)@test.)
v1.0.7: Could not introduce github.com/cpuguy83/[email protected], as its subpackage github.com/cpuguy83/go-md2man/v2/md2man is missing. (Package is required by github.com/urfave/cli (from gitlab.com/anycompany/forks/cli.git)@test.)
v1.0.6: Could not introduce github.com/cpuguy83/[email protected], as its subpackage github.com/cpuguy83/go-md2man/v2/md2man is missing. (Package is required by github.com/urfave/cli (from gitlab.com/anycompany/forks/cli.git)@test.)
v1.0.5: Could not introduce github.com/cpuguy83/[email protected], as its subpackage github.com/cpuguy83/go-md2man/v2/md2man is missing. (Package is required by github.com/urfave/cli (from gitlab.com/anycompany/forks/cli.git)@test.)
v1.0.4: Could not introduce github.com/cpuguy83/[email protected], as its subpackage github.com/cpuguy83/go-md2man/v2/md2man is missing. (Package is required by github.com/urfave/cli (from gitlab.com/anycompany/forks/cli.git)@test.)
v1.0.3: Could not introduce github.com/cpuguy83/[email protected], as its subpackage github.com/cpuguy83/go-md2man/v2/md2man is missing. (Package is required by github.com/urfave/cli (from gitlab.com/anycompany/forks/cli.git)@test.)
v1.0.2: Could not introduce github.com/cpuguy83/[email protected], as its subpackage github.com/cpuguy83/go-md2man/v2/md2man is missing. (Package is required by github.com/urfave/cli (from gitlab.com/anycompany/forks/cli.git)@test.)
v1.0.1: Could not introduce github.com/cpuguy83/[email protected], as its subpackage github.com/cpuguy83/go-md2man/v2/md2man is missing. (Package is required by github.com/urfave/cli (from gitlab.com/anycompany/forks/cli.git)@test.)
v1: Could not introduce github.com/cpuguy83/go-md2man@v1, as its subpackage github.com/cpuguy83/go-md2man/v2/md2man is missing. (Package is required by github.com/urfave/cli (from gitlab.com/anycompany/forks/cli.git)@test.)
master: Could not introduce github.com/cpuguy83/go-md2man@master, as its subpackage github.com/cpuguy83/go-md2man/v2/md2man is missing. (Package is required by github.com/urfave/cli (from gitlab.com/anycompany/forks/cli.git)@test.)
6_fix_char_escaping: Could not introduce github.com/cpuguy83/go-md2man@6_fix_char_escaping, as its subpackage github.com/cpuguy83/go-md2man/v2/md2man is missing. (Package is required by github.com/urfave/cli (from gitlab.com/anycompany/forks/cli.git)@test.)
fix_rawhtml: Could not introduce github.com/cpuguy83/go-md2man@fix_rawhtml, as its subpackage github.com/cpuguy83/go-md2man/v2/md2man is missing. (Package is required by github.com/urfave/cli (from gitlab.com/anycompany/forks/cli.git)@test.)
release-1.0: Could not introduce github.com/cpuguy83/[email protected], as its subpackage github.com/cpuguy83/go-md2man/v2/md2man is missing. (Package is required by github.com/urfave/cli (from gitlab.com/anycompany/forks/cli.git)@test.)
This error can be traced back to the go-md2man package which unfortunately only supports go modules. You can still continue to use v1.22.0 though. If you want to upgrade to the newer versions, I would highly recommend migrating to go modules.
Okay, thanks !
Most helpful comment
To fix that i find in https://github.com/spf13/cobra/issues/917#issuecomment-518857368
Add in toml