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/website: golang.org/doc/articles/wiki is broken #44314

Closed
kortschak opened this issue Feb 17, 2021 · 6 comments
Closed

x/website: golang.org/doc/articles/wiki is broken #44314

kortschak opened this issue Feb 17, 2021 · 6 comments
Labels
FrozenDueToAge NeedsFix The path to resolution is known, but the work has not been done.
Milestone

Comments

@kortschak
Copy link
Contributor

The https://golang.org/doc/articles/wiki/ page linked from https://golang.org/doc/#articles is broken presumably due to the content being moved out to x/website in 0cb3415.

Screenshot from 2021-02-17 10-41-44

@gopherbot gopherbot added this to the Unreleased milestone Feb 17, 2021
@ianlancetaylor
Copy link
Contributor

CC @rsc @dmitshur

@dmitshur dmitshur added the NeedsInvestigation Someone must examine and confirm this is a valid issue and not a duplicate of an existing one. label Feb 17, 2021
@dmitshur
Copy link
Contributor

dmitshur commented Feb 17, 2021

The problem is because the wiki directory in x/website contains a file named "go.mod":

https://github.com/golang/website/blob/master/_content/doc/articles/wiki/go.mod

Despite being inside a _content directory that the go tool largely ignores due to the "_" prefix, it isn't ignored for the purpose of carving out a nested module. The content of that directory is not included in website.Content, because embed.FS doesn't reach beyond its module boundaries.

@gopherbot
Copy link

Change https://golang.org/cl/292829 mentions this issue: cmd/golangorg: read _content directory from disk in production

@dmitshur
Copy link
Contributor

dmitshur commented Feb 17, 2021

I'm not sure what's the best thing to do here. If we continue to use //go:embed, we can't place any files named "go.mod" in _content. Maybe we shouldn't do that regardless.

I've sent CL 292829 with a workaround of reading files from disk (as was done to some extent before CL 291690). We can consider using that approach to fix the immediate problem on golang.org and buy more time to think about a long term fix here. It's functional as of patch set 2, and can be previewed here.

@rsc Let me know how you'd like to proceed here.

@dmitshur dmitshur added NeedsDecision Feedback is required from experts, contributors, and/or the community before a change can be made. Unfortunate and removed NeedsInvestigation Someone must examine and confirm this is a valid issue and not a duplicate of an existing one. labels Feb 17, 2021
@gopherbot
Copy link

Change https://golang.org/cl/293410 mentions this issue: _content/doc/articles/wiki: delete go.mod

@rsc
Copy link
Contributor

rsc commented Feb 18, 2021

I don't think the go.mod is doing anything useful. Sent CL 293410 to delete it.

@dmitshur dmitshur added NeedsFix The path to resolution is known, but the work has not been done. and removed NeedsDecision Feedback is required from experts, contributors, and/or the community before a change can be made. Unfortunate labels Feb 18, 2021
@golang golang locked and limited conversation to collaborators Feb 18, 2022
passionSeven added a commit to passionSeven/website that referenced this issue Oct 18, 2022
This was added in CL 207263 to isolate these from the
main repo. That's not a concern anymore, and it's keeping
them out of the website module and therefore out of the embed.
Delete the go.mod to put them back.

Fixes golang/go#44314.

Change-Id: I36c20607d6132ad089ddae8150abe220eb90d3fd
Reviewed-on: https://go-review.googlesource.com/c/website/+/293410
Trust: Russ Cox <rsc@golang.org>
Run-TryBot: Russ Cox <rsc@golang.org>
TryBot-Result: Go Bot <gobot@golang.org>
Reviewed-by: Dmitri Shuralyov <dmitshur@golang.org>
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
FrozenDueToAge NeedsFix The path to resolution is known, but the work has not been done.
Projects
None yet
Development

No branches or pull requests

5 participants