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

Improve output of genErrors #546

Open
3 tasks
WhatisRT opened this issue Aug 15, 2024 · 3 comments · Fixed by #551
Open
3 tasks

Improve output of genErrors #546

WhatisRT opened this issue Aug 15, 2024 · 3 comments · Fixed by #551
Labels
conformance enhancement New feature or request

Comments

@WhatisRT
Copy link
Collaborator

  • genErrors always generates fully qualified names. The output would be a lot more readable if we postprocess the string to remove those qualifiers.
  • We could also give a number that indicates which failure happened, for easier identification.
  • The output generates non-breaking spaces. We may want to replace them with regular spaces (but maybe that should be a downstream responsibility?)
@WhatisRT WhatisRT added enhancement New feature or request conformance labels Aug 15, 2024
@williamdemeo williamdemeo linked a pull request Aug 21, 2024 that will close this issue
3 tasks
@WhatisRT
Copy link
Collaborator Author

Note that that PR didn't fix any of those issues

@WhatisRT WhatisRT reopened this Aug 26, 2024
@williamdemeo
Copy link
Contributor

williamdemeo commented Aug 27, 2024

Note that that PR didn't fix any of those issues

As for the first issue, the fully qualified names issue is not an issue if we avoid genErrors and use simpler error handling, like the simple function I implemented to find the bug causing the latest conformance test failure. When I used show in that function, the names did not come out fully qualified.

Also, using a bespoke error generator function has the added benefit of allowing us to say which error occurred, which addresses the second issue in the list above.

I know this isn't a scalable, automated approach, but it's useful when we know what we're looking for (as in the most recent case).

@WhatisRT
Copy link
Collaborator Author

Yeah, this is strictly an issue about genErrors, not about producing error messages in general. Of course a manual approach is going to be prettier, but it has the downside of being brittle: if you change the order of some clauses without updating the error messages for example, the error message will be misleading. This actually happened in the past which is why we came up with genErrors in the first place.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
conformance enhancement New feature or request
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants