We use Decco at work and recently ran into a situation where we we're trying to track down a decode failure before pushing some code to prod and given the {path: "", ...} was hardcoded to an empty string made it incredibly difficult to track down the source of the error.
If we could instead default to Pervasives.__LOC__ this would have been very easy to track down as the error would've pointed to the exact file and line number of the failure.
Or at least in principle.
Even if the line number is off by one or something just knowing the file of the source where the decode is failing would be immensely helpful.
We use Decco at work and recently ran into a situation where we we're trying to track down a decode failure before pushing some code to prod and given the
{path: "", ...}
was hardcoded to an empty string made it incredibly difficult to track down the source of the error.If we could instead default to
Pervasives.__LOC__
this would have been very easy to track down as the error would've pointed to the exact file and line number of the failure. Or at least in principle. Even if the line number is off by one or something just knowing the file of the source where the decode is failing would be immensely helpful.