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 error messages, which mention module parameters. #1813

Merged
merged 5 commits into from
Feb 26, 2025

Conversation

yav
Copy link
Member

@yav yav commented Feb 25, 2025

Fixes #1560. There are two main improvements:

  • When printing module parameters from anonymous module interfaces (i.e., parameter) don't show the module name.
    So, instead of saying M::M__parameter::x we just say M::x.
  • When referring to module parameters in error message just use the variable name (e.g., x instead of M::x).
    • To avoid name conflicts we add suffixes (e.g., x₁)
    • After the error we add an explanation linking the names used to the actual parameter (e.g., where `x` is module parameter `M::x` )
  • When printing quantifiers in error messages, we only print variables that are actually mentioned in the error.

Copy link
Contributor

@RyanGlScott RyanGlScott left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hooray! I'm quite happy with how the error messages look now.

LGTM, aside from some minor suggestions.

@yav yav merged commit a172900 into master Feb 26, 2025
50 checks passed
@yav yav deleted the issue#1560-improve-module-parameters-in-errors branch February 26, 2025 00:20
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

The error messages have gotten worse
2 participants