"Go build failed." in Go tour requires explicit Kill

134 views
Skip to first unread message

Marvin Renich

unread,
Apr 15, 2020, 1:02:47 PM4/15/20
to golang-nuts
In the Go tour, what is the purpose of requiring the user to explicitly
press the "Kill" button when the build fails? This seems completely
unnecessary to me.

If this is just a natural consequence of the internal implementation, it
would, in my opinion, be well worth the effort to make a failed build
exit without requiring the user to press "Kill".

...Marvin

Jake Montgomery

unread,
Apr 16, 2020, 12:05:55 PM4/16/20
to golang-nuts
As far as I can tell, you do not ever need to hit 'kill'. If the build (compile) fails, then it exists immediately. If the program gets into an infinite loop, or otherwise takes too long, it will eventually exit with the message:

timeout running program
Program exited: status 255.

It looks to me like the kill button is there in case you create a long running program and do not wish to wait for the timeout.

Are you seeing different behavior? If so it may be a bug.


 

Brian Candler

unread,
Apr 16, 2020, 12:19:59 PM4/16/20
to golang-nuts
I've noticed this too.  This is with the tour, rather than play.golang.org.

To reproduce (I'm using Chrome 80 under macOS 10.14):

* Go to a tour page which doesn't compile, e.g. https://tour.golang.org/methods/25
* Click Run
* At this point it shows an error - but the Run button has become Kill

pic1.png



* Now you have to click Kill.  The line "Program exited: killed" is added.

pic2.png



* Now you can edit and re-run

The "Kill" step appears to be superfluous, as noted by the OP.

Marvin Renich

unread,
Apr 16, 2020, 1:01:49 PM4/16/20
to golang-nuts
* Brian Candler <b.ca...@pobox.com> [200416 12:20]:
> I've noticed this too. This is with the tour, rather than play.golang.org.
>
> To reproduce (I'm using Chrome 80 under macOS 10.14):
>
> * Go to a tour page which doesn't compile, e.g.
> https://tour.golang.org/methods/25
> * Click Run
> * At this point it shows an error - but the Run button has become Kill
> * Now you have to click Kill. The line "Program exited: killed" is added.
> * Now you can edit and re-run
>
> The "Kill" step appears to be superfluous, as noted by the OP.

This is exactly what I am seeing, on any tour page when the build fails.
Go to the "Hello, 世界" page (https://tour.golang.org/welcome/1) and
edit the code to produce an error.

...Marvin

Reply all
Reply to author
Forward
0 new messages