comunica / comunica-feature-link-traversal

📬 Comunica packages for link traversal-based query execution
Other
8 stars 11 forks source link

dep @types/shexj^2.1.2 has a breaking change #68

Closed ericprud closed 11 months ago

ericprud commented 1 year ago

Issue type:


Description:

(More of a potential bug, but templates don't invite creativity)

There's a non-backard-compatible change in the upcoming ShExJ 1.2, and corresponding @types/shexj. All top-level shapes require a ShapeDecl (it was optional in the EXTENDS branch but that led to a proliferation of bugs.)

Old structure:

{ "type": "Schema", "shapes": [
    { "type": "Shape", "id": "http://a.example/schema/S1",  "expression", … }
] }

New structure:

  { "type": "Schema", "shapes": [
+   {"type": "ShapeDecl", "id": "http://a.example/schema/S1", "shapeExpr":
      { "type": "Shape", "expression", … }
+   }
  ] }

.id is no longer allowed in top-level shapeExprs (or any shapeExprs). Ping me if y'all want extra eyes while fielding this change.


Environment:

Crash log:

github-actions[bot] commented 1 year ago

Thanks for reporting!

rubensworks commented 1 year ago

Thanks for letting us know @ericprud!

The only place we're using ShEx is here: https://github.com/comunica/comunica-feature-link-traversal/blob/master/packages/actor-rdf-metadata-extract-shapetrees/lib/ActorRdfMetadataExtractShapetrees.ts#L201-L214 So it looks like we'll need to make a small change indeed.

(just moving this issue to the repo where this code exists)

ericprud commented 1 year ago

https://github.com/comunica/comunica-feature-link-traversal/blob/master/packages/actor-rdf-metadata-extract-shapetrees/lib/ActorRdfMetadataExtractShapetrees.ts#L183 should now be

public async dereferenceShape(shapeIri: string, context: IActionContext): Promise<ShEx.ShapeDecl>