Skip to content
This repository was archived by the owner on Sep 9, 2020. It is now read-only.

dep crush on status -dot #669

Closed
gregory-m opened this issue May 28, 2017 · 5 comments · Fixed by #837
Closed

dep crush on status -dot #669

gregory-m opened this issue May 28, 2017 · 5 comments · Fixed by #837

Comments

@gregory-m
Copy link
Contributor

In case status can't output version see #664

dep status -dot panics:

panic: runtime error: invalid memory address or nil pointer dereference
[signal SIGSEGV: segmentation violation code=0x1 addr=0x48 pc=0x13b757e]

goroutine 1 [running]:
main.(*dotOutput).BasicLine(0xc420199ce0, 0xc4201b61c0)
	/Users/gregory/Documents/gospace/src/github.com/golang/dep/cmd/dep/status.go:177 +0x2e
main.runStatusAll(0xc42013b9c0, 0x1680c00, 0xc420199ce0, 0xc420135080, 0x1682280, 0xc42001df80, 0x0, 0x1)
	/Users/gregory/Documents/gospace/src/github.com/golang/dep/cmd/dep/status.go:359 +0x8a4
main.(*statusCommand).Run(0xc420134d20, 0xc42013d9c0, 0xc4200102f0, 0x0, 0x0, 0x0, 0x0)
	/Users/gregory/Documents/gospace/src/github.com/golang/dep/cmd/dep/status.go:218 +0x1f2
main.(*Config).Run(0xc42001cfc0, 0xc42001cfc0)
	/Users/gregory/Documents/gospace/src/github.com/golang/dep/cmd/dep/main.go:161 +0x8e3
main.main()
	/Users/gregory/Documents/gospace/src/github.com/golang/dep/cmd/dep/main.go:44 +0x253
@darkowlzz
Copy link
Collaborator

@gregory-m thanks for reporting.

Adding some more info:
I'm able to reproduce it by editing manifest and running ensure, same steps as in #664 .
-dot works fine before any manual changes to manifest. Panics after changing and running ensure.

@gregory-m
Copy link
Contributor Author

I think it good idea to check if version is not null.
Any objections?

@darkowlzz
Copy link
Collaborator

@gregory-m yeah, checking for version to be nil and falling back to revision should be good.

Also, when we use revision, maybe we should shorten the revision, at least for the git rev hashes?
Because this
screen shot 2017-05-28 at 4 22 01 pm
would look weird and I don't think people would use the full rev hash from the image.

screen shot 2017-05-28 at 4 26 57 pm
IMO, this looks much better.

@sdboyer @carolynvs opinions?

@sdboyer
Copy link
Member

sdboyer commented May 29, 2017

Yep, shortening would be ideal. Looks like we have the formatVersion() func to do that.

@gregory-m
Copy link
Contributor Author

Ok, I will do it.

DDRBoxman added a commit to DDRBoxman/dep that referenced this issue Jul 16, 2017
DDRBoxman added a commit to DDRBoxman/dep that referenced this issue Jul 18, 2017
DDRBoxman added a commit to DDRBoxman/dep that referenced this issue Jul 18, 2017
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants