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

x/playground: missing output in Playground example #21170

Closed
bcmills opened this issue Jul 25, 2017 · 3 comments
Closed

x/playground: missing output in Playground example #21170

bcmills opened this issue Jul 25, 2017 · 3 comments

Comments

@bcmills
Copy link
Contributor

bcmills commented Jul 25, 2017

The example program from #21168 (https://play.golang.org/p/XPEU7FoTes) can only exit early if it panics, and ends with an unconditional call to fmt.Println with an int64 argument.

Oddly, with the current Playground version of the Go compiler, it appears to print a blank line instead of the final number:
screenshot 2017-07-25 at 17 24 43

The gray (rather than red) text at the bottom and lack of a panic dump suggest that the program did, in fact, run to completion, but where is the output?

@ghost
Copy link

ghost commented Jul 26, 2017

fmt.Println(n+1) works the same way. With fmt.Println(1), fmt.Println(n*1) or fmt.Println(n,n) I get either "process took too long" or "Error communicating with remote server." It's funny.

@ysmolski
Copy link
Member

Right now this program reports "took too long" on play.golang.org.

I ran this program on local playground and it was able to execute in 2 seconds some of the launches. Sometimes it returned "too too long".

@andybons andybons changed the title missing output in Playground example x/playground: missing output in Playground example Mar 11, 2018
@gopherbot gopherbot added this to the Unreleased milestone Mar 11, 2018
@andybons
Copy link
Member

I too see this as being reported as “process took too long”. When reducing the constant maxInt so that it returns in under 2 seconds, the output it printed as expected.

@golang golang locked and limited conversation to collaborators Mar 11, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

4 participants