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

Get rid of uninformative generic notes for higher-order contract errors #1564

Merged
merged 1 commit into from
Sep 1, 2023

Conversation

yannham
Copy link
Member

@yannham yannham commented Sep 1, 2023

Upon the failure of a higher-order contract, we used to include quite generic notes showing a plain illustration of the kind of higher-order violation that happened. However, this text was totally generic (the example didn't relate to the source code at all), quite verbose (around 4-5 lines of notes), and to be honest, not very helpful.

We now have good mechanisms to point at the right part of the function contract that failed, together with customized label (e.g. "broken by the caller"), which feel like the original generic notes aren't very valuable anymore.

This patch ditches those notes altogether in the error messages, making them smaller.

Upon the failure of a higher-order contracts, we used to include quite
generic notes showing a plain illustration of the kind of higher-order
violation that happened. However, this text was totally generic (the
example didn't relate to the source code at all), quite verbose (around
4-5 lines of notes), and to be honest, not very helpful.

We now have good mechanisms to underline the right part of the function
contract that failed, together with customized label (e.g. "broken by the
caller"), which makes look like the original generic note aren't very
valuable.

This patch ditches those notes altogether.
@github-actions github-actions bot temporarily deployed to pull request September 1, 2023 16:11 Inactive
@yannham yannham added this pull request to the merge queue Sep 1, 2023
Merged via the queue into master with commit b687ea3 Sep 1, 2023
4 checks passed
@yannham yannham deleted the error/remove-useless-higherorder-notes branch September 1, 2023 17:49
suimong pushed a commit to suimong/nickel that referenced this pull request Sep 17, 2023
Upon the failure of a higher-order contracts, we used to include quite
generic notes showing a plain illustration of the kind of higher-order
violation that happened. However, this text was totally generic (the
example didn't relate to the source code at all), quite verbose (around
4-5 lines of notes), and to be honest, not very helpful.

We now have good mechanisms to underline the right part of the function
contract that failed, together with customized label (e.g. "broken by the
caller"), which makes look like the original generic note aren't very
valuable.

This patch ditches those notes altogether.
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.

2 participants