-
Notifications
You must be signed in to change notification settings - Fork 18.4k
Description
"vet" is implemented as a separate button. Consider if we can remove that button and do the "vet" check whenever a user pushes the "run" button.
Comments from CL 100776:
Bryan Mills
I wonder whether this should even be a separate button. Could we Vet unconditionally whenever we Run?We already have a bit of a visual distinction between “errors” and “output”, so it probably wouldn't be terribly confusing to put the errors before the output if we have both, and that would make the warnings that much more discoverable.
Nathan Youngman
I think that's a good point.Also, with the Go Playground supporting tests, and tests in Go 1.10 now running a subset of vet, it seems like this could just be automatic whether running tests or code. Though it may be important to clearly indicate what is an error from the compiler vs. an error from vet for people new to Go.
https://go-review.googlesource.com/c/playground/+/98155
Andrew Bonventre
This would have ramifications for every call to /compile, which is an endpoint that anyone can use right now.Yury Smolsky
That would mean changing the spec of /compile endpoint. That endpoint is not supposed to return errors along with output. All clients assume that if there is an error, then output should not be considered. So this could break clients. IMHO, this feature requires new version of /compile along with new protocol.Nathan Youngman
There is more than one way to do it. An alternative is for the front-end to call /compile and /vet from the same button click.
https://go-review.googlesource.com/c/playground/+/100776/5/edit.html#115