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

text/scanner: last commit caused /ref/spec page to break #25986

Closed
griesemer opened this issue Jun 20, 2018 · 6 comments
Closed

text/scanner: last commit caused /ref/spec page to break #25986

griesemer opened this issue Jun 20, 2018 · 6 comments
Labels
FrozenDueToAge NeedsInvestigation Someone must examine and confirm this is a valid issue and not a duplicate of an existing one. release-blocker Soon This needs to be done soon. (regressions, serious bugs, outages)
Milestone

Comments

@griesemer
Copy link
Contributor

griesemer commented Jun 20, 2018

https://tip.golang.org/ref/spec#Rune_literals
displays EBNF parsing errors.

@gopherbot gopherbot added this to the Unreleased milestone Jun 20, 2018
@griesemer griesemer modified the milestones: Unreleased, Go1.11 Jun 20, 2018
@griesemer griesemer added NeedsInvestigation Someone must examine and confirm this is a valid issue and not a duplicate of an existing one. release-blocker Soon This needs to be done soon. (regressions, serious bugs, outages) labels Jun 20, 2018
@agnivade
Copy link
Contributor

The error is coming from godoc/spec.go, which is expected because that is where the EBNF parsing is done. But what is interesting is it doesn't happen if I compile godoc using go1.10, and only happens with the tip compiler. Which means something changed in the standard library which is causing this to fail.

And looking at the imports of that file, my money is on the "text/scanner" package.

@agnivade
Copy link
Contributor

Figured that it had to be the "text/scanner" package. Looked into the history of commits. Found culprit commit to be - c8915a0. The things a single-line change can do :)

Re-titling. Feel free to take appropriate action.

@agnivade agnivade changed the title x/tools/cmd/godoc: spec page broken text/scanner: last commit caused /ref/spec page to break Jun 23, 2018
@dsnet
Copy link
Member

dsnet commented Jun 23, 2018

Thank you @agnivade for triaging.

\cc @SilverRainZ since he authored the change.

@griesemer
Copy link
Contributor Author

Thanks, @agnivade for tracking this down. I think the scanner change was correct; godoc/spec should probably accept raw strings where it only accepts strings.

@agnivade
Copy link
Contributor

Fix incoming. Will probably add a test while at it.

@gopherbot
Copy link

Change https://golang.org/cl/120659 mentions this issue: godoc: accept scanner.RawString too during EBNF parsing

@golang golang locked and limited conversation to collaborators Jun 25, 2019
@rsc rsc unassigned dsnet and griesemer Jun 23, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
FrozenDueToAge NeedsInvestigation Someone must examine and confirm this is a valid issue and not a duplicate of an existing one. release-blocker Soon This needs to be done soon. (regressions, serious bugs, outages)
Projects
None yet
Development

No branches or pull requests

4 participants