goviz icon indicating copy to clipboard operation
goviz copied to clipboard

Fix silent failure when using Go 1.6+

Open richardwilkes opened this issue 8 years ago • 15 comments

This fixes issue #6

richardwilkes avatar Jul 28 '16 04:07 richardwilkes

This fixed the tool for me too, using go 1.5.3. Thanks! :)

miknie avatar Aug 28 '16 20:08 miknie

Just for reference: this has nothing to do with the Go version – the error comes from the go-flags library and the specific commit that makes goviz segfault upon start was jessevdk/go-flags@7f2ab82552ae1b12e070838918ac056507c0f114 (merged on Feb 27, 2016). We should vendor the few dependencies that goviz has (I can do that if @hirokidaichi wants that).

Nevertheless, this PR should be merged immediately. :)

annismckenzie avatar Sep 03 '16 11:09 annismckenzie

This fixed the tool for me as well. Thanks!

bensooter avatar Sep 07 '16 16:09 bensooter

Thanks @hirokidaichi for this beautiful tool -- and @richardwilkes for this fix.

Works for me. go version go1.7.1 darwin/amd64

nathany avatar Oct 03 '16 20:10 nathany

Thanks @richardwilkes. Until this is merged, I'm installing a patched version of Goviz as follows:

mkdir -p ${GOPATH}/src/github.com/hirokidaichi/goviz
git clone [email protected]:RobotsAndPencils/goviz.git ${GOPATH}/src/github.com/hirokidaichi/goviz -o fork
go install github.com/hirokidaichi/goviz

UPDATE: that doesn't grab dependencies of goviz though, so I'm going to just rewrite import paths to make it simpler:

go get -u github.com/RobotsAndPencils/goviz

(I may merge some of the other pull requests there as well)

nathany avatar Oct 05 '16 21:10 nathany

Thanks for that patch @nathany, it worked for me. 👍

carlisia avatar Oct 16 '16 18:10 carlisia

Mh, this still doesn't work. I keep getting inputdir does not exist.

adrianbrink avatar Mar 22 '17 22:03 adrianbrink

Feel free to use my fork until this gets reviewed/merged. go get -u github.com/RobotsAndPencils/goviz

nathany avatar Mar 23 '17 17:03 nathany

Thank you for the fork @nathany (and for the original fix @richardwilkes)!

aseemk avatar Apr 26 '17 12:04 aseemk

@adrianbrink not sure if this is by design, but try doing a go get [whatever] before running the full command.

➜  go goviz -i github.com/lestrrat/go-xslate | dot -Tpng -o xslate.png
inputdir does not exist.
 go get github.com/lestrrat/go-xslate%                                                                                                                                                                      ➜  go go get github.com/lestrrat/go-xslate
➜  go goviz -i github.com/lestrrat/go-xslate | dot -Tpng -o xslate.png
➜  go ls
bin        pkg        src        tutorial   xslate.png

emcniece avatar Oct 03 '17 03:10 emcniece

Without this patch goviz prints nothing. With this patch, things work fine.

jmrodri avatar Mar 12 '18 03:03 jmrodri

The value I give to -i has to be a package name, not a path. So setting your GOPATH env var properly should resolve your "inputdir does not exist" issue

iselind avatar May 22 '18 11:05 iselind

Great tool @hirokidaichi. Thanks @richardwilkes for fix and @nathany it works great.

I did run into inputdir does not exist. but that was my bad cos I was prepending src/to the package path.

Just a note if people run into this, I ran the command from $GOPATH; -i option should have package path (e.g., github.com///). This path should be hand-typed and terminal will not auto complete.

praneethpatil avatar Jun 28 '18 16:06 praneethpatil

Seems there's no update. May @hirokidaichi merge this please?

Issue #12 is still active and should be definitively resolved with this! :+1:

bLuka avatar Sep 25 '18 08:09 bLuka

This fixes issue #6

This really fixes the issue! go1.11.2 Thank you very much!

zverevm avatar Feb 08 '19 15:02 zverevm