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

Add [Needs_stack_trace] annotation for user errors #5047

Merged
merged 1 commit into from
Oct 25, 2021

Conversation

snowleopard
Copy link
Collaborator

@snowleopard snowleopard commented Oct 23, 2021

In #5025 that introduces directory targets, I need a way to force a user error to include the stack trace even though it has an embedded location.

This PR makes this possible via the new Needs_stack_trace annotation. I also fix a naming inconsistency and rename has_embed_location to has_embedded_location.

@snowleopard snowleopard requested review from rgrinberg, a user and cwong-ocaml October 23, 2021 10:23
@snowleopard snowleopard merged commit 5306218 into ocaml:main Oct 25, 2021
@snowleopard snowleopard deleted the needs-stack-trace branch October 25, 2021 10:50
snowleopard added a commit that referenced this pull request Nov 2, 2021
Thanks to #5075 and #5047, we can now easily provide more information for some library
resolution errors. I think it's pretty helpful to tell the user why the problematic library was required.
In fact, in one of the tests, this was suggested as a future improvement.

We could only do this for a subset of errors in this module, but after studying the new error
messages, I think all of them got better.

Signed-off-by: Andrey Mokhov <[email protected]>
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