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

Duplicate output #256

Open
dpriskorn opened this issue Jul 18, 2023 · 1 comment
Open

Duplicate output #256

dpriskorn opened this issue Jul 18, 2023 · 1 comment
Labels

Comments

@dpriskorn
Copy link

dpriskorn commented Jul 18, 2023

Description of problem

The validator outputs the same validation errors multiple times

E.g.

[
     {
       "type": "MissingProperty",
       "property": "[http://www.wikidata.org/prop/direct/P137](https://www.wikidata.org/prop/direct/P137)"
     },
     {
       "type": "MissingProperty",
       "property": "[http://www.wikidata.org/prop/direct/P625](https://www.wikidata.org/prop/direct/P625)",
       "valueExpr": {
         "type": "NodeConstraint",
         "datatype": "http://www.w3.org/2001/XMLSchema#coordinate"
       }
     }
   ],
   [
     {
       "type": "MissingProperty",
       "property": "[http://www.wikidata.org/prop/direct/P137](https://www.wikidata.org/prop/direct/P137)"
     },
     {
       "type": "MissingProperty",
       "property": "[http://www.wikidata.org/prop/direct/P625](https://www.wikidata.org/prop/direct/P625)",
       "valueExpr": {
         "type": "NodeConstraint",
         "datatype": "http://www.w3.org/2001/XMLSchema#coordinate"
       }
     }
   ],

URL to affected spec or repo:
See details under second try here: https://www.wikidata.org/wiki/User:So9q/shexjs#Usage

What happened (e.g., it crashed)?:
Unexpected duplicate output

Expected behavior (e.g., it shouldn't crash):
No duplicate output

Optional, steps to reproduce:

  1. ...
@dpriskorn dpriskorn added the bug label Jul 18, 2023
@ericprud
Copy link
Contributor

ericprud commented Jul 23, 2023

The fact that they're in an array means they showed up through some disjunction (typically an EachOf, but not exclusively).

It would be nice to

  1. work out some minimal and realistic use cases
  2. improve nfax-threaded-nerr to eliminate redundancies
  3. make it so e.g. the following use case would generate consistent and minimal error reports:

Schema

<Person> {
  ( :name . ; addr . )
|
  ( :name . )
}

Data

<Alice> :foo 1 .

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants