FDio / govpp

Go toolset for the VPP.
Apache License 2.0
183 stars 81 forks source link

Fix import for extras in go.mod file #207

Open dwallacelf opened 2 months ago

dwallacelf commented 2 months ago

When I attempt to add the two references to a go.mod file

go.fd.io/govpp.git v0.8.0
go.fd.io/govpp.git/extras v0.1.0

and then I run go mod tidy, I get this error a lot:

git.fd.io/govpp.git: go.fd.io/govpp.git@v0.8.0: no secure protocol found for repository
git.fd.io/govpp.git/binapi/memif: go.fd.io/govpp.git@v0.8.0: no secure protocol found for repository

What should I be adding to go.mod so that I can use libmemif and govpp. I also tried to use github.com/FDio/govpp but go mod hates that even more.


Originally posted by @Sophrinix in https://github.com/FDio/govpp/issues/122#issuecomment-1870711347

ondrej-fabry commented 1 month ago

Here is a link to a closed issue where this has been addresses previously: https://github.com/FDio/govpp/issues/111

ondrej-fabry commented 1 month ago

@Sophrinix Need more information to be able to help you, as I'm not really sure what is happening here, but the error no secure protocol found for repository seems unrelated to extras actually.

ℹ️ Can you provide the following information?

ondrej-fabry commented 1 month ago

There actually is issue with importing GoVPP's extras go module, but the problem does not show any erorr like you are seeing.

It short, you have to use GOPROXY=direct, because the data in the proxy is invalid.

➤ go list -json -m -versions go.fd.io/govpp/extras@v0.1.0
{
    "Path": "go.fd.io/govpp/extras",
    "Version": "v0.1.0",
    "Versions": [
        "v0.6.0-alpha",
        "v0.6.0",
        "v0.7.0",
        "v0.8.0-alpha",
        "v0.10.0"
    ],
    "Time": "2019-07-03T15:00:28Z",
    "Dir": "/home/ondrej/go/pkg/mod/go.fd.io/govpp/extras@v0.1.0",
    "GoMod": "/home/ondrej/go/pkg/mod/cache/download/go.fd.io/govpp/extras/@v/v0.1.0.mod",
    "GoVersion": "1.18",
    "Origin": {
        "VCS": "git",
        "URL": "https://github.com/FDio/govpp",
        "Ref": "refs/tags/v0.1.0",
        "Hash": "b1006dced4cc0c23d9dc754e97d89500aeb55170"
    }
}
➤ GOPROXY=direct go list -json -m -versions go.fd.io/govpp/extras@v0.1.0
{
    "Path": "go.fd.io/govpp/extras",
    "Version": "v0.1.0",
    "Versions": [
        "v0.1.0"
    ],
    "Time": "2019-07-03T15:00:28Z",
    "Dir": "/home/ondrej/go/pkg/mod/go.fd.io/govpp/extras@v0.1.0",
    "GoMod": "/home/ondrej/go/pkg/mod/cache/download/go.fd.io/govpp/extras/@v/v0.1.0.mod",
    "GoVersion": "1.18",
    "Origin": {
        "VCS": "git",
        "URL": "https://github.com/FDio/govpp",
        "TagPrefix": "extras/",
        "TagSum": "t1:x7xgAj5aeOC+DZu5HLiZUY3DgMQA9RRScS5l/36Vcls=",
        "Ref": "refs/tags/v0.1.0",
        "Hash": "b1006dced4cc0c23d9dc754e97d89500aeb55170"
    }
}