RubenVerborgh / SPARQL.js

A parser for the SPARQL query language in JavaScript
Other
342 stars 66 forks source link

Serialising a double inverse property path results in a syntactically invalid query #165

Open MPvHarmelen opened 1 year ago

MPvHarmelen commented 1 year ago

When serialising the following query, the surrounding ( ) are forgotten, causing a syntactically invalid query to be generated:

ASK WHERE { ?s ^(^<a:a>) ?o. }

becomes:

ASK WHERE { ?s ^^<a:a> ?o. }

which is syntactically invalid.

This pull-request contains a failing test for this case.

jeswr commented 1 year ago

@MPvHarmelen I just had a glance at the files changed and there is only a commit adding the test file; did you forget to commit the actual code changes?

I'm not a maintainer so I can't run the workflow to see if the tests are currently failing or not.

MPvHarmelen commented 1 year ago

Sorry, no! I encountered this issue and wanted to create an issue/pull-request combination to improve the DX for debugging the problem, but I forgot the issue half of it...

RubenVerborgh commented 1 month ago

(Quickly rebased this one to trigger CI.)