Skip to content

Instantly share code, notes, and snippets.

@jwieringa
Created May 6, 2019 18:53
Show Gist options
  • Save jwieringa/67c78c85c43eac0c1685cdd8ff971d04 to your computer and use it in GitHub Desktop.
Save jwieringa/67c78c85c43eac0c1685cdd8ff971d04 to your computer and use it in GitHub Desktop.
Learning why gonum is bumped to latest

Working off from LDA project on RadiusNetworks/lda#7

What I expect:

  • The go get command sets gonum version in go.mod to gonum revision
  • Running the tests succeed

What I observe:

  • The @revision of go get is ignored
  • The latest version is fetched setting the revision to the last commit on master
  • go test fails
    # github.com/RadiusNetworks/lda [github.com/RadiusNetworks/lda.test]
    ./lda.go:164:20: too many arguments in call to ld.eigen.Factorize
        have (*mat.Dense, bool, bool)
        want (mat.Matrix, mat.EigenKind)
    

Obtained results by executing go get.

$ go get gonum.org/v1/gonum@73ea1e732937f96d723d31dc5263d214a275d204
go: finding gonum.org/v1/gonum latest

Git diff after go get.

diff --git a/go.mod b/go.mod
index 3be6763..454fd54 100644
--- a/go.mod
+++ b/go.mod
@@ -3,6 +3,11 @@ module github.com/RadiusNetworks/lda
 go 1.12

 require (
-       gonum.org/v1/gonum v0.0.0-20180816165407-929014505bf4
-       gonum.org/v1/plot v0.0.0-20190410204940-3a5f52653745
+       github.com/ajstarks/svgo v0.0.0-20180226025133-644b8db467af // indirect
+       github.com/fogleman/gg v1.2.1-0.20190220221249-0403632d5b90 // indirect
+       github.com/golang/freetype v0.0.0-20170609003504-e2365dfdc4a0 // indirect
+       github.com/jung-kurt/gofpdf v1.0.3-0.20190309125859-24315acbbda5 // indirect
+       golang.org/x/image v0.0.0-20180708004352-c73c2afc3b81 // indirect
+       gonum.org/v1/gonum v0.0.0-20190502212712-4a2eb0188cbc
+       rsc.io/pdf v0.1.1 // indirect
 )
diff --git a/go.sum b/go.sum
index 99fd0d0..01db5c5 100644
--- a/go.sum
+++ b/go.sum
@@ -19,6 +19,8 @@ gonum.org/v1/gonum v0.0.0-20180816165407-929014505bf4 h1:nYxTaCPaVoJbxx+vMVnsFb6
 gonum.org/v1/gonum v0.0.0-20180816165407-929014505bf4/go.mod h1:Y+Yx5eoAFn32cQvJDxZx5Dpnq+c3wtXuadVZAcxbbBo=
 gonum.org/v1/gonum v0.0.0-20190430210020-9827ae2933ff h1:PSmLTFCI0KBBLcaxSbM8ejKR6f7XuDyQS3R8t72ailE=
 gonum.org/v1/gonum v0.0.0-20190430210020-9827ae2933ff/go.mod h1:2ltnJ7xHfj0zHS40VVPYEAAMTa3ZGguvHGBSJeRWqE0=
+gonum.org/v1/gonum v0.0.0-20190502212712-4a2eb0188cbc h1:+c7TChc7Bi9WFPyWzDxu8mnEhA29YW/0NBDy4V24exU=
+gonum.org/v1/gonum v0.0.0-20190502212712-4a2eb0188cbc/go.mod h1:2ltnJ7xHfj0zHS40VVPYEAAMTa3ZGguvHGBSJeRWqE0=
 gonum.org/v1/netlib v0.0.0-20190313105609-8cb42192e0e0/go.mod h1:wa6Ws7BG/ESfp6dHfk7C6KdzKA7wR7u/rKwOGE66zvw=
 gonum.org/v1/plot v0.0.0-20190410204940-3a5f52653745 h1:Xaq5xR1I2KM/MWp1vwZxOosUPa1U8wtNN8zRbVko0ZY=
 gonum.org/v1/plot v0.0.0-20190410204940-3a5f52653745/go.mod h1:Wt8AAjI+ypCyYX3nZBvf6cAIx93T+c/OS2HFAYskSZc=
@jwieringa
Copy link
Author

jwieringa commented May 6, 2019

Running go mod why

Updates to the latest package, I did not expect this.

$ go mod why gonum.org/v1/gonum
go: finding gonum.org/v1/gonum latest
go: downloading gonum.org/v1/gonum v0.0.0-20190506115330-fb5cd163d924
go: extracting gonum.org/v1/gonum v0.0.0-20190506115330-fb5cd163d924
# gonum.org/v1/gonum
(main module does not need package gonum.org/v1/gonum)
diff --git a/go.mod b/go.mod
index 3be6763..f27deee 100644
--- a/go.mod
+++ b/go.mod
@@ -3,6 +3,6 @@ module github.com/RadiusNetworks/lda
 go 1.12

 require (
-       gonum.org/v1/gonum v0.0.0-20180816165407-929014505bf4
+       gonum.org/v1/gonum v0.0.0-20190506115330-fb5cd163d924
        gonum.org/v1/plot v0.0.0-20190410204940-3a5f52653745
 )
diff --git a/go.sum b/go.sum
index 99fd0d0..9ba59b3 100644
--- a/go.sum
+++ b/go.sum
@@ -8,6 +8,7 @@ github.com/jung-kurt/gofpdf v1.0.3-0.20190309125859-24315acbbda5 h1:PJr+ZMXIecYc
 github.com/jung-kurt/gofpdf v1.0.3-0.20190309125859-24315acbbda5/go.mod h1:7Id9E/uU8ce6rXgefFLlgrJj/GYY22cpxn+r32jIOes=
 golang.org/x/exp v0.0.0-20180321215751-8460e604b9de/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA=
 golang.org/x/exp v0.0.0-20180807140117-3d87b88a115f/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA=
+golang.org/x/exp v0.0.0-20190125153040-c74c464bbbf2 h1:y102fOLFqhV41b+4GPiJoa0k/x+pJcEi2/HB1Y5T6fU=
 golang.org/x/exp v0.0.0-20190125153040-c74c464bbbf2/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA=
 golang.org/x/image v0.0.0-20180708004352-c73c2afc3b81 h1:00VmoueYNlNz/aHIilyyQz/MHSqGoWJzpFv/HW8xpzI=
 golang.org/x/image v0.0.0-20180708004352-c73c2afc3b81/go.mod h1:ux5Hcp/YLpHSI86hEcLt0YII63i6oz57MZXIpbrjZUs=
@@ -19,7 +20,11 @@ gonum.org/v1/gonum v0.0.0-20180816165407-929014505bf4 h1:nYxTaCPaVoJbxx+vMVnsFb6
 gonum.org/v1/gonum v0.0.0-20180816165407-929014505bf4/go.mod h1:Y+Yx5eoAFn32cQvJDxZx5Dpnq+c3wtXuadVZAcxbbBo=
 gonum.org/v1/gonum v0.0.0-20190430210020-9827ae2933ff h1:PSmLTFCI0KBBLcaxSbM8ejKR6f7XuDyQS3R8t72ailE=
 gonum.org/v1/gonum v0.0.0-20190430210020-9827ae2933ff/go.mod h1:2ltnJ7xHfj0zHS40VVPYEAAMTa3ZGguvHGBSJeRWqE0=
+gonum.org/v1/gonum v0.0.0-20190506115330-fb5cd163d924 h1:1/Mj4p6Y8YC+tgloec1wwNQdqLy3DdHA0W1ysJfhyeU=
+gonum.org/v1/gonum v0.0.0-20190506115330-fb5cd163d924/go.mod h1:2ltnJ7xHfj0zHS40VVPYEAAMTa3ZGguvHGBSJeRWqE0=
+gonum.org/v1/netlib v0.0.0-20190313105609-8cb42192e0e0 h1:OE9mWmgKkjJyEmDAAtGMPjXu+YNeGvK9VTSHY6+Qihc=
 gonum.org/v1/netlib v0.0.0-20190313105609-8cb42192e0e0/go.mod h1:wa6Ws7BG/ESfp6dHfk7C6KdzKA7wR7u/rKwOGE66zvw=
 gonum.org/v1/plot v0.0.0-20190410204940-3a5f52653745 h1:Xaq5xR1I2KM/MWp1vwZxOosUPa1U8wtNN8zRbVko0ZY=
 gonum.org/v1/plot v0.0.0-20190410204940-3a5f52653745/go.mod h1:Wt8AAjI+ypCyYX3nZBvf6cAIx93T+c/OS2HFAYskSZc=
+rsc.io/pdf v0.1.1 h1:k1MczvYDUvJBe93bYd7wrZLLUEcLZAuF824/I4e5Xr4=
 rsc.io/pdf v0.1.1/go.mod h1:n8OzWcQ6Sp37PL01nO98y4iUCRdTGarVfzxY20ICaU4=

@jwieringa
Copy link
Author

jwieringa commented May 6, 2019

In #go-nuts on freenode

[12:07:21]  <Tv`>	jwieringa: maybe go get -v will show something relevant?

Appears this doesn't change anything, but going to take a closer look at the options.

$ go get -v
$ # no response
$ git diff
$ # no response

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment