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

cmd/go: output from go bug on a headless machine is very long #19263

Closed
broady opened this issue Feb 23, 2017 · 3 comments
Closed

cmd/go: output from go bug on a headless machine is very long #19263

broady opened this issue Feb 23, 2017 · 3 comments
Labels
FrozenDueToAge NeedsDecision Feedback is required from experts, contributors, and/or the community before a change can be made.
Milestone

Comments

@broady
Copy link
Contributor

broady commented Feb 23, 2017

The output from "go bug" on a headless system looks like this:

$ go bug
Please file a new issue at golang.org/issue/new using this template:

Please answer these questions before submitting your issue. Thanks!

#### What did you do?
If possible, provide a recipe for reproducing the error.
A complete runnable program is good.
A link on play.golang.org is best.


#### What did you expect to see?


#### What did you see instead?


#### Does this issue reproduce with the latest release (go1.8)?


#### System details

``
go version devel +bf1d5c230a Thu Feb 23 12:26:01 2017 -0800 linux/amd64
GOARCH="amd64"
GOBIN=""
GOEXE=""
GOHOSTARCH="amd64"
GOHOSTOS="linux"
GOOS="linux"
GOPATH="/usr/local/google/home/cbro"
GORACE=""
GOROOT="/usr/local/google/home/cbro/go"
GOTOOLDIR="/usr/local/google/home/cbro/go/pkg/tool/linux_amd64"
GCCGO="gccgo"
CC="gcc"
GOGCCFLAGS="-fPIC -m64 -pthread -fmessage-length=0 -fdebug-prefix-map=/tmp/go-build251963537=/tmp/go-build -gno-record-gcc-switches"
CXX="g++"
CGO_ENABLED="1"
CGO_CFLAGS="-g -O2"
CGO_CPPFLAGS=""
CGO_CXXFLAGS="-g -O2"
CGO_FFLAGS="-g -O2"
CGO_LDFLAGS="-g -O2"
PKG_CONFIG="pkg-config"
GOROOT/bin/go version: go version devel +bf1d5c230a Thu Feb 23 12:26:01 2017 -0800 linux/amd64
GOROOT/bin/go tool compile -V: compile version devel +bf1d5c230a Thu Feb 23 12:26:01 2017 -0800 X:framepointer
uname -sr: Linux 3.13.0-100-generic
LSB Version:	core-2.0-amd64:core-2.0-noarch:core-3.0-amd64:core-3.0-noarch:core-3.1-amd64:core-3.1-noarch:core-3.2-amd64:core-3.2-noarch:core-4.0-amd64:core-4.0-noarch:core-4.1-amd64:core-4.1-noarch:cxx-3.0-amd64:cxx-3.0-noarch:cxx-3.1-amd64:cxx-3.1-noarch:cxx-3.2-amd64:cxx-3.2-noarch:cxx-4.0-amd64:cxx-4.0-noarch:cxx-4.1-amd64:cxx-4.1-noarch:desktop-3.1-amd64:desktop-3.1-noarch:desktop-3.2-amd64:desktop-3.2-noarch:desktop-4.0-amd64:desktop-4.0-noarch:desktop-4.1-amd64:desktop-4.1-noarch:graphics-2.0-amd64:graphics-2.0-noarch:graphics-3.0-amd64:graphics-3.0-noarch:graphics-3.1-amd64:graphics-3.1-noarch:graphics-3.2-amd64:graphics-3.2-noarch:graphics-4.0-amd64:graphics-4.0-noarch:graphics-4.1-amd64:graphics-4.1-noarch:languages-3.2-amd64:languages-3.2-noarch:languages-4.0-amd64:languages-4.0-noarch:languages-4.1-amd64:languages-4.1-noarch:multimedia-3.2-amd64:multimedia-3.2-noarch:multimedia-4.0-amd64:multimedia-4.0-noarch:multimedia-4.1-amd64:multimedia-4.1-noarch:printing-3.2-amd64:printing-3.2-noarch:printing-4.0-amd64:printing-4.0-noarch:printing-4.1-amd64:printing-4.1-noarch:qt4-3.1-amd64:qt4-3.1-noarch:security-4.0-amd64:security-4.0-noarch:security-4.1-amd64:security-4.1-noarch
Distributor ID:	Ubuntu
Description:	Ubuntu 14.04 LTS
Release:	14.04
Codename:	trusty
/lib/x86_64-linux-gnu/libc.so.6: GNU C Library (Ubuntu EGLIBC 2.19-0ubuntu6.9) stable release version 2.19, by Roland McGrath et al.
gdb --version: GNU gdb (GDB) 7.9-gg19
``

That's 54 lines, ignoring wrapping. More than the height of most people's terminals.

I suggest changing it to something shorter, or printing the URL (~ 4000 characters).

$ go bug
Please open this URL:

https://github.com/golang/go/issues/new?body=Please+answer+these+questions+before+submitting+your+issue.+Thanks%21%0A%0A%23%23%23%23+What+did+you+do%3F%0AIf+possible%2C+provide+a+recipe+for+reproducing+the+error.%0AA+complete+runnable+program+is+good.%0AA+link+on+play.golang.org+is+best.%0A%0A%0A%23%23%23%23+What+did+you+expect+to+see%3F%0A%0A%0A%23%23%23%23+What+did+you+see+instead%3F%0A%0A%0A%23%23%23%23+Does+this+issue+reproduce+with+the+latest+release+%28go1.8%29%3F%0A%0A%0A%23%23%23%23+System+details%0A%0A%60%60%60%0Ago+version+devel+%2Bbf1d5c230a+Thu+Feb+23+12%3A26%3A01+2017+-0800+linux%2Famd64%0AGOARCH%3D%22amd64%22%0AGOBIN%3D%22%22%0AGOEXE%3D%22%22%0AGOHOSTARCH%3D%22amd64%22%0AGOHOSTOS%3D%22linux%22%0AGOOS%3D%22linux%22%0AGOPATH%3D%22%2Fusr%2Flocal%2Fgoogle%2Fhome%2Fcbro%22%0AGORACE%3D%22%22%0AGOROOT%3D%22%2Fusr%2Flocal%2Fgoogle%2Fhome%2Fcbro%2Fgo%22%0AGOTOOLDIR%3D%22%2Fusr%2Flocal%2Fgoogle%2Fhome%2Fcbro%2Fgo%2Fpkg%2Ftool%2Flinux_amd64%22%0AGCCGO%3D%22gccgo%22%0ACC%3D%22gcc%22%0AGOGCCFLAGS%3D%22-fPIC+-m64+-pthread+-fmessage-length%3D0+-fdebug-prefix-map%3D%2Ftmp%2Fgo-build052515961%3D%2Ftmp%2Fgo-build+-gno-record-gcc-switches%22%0ACXX%3D%22g%2B%2B%22%0ACGO_ENABLED%3D%221%22%0ACGO_CFLAGS%3D%22-g+-O2%22%0ACGO_CPPFLAGS%3D%22%22%0ACGO_CXXFLAGS%3D%22-g+-O2%22%0ACGO_FFLAGS%3D%22-g+-O2%22%0ACGO_LDFLAGS%3D%22-g+-O2%22%0APKG_CONFIG%3D%22pkg-config%22%0AGOROOT%2Fbin%2Fgo+version%3A+go+version+devel+%2Bbf1d5c230a+Thu+Feb+23+12%3A26%3A01+2017+-0800+linux%2Famd64%0AGOROOT%2Fbin%2Fgo+tool+compile+-V%3A+compile+version+devel+%2Bbf1d5c230a+Thu+Feb+23+12%3A26%3A01+2017+-0800+X%3Aframepointer%0Auname+-sr%3A+Linux+3.13.0-100-generic%0ALSB+Version%3A%09core-2.0-amd64%3Acore-2.0-noarch%3Acore-3.0-amd64%3Acore-3.0-noarch%3Acore-3.1-amd64%3Acore-3.1-noarch%3Acore-3.2-amd64%3Acore-3.2-noarch%3Acore-4.0-amd64%3Acore-4.0-noarch%3Acore-4.1-amd64%3Acore-4.1-noarch%3Acxx-3.0-amd64%3Acxx-3.0-noarch%3Acxx-3.1-amd64%3Acxx-3.1-noarch%3Acxx-3.2-amd64%3Acxx-3.2-noarch%3Acxx-4.0-amd64%3Acxx-4.0-noarch%3Acxx-4.1-amd64%3Acxx-4.1-noarch%3Adesktop-3.1-amd64%3Adesktop-3.1-noarch%3Adesktop-3.2-amd64%3Adesktop-3.2-noarch%3Adesktop-4.0-amd64%3Adesktop-4.0-noarch%3Adesktop-4.1-amd64%3Adesktop-4.1-noarch%3Agraphics-2.0-amd64%3Agraphics-2.0-noarch%3Agraphics-3.0-amd64%3Agraphics-3.0-noarch%3Agraphics-3.1-amd64%3Agraphics-3.1-noarch%3Agraphics-3.2-amd64%3Agraphics-3.2-noarch%3Agraphics-4.0-amd64%3Agraphics-4.0-noarch%3Agraphics-4.1-amd64%3Agraphics-4.1-noarch%3Alanguages-3.2-amd64%3Alanguages-3.2-noarch%3Alanguages-4.0-amd64%3Alanguages-4.0-noarch%3Alanguages-4.1-amd64%3Alanguages-4.1-noarch%3Amultimedia-3.2-amd64%3Amultimedia-3.2-noarch%3Amultimedia-4.0-amd64%3Amultimedia-4.0-noarch%3Amultimedia-4.1-amd64%3Amultimedia-4.1-noarch%3Aprinting-3.2-amd64%3Aprinting-3.2-noarch%3Aprinting-4.0-amd64%3Aprinting-4.0-noarch%3Aprinting-4.1-amd64%3Aprinting-4.1-noarch%3Aqt4-3.1-amd64%3Aqt4-3.1-noarch%3Asecurity-4.0-amd64%3Asecurity-4.0-noarch%3Asecurity-4.1-amd64%3Asecurity-4.1-noarch%0ADistributor+ID%3A%09Ubuntu%0ADescription%3A%09Ubuntu+14.04+LTS%0ARelease%3A%0914.04%0ACodename%3A%09trusty%0A%2Flib%2Fx86_64-linux-gnu%2Flibc.so.6%3A+GNU+C+Library+%28Ubuntu+EGLIBC+2.19-0ubuntu6.9%29+stable+release+version+2.19%2C+by+Roland+McGrath+et+al.%0Agdb+--version%3A+GNU+gdb+%28GDB%29+7.9-gg19%0A%60%60%60%0A

Another option is to run a small service (on golang.org or on another domain) that creates shortlinks. The shortlink would be stored in memcache and expire after a few minutes.

Any opinions?

  • Keep as-is
  • Print a long URL
  • Print a short URL using a service on golang.org
  • Print a short URL using a third-party service like goo.gl
  • Who cares? How many people are headless?

Related: #19131

@mvdan
Copy link
Member

mvdan commented Feb 24, 2017

What about writing to a temporary file too? If the link is really long, it might make opening it non-trivial too.

@josharian
Copy link
Contributor

I don't think we should make a short url, because the output could in theory contain data that someone considers private or sensitive. Beyond that I have no opinions.

@bradfitz bradfitz added the NeedsDecision Feedback is required from experts, contributors, and/or the community before a change can be made. label Mar 21, 2017
@bradfitz bradfitz added this to the Go1.9 milestone Mar 21, 2017
@rsc
Copy link
Contributor

rsc commented Jun 5, 2017

The current readable output seems clear and much better than printing a 4000-char single-line URL. Users can always redirect the output to a file or find some other way to copy (or make the window bigger than 50 lines).

@rsc rsc closed this as completed Jun 5, 2017
@golang golang locked and limited conversation to collaborators Jun 5, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
FrozenDueToAge NeedsDecision Feedback is required from experts, contributors, and/or the community before a change can be made.
Projects
None yet
Development

No branches or pull requests

6 participants