weso / shex-s

Scala implementation of ShEx
http://www.weso.es/shex-s/
MIT License
5 stars 6 forks source link

Improve ShEx error messages #70

Open labra opened 4 years ago

labra commented 4 years ago

The information of error messages is incomprehensible for an end user. See this issue about SHaclEX.

Providing a better error information system for ShEx can be a challenge given ShEx expressivity that can make it difficult to guess which is the root cause of the error. However, for some (most) of the shapes, it should be easier.

The strategy to improve this issue will probably involve several steps:

This issue will be divided in several issues and remain open until we consider that the error messages are more comprehensible.

ericprud commented 4 years ago

I claimed in a shexjava issue that ShEx folks were interested in standardizing error reports (as much as practical). I know @hsolbrig was interested. Where does this land in your priority stack?

labra commented 4 years ago

I am very interested and you guessed well that the problem was with my priority stack.

I am finishing my teaching duties on 19th May, since them I can devote more time to this.

Meanwhile, these weeks I am cleaning the validation code and tackle the first part of the issue, i.e. generate machine-readable errors instead of natural language ones.

henrietteharmse commented 2 years ago

Any update on this issue? Is there perhaps a planned due date or suggested alternative approach?

labra commented 2 years ago

Thanks for your interest...we have been working on some aspects of this, bit I admit that there is a lot of space for improvement.

One aspect we improved it a little bit is that now the error messages can be shown in either natural language or JSON, and the JSON representation contains information about the line/column numbers of the nodes and shapes that have failed.

The shex-s library contains a command line interface that you can use with an option to select which result format you want, which can be either JSON or a Result ShapeMap with information in natural language.

We gave more priority in the last months to add support to extends, a new feature that increases ShEx expressivity. Now that our implementation passes all the tests, we are more confident to refactor it and in fact we have already started to do it and create a new validator which I hope will also improve the error messages.

I'm afraid we don't have a planned due date for this because we are currently doing this without proper funding and more as part of our research tasks. Anyway, as we have other projects that indirectly are funding this one, we will continue advancing in this direction.

Of course, if you have specific examples or suggestions for imprvements, let us know so we can give them more priority.