-
Notifications
You must be signed in to change notification settings - Fork 17.9k
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
cmd/compile: fix line number during yyerror in pragcgo #18882
Comments
@rsc I had mentioned in #18459 (comment), that I had encountered this and perhaps we can fix it like I did here https://go-review.googlesource.com/c/34562 p.error(syntax.Error{Pos: pos, Line: line, Msg: err.Error()}) We didn't include the suggested change because it was very late in the Go1.8 cycle and my |
@odeke-em While your change is maybe the right approach long-term, it's too large for the (small) issue, and doesn't fit the current error handling model (which is going to change anyway, down the road). It appears that the test I added with https://go-review.googlesource.com/c/34721/ is passing, so we may not have an issue here, but I will investigate. |
CL https://golang.org/cl/36121 mentions this issue. |
@odeke-em It turns out your fix is actually the correct one - my initial approach won't work anymore due to the concurrency we have now (pragcgo is called concurrently since files are parsed concurrently). Working on a correct solution... |
Cool, glad to know it worked 🍻 |
Merged position changes from dev.inline into master.
The only part I wasn't sure about was how to translate this one line added to master since the dev.inline branched forked off. I commented it with TODO(gri) instead:
The text was updated successfully, but these errors were encountered: