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/pkgsite: no docs for GOEXPERIMENT packages #71488

Open
SpikesDivZero opened this issue Jan 30, 2025 · 5 comments
Open

x/pkgsite: no docs for GOEXPERIMENT packages #71488

SpikesDivZero opened this issue Jan 30, 2025 · 5 comments
Assignees
Labels
FeatureRequest Issues asking for a new feature that does not need a proposal. pkgsite

Comments

@SpikesDivZero
Copy link

SpikesDivZero commented Jan 30, 2025

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.

@gopherbot gopherbot added this to the Unreleased milestone Jan 30, 2025
@zigo101
Copy link

zigo101 commented Jan 30, 2025

Just FYI: you can view the docs of the two packages here:

@seankhliao seankhliao changed the title x/pkgsite: unable to view experimental package docs x/pkgsite: no docs for GOEXPERIMENT packages Jan 30, 2025
@ansaba ansaba added NeedsInvestigation Someone must examine and confirm this is a valid issue and not a duplicate of an existing one. help wanted labels Jan 30, 2025
@jba jba added FeatureRequest Issues asking for a new feature that does not need a proposal. and removed NeedsInvestigation Someone must examine and confirm this is a valid issue and not a duplicate of an existing one. help wanted labels Jan 30, 2025
@jba jba modified the milestones: Unreleased, pkgsite/unplanned Jan 30, 2025
@jba
Copy link
Contributor

jba commented Jan 30, 2025

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.

@gopherbot
Copy link
Contributor

Change https://go.dev/cl/649319 mentions this issue: internal/fetch: look at files with tag goexperiment.synctest

gopherbot pushed a commit to golang/pkgsite that referenced this issue Feb 14, 2025
If a file has the goexperiment.synctest tag, the worker will include
it when constructing documentation.

This was done for testing/synctest (clearly).

We should gather a list of all GOEXPERIMENT tags that affect stdlib
files, and include them as well.

For golang/go#71488.

Change-Id: Ibed834ebfcff529a58cd54efcacf4fe70941c5b0
Reviewed-on: https://go-review.googlesource.com/c/pkgsite/+/649319
kokoro-CI: kokoro <noreply+kokoro@google.com>
Reviewed-by: Damien Neil <dneil@google.com>
LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
@jba jba self-assigned this Feb 17, 2025
@jba
Copy link
Contributor

jba commented Feb 17, 2025

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.

@jba
Copy link
Contributor

jba commented Feb 18, 2025

testing/synctest doc is now live: https://pkg.go.dev/testing/synctest@go1.24.0

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
FeatureRequest Issues asking for a new feature that does not need a proposal. pkgsite
Projects
None yet
Development

No branches or pull requests

5 participants