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/playground: error line highlighting is broken #17187

Closed
adg opened this issue Sep 21, 2016 · 5 comments
Closed

x/playground: error line highlighting is broken #17187

adg opened this issue Sep 21, 2016 · 5 comments
Labels
FrozenDueToAge NeedsFix The path to resolution is known, but the work has not been done.
Milestone

Comments

@adg
Copy link
Contributor

adg commented Sep 21, 2016

https://play.golang.org/p/hO3Iguuryi

When you click 'run' line 8 should be highlighted as a syntax error, but this appears to be broken. I suspect it's because the regexp in the frontend JS isn't matching the error message properly.

tmp/sandbox073288310/main.go:8: undefined: asf

The sandbox server should probably trim the directory from the error message, too. In fact, that might be what broke it.

@quentinmit quentinmit modified the milestone: Unreleased Oct 4, 2016
@fredr
Copy link
Contributor

fredr commented Oct 18, 2016

The regexp seems to be wrong indeed

var regex = /prog.go:([0-9]+)/g;

But the playground.js doesn't seem to be part of https://go.googlesource.com/playground/ or am I blind? 👀

@ALTree
Copy link
Member

ALTree commented Oct 18, 2016

I believe playground.js is imported from here: https://github.com/golang/tools/blob/master/godoc/static/playground.js

@fredr
Copy link
Contributor

fredr commented Oct 18, 2016

All right! thanks @ALTree. The highlighting works on https://tour.golang.org/ though. So the issue might be something else. But I'll have a look whenever I have some time over.

@fredr
Copy link
Contributor

fredr commented Dec 25, 2017

Oops, never got around to fix this, but I believe this will be fixed when #23201 is fixed

@gopherbot
Copy link

Change https://golang.org/cl/99118 mentions this issue: playground: show consistent formatting of errors for gofmt mode

@andybons andybons added the NeedsFix The path to resolution is known, but the work has not been done. label Mar 7, 2018
@golang golang locked and limited conversation to collaborators Mar 7, 2019
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

6 participants