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/mod/modfile: Parse should return structured errors #36486

Closed
jayconrod opened this issue Jan 9, 2020 · 1 comment
Closed

x/mod/modfile: Parse should return structured errors #36486

jayconrod opened this issue Jan 9, 2020 · 1 comment
Labels
FrozenDueToAge modules NeedsFix The path to resolution is known, but the work has not been done. Tools This label describes issues relating to any tools in the x/tools repository.
Milestone

Comments

@jayconrod
Copy link
Contributor

modfile.Parse appends error messages to a bytes.Buffer, then creates an error from the contents of the buffer with errors.New. This is not useful for tools like gopls that need to show where errors occur.

Instead, modfile.Parse should a structured error containing a list of errors with file names and line numbers.

@jayconrod jayconrod added NeedsFix The path to resolution is known, but the work has not been done. modules Tools This label describes issues relating to any tools in the x/tools repository. labels Jan 9, 2020
@jayconrod jayconrod added this to the Unreleased milestone Jan 9, 2020
@jayconrod jayconrod self-assigned this Jan 9, 2020
@gopherbot
Copy link

Change https://golang.org/cl/214430 mentions this issue: modfile: return structured errors from Parse and ParseLax

@golang golang locked and limited conversation to collaborators Jan 20, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
FrozenDueToAge modules NeedsFix The path to resolution is known, but the work has not been done. Tools This label describes issues relating to any tools in the x/tools repository.
Projects
None yet
Development

No branches or pull requests

2 participants