Parameterize the println that informs of the fallback cases#10
Parameterize the println that informs of the fallback cases#10vemv wants to merge 2 commits intoathos:masterfrom
println that informs of the fallback cases#10Conversation
4912e74 to
9df8549
Compare
|
Hi, @vemv! Thank you for the feedback 😄 And I’m sorry for my slow response. I agree that that warning message can be somewhat noisy, so improvements around it are very welcomed. I feel more like users would just want to disable showing that message, eg.: Or, to give users more liberty of controlling the behaviors on error, the following might seem more intuitive: What do you think of these? Do you have any concrete use case of this change in mind? |
|
Hey there @athos ! Thanks for the reply.
An option which can have
I like this option better. But, one has to remember to call It's a cost I personally could assume though, no biggie.
Primarily, being able to debug things (since no exceptions are logged). Also, the warning message is not tremendously useful to me, as I can guess when is Pinpointer being used and when not. Also, the message happens to break some unit tests we have. Cheers - Victor |
|
Hey there, kindly let me now what you think when you have a chance. Thanks! |
Hi there!
I was finding the
(println "[PINPOINTER] Failed to analyze the spec errors, and will fall back to s/explain-printer\n")somewhat noisy and with limited usefulness.This PR leaves up to the user whether to run it (by passing an empty fn), or to actually log the incidence in detail: it can be very handy to access the underlying exception, that way one can try to fix it.
You can try out these changes by raising an error (e.g.
https://github.com/athos/Pinpointer/issues/2) with the option being passed.Cheers - Victor