Join GitHub today
GitHub is home to over 50 million developers working together to host and review code, manage projects, and build software together.Sign up
cmd/go2go: go2goplay does not have feature parity with play.golang.org #39675
Perhaps related, or perhaps not related, but go2goplay.golang.org also does not seem to recognize test cases. It instead reports:
This does not work:
But this does:
Those are from #39634.
I should have been more clear: it is known that go2goplay only handles single-file, non-test, main-package cases only for now. None of the additional functionality that the playground has accumulated over the years (multiple files, test cases, modules support, etc.) works. I remember looking into supporting these things but time-boxed myself into just getting the basic use-case up and running. I don’t remember the specific details of what issues I ran into when adjusting the playground code, nor do I know how long the go2go tool will be viable for/how much churn there will be with it.
This CL contains the altered playground source that is served at go2goplay.golang.org. It compiles the toolchain at the dev.go2go branch of the main Go repository, translates .go2 programs using the go2go tool, and compiles the playground frontend binary using the dev.go2go toolchain (to support code formatting). The header and “About” text is updated to differentiate from the normal playground and explain its differences, code location, etc. Most features present on play.golang.org are missing, and this instance only supports single-file, non-test, main-package programs. This was done for initial simplicity of the implementation. Updates golang/go#39675 Fixes golang/go#39809 Change-Id: Id9461830c4233ab3f938dc6d21da3e5f2d8adbc3 Reviewed-on: https://go-review.googlesource.com/c/playground/+/240541 Reviewed-by: Alexander Rakoczy <email@example.com>