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
x/playground: playground should display the version of Go in use #12218
Comments
It's non-trivial because the web front end and sandbox back end are separate. |
Perhaps the web front-end could run that exact program to find out? (and then it's cached, presumably). While it's easy enough to run the program, I do think this would be useful to highlight clearly. It's a common source of confusion. |
Here's a cheap solution: Have a "version" button which is a link to that program http://play.golang.org/p/4WfD2XfzPt and then runs it. |
Actually this solution is already mentioned in the About text. It was fairly easy to discover. I think Go playground should always run the latest version of Go, then displaying the version becomes unnecessary. |
"Always run the latest version of Go" is the goal, but it's not that simple unfortunately. |
@griesemer it's true, the front end could query the back end to find the version. But right now the front end is more or less stateless; I'm hesitant to add state. Will continue to ponder. |
@adg Having a "Version" button that simply links to http://play.golang.org/p/4WfD2XfzPt would be entirely stateless. Ideally it should also run it, but that could still be done in a stateless way I suspect. |
I have a counterproposal, make the front end responsible for declaring the The front end has a constant, say 1.5.0 encoded into it, which allows it to If the version of the back end does not match the front end, it can return Thanks Dave On Sat, 22 Aug 2015 03:54 Robert Griesemer notifications@github.com wrote:
|
@griesemer honestly, I don't think the UI needs more buttons. @davecheney That would mean the playground would be broken sometimes. I'd rather serve an old version of the sandbox than break the playground. |
I want to submit a CL, but did not found web front playground.js in golang/playground repo. sandbox change to response with go version, web front got it and show in html.
|
@tomheng I don't want to run a 'go version' on each invocation of a sandbox program. That would add unnecessary latency to each request. I also don't want to further complicate the wire format between the playground and the sandbox. |
Change https://golang.org/cl/98446 mentions this issue: |
The only way to discover the version of Go the playground supports is a program like this
http://play.golang.org/p/4WfD2XfzPt
The playground should show the version of Go in use either at the bottom of the page, or on the About dialog.
The text was updated successfully, but these errors were encountered: