Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Package import with go get gonum.org/v1/plot/... is broken — 404 returned. #397

Open
denisbrodbeck opened this issue Oct 25, 2017 · 6 comments

Comments

@denisbrodbeck
Copy link

I am unable to import this project with go get or dep, which never failed me before.

Call to Parsing meta tags from https://gonum.org/v1/plot?go-get=1 (status code 404) fails.
The page https://www.gonum.org/v1/plot?go-get=1 returns Page not found.

Output:

$ go get -v gonum.org/v1/plot/...

Fetching https://gonum.org/v1/plot?go-get=1
Parsing meta tags from https://gonum.org/v1/plot?go-get=1 (status code 404)
get "gonum.org/v1/plot": found meta tag get.metaImport{Prefix:"gonum.org/v1/plot", VCS:"git", RepoRoot:"https://github.com/gonum/plot"} at https://gonum.org/v1/plot?go-get=1
gonum.org/v1/plot (download)
Fetching https://gonum.org/v1/plot/vg?go-get=1
Parsing meta tags from https://gonum.org/v1/plot/vg?go-get=1 (status code 404)
get "gonum.org/v1/plot/vg": found meta tag get.metaImport{Prefix:"gonum.org/v1/plot", VCS:"git", RepoRoot:"https://github.com/gonum/plot"} at https://gonum.org/v1/plot/vg?go-get=1
get "gonum.org/v1/plot/vg": verifying non-authoritative meta tag
Fetching https://gonum.org/v1/plot?go-get=1
Parsing meta tags from https://gonum.org/v1/plot?go-get=1 (status code 404)
github.com/golang/freetype (download)
Fetching https://golang.org/x/image/math/fixed?go-get=1
Parsing meta tags from https://golang.org/x/image/math/fixed?go-get=1 (status code 200)
get "golang.org/x/image/math/fixed": found meta tag get.metaImport{Prefix:"golang.org/x/image", VCS:"git", RepoRoot:"https://go.googlesource.com/image"} at https://golang.org/x/image/math/fixed?go-get=1
get "golang.org/x/image/math/fixed": verifying non-authoritative meta tag
Fetching https://golang.org/x/image?go-get=1
Parsing meta tags from https://golang.org/x/image?go-get=1 (status code 200)
golang.org/x/image (download)
Fetching https://golang.org/x/image/font?go-get=1
Parsing meta tags from https://golang.org/x/image/font?go-get=1 (status code 200)
get "golang.org/x/image/font": found meta tag get.metaImport{Prefix:"golang.org/x/image", VCS:"git", RepoRoot:"https://go.googlesource.com/image"} at https://golang.org/x/image/font?go-get=1
get "golang.org/x/image/font": verifying non-authoritative meta tag
Fetching https://gonum.org/v1/plot/vg/fonts?go-get=1
Parsing meta tags from https://gonum.org/v1/plot/vg/fonts?go-get=1 (status code 404)
get "gonum.org/v1/plot/vg/fonts": found meta tag get.metaImport{Prefix:"gonum.org/v1/plot", VCS:"git", RepoRoot:"https://github.com/gonum/plot"} at https://gonum.org/v1/plot/vg/fonts?go-get=1
get "gonum.org/v1/plot/vg/fonts": verifying non-authoritative meta tag
Fetching https://gonum.org/v1/plot/vg/draw?go-get=1
Parsing meta tags from https://gonum.org/v1/plot/vg/draw?go-get=1 (status code 404)
get "gonum.org/v1/plot/vg/draw": found meta tag get.metaImport{Prefix:"gonum.org/v1/plot", VCS:"git", RepoRoot:"https://github.com/gonum/plot"} at https://gonum.org/v1/plot/vg/draw?go-get=1
get "gonum.org/v1/plot/vg/draw": verifying non-authoritative meta tag
Fetching https://gonum.org/v1/plot/vg/vgeps?go-get=1
Parsing meta tags from https://gonum.org/v1/plot/vg/vgeps?go-get=1 (status code 404)
get "gonum.org/v1/plot/vg/vgeps": found meta tag get.metaImport{Prefix:"gonum.org/v1/plot", VCS:"git", RepoRoot:"https://github.com/gonum/plot"} at https://gonum.org/v1/plot/vg/vgeps?go-get=1
get "gonum.org/v1/plot/vg/vgeps": verifying non-authoritative meta tag
Fetching https://gonum.org/v1/plot/vg/vgimg?go-get=1
Parsing meta tags from https://gonum.org/v1/plot/vg/vgimg?go-get=1 (status code 404)
get "gonum.org/v1/plot/vg/vgimg": found meta tag get.metaImport{Prefix:"gonum.org/v1/plot", VCS:"git", RepoRoot:"https://github.com/gonum/plot"} at https://gonum.org/v1/plot/vg/vgimg?go-get=1
get "gonum.org/v1/plot/vg/vgimg": verifying non-authoritative meta tag
github.com/llgcode/draw2d (download)
Fetching https://golang.org/x/image/draw?go-get=1
Parsing meta tags from https://golang.org/x/image/draw?go-get=1 (status code 200)
get "golang.org/x/image/draw": found meta tag get.metaImport{Prefix:"golang.org/x/image", VCS:"git", RepoRoot:"https://go.googlesource.com/image"} at https://golang.org/x/image/draw?go-get=1
get "golang.org/x/image/draw": verifying non-authoritative meta tag
Fetching https://golang.org/x/image/math/f64?go-get=1
Parsing meta tags from https://golang.org/x/image/math/f64?go-get=1 (status code 200)
get "golang.org/x/image/math/f64": found meta tag get.metaImport{Prefix:"golang.org/x/image", VCS:"git", RepoRoot:"https://go.googlesource.com/image"} at https://golang.org/x/image/math/f64?go-get=1
get "golang.org/x/image/math/f64": verifying non-authoritative meta tag
Fetching https://golang.org/x/image/tiff?go-get=1
Parsing meta tags from https://golang.org/x/image/tiff?go-get=1 (status code 200)
get "golang.org/x/image/tiff": found meta tag get.metaImport{Prefix:"golang.org/x/image", VCS:"git", RepoRoot:"https://go.googlesource.com/image"} at https://golang.org/x/image/tiff?go-get=1
get "golang.org/x/image/tiff": verifying non-authoritative meta tag
Fetching https://golang.org/x/image/tiff/lzw?go-get=1
Parsing meta tags from https://golang.org/x/image/tiff/lzw?go-get=1 (status code 200)
get "golang.org/x/image/tiff/lzw": found meta tag get.metaImport{Prefix:"golang.org/x/image", VCS:"git", RepoRoot:"https://go.googlesource.com/image"} at https://golang.org/x/image/tiff/lzw?go-get=1
get "golang.org/x/image/tiff/lzw": verifying non-authoritative meta tag
Fetching https://gonum.org/v1/plot/vg/vgpdf?go-get=1
Parsing meta tags from https://gonum.org/v1/plot/vg/vgpdf?go-get=1 (status code 404)
get "gonum.org/v1/plot/vg/vgpdf": found meta tag get.metaImport{Prefix:"gonum.org/v1/plot", VCS:"git", RepoRoot:"https://github.com/gonum/plot"} at https://gonum.org/v1/plot/vg/vgpdf?go-get=1
get "gonum.org/v1/plot/vg/vgpdf": verifying non-authoritative meta tag
bitbucket.org/zombiezen/gopdf (download)
go: missing Mercurial command. See https://golang.org/s/gogetcmd
package gonum.org/v1/plot
	imports bitbucket.org/zombiezen/gopdf/pdf: exec: "hg": executable file not found in $PATH
Fetching https://gonum.org/v1/plot/vg/vgsvg?go-get=1
Parsing meta tags from https://gonum.org/v1/plot/vg/vgsvg?go-get=1 (status code 404)
get "gonum.org/v1/plot/vg/vgsvg": found meta tag get.metaImport{Prefix:"gonum.org/v1/plot", VCS:"git", RepoRoot:"https://github.com/gonum/plot"} at https://gonum.org/v1/plot/vg/vgsvg?go-get=1
get "gonum.org/v1/plot/vg/vgsvg": verifying non-authoritative meta tag
github.com/ajstarks/svgo (download)
Fetching https://gonum.org/v1/plot?go-get=1
Parsing meta tags from https://gonum.org/v1/plot?go-get=1 (status code 404)
get "gonum.org/v1/plot": found meta tag get.metaImport{Prefix:"gonum.org/v1/plot", VCS:"git", RepoRoot:"https://github.com/gonum/plot"} at https://gonum.org/v1/plot?go-get=1
Fetching https://gonum.org/v1/plot/plotter?go-get=1
Parsing meta tags from https://gonum.org/v1/plot/plotter?go-get=1 (status code 404)
get "gonum.org/v1/plot/plotter": found meta tag get.metaImport{Prefix:"gonum.org/v1/plot", VCS:"git", RepoRoot:"https://github.com/gonum/plot"} at https://gonum.org/v1/plot/plotter?go-get=1
get "gonum.org/v1/plot/plotter": verifying non-authoritative meta tag
Fetching https://gonum.org/v1/plot/palette?go-get=1
Parsing meta tags from https://gonum.org/v1/plot/palette?go-get=1 (status code 404)
get "gonum.org/v1/plot/palette": found meta tag get.metaImport{Prefix:"gonum.org/v1/plot", VCS:"git", RepoRoot:"https://github.com/gonum/plot"} at https://gonum.org/v1/plot/palette?go-get=1
get "gonum.org/v1/plot/palette": verifying non-authoritative meta tag
Fetching https://gonum.org/v1/plot/tools/bezier?go-get=1
Parsing meta tags from https://gonum.org/v1/plot/tools/bezier?go-get=1 (status code 404)
get "gonum.org/v1/plot/tools/bezier": found meta tag get.metaImport{Prefix:"gonum.org/v1/plot", VCS:"git", RepoRoot:"https://github.com/gonum/plot"} at https://gonum.org/v1/plot/tools/bezier?go-get=1
get "gonum.org/v1/plot/tools/bezier": verifying non-authoritative meta tag
Fetching https://rsc.io/pdf?go-get=1
Parsing meta tags from https://rsc.io/pdf?go-get=1 (status code 200)
get "rsc.io/pdf": found meta tag get.metaImport{Prefix:"rsc.io/pdf", VCS:"git", RepoRoot:"https://github.com/rsc/pdf"} at https://rsc.io/pdf?go-get=1
rsc.io/pdf (download)
@kortschak
Copy link
Member

kortschak commented Oct 25, 2017

I just tried this here in a clean GOPATH and it works (it complains with 404's and probably shouldn't, @btracey), but it still downloads and builds (you can see that it downloads since otherwise it wouldn't pull the dependencies in your pasted output).

Your paste does miss the bitbucket.org/zombiezen/gopdf dep, but that's because you don't have hg installed. Can you try this again after installing mercurial?

@denisbrodbeck
Copy link
Author

Oh no, how embarrassing:confounded: Cleaned up GOPATH and installed mercurial and now it works.

Both dep init -v and go get -v gonum.org/v1/plot/... ran through without issues. Two hours ago dep init -v got stuck for minutes multiple times at (1) try gonum.org/v1/plot@master.

go get -v gonum.org/v1/plot/... showed 404s and exited non-zero and I somehow overlooked the failed hg dependency.

I've done some testing with a fresh Ubuntu 16.04 VM.
When mercurial is not installed, dep init hangs at this position:

$ dep init -v

Getting direct dependencies...
Checked 1 directories for packages.
Found 1 direct dependencies.
Root project is "github.com/denisbrodbeck/entro"
 1 transitively valid internal packages
 1 external packages imported from 1 projects
(0)   ✓ select (root)
(1)	? attempt gonum.org/v1/plot with 1 pkgs; 4 versions to try
(1)	    try gonum.org/v1/plot@master

When mercurial is installed, dep runs through.

$ dep init -v

Getting direct dependencies...
Checked 4 directories for packages.
Found 1 direct dependencies.
Root project is "github.com/denisbrodbeck/entro"
 3 transitively valid internal packages
 1 external packages imported from 1 projects
(0)   ✓ select (root)
(1)	? attempt gonum.org/v1/plot with 1 pkgs; 4 versions to try
(1)	    try gonum.org/v1/plot@master
(1)	✓ select gonum.org/v1/plot@master w/8 pkgs
(2)	? attempt golang.org/x/image with 2 pkgs; 1 versions to try
(2)	    try golang.org/x/image@master
(2)	✓ select golang.org/x/image@master w/3 pkgs
(3)	? attempt github.com/golang/freetype with 2 pkgs; 3 versions to try
(3)	    try github.com/golang/freetype@master
(3)	✓ select github.com/golang/freetype@master w/3 pkgs
(4)	? revisit golang.org/x/image to add 1 pkgs
(4)	  ✓ include 2 more pkgs from golang.org/x/image@master
(4)	? attempt bitbucket.org/zombiezen/gopdf with 1 pkgs; 6 versions to try
(5)	    try bitbucket.org/zombiezen/gopdf@default
(5)	✓ select bitbucket.org/zombiezen/gopdf@default w/1 pkgs
(5)	? attempt github.com/llgcode/draw2d with 2 pkgs; 5 versions to try
(6)	    try github.com/llgcode/draw2d@master
(6)	✓ select github.com/llgcode/draw2d@master w/3 pkgs
(6)	? revisit golang.org/x/image to add 2 pkgs
(7)	  ✓ include 2 more pkgs from golang.org/x/image@master
(6)	? attempt github.com/ajstarks/svgo with 1 pkgs; 9 versions to try
(8)	    try github.com/ajstarks/svgo@master
(8)	✓ select github.com/ajstarks/svgo@master w/1 pkgs
(7)	? revisit github.com/golang/freetype to add 1 pkgs
(9)	  ✓ include 1 more pkgs from github.com/golang/freetype@master
  ✓ found solution with 22 packages from 6 projects

Solver wall times by segment:
     b-source-exists: 16.637893064s
     b-list-versions:  9.386182938s
         b-list-pkgs:  541.701378ms
              b-gmal:  374.514969ms
  b-deduce-proj-root:  275.168535ms
         select-atom:    4.245835ms
            new-atom:    2.256841ms
             satisfy:    2.161001ms
         select-root:     180.629µs
            add-atom:      22.268µs
               other:      21.778µs

  TOTAL: 27.224349236s

  Using master as constraint for direct dep gonum.org/v1/plot
  Locking in master (def97c8) for direct dep gonum.org/v1/plot
  Locking in master (f7e31b4) for transitive dep golang.org/x/image
  Locking in master (e2365df) for transitive dep github.com/golang/freetype
  Locking in default (1c63dc6) for transitive dep bitbucket.org/zombiezen/gopdf
  Locking in master (dcbfbe5) for transitive dep github.com/llgcode/draw2d
  Locking in master (ac87889) for transitive dep github.com/ajstarks/svgo
(1/6) Wrote github.com/golang/freetype@master
(2/6) Wrote github.com/ajstarks/svgo@master
(3/6) Wrote github.com/llgcode/draw2d@master
(4/6) Wrote gonum.org/v1/plot@master
(5/6) Wrote golang.org/x/image@master
(6/6) Wrote bitbucket.org/zombiezen/gopdf@default

I guess, I'll open an issue at dep.

@kortschak Thank you for your quick reply and sorry for any inconvenience. It would be great, if your project README would include some hint, that the user needs mercurial installed, or installation might fail (creating a PR right now).

@kortschak
Copy link
Member

With any luck mercurial will not be required in the near future (#389), but in the Go ecosystem, it pays to have mercurial installed since there is a history there (Go was previously distributed via mercurial).

@btracey
Copy link
Member

btracey commented Oct 25, 2017

Could you open an issue on the website with what the behavior should be? The page doesn't exist, so I would expect a 404

@denisbrodbeck
Copy link
Author

Hmm, IMO it's just a minor issue. I've looked up the go get documentation and in the end go get handles this rather clever.

Given the output:

Parsing meta tags from https://gonum.org/v1/plot?go-get=1 (status code 404)
get "gonum.org/v1/plot": found meta tag get.metaImport{Prefix:"gonum.org/v1/plot", VCS:"git", RepoRoot:"https://github.com/gonum/plot"} at https://gonum.org/v1/plot?go-get=1
gonum.org/v1/plot (download)

We can see, that go get still searches and finds the meta tag in the doc header, even when the server returns a 404.

One could get rid of the 404s, if there's an actual hugo page behind the path /v1/plot/. The ?go-get=1 part shouldn't cause issues.
I suppose, something like hugo new v1/plot.md (without actual content) might suffice.

Maybe for all top level import paths:

hugo new v1/gonum.md
hugo new v1/plot.md
hugo new v1/netlib.md
hugo new v1/hdf5.md

and for each md:

+++
title = "gonum"
date = "2017-10-26T00:00:00"
selected = false
highlight = false
math = false
+++

@kortschak
Copy link
Member

Others return a refresh to godoc, e.g.

~ $ curl golang.org/x/tools
<!DOCTYPE html>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
<meta name="go-import" content="golang.org/x/tools git https://go.googlesource.com/tools">
<meta name="go-source" content="golang.org/x/tools https://github.com/golang/tools/ https://github.com/golang/tools/tree/master{/dir} https://github.com/golang/tools/blob/master{/dir}/{file}#L{line}">
<meta http-equiv="refresh" content="0; url=https://godoc.org/golang.org/x/tools">
</head>
<body>
Nothing to see here; <a href="https://godoc.org/golang.org/x/tools">move along</a>.
</body>
</html>

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants