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

Use aliases in error messages #8894

Open
orklah opened this issue Dec 12, 2022 · 0 comments
Open

Use aliases in error messages #8894

orklah opened this issue Dec 12, 2022 · 0 comments

Comments

@orklah
Copy link
Collaborator

orklah commented Dec 12, 2022

In the following comment:
doctrine/dbal#5830 (comment)

Psalm emits a 10Kb error message. While #7445 could be useful for more formatting, it would still be a 10Kb string to process.

It happens that for those shapes, there are already declared aliases: doctrine/dbal#5830 (comment) that would help reduce the error by more than half (and getting rid of irrelevant parts of the error). Ideally, we should be able to reapply those aliases to the error message.

Alternatively, if applying local aliases is a problem, we could propose a config with a simple search/replace string that we would process on every error message that would help user reduce known structure into recognizable aliases

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant