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

go/types, types2: consolidate error message formats #49123

Open
griesemer opened this issue Oct 23, 2021 · 0 comments
Open

go/types, types2: consolidate error message formats #49123

griesemer opened this issue Oct 23, 2021 · 0 comments
Assignees
Labels
NeedsDecision
Milestone

Comments

@griesemer
Copy link
Contributor

@griesemer griesemer commented Oct 23, 2021

Error messages don't have a particular "style guide" at the moment:

  • there are simple errors of the form: func main must have no arguments and no return values
  • there are errors with clarifications using a :: undefined: x
  • there are errors with clarifications using a ;: cannot make int; type must be slice, map, or channel
  • there are errors with clarifications using parentheses: cannot slice s (variable of type chan int)
  • there are errors with clarifications on separate lines, indented, possible combined with any of the forms above

Maybe we can come up with a reasonably consistent set of rules for how to format errors (e.g., when to use ':', ';', or parentheses). If we can, that we should be able to encode this for consistent behavior.

@griesemer griesemer added NeedsFix NeedsDecision labels Oct 23, 2021
@griesemer griesemer added this to the Backlog milestone Oct 23, 2021
@gopherbot gopherbot removed the NeedsFix label Oct 23, 2021
@griesemer griesemer removed this from the Backlog milestone Mar 18, 2022
@griesemer griesemer added this to the Go1.19 milestone Mar 18, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
NeedsDecision
Projects
None yet
Development

No branches or pull requests

3 participants