nix-community / vgo2nix

Convert go.mod files to nixpkgs buildGoPackage compatible deps.nix files [maintainer=@adisbladis]
MIT License
90 stars 21 forks source link

can't fetch all mtail dependencies #31

Closed bbigras closed 4 years ago

bbigras commented 4 years ago

vgo2nix-unstable-2019-02-06

git clone https://github.com/google/mtail.git
cd mtail
vgo2nix
[...]
Fetching contrib.go.opencensus.io/exporter/jaeger
panic: Error processing import path "dmitri.shuralyov.com/gpu/mtl": unrecognized import path "dmitri.shuralyov.com/gpu/mtl"

EDIT: If I use -keep-going I get more errors:

95:Encountered error: Error processing import path "dmitri.shuralyov.com/gpu/mtl": unrecognized import path "dmitri.shuralyov.com/gpu/mtl"
102:Encountered error: Error processing import path "cloud.google.com/go/storage": exit status 1
104:Encountered error: Error processing import path "cloud.google.com/go/bigquery": exit status 1
106:Encountered error: Error processing import path "cloud.google.com/go/pubsub": exit status 1
108:Encountered error: Error processing import path "cloud.google.com/go/datastore": exit status 1
bbigras commented 4 years ago

My bad I didn't do something correctly. Sorry. It's been a while that I didn't play with Go.

bbigras commented 4 years ago

oh wait I still have the problem but only for the v3.0.0-rc34 tag. not master.

ghost commented 4 years ago

The same error is now showing up with the new GitLab update.

infinisil commented 4 years ago

I tracked this down to this problem:

package main

import (
    "fmt"
    "golang.org/x/tools/go/vcs"
)

func main() {
    repoRootDynamic, err := vcs.RepoRootForImportDynamic(
        "dmitri.shuralyov.com/gpu/mtl",
        true)
    if err != nil {
        fmt.Println(fmt.Sprintf("RepoRootForImportDynamic Error %s", err))
    } else {
        fmt.Println(fmt.Sprintf("RepoRootForImportDynamic Success %s", repoRootDynamic))
    }
}

Running this gives

RepoRootForImportDynamic Error
  parse https://dmitri.shuralyov.com/gpu/mtl?go-get=1:
  multiple meta tags match import path "dmitri.shuralyov.com/gpu/mtl"

The contents of that URL are

<meta name="go-import" content="dmitri.shuralyov.com/gpu/mtl git https://dmitri.shuralyov.com/gpu/mtl">
<meta name="go-import" content="dmitri.shuralyov.com/gpu/mtl mod https://dmitri.shuralyov.com/api/module">
<meta name="go-source" content="dmitri.shuralyov.com/gpu/mtl https://dmitri.shuralyov.com/gpu/mtl https://gotools.org/dmitri.shuralyov.com/gpu/mtl https://gotools.org/dmitri.shuralyov.com/gpu/mtl#{file}-L{line}">

@dmitshur Do you have any idea about why this is happening?

dmitshur commented 4 years ago

@Infinisil Yes. I think you must've tested with a very old version of the golang.org/x/tools/go/vcs package. This was issue golang/go#31845, and it was fixed on May 6, 2019.

I see that the golang.org/x/tools module was updated from a 2-year-old version to a newer one in PR #37 11 days ago, so I suspect this problem is resolved now.

Mic92 commented 4 years ago

@bbigras Let me know if this is still an issue.