-
Notifications
You must be signed in to change notification settings - Fork 409
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
fix(pkg): print depexts message when a program is not found #11005
Conversation
src/dune_rules/pkg_rules.ml
Outdated
let _, loc = pkg in | ||
let depexts_msg = if List.is_empty depexts then [] else Depexts.message depexts in | ||
let error_msg = (Action.Prog.Not_found.message e).paragraphs in | ||
raise (User_error.E (error_msg @ depexts_msg |> User_message.make ~loc)) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It might be simpler to set the hint
field of e
. The benefit is that it would let us avoid adding new code to the engine.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Let me try it.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is there a particular reason to not use User_error.raise
? I feel it makes the code easier to mentally parse.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The suggestion of @gridbugs was good one that simplifies the code.
b5dc57f
to
869c47b
Compare
Signed-off-by: Alpha DIALLO <moyodiallo@gmail.com>
Signed-off-by: Alpha DIALLO <moyodiallo@gmail.com>
Signed-off-by: Alpha DIALLO <moyodiallo@gmail.com>
869c47b
to
1702a2a
Compare
1611e82
to
74f7344
Compare
Fixes #10988.