What is the URL of the page with the issue?
https://pkg.go.dev/testing/synctest@go1.24rc2
What is your user agent?
Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/132.0.0.0 Safari/537.36
Screenshot
No response
What did you do?
At the time of writing this, the current go version is 1.23. Go 1.24rc2 is out and offers an experimental (gated) testing/synctest.
I was trying to find the docs for synctest online, as I was curious to see how it'd work.
1) Load the testing package documentation 2) Use the version selector to go to the rc2 docs 3) Scroll to the "Directories" section, and did not find synctest. 4) Verified that testing/synctest exists in go1.24rc2 5) Clicked on slogtest and replaced slogtest in the URL with synctest. 6) Observe that synctest does not load.
What did you see happen?
When loading synctest@go1.24rc2, I got the error "404 Not Found".
On a whim, since pkgsite also supports GOOS in the query string, I tried passing in ?GOEXPERIMENT=synctest
but still wasn't able to view the docs.
What did you expect to see?
I'd hoped to find a way to view the synctest docs online (outside of GitHub's code browser).
--
While I've used synctest as a focus in reporting this issue/feature request, I'll note that this also doesn't work with current-version experimental packages. The arena package also does not load in pkgsite.
Comment From: zigo101
Just FYI: you can view the docs of the two packages here: * https://docs.go101.org/std/pkg/arena.html * https://docs.go101.org/std/pkg/testing/synctest.html
Comment From: jba
Thanks. We should display those packages, but they are under build tags, and we're conservative about build tags. We actually ignore files with any build tags, except a few predefined GOOS/GOARCH combinations. Processing every file with every possible set of build tags across the entire ecosystem is infeasible, especially since doing so can lead to an exponential number of different "packages" in a single directory.
However, we should make an exception for standard library packages under experiment tags. We should also carefully mark such packages in the UI.
So this is a medium-sized feature request, not a simple fix.
Comment From: gopherbot
Change https://go.dev/cl/649319 mentions this issue: internal/fetch: look at files with tag goexperiment.synctest
Comment From: jba
The above CL added support for a specific GOEXPERIMENT flag for testing/synctest. We plan to deploy tomorrow. Based on that work, it would be straightforward to support a hardcoded list of such flags.
Comment From: jba
testing/synctest doc is now live: https://pkg.go.dev/testing/synctest@go1.24.0
Comment From: gopherbot
Change https://go.dev/cl/666935 mentions this issue: internal/fetch: include goexperiment.jsonv2
Comment From: gopherbot
Change https://go.dev/cl/680695 mentions this issue: internal/fetch: remove goexperiment.synctest
Comment From: gopherbot
Change https://go.dev/cl/680675 mentions this issue: internal/fetch: don't include goexperiment.jsonv2 for encoding/json