diff --git a/_next/data/git-sha-f2544a58c164bcbf96c75041ac91d22ed268a3f2/association/bounties.json b/_next/data/git-sha-f2544a58c164bcbf96c75041ac91d22ed268a3f2/association/bounties.json index 60e77e8e..a882ca7f 100644 --- a/_next/data/git-sha-f2544a58c164bcbf96c75041ac91d22ed268a3f2/association/bounties.json +++ b/_next/data/git-sha-f2544a58c164bcbf96c75041ac91d22ed268a3f2/association/bounties.json @@ -1 +1 @@ -{"pageProps":{"githubData":{"data":{"search":{"nodes":[{"state":"OPEN","title":"initialBindings in combination with named graph","url":"https://github.com/comunica/comunica/issues/1154","number":1154,"repository":{"name":"comunica","nameWithOwner":"comunica/comunica","url":"https://github.com/comunica/comunica","description":"📬 A knowledge graph querying framework for JavaScript"},"assignees":{"totalCount":0,"nodes":[]},"body":"\r\n\r\n\r\n#### Issue type:\r\n\r\n- :bug: Bug \r\n\r\n____\r\n#### Description:\r\n\r\nThis query works fine:\r\n\r\n```sparql\r\nCONSTRUCT FROM WHERE { ?s ?p ?o } LIMIT 100\r\n```\r\n\r\nWith code:\r\n\r\n```js\r\nconst quadStream = await this.engine.queryQuads(query, {\r\n sources: [\r\n {\r\n type: 'sparql',\r\n value: 'https://www.goudatijdmachine.nl/sparql/repositories/gtm',\r\n },\r\n ],\r\n});\r\n```\r\n\r\nBut when adding initial bindings, we get an error:\r\n\r\n```js\r\nconst quadStream = await this.engine.queryQuads(query, {\r\n sources: [\r\n {\r\n type: 'sparql',\r\n value: 'https://www.goudatijdmachine.nl/sparql/repositories/gtm',\r\n },\r\n ],\r\n initialBindings: bindingsFactory.fromRecord({}) as unknown as Bindings,\r\n});\r\n```\r\n\r\nConversely, when we’re not querying named graphs, the initial bindings work fine:\r\n\r\n```sparql\r\nCONSTRUCT WHERE { ?s ?p ?o } LIMIT 100\r\n```\r\n____\r\n#### Environment:\r\n\r\n\r\n\r\n\r\n@comunica/query-sparql@2.6.6\r\n\r\n#### Crash log:\r\n\r\n```\r\nCannot read properties of undefined (reading '0')\",\"stack\":\"TypeError: Cannot read properties of undefined (reading '0')\\n at translateFrom (/Users/david/src/netwerk-digitaal-erfgoed/network-of-terms/node_modules/sparqlalgebrajs/lib/sparql.js:228:32)\\n at translateOperation (/Users/david/src/netwerk-digitaal-erfgoed/network-of-terms/node_modules/sparqlalgebrajs/lib/sparql.js:71:33)\\n at translateProject (/Users/david/src/netwerk-digitaal-erfgoed/network-of-terms/node_modules/sparqlalgebrajs/lib/sparql.js:369:41)\\n at translateOperation (/Users/david/src/netwerk-digitaal-erfgoed/network-of-terms/node_modules/sparqlalgebrajs/lib/sparql.js:82:36)\\n at toSparqlJs (/Users/david/src/netwerk-digitaal-erfgoed/network-of-terms/node_modules/sparqlalgebrajs/lib/sparql.js:48:18)\\n at toSparql (/Users/david/src/netwerk-digitaal-erfgoed/network-of-terms/node_modules/sparqlalgebrajs/lib/sparql.js:42:32)\\n at ActorQueryOperationSparqlEndpoint.run (/Users/david/src/netwerk-digitaal-erfgoed/network-of-terms/node_modules/@comunica/actor-query-operation-sparql-endpoint/lib/ActorQueryOperationSparqlEndpoint.js:75:52)\\n at ActorQueryOperationSparqlEndpoint.runObservable (/Users/david/src/netwerk-digitaal-erfgoed/network-of-terms/node_modules/@comunica/core/lib/Actor.js:57:29)\\n at MediatorNumber.mediate (/Users/david/src/netwerk-digitaal-erfgoed/network-of-terms/node_modules/@comunica/core/lib/Mediator.js:79:22)\\n at process.processTicksAndRejections (node:internal/process/task_queues:95:5)\",\"path\":[\"terms\"],\"locations\":[{\"line\":2,\"column\":3}],\"extensions\":{}},\"message\":\"Cannot read properties of undefined (reading '0')\"}\r\n```\r\n\r\n-----\r\n\r\n## Bounty\r\n\r\nA [bounty](https://comunica.dev/association/bounties/) has been placed on this issue by:\r\n\r\n\r\n\r\n| |\r\n|-|\r\n| [\"Comunica](https://comunica.dev/association/) |\r\n| €136 |\r\n\r\n\r\n\r\n[Click here to learn more](https://comunica.dev/association/bounty_process/) if you're interested in claiming this bounty by resolving this issue.","bodyHTML":"\n\n

Issue type:

\n\n
\n

Description:

\n

This query works fine:

\n
CONSTRUCT FROM <http://www.ontotext.com/retain-bind-position> WHERE { ?s ?p ?o }  LIMIT 100
\n

With code:

\n
const quadStream = await this.engine.queryQuads(query, {\n  sources: [\n        {\n          type: 'sparql',\n          value: 'https://www.goudatijdmachine.nl/sparql/repositories/gtm',\n        },\n      ],\n});
\n

But when adding initial bindings, we get an error:

\n
const quadStream = await this.engine.queryQuads(query, {\n  sources: [\n        {\n          type: 'sparql',\n          value: 'https://www.goudatijdmachine.nl/sparql/repositories/gtm',\n        },\n      ],\n  initialBindings: bindingsFactory.fromRecord({}) as unknown as Bindings,\n});
\n

Conversely, when we’re not querying named graphs, the initial bindings work fine:

\n
CONSTRUCT WHERE { ?s ?p ?o } LIMIT 100
\n
\n

Environment:

\n\n\n

@comunica/query-sparql@2.6.6

\n

Crash log:

\n
Cannot read properties of undefined (reading '0')\",\"stack\":\"TypeError: Cannot read properties of undefined (reading '0')\\n    at translateFrom (/Users/david/src/netwerk-digitaal-erfgoed/network-of-terms/node_modules/sparqlalgebrajs/lib/sparql.js:228:32)\\n    at translateOperation (/Users/david/src/netwerk-digitaal-erfgoed/network-of-terms/node_modules/sparqlalgebrajs/lib/sparql.js:71:33)\\n    at translateProject (/Users/david/src/netwerk-digitaal-erfgoed/network-of-terms/node_modules/sparqlalgebrajs/lib/sparql.js:369:41)\\n    at translateOperation (/Users/david/src/netwerk-digitaal-erfgoed/network-of-terms/node_modules/sparqlalgebrajs/lib/sparql.js:82:36)\\n    at toSparqlJs (/Users/david/src/netwerk-digitaal-erfgoed/network-of-terms/node_modules/sparqlalgebrajs/lib/sparql.js:48:18)\\n    at toSparql (/Users/david/src/netwerk-digitaal-erfgoed/network-of-terms/node_modules/sparqlalgebrajs/lib/sparql.js:42:32)\\n    at ActorQueryOperationSparqlEndpoint.run (/Users/david/src/netwerk-digitaal-erfgoed/network-of-terms/node_modules/@comunica/actor-query-operation-sparql-endpoint/lib/ActorQueryOperationSparqlEndpoint.js:75:52)\\n    at ActorQueryOperationSparqlEndpoint.runObservable (/Users/david/src/netwerk-digitaal-erfgoed/network-of-terms/node_modules/@comunica/core/lib/Actor.js:57:29)\\n    at MediatorNumber.mediate (/Users/david/src/netwerk-digitaal-erfgoed/network-of-terms/node_modules/@comunica/core/lib/Mediator.js:79:22)\\n    at process.processTicksAndRejections (node:internal/process/task_queues:95:5)\",\"path\":[\"terms\"],\"locations\":[{\"line\":2,\"column\":3}],\"extensions\":{}},\"message\":\"Cannot read properties of undefined (reading '0')\"}\n
\n
\n

Bounty

\n

A bounty has been placed on this issue by:

\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n
\"Comunica
€136
\n\n

Click here to learn more if you're interested in claiming this bounty by resolving this issue.

","createdAt":"2023-02-09T11:08:02Z","closedAt":null},{"state":"CLOSED","title":"FILTER on langString literals does not work with N3 as source","url":"https://github.com/comunica/comunica/issues/1146","number":1146,"repository":{"name":"comunica","nameWithOwner":"comunica/comunica","url":"https://github.com/comunica/comunica","description":"📬 A knowledge graph querying framework for JavaScript"},"assignees":{"totalCount":1,"nodes":[{"name":"Daniel Beeke","avatarUrl":"https://avatars.githubusercontent.com/u/684215?u=44d5742e760eaa9cd2b05b5025654b028c50eacd&v=4","url":"https://github.com/danielbeeke"}]},"body":"```\r\n// add a quad with a language string\r\nconst store = new N3.Store();\r\nstore.addQuad(namedNode('http://ex.com/s'), namedNode('http://ex.com/p'), literal('abc', 'en'));\r\n\r\n// query it using SPARQL with a FILTER\r\nconst eng = new comunica.QueryEngine();\r\nconst bindings = await eng.queryBindings('SELECT ?o WHERE { ?s ?p ?o. FILTER(?o = \"abc\"@en) }', { sources: [ store ] });\r\n```\r\n\r\nAny FILTER on ?o in the example fails (with or without language string, = or !=). That is, as soon as a FILTER on the langString literal is present in the query, it won't return any results anymore. No crash or log warnings, just an empty result set.\r\n\r\nObserved on Comunica v2.6.0 in combination with N3 v1.16.3.\r\n\r\n-----\r\n\r\n## Bounty\r\n\r\nA [bounty](https://comunica.dev/association/bounties/) has been placed on this issue by:\r\n\r\n\r\n\r\n| |\r\n|-|\r\n| [\"Comunica](https://comunica.dev/association/) |\r\n| €272 |\r\n\r\n\r\n\r\n[Click here to learn more](https://comunica.dev/association/bounty_process/) if you're interested in claiming this bounty by resolving this issue.","bodyHTML":"
// add a quad with a language string\nconst store = new N3.Store();\nstore.addQuad(namedNode('http://ex.com/s'), namedNode('http://ex.com/p'), literal('abc', 'en'));\n\n// query it using SPARQL with a FILTER\nconst eng = new comunica.QueryEngine();\nconst bindings = await eng.queryBindings('SELECT ?o WHERE { ?s ?p ?o. FILTER(?o = \"abc\"@en) }', { sources: [ store ] });\n
\n

Any FILTER on ?o in the example fails (with or without language string, = or !=). That is, as soon as a FILTER on the langString literal is present in the query, it won't return any results anymore. No crash or log warnings, just an empty result set.

\n

Observed on Comunica v2.6.0 in combination with N3 v1.16.3.

\n
\n

Bounty

\n

A bounty has been placed on this issue by:

\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n
\"Comunica
€272
\n\n

Click here to learn more if you're interested in claiming this bounty by resolving this issue.

","createdAt":"2023-01-31T07:42:05Z","closedAt":"2023-03-23T09:12:08Z"},{"state":"OPEN","title":"UTF-8 characters get corrupted when inserting into blazegraph triple store","url":"https://github.com/comunica/comunica/issues/1140","number":1140,"repository":{"name":"comunica","nameWithOwner":"comunica/comunica","url":"https://github.com/comunica/comunica","description":"📬 A knowledge graph querying framework for JavaScript"},"assignees":{"totalCount":0,"nodes":[]},"body":"\r\n\r\n\r\n#### Issue type:\r\n\r\n- :bug: Bug \r\n\r\n____\r\n#### Description:\r\n\r\n\r\n\r\nWhen using comunica to insert triples containing diacritics, the characters get corrupted, while if axios is used the triples are inserted correctly.\r\n\r\n\r\nFor example:\r\n\r\n##### Input triples:\r\n\r\n`\" \\\"Terzic\\\" .\"\r\n\r\n \" \\\"Терзић\\\" .\"\r\n\r\n \" \\\"Terzić\\\" .\"\r\n\r\n \" \\\"特尔日奇\\\" .\"\r\n`\r\n\r\n##### Triples in triple store after insertion:\r\n\r\n`\" \\\"Terzic\\\" .\"\r\n\r\n \" \\\"Терзић\\\" .\"\r\n\r\n \" \\\"Terzić\\\" .\"\r\n\r\n \" \\\"特尔日奇\\\" .\"`\r\n\r\n##### Code used to insert using comunica:\r\n\"Screenshot\r\n\r\n##### Code used to insert using axios:\r\n\"Screenshot\r\n\r\n____\r\n\r\n#### Environment:\r\n\r\n\r\n\r\n\r\n`\"@comunica/query-sparql\": \"^2.4.3\"`\r\n\r\n#### Crash log:\r\n\r\n\r\n\r\n\r\n-----\r\n\r\n## Bounty\r\n\r\nA [bounty](https://comunica.dev/association/bounties/) has been placed on this issue by:\r\n\r\n\r\n\r\n| |\r\n|-|\r\n| [\"Comunica](https://comunica.dev/association/) |\r\n| €544 |\r\n\r\n\r\n\r\n[Click here to learn more](https://comunica.dev/association/bounty_process/) if you're interested in claiming this bounty by resolving this issue.\r\n","bodyHTML":"\n\n

Issue type:

\n
    \n
  • 🐛 Bug
  • \n
\n
\n

Description:

\n\n

When using comunica to insert triples containing diacritics, the characters get corrupted, while if axios is used the triples are inserted correctly.

\n

For example:

\n
Input triples:
\n

`\"urn:uuid:1231231-321-3123-123-123 http://schema.org/normal \"Terzic\" .\"

\n

\"urn:uuid:1231231-321-3123-123-123 http://schema.org/test1 \"Терзић\" .\"

\n

\"urn:uuid:1231231-321-3123-123-123 http://schema.org/test2 \"Terzić\" .\"

\n

\"urn:uuid:1231231-321-3123-123-123 http://schema.org/test3 \"特尔日奇\" .\"
\n`

\n
Triples in triple store after insertion:
\n

`\"urn:uuid:01231231-0321-3123-0123-000000000123 http://schema.org/normal \"Terzic\" .\"

\n

\"urn:uuid:01231231-0321-3123-0123-000000000123 http://schema.org/test1 \"Те�зи�\" .\"

\n

\"urn:uuid:01231231-0321-3123-0123-000000000123 http://schema.org/test2 \"Terzi�\" .\"

\n

\"urn:uuid:01231231-0321-3123-0123-000000000123 http://schema.org/test3 \"����\" .\"`

\n
Code used to insert using comunica:
\n

\"Screenshot

\n
Code used to insert using axios:
\n

\"Screenshot

\n
\n

Environment:

\n\n\n

\"@comunica/query-sparql\": \"^2.4.3\"

\n

Crash log:

\n\n\n
\n

Bounty

\n

A bounty has been placed on this issue by:

\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n
\"Comunica
€544
\n\n

Click here to learn more if you're interested in claiming this bounty by resolving this issue.

","createdAt":"2023-01-16T15:55:01Z","closedAt":null},{"state":"CLOSED","title":"Add check for query-sparql-* depencies","url":"https://github.com/comunica/comunica/issues/1139","number":1139,"repository":{"name":"comunica","nameWithOwner":"comunica/comunica","url":"https://github.com/comunica/comunica","description":"📬 A knowledge graph querying framework for JavaScript"},"assignees":{"totalCount":0,"nodes":[]},"body":"\r\n\r\n\r\n#### Issue type:\r\n\r\n- :heavy_plus_sign: Feature request \r\n\r\n____\r\n#### Description:\r\n\r\nTo avoid issues such as https://github.com/comunica/comunica/commit/e3b938940fa30b10bf2aa68a5f6ac3086399873a, we should add a CI check to ensure that all dependencies from the compiled engine configs are available in the package.json file of each engine.\r\nWe may be able to tweak our `depcheck` script for this.\r\n\r\n@jeswr any thoughts on this?\r\n\r\n-----\r\n\r\n## Bounty\r\n\r\nA [bounty](https://comunica.dev/association/bounties/) has been placed on this issue by:\r\n\r\n\r\n\r\n| |\r\n|-|\r\n| [\"Comunica](https://comunica.dev/association/) |\r\n| €136 |\r\n\r\n\r\n\r\n[Click here to learn more](https://comunica.dev/association/bounty_process/) if you're interested in claiming this bounty by resolving this issue.","bodyHTML":"\n\n

Issue type:

\n
    \n
  • ➕ Feature request
  • \n
\n
\n

Description:

\n

To avoid issues such as e3b9389, we should add a CI check to ensure that all dependencies from the compiled engine configs are available in the package.json file of each engine.
\nWe may be able to tweak our depcheck script for this.

\n

@jeswr any thoughts on this?

\n
\n

Bounty

\n

A bounty has been placed on this issue by:

\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n
\"Comunica
€136
\n\n

Click here to learn more if you're interested in claiming this bounty by resolving this issue.

","createdAt":"2023-01-11T10:54:51Z","closedAt":"2023-05-05T09:09:30Z"},{"state":"CLOSED","title":"Optional fails on N3 store","url":"https://github.com/comunica/comunica/issues/1095","number":1095,"repository":{"name":"comunica","nameWithOwner":"comunica/comunica","url":"https://github.com/comunica/comunica","description":"📬 A knowledge graph querying framework for JavaScript"},"assignees":{"totalCount":1,"nodes":[{"name":"Daniel Beeke","avatarUrl":"https://avatars.githubusercontent.com/u/684215?u=44d5742e760eaa9cd2b05b5025654b028c50eacd&v=4","url":"https://github.com/danielbeeke"}]},"body":"\r\n\r\n\r\n#### Issue type:\r\n\r\n- :bug: Bug \r\n\r\n____\r\n#### Description:\r\n\r\nGiven the following two triples I would expect four bindings as the result of the following query.\r\n```\r\n \r\n \"Lorem ipsum\"@nl\r\n\r\n```\r\n\r\n```\r\n SELECT * WHERE { \r\n ?s ?p ?o .\r\n\r\n OPTIONAL {\r\n ?s ?name .\r\n FILTER(lang(?name) = 'nl')\r\n }\r\n }\r\n```\r\n_Expectation_\r\ns, p, o and name\r\n\r\n_Actual_\r\ns, p and o\r\n\r\nWhen changing the language filter to something that does not exists I get zero bindings.\r\n\r\nSee http://danielbeeke.nl/comunica-rdfjs-optional-bug/ for a reproduction.\r\nAnd the console on https://github.com/danielbeeke/comunica-rdfjs-optional-bug.\r\n____\r\n#### Environment:\r\n\r\nI am using N3 and Comunica in a web site.\r\nN3 is fetched as an ESM module.\r\nComunica is included via a script tag.\r\n\r\n-----\r\n\r\n## Bounty\r\n\r\nA [bounty](https://comunica.dev/association/bounties/) has been placed on this issue by:\r\n\r\n\r\n\r\n| |\r\n|-|\r\n| [\"Comunica](https://comunica.dev/association/) |\r\n| €544 |\r\n\r\n\r\n\r\n[Click here to learn more](https://comunica.dev/association/bounty_process/) if you're interested in claiming this bounty by resolving this issue.","bodyHTML":"\n\n

Issue type:

\n
    \n
  • 🐛 Bug
  • \n
\n
\n

Description:

\n

Given the following two triples I would expect four bindings as the result of the following query.

\n
<http://ex.org/Pluto> <http://ex.org/type> <http://ex.org/Dog>\n<http://ex.org/Mickey> <http://ex.org/name> \"Lorem ipsum\"@nl\n\n
\n
  SELECT * WHERE { \n    ?s ?p ?o .\n\n    OPTIONAL {\n      ?s <http://ex.org/name> ?name .\n      FILTER(lang(?name) = 'nl')\n    }\n  }\n
\n

Expectation
\ns, p, o and name

\n

Actual
\ns, p and o

\n

When changing the language filter to something that does not exists I get zero bindings.

\n

See http://danielbeeke.nl/comunica-rdfjs-optional-bug/ for a reproduction.
\nAnd the console on https://github.com/danielbeeke/comunica-rdfjs-optional-bug.

\n
\n

Environment:

\n

I am using N3 and Comunica in a web site.
\nN3 is fetched as an ESM module.
\nComunica is included via a script tag.

\n
\n

Bounty

\n

A bounty has been placed on this issue by:

\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n
\"Comunica
€544
\n\n

Click here to learn more if you're interested in claiming this bounty by resolving this issue.

","createdAt":"2022-10-07T06:32:50Z","closedAt":"2023-03-08T06:36:14Z"},{"state":"CLOSED","title":"Stream halts on order by over empty source","url":"https://github.com/comunica/comunica/issues/1091","number":1091,"repository":{"name":"comunica","nameWithOwner":"comunica/comunica","url":"https://github.com/comunica/comunica","description":"📬 A knowledge graph querying framework for JavaScript"},"assignees":{"totalCount":0,"nodes":[]},"body":"\r\n\r\n\r\n#### Issue type:\r\n\r\n- :bug: Bug \r\n\r\n____\r\n#### Description:\r\n\r\nThe node process terminates when reading an empty query bindings stream. What is particularly atypical:\r\n- No error is thrown\r\n- Subsequent lines are not executed\r\n- The process exits with a `0` exit code\r\n\r\nSee [here](https://github.com/LaurensRietveld/comunica/blob/bug/executionStops/engines/query-sparql/lib/executionSeemsToStop.ts) for a minimum working example.\r\n\r\n\r\n____\r\n#### Environment:\r\n\r\n\r\n\r\n\r\n\r\n```\r\n| software | version\r\n| ---------------- | -------\r\n| Comunica Engine | 2.4.3 (dev)\r\n| node | v16.17.0\r\n| npm | 8.15.0\r\n| yarn | 1.22.19\r\n| Operating System | linux (Linux 5.15.0-46-generic)\r\n\r\n```\r\n\r\n(note, the github issue template should be updated so that it references `node ./engines/query-sparql/bin/query.js -v` instead of `node ./packages/actor-init-query/bin/query.js -v`)\r\n\r\n#### Crash log:\r\n\r\nNone\r\n\r\n-----\r\n\r\n## Bounty\r\n\r\nA [bounty](https://comunica.dev/association/bounties/) has been placed on this issue by:\r\n\r\n\r\n\r\n| |\r\n|-|\r\n| [\"Comunica](https://comunica.dev/association/) |\r\n| €544 |\r\n\r\n\r\n\r\n[Click here to learn more](https://comunica.dev/association/bounty_process/) if you're interested in claiming this bounty by resolving this issue.\r\n","bodyHTML":"\n\n

Issue type:

\n
    \n
  • 🐛 Bug
  • \n
\n
\n

Description:

\n

The node process terminates when reading an empty query bindings stream. What is particularly atypical:

\n
    \n
  • No error is thrown
  • \n
  • Subsequent lines are not executed
  • \n
  • The process exits with a 0 exit code
  • \n
\n

See here for a minimum working example.

\n
\n

Environment:

\n\n\n
| software         | version\n| ---------------- | -------\n| Comunica Engine  | 2.4.3 (dev)\n| node             | v16.17.0\n| npm              | 8.15.0\n| yarn             | 1.22.19\n| Operating System | linux (Linux 5.15.0-46-generic)\n\n
\n

(note, the github issue template should be updated so that it references node ./engines/query-sparql/bin/query.js -v instead of node ./packages/actor-init-query/bin/query.js -v)

\n

Crash log:

\n

None

\n
\n

Bounty

\n

A bounty has been placed on this issue by:

\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n
\"Comunica
€544
\n\n

Click here to learn more if you're interested in claiming this bounty by resolving this issue.

","createdAt":"2022-10-04T13:08:30Z","closedAt":"2023-05-25T10:41:47Z"},{"state":"CLOSED","title":"Invalid baseIRI when querying a local JSON-LD file","url":"https://github.com/comunica/comunica/issues/1044","number":1044,"repository":{"name":"comunica","nameWithOwner":"comunica/comunica","url":"https://github.com/comunica/comunica","description":"📬 A knowledge graph querying framework for JavaScript"},"assignees":{"totalCount":1,"nodes":[{"name":"Andrew Zhurov","avatarUrl":"https://avatars.githubusercontent.com/u/13056889?u=02b5e16b9436aa98280faddec3e5ebd92a522b55&v=4","url":"https://github.com/andrewzhurov"}]},"body":"\r\n\r\n\r\n#### Issue type:\r\n\r\n- :bug: Bug \r\n\r\n____\r\n#### Description:\r\n\r\nWhen I query a local JSON-LD file with this command\r\n\r\n```shell\r\ncomunica-sparql-file \"/Users/pheyvaer/Development/test.jsonld\" -q \"SELECT * WHERE {?s ?p ?o}\"\r\n````\r\n\r\n I get the following error \r\n\r\n```\r\nFound invalid baseIRI '/Users/pheyvaer/Development/test.jsonld' for value '/Users/pheyvaer/Development/test.jsonld'\r\n```\r\nThe error doesn't occur when adding `file://` to the path:\r\n\r\n```shell\r\ncomunica-sparql-file \"file:///Users/pheyvaer/Development/test.jsonld\" -q \"SELECT * WHERE {?s ?p ?o}\"\r\n````\r\n____\r\n#### Environment:\r\n```shell\r\n$ comunica-sparql-file -v\r\n```\r\n| software | version\r\n| ---------------- | -------\r\n| Comunica Engine | 2.3.0 \r\n| node | v14.19.2\r\n| npm | 8.10.0\r\n| yarn | 1.22.5\r\n| Operating System | darwin (Darwin 21.5.0)\r\n\r\n\r\n#### Crash log:\r\n\r\n\r\n\r\n\r\n-----\r\n\r\n## Bounty\r\n\r\nA [bounty](https://comunica.dev/association/bounties/) has been placed on this issue by:\r\n\r\n\r\n\r\n| |\r\n|-|\r\n| [\"Comunica](https://comunica.dev/association/) |\r\n| €136 |\r\n\r\n\r\n\r\n[Click here to learn more](https://comunica.dev/association/bounty_process/) if you're interested in claiming this bounty by resolving this issue.\r\n","bodyHTML":"\n\n

Issue type:

\n
    \n
  • 🐛 Bug
  • \n
\n
\n

Description:

\n

When I query a local JSON-LD file with this command

\n
comunica-sparql-file \"/Users/pheyvaer/Development/test.jsonld\" -q \"SELECT * WHERE {?s ?p ?o}\"
\n

I get the following error

\n
Found invalid baseIRI '/Users/pheyvaer/Development/test.jsonld' for value '/Users/pheyvaer/Development/test.jsonld'\n
\n

The error doesn't occur when adding file:// to the path:

\n
comunica-sparql-file \"file:///Users/pheyvaer/Development/test.jsonld\" -q \"SELECT * WHERE {?s ?p ?o}\"
\n
\n

Environment:

\n
$ comunica-sparql-file -v
\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n
softwareversion
Comunica Engine2.3.0
nodev14.19.2
npm8.10.0
yarn1.22.5
Operating Systemdarwin (Darwin 21.5.0)
\n

Crash log:

\n\n\n
\n

Bounty

\n

A bounty has been placed on this issue by:

\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n
\"Comunica
€136
\n\n

Click here to learn more if you're interested in claiming this bounty by resolving this issue.

","createdAt":"2022-08-12T09:03:58Z","closedAt":"2023-01-11T10:12:15Z"},{"state":"CLOSED","title":"\"EXISTS found, but no existence hook provided\" in Optional block","url":"https://github.com/comunica/comunica/issues/1029","number":1029,"repository":{"name":"comunica","nameWithOwner":"comunica/comunica","url":"https://github.com/comunica/comunica","description":"📬 A knowledge graph querying framework for JavaScript"},"assignees":{"totalCount":0,"nodes":[]},"body":"\r\n\r\n\r\n#### Issue type:\r\n\r\n- :bug: Bug \r\n\r\n____\r\n#### Description:\r\n\r\nThe following code test throws \"EXISTS found, but no existence hook provided\" but should pass\r\nNote that these queries worked in @comunica/actor-init-sparql-rdfjs\r\nAlso presumably similar issue to https://github.com/comunica/comunica/issues/650\r\n```\r\nimport 'mocha'\r\nimport n3 from 'n3'\r\nimport { QueryEngine } from '@comunica/query-sparql-rdfjs'\r\nimport chai from 'chai'\r\n\r\nconst sparql = new QueryEngine()\r\n\r\ndescribe('comunica sparql', () => {\r\n it('Does not support EXISTS sparql keyword', async () => {\r\n const store = new n3.Store()\r\n const subject = n3.DataFactory.namedNode('http://subject')\r\n const predicate = n3.DataFactory.namedNode('http://predicate')\r\n const object = n3.DataFactory.namedNode('http://object')\r\n const blank = n3.DataFactory.blankNode()\r\n const spo = n3.DataFactory.quad(subject, predicate, object)\r\n const bpo = n3.DataFactory.quad(blank, predicate, object)\r\n store.addQuads([spo, bpo])\r\n const quadStream = await sparql.queryQuads(`\r\n CONSTRUCT {\r\n ?s ?p ?o.\r\n }\r\n WHERE { \r\n ?s ?p ?o.\r\n OPTIONAL {\r\n FILTER EXISTS {\r\n ?s2 ?p ?o.\r\n FILTER (?s != ?s2)\r\n }\r\n }\r\n }\r\n `,\r\n { sources: [store] })\r\n const result_quads = await quadStream.toArray()\r\n chai.expect(result_quads).to.deep.equal([{\r\n termType: 'Quad',\r\n value: '',\r\n graph: {\r\n termType: 'DefaultGraph',\r\n value: '',\r\n },\r\n subject: {\r\n id: 'http://subject',\r\n },\r\n predicate: {\r\n id: 'http://predicate',\r\n },\r\n object: {\r\n id: 'http://object',\r\n },\r\n }, {\r\n termType: 'Quad',\r\n value: '',\r\n graph: {\r\n termType: 'DefaultGraph',\r\n value: '',\r\n },\r\n subject: {\r\n termType: 'BlankNode',\r\n value: 'bc_0_n3-01',\r\n },\r\n predicate: {\r\n id: 'http://predicate',\r\n },\r\n object: {\r\n id: 'http://object',\r\n },\r\n }])\r\n })\r\n})\r\n\r\n```\r\n\r\n____\r\n#### Environment:\r\n\r\n `node ./packages/actor-init-query/bin/query.js -v`--> not part of \"@comunica/query-sparql-rdfjs\": \"^2.3.0\",\r\n\r\n#### Crash log:\r\n\r\nNA\r\n\r\n-----\r\n\r\n## Bounty\r\n\r\nA [bounty](https://comunica.dev/association/bounties/) has been placed on this issue by:\r\n\r\n\r\n\r\n| |\r\n|-|\r\n| [\"Comunica](https://comunica.dev/association/) |\r\n| €136 |\r\n\r\n\r\n\r\n[Click here to learn more](https://comunica.dev/association/bounty_process/) if you're interested in claiming this bounty by resolving this issue.\r\n","bodyHTML":"\n\n

Issue type:

\n
    \n
  • 🐛 Bug
  • \n
\n
\n

Description:

\n

The following code test throws \"EXISTS found, but no existence hook provided\" but should pass
\nNote that these queries worked in @comunica/actor-init-sparql-rdfjs
\nAlso presumably similar issue to #650

\n
import 'mocha'\nimport n3 from 'n3'\nimport { QueryEngine } from '@comunica/query-sparql-rdfjs'\nimport chai from 'chai'\n\nconst sparql = new QueryEngine()\n\ndescribe('comunica sparql', () => {\n  it('Does not support EXISTS sparql keyword', async () => {\n    const store = new n3.Store()\n    const subject = n3.DataFactory.namedNode('http://subject')\n    const predicate = n3.DataFactory.namedNode('http://predicate')\n    const object = n3.DataFactory.namedNode('http://object')\n    const blank = n3.DataFactory.blankNode()\n    const spo = n3.DataFactory.quad(subject, predicate, object)\n    const bpo = n3.DataFactory.quad(blank, predicate, object)\n    store.addQuads([spo, bpo])\n    const quadStream = await sparql.queryQuads(`\n      CONSTRUCT {\n        ?s ?p ?o.\n      }\n      WHERE { \n        ?s ?p ?o.\n        OPTIONAL {\n          FILTER EXISTS {\n            ?s2 ?p ?o.\n            FILTER (?s != ?s2)\n          }\n        }\n      }\n      `,\n      { sources: [store] })\n    const result_quads = await quadStream.toArray()\n    chai.expect(result_quads).to.deep.equal([{\n      termType: 'Quad',\n      value: '',\n      graph: {\n        termType: 'DefaultGraph',\n        value: '',\n      },\n      subject: {\n        id: 'http://subject',\n      },\n      predicate: {\n        id: 'http://predicate',\n      },\n      object: {\n        id: 'http://object',\n      },\n    }, {\n      termType: 'Quad',\n      value: '',\n      graph: {\n        termType: 'DefaultGraph',\n        value: '',\n      },\n      subject: {\n        termType: 'BlankNode',\n        value: 'bc_0_n3-01',\n      },\n      predicate: {\n        id: 'http://predicate',\n      },\n      object: {\n        id: 'http://object',\n      },\n    }])\n  })\n})\n\n
\n
\n

Environment:

\n

node ./packages/actor-init-query/bin/query.js -v--> not part of \"@comunica/query-sparql-rdfjs\": \"^2.3.0\",

\n

Crash log:

\n

NA

\n
\n

Bounty

\n

A bounty has been placed on this issue by:

\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n
\"Comunica
€136
\n\n

Click here to learn more if you're interested in claiming this bounty by resolving this issue.

","createdAt":"2022-07-18T20:14:45Z","closedAt":"2023-05-25T10:58:27Z"},{"state":"CLOSED","title":"secure conversion to ActionContext object for context added to source","url":"https://github.com/comunica/comunica/issues/1003","number":1003,"repository":{"name":"comunica","nameWithOwner":"comunica/comunica","url":"https://github.com/comunica/comunica","description":"📬 A knowledge graph querying framework for JavaScript"},"assignees":{"totalCount":1,"nodes":[{"name":"Aron Buzogany","avatarUrl":"https://avatars.githubusercontent.com/u/108480125?v=4","url":"https://github.com/AronBuzogany"}]},"body":"#### Issue type:\r\n\r\n- :heavy_plus_sign: Feature request \r\n\r\n____\r\n#### Description:\r\n\r\n\r\nAt present a context can be added to a source making a new ActionContext. \r\ne.g. const context = {sources: [ {value:'path_to_source', context : new ActionContext({'@comunica/bus-context-preprocess:mapping':'path_to_mapping'})}] }\r\nI would like to be able to add a context using a plain object, and count on Comunica to convert this object to a ActionContext, like is done with the other context objects. \r\ne.g. const context = {sources: [ {value:'path_to_source', context :{'@comunica/bus-context-preprocess:mapping':'path_to_mapping'}}] }\r\n\r\n-----\r\n\r\n## Bounty\r\n\r\nA [bounty](https://comunica.dev/association/bounties/) has been placed on this issue by:\r\n\r\n\r\n\r\n| |\r\n|-|\r\n| [\"Comunica](https://comunica.dev/association/) |\r\n| €272 |\r\n\r\n\r\n\r\n[Click here to learn more](https://comunica.dev/association/bounty_process/) if you're interested in claiming this bounty by resolving this issue.","bodyHTML":"

Issue type:

\n
    \n
  • ➕ Feature request
  • \n
\n
\n

Description:

\n\n

At present a context can be added to a source making a new ActionContext.
\ne.g. const context = {sources: [ {value:'path_to_source', context : new ActionContext({'@comunica/bus-context-preprocess:mapping':'path_to_mapping'})}] }
\nI would like to be able to add a context using a plain object, and count on Comunica to convert this object to a ActionContext, like is done with the other context objects.
\ne.g. const context = {sources: [ {value:'path_to_source', context :{'@comunica/bus-context-preprocess:mapping':'path_to_mapping'}}] }

\n
\n

Bounty

\n

A bounty has been placed on this issue by:

\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n
\"Comunica
€272
\n\n

Click here to learn more if you're interested in claiming this bounty by resolving this issue.

","createdAt":"2022-05-25T14:40:02Z","closedAt":"2023-10-16T12:49:33Z"},{"state":"CLOSED","title":"Querying graphdb results in a lot of requests","url":"https://github.com/comunica/comunica/issues/994","number":994,"repository":{"name":"comunica","nameWithOwner":"comunica/comunica","url":"https://github.com/comunica/comunica","description":"📬 A knowledge graph querying framework for JavaScript"},"assignees":{"totalCount":0,"nodes":[]},"body":"#### Issue type:\r\n\r\n- :bug: Bug \r\n\r\n____\r\n#### Description:\r\n\r\nQuery to GraphDB results in a lot of requests.\r\n\r\nCode example with screenshot of the logs: https://gist.github.com/zeroxbt/6cfede66e5104471d303b69372ebb51f\r\n\r\n-----\r\n\r\n## Bounty\r\n\r\nA [bounty](https://comunica.dev/association/bounties/) has been placed on this issue by:\r\n\r\n\r\n\r\n| |\r\n|-|\r\n| [\"Comunica](https://comunica.dev/association/) |\r\n| €272 |\r\n\r\n\r\n\r\n[Click here to learn more](https://comunica.dev/association/bounty_process/) if you're interested in claiming this bounty by resolving this issue.","bodyHTML":"

Issue type:

\n
    \n
  • 🐛 Bug
  • \n
\n
\n

Description:

\n

Query to GraphDB results in a lot of requests.

\n

Code example with screenshot of the logs: https://gist.github.com/zeroxbt/6cfede66e5104471d303b69372ebb51f

\n
\n

Bounty

\n

A bounty has been placed on this issue by:

\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n
\"Comunica
€272
\n\n

Click here to learn more if you're interested in claiming this bounty by resolving this issue.

","createdAt":"2022-04-26T10:16:26Z","closedAt":"2023-01-16T14:07:43Z"},{"state":"CLOSED","title":"INSERT DATA query on solid pod crashes in browser - again","url":"https://github.com/comunica/comunica-feature-solid/issues/30","number":30,"repository":{"name":"comunica-feature-solid","nameWithOwner":"comunica/comunica-feature-solid","url":"https://github.com/comunica/comunica-feature-solid","description":"📬 Comunica packages for query execution over Solid data pods"},"assignees":{"totalCount":1,"nodes":[{"name":"Ludwig","avatarUrl":"https://avatars.githubusercontent.com/u/35169452?u=03ecc9f16e49afe4ce4399e97001ee94a342c435&v=4","url":"https://github.com/ludwigschubi"}]},"body":"_This issue has been modified by @rubensworks to describe the intended solution_\r\n\r\n**Problem:**\r\n\r\nThe external [`solid-client-authn-js`](https://github.com/inrupt/solid-client-authn-js) has a [bug](https://github.com/inrupt/solid-client-authn-js/issues/2178) that makes it pass incorrect content types on PUT requests.\r\n\r\nThis only occurs in browsers, not in Node.js.\r\n\r\n**Possible solution:**\r\n\r\nSince the bug only seems to occur when using headers using a `Headers` object, and not when passing headers as a plain record, we may be able to work around it by just converting our `Headers` object to a record.\r\n\r\n**Implementation suggestions:**\r\n\r\nThe same workaround as [here](https://github.com/comunica/comunica/blob/master/packages/actor-http-fetch/lib/ActorHttpFetch.ts#L56-L59) could be applied [here](https://github.com/comunica/comunica/blob/master/packages/actor-http-fetch/lib/FetchInitPreprocessor-browser.ts).\r\n\r\n-----\r\n\r\nOriginal issue:\r\n\r\n#### Issue type:\r\n\r\n- :bug: Bug \r\n\r\n____\r\n#### Description:\r\n\r\nI'm trying to do an insert query using `@comunica/query-sparql-solid` in a next.js + typescript app. I recently ran into another problem reported here (https://github.com/comunica/comunica-feature-solid/issues/22) with a very similar setup. I since switched from the deprecated `@comunica/actor-init-sparql-solid` to `@comunica/query-sparql-solid`. Therefore, the same pre-condition applies: the same query works when executed via command line. This is what I'm trying to do in my TypeScript code:\r\n\r\n```\r\n const insertQuery = `\r\n INSERT DATA {\r\n <${\r\n getDefaultSession().info.webId?.split(\"#\")[0]\r\n }#Seppli> 'Seppli'.\r\n }\r\n `;\r\n\r\n console.log(insertQuery);\r\n\r\n await engine.queryVoid(insertQuery, {\r\n sources: [getDefaultSession().info.webId!],\r\n \"@comunica/actor-http-inrupt-solid-client-authn:session\":\r\n getDefaultSession(),\r\n });\r\n```\r\nFull code available [here](https://github.com/remodietlicher/comunica-solid-react-test). But it fails with this error: [Unsupported patch content type: text/plain](https://pastebin.com/TMexGNpM).\r\n\r\n____\r\n#### Environment:\r\n\r\n\r\n\r\n\r\ncomunica-solid-react-test (main)$ ./node_modules/.bin/comunica-sparql-solid -v\r\n| software | version\r\n| ---------------- | -------\r\n| Comunica Engine | 2.0.6 \r\n| node | v16.14.0\r\n| npm | 8.3.1\r\n| yarn | 1.22.17\r\n| Operating System | linux (Linux 5.13.0-37-generic)\r\n\r\n#### Crash log:\r\n\r\n\r\n\r\nhttps://pastebin.com/TMexGNpM\r\n\r\n-----\r\n\r\n## Bounty\r\n\r\nA [bounty](https://comunica.dev/association/bounties/) has been placed on this issue by:\r\n\r\n\r\n\r\n| |\r\n|-|\r\n| [\"Comunica](https://comunica.dev/association/) |\r\n| €272 |\r\n\r\n\r\n\r\n[Click here to learn more](https://comunica.dev/association/bounty_process/) if you're interested in claiming this bounty by resolving this issue.\r\n","bodyHTML":"

This issue has been modified by @rubensworks to describe the intended solution

\n

Problem:

\n

The external solid-client-authn-js has a bug that makes it pass incorrect content types on PUT requests.

\n

This only occurs in browsers, not in Node.js.

\n

Possible solution:

\n

Since the bug only seems to occur when using headers using a Headers object, and not when passing headers as a plain record, we may be able to work around it by just converting our Headers object to a record.

\n

Implementation suggestions:

\n

The same workaround as here could be applied here.

\n
\n

Original issue:

\n

Issue type:

\n
    \n
  • 🐛 Bug
  • \n
\n
\n

Description:

\n

I'm trying to do an insert query using @comunica/query-sparql-solid in a next.js + typescript app. I recently ran into another problem reported here (#22) with a very similar setup. I since switched from the deprecated @comunica/actor-init-sparql-solid to @comunica/query-sparql-solid. Therefore, the same pre-condition applies: the same query works when executed via command line. This is what I'm trying to do in my TypeScript code:

\n
    const insertQuery = `\n      INSERT DATA {\n        <${\n          getDefaultSession().info.webId?.split(\"#\")[0]\n        }#Seppli> <http://xmlns.com/foaf/0.1/name> 'Seppli'.\n      }\n    `;\n\n    console.log(insertQuery);\n\n    await engine.queryVoid(insertQuery, {\n      sources: [getDefaultSession().info.webId!],\n      \"@comunica/actor-http-inrupt-solid-client-authn:session\":\n        getDefaultSession(),\n    });\n
\n

Full code available here. But it fails with this error: Unsupported patch content type: text/plain.

\n
\n

Environment:

\n\n\n

comunica-solid-react-test (main)$ ./node_modules/.bin/comunica-sparql-solid -v

\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n
softwareversion
Comunica Engine2.0.6
nodev16.14.0
npm8.3.1
yarn1.22.17
Operating Systemlinux (Linux 5.13.0-37-generic)
\n

Crash log:

\n\n\n

https://pastebin.com/TMexGNpM

\n
\n

Bounty

\n

A bounty has been placed on this issue by:

\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n
\"Comunica
€272
\n\n

Click here to learn more if you're interested in claiming this bounty by resolving this issue.

","createdAt":"2022-03-24T21:23:59Z","closedAt":"2022-09-06T08:29:56Z"},{"state":"OPEN","title":"Expose ESM modules","url":"https://github.com/comunica/comunica/issues/930","number":930,"repository":{"name":"comunica","nameWithOwner":"comunica/comunica","url":"https://github.com/comunica/comunica","description":"📬 A knowledge graph querying framework for JavaScript"},"assignees":{"totalCount":0,"nodes":[]},"body":"#### Issue type:\r\n\r\n- :heavy_plus_sign: Feature request \r\n\r\n____\r\n#### Description:\r\n\r\nCurrently, Comunica only exposes CommonJS modules for Node.js.\r\nIn the future, we should expose both ESM and CJS modules, as this will make it easier to use Comunica in other environments, like the browser.\r\n\r\nSome pointers:\r\n- https://2ality.com/2021/06/typescript-esm-nodejs.html\r\n- https://www.typescriptlang.org/docs/handbook/2/modules.html\r\n- https://github.com/RubenVerborgh/AsyncIterator/blob/main/package.json\r\n\r\nRelated to #857.\r\n\r\n-----\r\n\r\n## Bounty\r\n\r\nA [bounty](https://comunica.dev/association/bounties/) has been placed on this issue by:\r\n\r\n\r\n\r\n| |\r\n|-|\r\n| [\"Comunica](https://comunica.dev/association/) |\r\n| *Variable budget* |\r\n\r\n\r\n\r\n[Click here to learn more](https://comunica.dev/association/bounty_process/) if you're interested in claiming this bounty by resolving this issue.","bodyHTML":"

Issue type:

\n
    \n
  • ➕ Feature request
  • \n
\n
\n

Description:

\n

Currently, Comunica only exposes CommonJS modules for Node.js.
\nIn the future, we should expose both ESM and CJS modules, as this will make it easier to use Comunica in other environments, like the browser.

\n

Some pointers:

\n\n

Related to #857.

\n
\n

Bounty

\n

A bounty has been placed on this issue by:

\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n
\"Comunica
Variable budget
\n\n

Click here to learn more if you're interested in claiming this bounty by resolving this issue.

","createdAt":"2022-02-14T12:35:10Z","closedAt":null},{"state":"CLOSED","title":"ORDER BY is not implemented completely","url":"https://github.com/comunica/comunica/issues/892","number":892,"repository":{"name":"comunica","nameWithOwner":"comunica/comunica","url":"https://github.com/comunica/comunica","description":"📬 A knowledge graph querying framework for JavaScript"},"assignees":{"totalCount":1,"nodes":[{"name":"Thomas Tanon","avatarUrl":"https://avatars.githubusercontent.com/u/458123?u=8f3e73bd5196789bdbf821f0f4e309dffdffd295&v=4","url":"https://github.com/Tpt"}]},"body":"_This issue has been modified by @rubensworks to describe the intended solution_\r\n\r\nApparently, [we only support ordering by literal values](https://github.com/comunica/sparqlee/blob/7c1180638154c72d3c3292e48d000ed9770796f0/lib/util/Ordering.ts#L8), and a total ordering as mentioned in the [SPARQL spec](https://www.w3.org/TR/sparql11-query/#modOrderBy) has not been implemented yet.\r\n\r\nThe goal of this issue is to properly implement total ordering in sparqlee (with the necessary unit tests), and optionally some integration tests here in Comunica.\r\n\r\n-----\r\n\r\n#### Issue type:\r\n\r\n- :bug: Bug \r\n\r\n____\r\n#### Description:\r\n\r\nRunning queries with ORDER BY on @comunica/actor-init-sparql-file, IRIs are not sorted.\r\n\r\nRelevant paragraph in the SPARQL 1.1 Spec (https://www.w3.org/TR/sparql11-query/#modOrderBy):\r\n\r\n> The \"<\" operator (see the Operator Mapping and 17.3.1 Operator Extensibility) defines the relative order of pairs of numerics, simple literals, xsd:strings, xsd:booleans and xsd:dateTimes. Pairs of IRIs are ordered by comparing them as simple literals.\r\n\r\nExample (using VALUES for self-containment, but I've found the same issue with actual input sources):\r\n```javascript\r\nimport { newEngine } from '@comunica/actor-init-sparql-file'\r\n\r\nconst query = `\r\n PREFIX ex: \r\n SELECT ?x\r\n WHERE {\r\n VALUES ?x {ex:b ex:a ex:c}\r\n } ORDER BY ?x`;\r\n\r\nconst engine = newEngine();\r\nconst resPromise = engine.query(query);\r\n\r\n// show the results\r\nresPromise\r\n .then((result) => result.bindings())\r\n .then((ba) => ba.map((b) => Object.fromEntries(b.entries())))\r\n .then(console.log);\r\n\r\n// expected output:\r\n//\r\n// [\r\n// {\r\n// '?x': NamedNode { termType: 'NamedNode', value: 'http://example.org/a' }\r\n// },\r\n// {\r\n// '?x': NamedNode { termType: 'NamedNode', value: 'http://example.org/b' }\r\n// },\r\n// {\r\n// '?x': NamedNode { termType: 'NamedNode', value: 'http://example.org/c' }\r\n// }\r\n// ]\r\n\r\n// actual output:\r\n//\r\n// [\r\n// {\r\n// '?x': NamedNode { termType: 'NamedNode', value: 'http://example.org/b' }\r\n// },\r\n// {\r\n// '?x': NamedNode { termType: 'NamedNode', value: 'http://example.org/a' }\r\n// },\r\n// {\r\n// '?x': NamedNode { termType: 'NamedNode', value: 'http://example.org/c' }\r\n// }\r\n// ]\r\n```\r\n\r\n____\r\n#### Environment:\r\n\r\n\r\n\r\nResult of running from my package `node node_modules/@comunica/actor-init-sparql/bin/query.js -v`\r\n\r\n| software | version\r\n| ------------------- | -------\r\n| Comunica Init Actor | 1.22.3\r\n| node | v14.18.1\r\n| npm | 6.14.15\r\n| yarn | 1.22.17\r\n| Operating System | linux (Linux 5.4.0-48-generic)\r\n\r\n#### Crash log:\r\n\r\n\r\n\r\n\r\nNot applicable.\r\n\r\n-----\r\n\r\n## Bounty\r\n\r\nA [bounty](https://comunica.dev/association/bounties/) has been placed on this issue by:\r\n\r\n\r\n\r\n| |\r\n|-|\r\n| [\"Comunica](https://comunica.dev/association/) |\r\n| €544 |\r\n\r\n\r\n\r\n[Click here to learn more](https://comunica.dev/association/bounty_process/) if you're interested in claiming this bounty by resolving this issue.\r\n","bodyHTML":"

This issue has been modified by @rubensworks to describe the intended solution

\n

Apparently, we only support ordering by literal values, and a total ordering as mentioned in the SPARQL spec has not been implemented yet.

\n

The goal of this issue is to properly implement total ordering in sparqlee (with the necessary unit tests), and optionally some integration tests here in Comunica.

\n
\n

Issue type:

\n
    \n
  • 🐛 Bug
  • \n
\n
\n

Description:

\n

Running queries with ORDER BY on @comunica/actor-init-sparql-file, IRIs are not sorted.

\n

Relevant paragraph in the SPARQL 1.1 Spec (https://www.w3.org/TR/sparql11-query/#modOrderBy):

\n
\n

The \"<\" operator (see the Operator Mapping and 17.3.1 Operator Extensibility) defines the relative order of pairs of numerics, simple literals, xsd:strings, xsd:booleans and xsd:dateTimes. Pairs of IRIs are ordered by comparing them as simple literals.

\n
\n

Example (using VALUES for self-containment, but I've found the same issue with actual input sources):

\n
import { newEngine } from '@comunica/actor-init-sparql-file'\n\nconst query = `\n  PREFIX ex: <http://example.org/>\n  SELECT ?x\n  WHERE {\n    VALUES ?x {ex:b ex:a ex:c}\n  } ORDER BY ?x`;\n\nconst engine = newEngine();\nconst resPromise = engine.query(query);\n\n// show the results\nresPromise\n  .then((result) => result.bindings())\n  .then((ba) => ba.map((b) => Object.fromEntries(b.entries())))\n  .then(console.log);\n\n// expected output:\n//\n// [\n//   {\n//     '?x': NamedNode { termType: 'NamedNode', value: 'http://example.org/a' }\n//   },\n//   {\n//     '?x': NamedNode { termType: 'NamedNode', value: 'http://example.org/b' }\n//   },\n//   {\n//     '?x': NamedNode { termType: 'NamedNode', value: 'http://example.org/c' }\n//   }\n// ]\n\n// actual output:\n//\n// [\n//   {\n//     '?x': NamedNode { termType: 'NamedNode', value: 'http://example.org/b' }\n//   },\n//   {\n//     '?x': NamedNode { termType: 'NamedNode', value: 'http://example.org/a' }\n//   },\n//   {\n//     '?x': NamedNode { termType: 'NamedNode', value: 'http://example.org/c' }\n//   }\n// ]
\n
\n

Environment:

\n\n\n

Result of running from my package node node_modules/@comunica/actor-init-sparql/bin/query.js -v

\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n
softwareversion
Comunica Init Actor1.22.3
nodev14.18.1
npm6.14.15
yarn1.22.17
Operating Systemlinux (Linux 5.4.0-48-generic)
\n

Crash log:

\n\n\n

Not applicable.

\n
\n

Bounty

\n

A bounty has been placed on this issue by:

\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n
\"Comunica
€544
\n\n

Click here to learn more if you're interested in claiming this bounty by resolving this issue.

","createdAt":"2021-11-21T17:42:37Z","closedAt":"2022-05-12T07:07:51Z"},{"state":"CLOSED","title":"Include Sparqlee into the main Comunica monorepo","url":"https://github.com/comunica/sparqlee/issues/131","number":131,"repository":{"name":"sparqlee","nameWithOwner":"comunica/sparqlee","url":"https://github.com/comunica/sparqlee","description":"⚙️ SPARQL expression evaluator library - Moved to @comunica/expression-evaluator"},"assignees":{"totalCount":0,"nodes":[]},"body":"We may want to consider making this project part of the main Comunica monorepo because\r\n\r\n* there are quite a bit of interdependencies, and changes in either project require annoying interlinking,\r\n* any major changes in sparqlee require manual checking in Comunica if things like spec and integration tests still work, while making this part of the monorepo would allow us to use Comunica's CI pipeline for this.\r\n\r\nBefore we would do this move, we need to make sure that this project follows all of Comunica's coding conventions, and that we have 100% testing coverage, so this depends on #38.\r\n\r\n-----\r\n\r\n## Bounty\r\n\r\nA [bounty](https://comunica.dev/association/bounties/) has been placed on this issue by:\r\n\r\n\r\n\r\n| |\r\n|-|\r\n| [\"Comunica](https://comunica.dev/association/) |\r\n| *Variable budget* |\r\n\r\n\r\n\r\n[Click here to learn more](https://comunica.dev/association/bounty_process/) if you're interested in claiming this bounty by resolving this issue.","bodyHTML":"

We may want to consider making this project part of the main Comunica monorepo because

\n
    \n
  • there are quite a bit of interdependencies, and changes in either project require annoying interlinking,
  • \n
  • any major changes in sparqlee require manual checking in Comunica if things like spec and integration tests still work, while making this part of the monorepo would allow us to use Comunica's CI pipeline for this.
  • \n
\n

Before we would do this move, we need to make sure that this project follows all of Comunica's coding conventions, and that we have 100% testing coverage, so this depends on #38.

\n
\n

Bounty

\n

A bounty has been placed on this issue by:

\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n
\"Comunica
Variable budget
\n\n

Click here to learn more if you're interested in claiming this bounty by resolving this issue.

","createdAt":"2021-10-29T15:09:24Z","closedAt":"2023-08-25T11:06:20Z"},{"state":"CLOSED","title":"Remove dependency on Node.js APIs","url":"https://github.com/comunica/comunica/issues/857","number":857,"repository":{"name":"comunica","nameWithOwner":"comunica/comunica","url":"https://github.com/comunica/comunica","description":"📬 A knowledge graph querying framework for JavaScript"},"assignees":{"totalCount":1,"nodes":[{"name":"Thomas Tanon","avatarUrl":"https://avatars.githubusercontent.com/u/458123?u=8f3e73bd5196789bdbf821f0f4e309dffdffd295&v=4","url":"https://github.com/Tpt"}]},"body":"#### Issue type:\r\n\r\n- :heavy_plus_sign: Feature request \r\n\r\n____\r\n#### Description:\r\n\r\nCurrently, when trying to bundle Comunica via tools such as Webpack (>= 5.x) requires users to manually configure polyfills for Node.js built-ins. We should make this process easier by not directly depending on Node.js built-ins, and instead use libraries such as `readable-stream`.\r\n\r\nThis will also require some changes to several dependencies, such as RDF parsers.\r\n\r\nWe should ensure that no such Node.js built-in dependencies are added in the future, either via a linter rule if that exists, or via a webpack process during CI.\r\n\r\nWe should make sure that we don't see any performance degradations because of this.\r\n\r\n**The end-result of this issue should be that we can run webpack 5 on @comunica/query-sparql without having to configure any polyfills.**\r\n\r\nAlso add `\"sideEffects\": false` to package.json where applicable.\r\n\r\nRelated to :\r\n\r\n* https://github.com/rubensworks/jsonld-streaming-parser.js/issues/78\r\n* https://github.com/rubensworks/rdfa-streaming-parser.js\r\n* https://github.com/rubensworks/microdata-rdf-streaming-parser.js\r\n* https://github.com/rdfjs/rdfxml-streaming-parser.js\r\n* https://github.com/rubensworks/rdf-dereference.js/issues/32\r\n* *And possibly several others*\r\n\r\n-----\r\n\r\n## Bounty\r\n\r\nA [bounty](https://comunica.dev/association/bounties/) has been placed on this issue by:\r\n\r\n\r\n\r\n| |\r\n|-|\r\n| [\"Comunica](https://comunica.dev/association/) |\r\n| *Variable budget* |\r\n\r\n\r\n\r\n[Click here to learn more](https://comunica.dev/association/bounty_process/) if you're interested in claiming this bounty by resolving this issue.\r\n","bodyHTML":"

Issue type:

\n
    \n
  • ➕ Feature request
  • \n
\n
\n

Description:

\n

Currently, when trying to bundle Comunica via tools such as Webpack (>= 5.x) requires users to manually configure polyfills for Node.js built-ins. We should make this process easier by not directly depending on Node.js built-ins, and instead use libraries such as readable-stream.

\n

This will also require some changes to several dependencies, such as RDF parsers.

\n

We should ensure that no such Node.js built-in dependencies are added in the future, either via a linter rule if that exists, or via a webpack process during CI.

\n

We should make sure that we don't see any performance degradations because of this.

\n

The end-result of this issue should be that we can run webpack 5 on @comunica/query-sparql without having to configure any polyfills.

\n

Also add \"sideEffects\": false to package.json where applicable.

\n

Related to :

\n\n
\n

Bounty

\n

A bounty has been placed on this issue by:

\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n
\"Comunica
Variable budget
\n\n

Click here to learn more if you're interested in claiming this bounty by resolving this issue.

","createdAt":"2021-09-11T12:30:33Z","closedAt":"2022-08-22T12:58:13Z"},{"state":"CLOSED","title":"Send original SPARQL query string to endpoints","url":"https://github.com/comunica/comunica/issues/844","number":844,"repository":{"name":"comunica","nameWithOwner":"comunica/comunica","url":"https://github.com/comunica/comunica","description":"📬 A knowledge graph querying framework for JavaScript"},"assignees":{"totalCount":1,"nodes":[{"name":null,"avatarUrl":"https://avatars.githubusercontent.com/u/6739756?u=5e5d6c1d719da3a53c090306150a205d7f0c7370&v=4","url":"https://github.com/jasmineleonard"}]},"body":"_This issue has been modified by @rubensworks to describe the intended solution_\r\n\r\nThe problem is that we always parse the incoming query, and serialize it again when we send it to a SPARQL endpoint. Since this parsing-serializing process sometimes results in slightly different queries, this may cause issues for certain use cases. To solve this, we need to keep track of the original query string, and use that one in the case of querying a SPARQL endpoint.\r\n\r\nIn actor-init-sparql, we need to add the original query string into the context.\r\nIn `actor-query-operation-sparql-endpoint`, we need to check this context entry, and use that one if it exists.\r\n\r\nThe only difficulty here is that we have to make sure that this context entry does not propagate to places where it shouldn't. For example, if this actor is only used because of a `SERVICE` keyword, we need to make sure that the actor still uses the `SERVICE` operation instead of the full original query. We could do this by just making sure that the service operator unsets or overrides this entry.\r\n\r\n-----\r\n\r\nOriginal issue:\r\n\r\n\r\n#### Issue type:\r\n\r\n- :question: Question \r\n\r\n____\r\n#### Question:\r\n\r\nI want to query SPARQL endpoint `https://data.muziekschatten.nl/sparql`, backed by Virtuoso, using the query underneath:\r\n\r\n```sparql\r\nSELECT * WHERE {\r\n ?uri ;\r\n ?label.\r\n FILTER((?label, \"emile\"))\r\n BIND(\"no name\" AS ?name)\r\n}\r\nLIMIT 100\r\n```\r\n\r\nIt's a silly query - but the crucial parts are the `FILTER` and the `BIND`. If I execute this using Comunica...\r\n\r\n`npx comunica-sparql sparql@https://data.muziekschatten.nl/sparql -f query.rq`\r\n\r\n...where file `query.rq` contains the query above...then the result is:\r\n\r\n`[Invalid SPARQL endpoint (https://data.muziekschatten.nl/sparql) response: undefined`\r\n\r\nMy guess is that Comunica is rewriting the query, e.g. to:\r\n\r\n```sparql\r\nSELECT * WHERE {\r\n ?uri ;\r\n ?label.\r\n BIND(\"no name\" AS ?name)\r\n FILTER((?label, \"emile\"))\r\n}\r\nLIMIT 100\r\n```\r\n\r\n`FILTER` is placed after `BIND`. If I execute this query via the endpoint's query editor on `https://data.muziekschatten.nl/sparql`, then Virtuoso yields the error:\r\n\r\n`Virtuoso 37000 Error SP031: SPARQL compiler: The group does not contain triple pattern with '$label' object before bif:contains() predicate`.\r\n\r\nIs it possible to influence the way that Comunica rewrites the query?\r\n\r\n-----\r\n\r\n## Bounty\r\n\r\nA [bounty](https://comunica.dev/association/bounties/) has been placed on this issue by:\r\n\r\n\r\n\r\n| |\r\n|-|\r\n| [\"Netwerk](https://netwerkdigitaalerfgoed.nl/) |\r\n| €544 |\r\n\r\n\r\n\r\n[Click here to learn more](https://comunica.dev/association/bounty_process/) if you're interested in claiming this bounty by resolving this issue.","bodyHTML":"

This issue has been modified by @rubensworks to describe the intended solution

\n

The problem is that we always parse the incoming query, and serialize it again when we send it to a SPARQL endpoint. Since this parsing-serializing process sometimes results in slightly different queries, this may cause issues for certain use cases. To solve this, we need to keep track of the original query string, and use that one in the case of querying a SPARQL endpoint.

\n

In actor-init-sparql, we need to add the original query string into the context.
\nIn actor-query-operation-sparql-endpoint, we need to check this context entry, and use that one if it exists.

\n

The only difficulty here is that we have to make sure that this context entry does not propagate to places where it shouldn't. For example, if this actor is only used because of a SERVICE keyword, we need to make sure that the actor still uses the SERVICE operation instead of the full original query. We could do this by just making sure that the service operator unsets or overrides this entry.

\n
\n

Original issue:

\n

Issue type:

\n
    \n
  • ❓ Question
  • \n
\n
\n

Question:

\n

I want to query SPARQL endpoint https://data.muziekschatten.nl/sparql, backed by Virtuoso, using the query underneath:

\n
SELECT * WHERE {\n  ?uri <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://schema.org/Person>;\n    <http://schema.org/name> ?label.\n  FILTER(<bif:contains>(?label, \"emile\"))\n  BIND(\"no name\" AS ?name)\n}\nLIMIT 100
\n

It's a silly query - but the crucial parts are the FILTER and the BIND. If I execute this using Comunica...

\n

npx comunica-sparql sparql@https://data.muziekschatten.nl/sparql -f query.rq

\n

...where file query.rq contains the query above...then the result is:

\n

[Invalid SPARQL endpoint (https://data.muziekschatten.nl/sparql) response: undefined

\n

My guess is that Comunica is rewriting the query, e.g. to:

\n
SELECT * WHERE {\n  ?uri <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://schema.org/Person>;\n    <http://schema.org/name> ?label.\n  BIND(\"no name\" AS ?name)\n  FILTER(<bif:contains>(?label, \"emile\"))\n}\nLIMIT 100
\n

FILTER is placed after BIND. If I execute this query via the endpoint's query editor on https://data.muziekschatten.nl/sparql, then Virtuoso yields the error:

\n

Virtuoso 37000 Error SP031: SPARQL compiler: The group does not contain triple pattern with '$label' object before bif:contains() predicate.

\n

Is it possible to influence the way that Comunica rewrites the query?

\n
\n

Bounty

\n

A bounty has been placed on this issue by:

\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n
\"Netwerk
€544
\n\n

Click here to learn more if you're interested in claiming this bounty by resolving this issue.

","createdAt":"2021-07-28T15:44:07Z","closedAt":"2021-11-26T15:26:55Z"},{"state":"OPEN","title":"Implement OPT+ operator","url":"https://github.com/comunica/comunica/issues/825","number":825,"repository":{"name":"comunica","nameWithOwner":"comunica/comunica","url":"https://github.com/comunica/comunica","description":"📬 A knowledge graph querying framework for JavaScript"},"assignees":{"totalCount":0,"nodes":[]},"body":"#### Issue type:\r\n\r\n- :heavy_plus_sign: Feature request \r\n\r\n____\r\n#### Description:\r\n\r\nThe standard OPTIONAL operator is SPARQL is non-monotonic, which can lead to problem with streaming results. Concretely, intermediary results that do _not_ match with an OPTIONAL block will not be emitted until the whole relevant part of the dataset is handled. In practise, this means that some results will not become available to the user as soon as possible.\r\n\r\nThe paper [\"OPT+: A Monotonic Alternative to OPTIONAL in SPARQL\" (by Sijin Cheng and Olaf Hartig)](https://www.researchgate.net/publication/333627321_OPT_A_Monotonic_Alternativeto_OPTIONAL_in_SPARQL)\r\nintroduces the OPT+ operator, which makes OPTIONAL monotonic by changing its semantics (`A OPT+ B = (A AND B) UNION A`).\r\n\r\nThe modified nested loop join algorithm from the paper (others are proposed) seems to achieve the best results.\r\n\r\nWe can create a modified version (or provide a config option) of our OPTIONAL actor (`actor-query-operation-leftjoin-nestedloop`) that considers this modification.\r\nIn essence, this modification means that a result can be emitted twice: once _without_ the optional binding, and once _with_ the optional binding.\r\n\r\nSince this modification is not strictly spec-compliant anymore, we should not enable it by default. But having it available can be useful for many use cases, especially when we have many sources (or when we are doing link traversal).\r\n\r\n-----\r\n\r\n## Bounty\r\n\r\nA [bounty](https://comunica.dev/association/bounties/) has been placed on this issue by:\r\n\r\n\r\n\r\n| |\r\n|-|\r\n| [\"Comunica](https://comunica.dev/association/) |\r\n| €1088 |\r\n\r\n\r\n\r\n[Click here to learn more](https://comunica.dev/association/bounty_process/) if you're interested in claiming this bounty by resolving this issue.","bodyHTML":"

Issue type:

\n
    \n
  • ➕ Feature request
  • \n
\n
\n

Description:

\n

The standard OPTIONAL operator is SPARQL is non-monotonic, which can lead to problem with streaming results. Concretely, intermediary results that do not match with an OPTIONAL block will not be emitted until the whole relevant part of the dataset is handled. In practise, this means that some results will not become available to the user as soon as possible.

\n

The paper \"OPT+: A Monotonic Alternative to OPTIONAL in SPARQL\" (by Sijin Cheng and Olaf Hartig)
\nintroduces the OPT+ operator, which makes OPTIONAL monotonic by changing its semantics (A OPT+ B = (A AND B) UNION A).

\n

The modified nested loop join algorithm from the paper (others are proposed) seems to achieve the best results.

\n

We can create a modified version (or provide a config option) of our OPTIONAL actor (actor-query-operation-leftjoin-nestedloop) that considers this modification.
\nIn essence, this modification means that a result can be emitted twice: once without the optional binding, and once with the optional binding.

\n

Since this modification is not strictly spec-compliant anymore, we should not enable it by default. But having it available can be useful for many use cases, especially when we have many sources (or when we are doing link traversal).

\n
\n

Bounty

\n

A bounty has been placed on this issue by:

\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n
\"Comunica
€1088
\n\n

Click here to learn more if you're interested in claiming this bounty by resolving this issue.

","createdAt":"2021-05-28T13:11:35Z","closedAt":null},{"state":"OPEN","title":"Run CI on windows","url":"https://github.com/comunica/comunica/issues/798","number":798,"repository":{"name":"comunica","nameWithOwner":"comunica/comunica","url":"https://github.com/comunica/comunica","description":"📬 A knowledge graph querying framework for JavaScript"},"assignees":{"totalCount":0,"nodes":[]},"body":"#### Issue type:\r\n\r\n- :heavy_plus_sign: Feature request \r\n\r\n____\r\n#### Description:\r\n\r\nAs we have migrated to GitHub Actions to run our CI, it should be easy to run on Windows as well.\r\nHowever, [tests seem to fail](https://github.com/comunica/comunica/runs/2174042973?check_suite_focus=true), which is why it isn't enabled yet.\r\n\r\nMay be related to #713 and #616.\r\n\r\n-----\r\n\r\n## Bounty\r\n\r\nA [bounty](https://comunica.dev/association/bounties/) has been placed on this issue by:\r\n\r\n\r\n\r\n| |\r\n|-|\r\n| [\"Comunica](https://comunica.dev/association/) |\r\n| €272 |\r\n\r\n\r\n\r\n[Click here to learn more](https://comunica.dev/association/bounty_process/) if you're interested in claiming this bounty by resolving this issue.","bodyHTML":"

Issue type:

\n
    \n
  • ➕ Feature request
  • \n
\n
\n

Description:

\n

As we have migrated to GitHub Actions to run our CI, it should be easy to run on Windows as well.
\nHowever, tests seem to fail, which is why it isn't enabled yet.

\n

May be related to #713 and #616.

\n
\n

Bounty

\n

A bounty has been placed on this issue by:

\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n
\"Comunica
€272
\n\n

Click here to learn more if you're interested in claiming this bounty by resolving this issue.

","createdAt":"2021-03-23T10:55:56Z","closedAt":null},{"state":"OPEN","title":"Ensure backpressure is maintained in streams","url":"https://github.com/comunica/comunica/issues/759","number":759,"repository":{"name":"comunica","nameWithOwner":"comunica/comunica","url":"https://github.com/comunica/comunica","description":"📬 A knowledge graph querying framework for JavaScript"},"assignees":{"totalCount":0,"nodes":[]},"body":"#### Issue type:\r\n\r\n- :bug: Bug \r\n\r\n____\r\n#### Description:\r\n\r\nThere seem to be a couple of places where we are not adhering to Node's backpressure conventions with regards to streams.\r\n\r\nConcretely, we seem to be creating new streams (such as `Readable`, `PassThrough` and `Transform`), and `push`-ing into them (via a `'data'` handler on another stream). Node handles backpressuring via the return value of `push`, which we are ignoring in this manner.\r\n\r\nhttps://github.com/search?q=repo%3Acomunica%2Fcomunica%20on(%27data&type=code\r\n\r\nA better solution would be to simply `pipe` instead of calling `push` on each data element.\r\n\r\nRelated to https://github.com/rubensworks/rdf-parse.js/commit/269c757935c54b388e1bde076dc29c2afc2e8e7b\r\n\r\n-----\r\n\r\n## Bounty\r\n\r\nA [bounty](https://comunica.dev/association/bounties/) has been placed on this issue by:\r\n\r\n\r\n\r\n| |\r\n|-|\r\n| [\"Comunica](https://comunica.dev/association/) |\r\n| €1088 |\r\n\r\n\r\n\r\n[Click here to learn more](https://comunica.dev/association/bounty_process/) if you're interested in claiming this bounty by resolving this issue.\r\n","bodyHTML":"

Issue type:

\n
    \n
  • 🐛 Bug
  • \n
\n
\n

Description:

\n

There seem to be a couple of places where we are not adhering to Node's backpressure conventions with regards to streams.

\n

Concretely, we seem to be creating new streams (such as Readable, PassThrough and Transform), and push-ing into them (via a 'data' handler on another stream). Node handles backpressuring via the return value of push, which we are ignoring in this manner.

\n

https://github.com/search?q=repo%3Acomunica%2Fcomunica%20on(%27data&type=code

\n

A better solution would be to simply pipe instead of calling push on each data element.

\n

Related to rubensworks/rdf-parse.js@269c757

\n
\n

Bounty

\n

A bounty has been placed on this issue by:

\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n
\"Comunica
€1088
\n\n

Click here to learn more if you're interested in claiming this bounty by resolving this issue.

","createdAt":"2020-11-12T14:10:28Z","closedAt":null},{"state":"CLOSED","title":"Throwing `Projection of ungrouped variable` error on valid query","url":"https://github.com/RubenVerborgh/SPARQL.js/issues/120","number":120,"repository":{"name":"SPARQL.js","nameWithOwner":"RubenVerborgh/SPARQL.js","url":"https://github.com/RubenVerborgh/SPARQL.js","description":"A parser for the SPARQL query language in JavaScript"},"assignees":{"totalCount":1,"nodes":[{"name":"Daniel Beeke","avatarUrl":"https://avatars.githubusercontent.com/u/684215?u=44d5742e760eaa9cd2b05b5025654b028c50eacd&v=4","url":"https://github.com/danielbeeke"}]},"body":"We're encountering issues with the most recent sparqljs releases, where the error checking is too strict.\r\nThis query is valid, but throws an `Projection of ungrouped variable (?p)` error:\r\n\r\n```\r\nselect ?p (count(*) as ?n) {\r\n [ ?p [] ].\r\n}\r\n```\r\n\r\nThis seems to be introduced by this PR: #108\r\n\r\n\r\n-----\r\n\r\n## Bounty\r\n\r\nA [bounty](https://comunica.dev/association/bounties/) has been placed on this issue by:\r\n\r\n\r\n\r\n| |\r\n|-|\r\n| [\"Triply\"](https://triply.cc/) |\r\n| €272 |\r\n\r\n\r\n\r\n[Click here to learn more](https://comunica.dev/association/bounty_process/) if you're interested in claiming this bounty by resolving this issue.","bodyHTML":"

We're encountering issues with the most recent sparqljs releases, where the error checking is too strict.
\nThis query is valid, but throws an Projection of ungrouped variable (?p) error:

\n
select ?p (count(*) as ?n) {\n  [ ?p [] ].\n}\n
\n

This seems to be introduced by this PR: #108

\n
\n

Bounty

\n

A bounty has been placed on this issue by:

\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n
\"Triply\"
€272
\n\n

Click here to learn more if you're interested in claiming this bounty by resolving this issue.

","createdAt":"2020-10-29T10:13:22Z","closedAt":"2021-10-01T10:37:44Z"},{"state":"CLOSED","title":"URL encoded strings are decoded in IRIs","url":"https://github.com/rdfjs/rdfxml-streaming-parser.js/issues/39","number":39,"repository":{"name":"rdfxml-streaming-parser.js","nameWithOwner":"rdfjs/rdfxml-streaming-parser.js","url":"https://github.com/rdfjs/rdfxml-streaming-parser.js","description":"Streaming RDF/XML parser"},"assignees":{"totalCount":1,"nodes":[{"name":"Thomas Tanon","avatarUrl":"https://avatars.githubusercontent.com/u/458123?u=8f3e73bd5196789bdbf821f0f4e309dffdffd295&v=4","url":"https://github.com/Tpt"}]},"body":"Hi, I have a rdf-xml file where an IRI contains the character sequence ` `, which is a URL encoding for newlines (`\\n`). In the output of rdfxml-streaming-parser, this string is decoded, so that my IRI now instead contains `\\n`. The same can be seen for other strings such as `>` and `<`. This is different from what N3 does for turtle-family parsing. I'm not certain which approach would be correct. \r\n\r\n```javascript\r\nconst fs = require('fs');\r\nconst RdfXmlParser = require(\"rdfxml-streaming-parser\").RdfXmlParser;\r\nconst N3 = require('n3');\r\n\r\nfs.createReadStream('test.rdf')\r\n .pipe(new RdfXmlParser())\r\n .on('data', console.log)\r\n\r\nfs.createReadStream('test.ttl')\r\n .pipe(new N3.StreamParser())\r\n .on('data', console.log)\r\n```\r\n\r\ninput files: \r\n\r\n```rdf\r\n\r\n\r\n\r\n \r\n \r\n \r\n\r\n\r\n```\r\n\r\n```turtle\r\n.\r\n```\r\n\r\noutput:\r\n```\r\nQuad {\r\n subject: NamedNode { value: 'a:\\n' },\r\n predicate: NamedNode { value: 'b:b' },\r\n object: NamedNode { value: 'c:c' },\r\n graph: DefaultGraph { value: '' }\r\n}\r\nQuad {\r\n subject: NamedNode { id: 'a: ' },\r\n predicate: NamedNode { id: 'b:b' },\r\n object: NamedNode { id: 'c:c' },\r\n graph: DefaultGraph { id: '' }\r\n}\r\n```\r\n\r\n-----\r\n\r\n## Bounty\r\n\r\nA [bounty](https://comunica.dev/association/bounties/) has been placed on this issue by:\r\n\r\n\r\n\r\n| |\r\n|-|\r\n| [\"Triply\"](https://triply.cc/) |\r\n| €544 |\r\n\r\n\r\n\r\n[Click here to learn more](https://comunica.dev/association/bounty_process/) if you're interested in claiming this bounty by resolving this issue.","bodyHTML":"

Hi, I have a rdf-xml file where an IRI contains the character sequence &#xA;, which is a URL encoding for newlines (\\n). In the output of rdfxml-streaming-parser, this string is decoded, so that my IRI now instead contains \\n. The same can be seen for other strings such as &gt; and &lt;. This is different from what N3 does for turtle-family parsing. I'm not certain which approach would be correct.

\n
const fs = require('fs');\nconst RdfXmlParser = require(\"rdfxml-streaming-parser\").RdfXmlParser;\nconst N3 = require('n3');\n\nfs.createReadStream('test.rdf')\n  .pipe(new RdfXmlParser())\n  .on('data', console.log)\n\nfs.createReadStream('test.ttl')\n  .pipe(new N3.StreamParser())\n  .on('data', console.log)
\n

input files:

\n
<?xml version=\"1.0\" encoding=\"utf-8\" ?>\n<rdf:RDF xmlns:rdf=\"http://www.w3.org/1999/02/22-rdf-syntax-ns#\"\n         xmlns:ns0=\"b:\">\n\n  <rdf:Description rdf:about=\"a:&#xA;\">\n    <ns0:b rdf:resource=\"c:c\"/>\n  </rdf:Description>\n\n</rdf:RDF>
\n
<a:&#xA;><b:b><c:c>.
\n

output:

\n
Quad {\n  subject: NamedNode { value: 'a:\\n' },\n  predicate: NamedNode { value: 'b:b' },\n  object: NamedNode { value: 'c:c' },\n  graph: DefaultGraph { value: '' }\n}\nQuad {\n  subject: NamedNode { id: 'a:&#xA;' },\n  predicate: NamedNode { id: 'b:b' },\n  object: NamedNode { id: 'c:c' },\n  graph: DefaultGraph { id: '' }\n}\n
\n
\n

Bounty

\n

A bounty has been placed on this issue by:

\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n
\"Triply\"
€544
\n\n

Click here to learn more if you're interested in claiming this bounty by resolving this issue.

","createdAt":"2020-06-30T12:55:55Z","closedAt":"2022-08-25T07:26:06Z"},{"state":"CLOSED","title":"Parsing issue with SPARQL query on inverse paths in anonymous node","url":"https://github.com/RubenVerborgh/SPARQL.js/issues/99","number":99,"repository":{"name":"SPARQL.js","nameWithOwner":"RubenVerborgh/SPARQL.js","url":"https://github.com/RubenVerborgh/SPARQL.js","description":"A parser for the SPARQL query language in JavaScript"},"assignees":{"totalCount":1,"nodes":[{"name":"Daniel Beeke","avatarUrl":"https://avatars.githubusercontent.com/u/684215?u=44d5742e760eaa9cd2b05b5025654b028c50eacd&v=4","url":"https://github.com/danielbeeke"}]},"body":"_Originally reported in by https://github.com/comunica/comunica/issues/677 @jaw111._\r\n\r\nThere is an odd combination of syntax that is flagged as an error.\r\n\r\n```sparql\r\nSELECT *\r\nWHERE {\r\n ?movie a dbpedia-owl:Film ;\r\n dbpedia-owl:starring [\r\n rdfs:label \"Brad Pitt\"@en ;\r\n ^dbpedia-owl:starring ?otherMovie\r\n ] .\r\n}\r\n```\r\n\r\nGives the error:\r\n\r\n```\r\n# Parse error on line 21:\r\n...ad Pitt\"@en ; ^dbpedia-owl:starrin\r\n----------------------^\r\nExpecting 'IRIREF', 'PNAME_NS', 'VAR', '}', 'GRAPH', ';', 'a', ']', 'PNAME_LN', '.', got '^'\r\n```\r\n\r\nWhilst removing the triple pattern for `a` works just fine:\r\n\r\n```sparql\r\nSELECT *\r\nWHERE {\r\n ?movie\r\n dbpedia-owl:starring [\r\n rdfs:label \"Brad Pitt\"@en ;\r\n ^dbpedia-owl:starring ?otherMovie\r\n ] .\r\n}\r\n```\r\n\r\n-----\r\n\r\n## Bounty\r\n\r\nA [bounty](https://comunica.dev/association/bounties/) has been placed on this issue by:\r\n\r\n\r\n\r\n| |\r\n|-|\r\n| [\"Triply\"](https://triply.cc/) |\r\n| €272 |\r\n\r\n\r\n\r\n[Click here to learn more](https://comunica.dev/association/bounty_process/) if you're interested in claiming this bounty by resolving this issue.","bodyHTML":"

Originally reported in by comunica/comunica#677 @jaw111.

\n

There is an odd combination of syntax that is flagged as an error.

\n
SELECT *\nWHERE {\n  ?movie a dbpedia-owl:Film ;\n    dbpedia-owl:starring [\n      rdfs:label \"Brad Pitt\"@en ;\n      ^dbpedia-owl:starring ?otherMovie\n    ] .\n}
\n

Gives the error:

\n
# Parse error on line 21:\n...ad Pitt\"@en ;      ^dbpedia-owl:starrin\n----------------------^\nExpecting 'IRIREF', 'PNAME_NS', 'VAR', '}', 'GRAPH', ';', 'a', ']', 'PNAME_LN', '.', got '^'\n
\n

Whilst removing the triple pattern for a works just fine:

\n
SELECT *\nWHERE {\n  ?movie\n    dbpedia-owl:starring [\n      rdfs:label \"Brad Pitt\"@en ;\n      ^dbpedia-owl:starring ?otherMovie\n    ] .\n}
\n
\n

Bounty

\n

A bounty has been placed on this issue by:

\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n
\"Triply\"
€272
\n\n

Click here to learn more if you're interested in claiming this bounty by resolving this issue.

","createdAt":"2020-06-25T11:32:44Z","closedAt":"2021-11-29T13:39:03Z"},{"state":"CLOSED","title":"Achieve full test coverage","url":"https://github.com/comunica/sparqlee/issues/38","number":38,"repository":{"name":"sparqlee","nameWithOwner":"comunica/sparqlee","url":"https://github.com/comunica/sparqlee","description":"⚙️ SPARQL expression evaluator library - Moved to @comunica/expression-evaluator"},"assignees":{"totalCount":1,"nodes":[{"name":"Thomas Tanon","avatarUrl":"https://avatars.githubusercontent.com/u/458123?u=8f3e73bd5196789bdbf821f0f4e309dffdffd295&v=4","url":"https://github.com/Tpt"}]},"body":"We need additional and effective (unit/spec/integration/util) tests so that we achieve a 100% testing coverage.\r\n\r\nRelated to:\r\n\r\n* #35\r\n* #37\r\n* #34\r\n* #50\r\n* #40\r\n* #41\r\n* #21\r\n* #20\r\n-----\r\n\r\n## Bounty\r\n\r\nA [bounty](https://comunica.dev/association/bounties/) has been placed on this issue by:\r\n\r\n\r\n\r\n| |\r\n|-|\r\n| [\"Comunica](https://comunica.dev/association/) |\r\n| €544 |\r\n\r\n\r\n\r\n[Click here to learn more](https://comunica.dev/association/bounty_process/) if you're interested in claiming this bounty by resolving this issue.","bodyHTML":"

We need additional and effective (unit/spec/integration/util) tests so that we achieve a 100% testing coverage.

\n

Related to:

\n\n
\n

Bounty

\n

A bounty has been placed on this issue by:

\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n
\"Comunica
€544
\n\n

Click here to learn more if you're interested in claiming this bounty by resolving this issue.

","createdAt":"2019-05-20T15:53:09Z","closedAt":"2022-06-01T05:25:09Z"},{"state":"OPEN","title":"HTTP caching","url":"https://github.com/comunica/comunica/issues/166","number":166,"repository":{"name":"comunica","nameWithOwner":"comunica/comunica","url":"https://github.com/comunica/comunica","description":"📬 A knowledge graph querying framework for JavaScript"},"assignees":{"totalCount":1,"nodes":[{"name":null,"avatarUrl":"https://avatars.githubusercontent.com/u/5464743?u=d13cea279ad1005cc01c6f044daa4ab16ae977b7&v=4","url":"https://github.com/jaxoncreed"}]},"body":"#### Issue type:\r\n\r\n- :heavy_plus_sign: Feature request\r\n\r\n____\r\n#### Description:\r\n\r\nWe should add support for proper client-side caching of HTTP resources.\r\nWe should check both the `Expires`, `Cache-Control`, `ETag` and `Last-Modified` headers, and appropriately send requests with `If-None-Match`/`If-Modified-Since` if needed.\r\n\r\nWe should make the cache actor work on the http bus.\r\n\r\nThere may be npm packages available that can help us out.\r\n\r\nThis article contains some useful information on caching: https://link.springer.com/chapter/10.1007/978-3-319-18818-8_18\r\n\r\nMore relevant papers:\r\n* Bahn, Hyokyung, et al. \"Efficient replacement of nonuniform objects in web caches.\" Computer 35.6 (2002): 65-73.\r\n* Jin, Shudong, and Azer Bestavros. \"GreedyDual∗ Web caching algorithm: exploiting the two sources of temporal locality in Web request streams.\" Computer Communications 24.2 (2001): 174-183.\r\n* Jin, Shudong, and Azer Bestavros. \"Popularity-aware greedy dual-size web proxy caching algorithms.\" Proceedings 20th IEEE International Conference on Distributed Computing Systems. IEEE, 2000.\r\n\r\n-----\r\n\r\n**Implementation suggestions:**\r\n\r\n* A new package: `actor-http-cache` on the http bus\r\n* This new actor should be able to use a [`Cache`](https://developer.mozilla.org/en-US/docs/Web/API/Cache) from the context (interface is available in TS when using dom types).\r\n* A simple default LRUCache-based `Cache` implementation should be set here if the user provided none in the context: https://github.com/comunica/comunica/blob/master/packages/actor-init-query/lib/QueryEngineBase.ts#L110\r\nIt can be implemented using https://www.npmjs.com/package/http-cache-semantics\r\n* This actor should invoke the HTTP invalidation bus when cache entries become invalidation, to ensure that other parts of the query engine that cache things will be notified. This can be done by adding a `mediatorHttpInvalidate` to this actor, and invoking it like here: https://github.com/comunica/comunica/blob/master/packages/actor-init-query/lib/QueryEngineBase.ts#L301\r\n* This actor should also listen to manual HTTP invalidations via an HTTP invalidate observer, just like here: https://github.com/comunica/comunica/blob/master/packages/actor-rdf-resolve-quad-pattern-hypermedia/lib/ActorRdfResolveQuadPatternHypermedia.ts#L42-L44\r\n\r\n-----\r\n\r\n**Things that become possible after this issue has been resolved:**\r\n\r\n* The hardcoded cache store and cache semantics can be moved to a bus, with corresponding default actors. We should still allow values to be set for them via the context, in which case the bus should not be invoked.\r\n\r\n-----\r\n\r\n## Bounty\r\n\r\nA [bounty](https://comunica.dev/association/bounties/) has been placed on this issue by:\r\n\r\n\r\n\r\n| |\r\n|-|\r\n| [\"Comunica](https://comunica.dev/association/) |\r\n| €544 |\r\n\r\n\r\n\r\n[Click here to learn more](https://comunica.dev/association/bounty_process/) if you're interested in claiming this bounty by resolving this issue.","bodyHTML":"

Issue type:

\n
    \n
  • ➕ Feature request
  • \n
\n
\n

Description:

\n

We should add support for proper client-side caching of HTTP resources.
\nWe should check both the Expires, Cache-Control, ETag and Last-Modified headers, and appropriately send requests with If-None-Match/If-Modified-Since if needed.

\n

We should make the cache actor work on the http bus.

\n

There may be npm packages available that can help us out.

\n

This article contains some useful information on caching: https://link.springer.com/chapter/10.1007/978-3-319-18818-8_18

\n

More relevant papers:

\n
    \n
  • Bahn, Hyokyung, et al. \"Efficient replacement of nonuniform objects in web caches.\" Computer 35.6 (2002): 65-73.
  • \n
  • Jin, Shudong, and Azer Bestavros. \"GreedyDual∗ Web caching algorithm: exploiting the two sources of temporal locality in Web request streams.\" Computer Communications 24.2 (2001): 174-183.
  • \n
  • Jin, Shudong, and Azer Bestavros. \"Popularity-aware greedy dual-size web proxy caching algorithms.\" Proceedings 20th IEEE International Conference on Distributed Computing Systems. IEEE, 2000.
  • \n
\n
\n

Implementation suggestions:

\n\n
\n

Things that become possible after this issue has been resolved:

\n
    \n
  • The hardcoded cache store and cache semantics can be moved to a bus, with corresponding default actors. We should still allow values to be set for them via the context, in which case the bus should not be invoked.
  • \n
\n
\n

Bounty

\n

A bounty has been placed on this issue by:

\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n
\"Comunica
€544
\n\n

Click here to learn more if you're interested in claiming this bounty by resolving this issue.

","createdAt":"2018-07-03T10:59:23Z","closedAt":null},{"state":"CLOSED","title":"Clearer error reporting for incorrect input","url":"https://github.com/comunica/comunica/issues/119","number":119,"repository":{"name":"comunica","nameWithOwner":"comunica/comunica","url":"https://github.com/comunica/comunica","description":"📬 A knowledge graph querying framework for JavaScript"},"assignees":{"totalCount":0,"nodes":[]},"body":"_This issue has been modified by @rubensworks to describe the intended solution_\r\n\r\n**Problem:**\r\n\r\nThe problem is that some (most?) errors that can be produced by Comunica are quite cryptic.\r\nThis is a consequence of inter-actor communication happening via mediators, which can produce errors such as:\r\n```\r\nError: https://.../rdf-dereference.json#mediatorRdfParse mediated over all rejecting actors:\r\nError: Unrecognized media type: text/html\r\nError: Unrecognized media type: text/html\r\nError: Unrecognized media type: text/html\r\n at MediatorRace.js:55\r\n```\r\n\r\nSo the common format is that mediators show an error message that accumulates error messages from failing actors.\r\n\r\n**Possible solution:**\r\n\r\nOne possible solution could be to reformat these types of error messages to something roughly like:\r\n```\r\nError: RDF parsing failed: none of the configured parsers were able to handle the content type 'text/html'.\r\n Error messages of failing actors:\r\n ActorNameX: Unrecognized media type: text/html\r\n ActorNameY: Unrecognized media type: text/html\r\n ActorNameZ: Unrecognized media type: text/html\r\n```\r\n\r\n(certainly open to other suggestions)\r\n\r\n**Implementation suggestions:**\r\n\r\nWe could have mediators accept an error message format (with placeholders for things such as `contentType` in parsing actions), which can be configured via the different Components.js config files.\r\nThis would mean that every instantiated mediator would have a bus/action-specific error message format.\r\n\r\nEach mediator would also require some polishing (and alignment) in how it produces error messages.\r\n\r\n-----\r\n\r\nOriginal issue:\r\n\r\n#### Issue type:\r\n\r\n- :heavy_plus_sign: Feature request\r\n\r\n#### Description:\r\n\r\nWhen invoking `comunica-sparql` with (for instance) an error in the query, I get:\r\n\r\n```\r\nError: Unknown prefix: schema\r\n at Object.anonymous (/Users/ruben/.nvm/versions/node/v8.9.4/lib/node_modules/@comunica/actor-init-sparql/node_modules/sparqljs/lib/SparqlParser.js:498:29)\r\n at Parser.parse (/Users/ruben/.nvm/versions/node/v8.9.4/lib/node_modules/@comunica/actor-init-sparql/node_modules/sparqljs/lib/SparqlParser.js:642:36)\r\n at Parser.parser.parse (/Users/ruben/.nvm/versions/node/v8.9.4/lib/node_modules/@comunica/actor-init-sparql/node_modules/sparqljs/sparql.js:22:37)\r\n at Object.translate (/Users/ruben/.nvm/versions/node/v8.9.4/lib/node_modules/@comunica/actor-init-sparql/node_modules/sparqlalgebrajs/lib/sparqlAlgebra.js:30:25)\r\n at ActorSparqlParseAlgebra.run (/Users/ruben/.nvm/versions/node/v8.9.4/lib/node_modules/@comunica/actor-init-sparql/node_modules/@comunica/actor-sparql-parse-algebra/lib/ActorSparqlParseAlgebra.js:16:47)\r\n at MediatorRace.mediate (/Users/ruben/.nvm/versions/node/v8.9.4/lib/node_modules/@comunica/actor-init-sparql/node_modules/@comunica/core/lib/Mediator.js:80:22)\r\n at \r\n at process._tickCallback (internal/process/next_tick.js:188:7)\r\n at Function.Module.runMain (module.js:686:11)\r\n at startup (bootstrap_node.js:187:16)\r\n```\r\n\r\nWould be helpful to a) hide the stacktrace (only show it when a certain flag is set) and b) for this particular case, make the error message (a bit) more descriptive.\r\n\r\n-----\r\n\r\n## Bounty\r\n\r\nA [bounty](https://comunica.dev/association/bounties/) has been placed on this issue by:\r\n\r\n\r\n\r\n| |\r\n|-|\r\n| [\"Comunica](https://comunica.dev/association/) |\r\n| €1632 |\r\n\r\n\r\n\r\n[Click here to learn more](https://comunica.dev/association/bounty_process/) if you're interested in claiming this bounty by resolving this issue.","bodyHTML":"

This issue has been modified by @rubensworks to describe the intended solution

\n

Problem:

\n

The problem is that some (most?) errors that can be produced by Comunica are quite cryptic.
\nThis is a consequence of inter-actor communication happening via mediators, which can produce errors such as:

\n
Error: https://.../rdf-dereference.json#mediatorRdfParse mediated over all rejecting actors:\nError: Unrecognized media type: text/html\nError: Unrecognized media type: text/html\nError: Unrecognized media type: text/html\n    at MediatorRace.js:55\n
\n

So the common format is that mediators show an error message that accumulates error messages from failing actors.

\n

Possible solution:

\n

One possible solution could be to reformat these types of error messages to something roughly like:

\n
Error: RDF parsing failed: none of the configured parsers were able to handle the content type 'text/html'.\n  Error messages of failing actors:\n    ActorNameX: Unrecognized media type: text/html\n    ActorNameY: Unrecognized media type: text/html\n    ActorNameZ: Unrecognized media type: text/html\n
\n

(certainly open to other suggestions)

\n

Implementation suggestions:

\n

We could have mediators accept an error message format (with placeholders for things such as contentType in parsing actions), which can be configured via the different Components.js config files.
\nThis would mean that every instantiated mediator would have a bus/action-specific error message format.

\n

Each mediator would also require some polishing (and alignment) in how it produces error messages.

\n
\n

Original issue:

\n

Issue type:

\n
    \n
  • ➕ Feature request
  • \n
\n

Description:

\n

When invoking comunica-sparql with (for instance) an error in the query, I get:

\n
Error: Unknown prefix: schema\n    at Object.anonymous (/Users/ruben/.nvm/versions/node/v8.9.4/lib/node_modules/@comunica/actor-init-sparql/node_modules/sparqljs/lib/SparqlParser.js:498:29)\n    at Parser.parse (/Users/ruben/.nvm/versions/node/v8.9.4/lib/node_modules/@comunica/actor-init-sparql/node_modules/sparqljs/lib/SparqlParser.js:642:36)\n    at Parser.parser.parse (/Users/ruben/.nvm/versions/node/v8.9.4/lib/node_modules/@comunica/actor-init-sparql/node_modules/sparqljs/sparql.js:22:37)\n    at Object.translate (/Users/ruben/.nvm/versions/node/v8.9.4/lib/node_modules/@comunica/actor-init-sparql/node_modules/sparqlalgebrajs/lib/sparqlAlgebra.js:30:25)\n    at ActorSparqlParseAlgebra.run (/Users/ruben/.nvm/versions/node/v8.9.4/lib/node_modules/@comunica/actor-init-sparql/node_modules/@comunica/actor-sparql-parse-algebra/lib/ActorSparqlParseAlgebra.js:16:47)\n    at MediatorRace.mediate (/Users/ruben/.nvm/versions/node/v8.9.4/lib/node_modules/@comunica/actor-init-sparql/node_modules/@comunica/core/lib/Mediator.js:80:22)\n    at <anonymous>\n    at process._tickCallback (internal/process/next_tick.js:188:7)\n    at Function.Module.runMain (module.js:686:11)\n    at startup (bootstrap_node.js:187:16)\n
\n

Would be helpful to a) hide the stacktrace (only show it when a certain flag is set) and b) for this particular case, make the error message (a bit) more descriptive.

\n
\n

Bounty

\n

A bounty has been placed on this issue by:

\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n
\"Comunica
€1632
\n\n

Click here to learn more if you're interested in claiming this bounty by resolving this issue.

","createdAt":"2018-03-19T08:42:12Z","closedAt":"2023-08-25T11:06:19Z"},{"state":"CLOSED","title":"Allow HTTP timeout configuration","url":"https://github.com/comunica/comunica/issues/70","number":70,"repository":{"name":"comunica","nameWithOwner":"comunica/comunica","url":"https://github.com/comunica/comunica","description":"📬 A knowledge graph querying framework for JavaScript"},"assignees":{"totalCount":1,"nodes":[{"name":"Thomas Tanon","avatarUrl":"https://avatars.githubusercontent.com/u/458123?u=8f3e73bd5196789bdbf821f0f4e309dffdffd295&v=4","url":"https://github.com/Tpt"}]},"body":"We should allow users to pass an HTTP timeout value via the context (`httpTimeout`).\r\n\r\nThis could be implemented using our own `setTimeout` and the fetch `AbortController`: https://github.com/bitinn/node-fetch/issues/95\r\n\r\nWe should keep in mind here that we should clear our own timeout once the request completes (response object is available).\r\n\r\nAdditionally, we need an extra context option (boolean: `httpTimeoutOnBody`) to make it so that the timeout not only applies to the time until response starts coming in, but also to the time until the response body is fully available. The latter could take longer, or potentially be infinite for e.g. continuous data streams. This should also take into account that response bodies can be cancelled from within Comunica.\r\n\r\n-----\r\n\r\n## Bounty\r\n\r\nA [bounty](https://comunica.dev/association/bounties/) has been placed on this issue by:\r\n\r\n\r\n\r\n| |\r\n|-|\r\n| [\"Netwerk](https://netwerkdigitaalerfgoed.nl/) |\r\n| €1088 |\r\n\r\n\r\n\r\n[Click here to learn more](https://comunica.dev/association/bounty_process/) if you're interested in claiming this bounty by resolving this issue.","bodyHTML":"

We should allow users to pass an HTTP timeout value via the context (httpTimeout).

\n

This could be implemented using our own setTimeout and the fetch AbortController: node-fetch/node-fetch#95

\n

We should keep in mind here that we should clear our own timeout once the request completes (response object is available).

\n

Additionally, we need an extra context option (boolean: httpTimeoutOnBody) to make it so that the timeout not only applies to the time until response starts coming in, but also to the time until the response body is fully available. The latter could take longer, or potentially be infinite for e.g. continuous data streams. This should also take into account that response bodies can be cancelled from within Comunica.

\n
\n

Bounty

\n

A bounty has been placed on this issue by:

\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n
\"Netwerk
€1088
\n\n

Click here to learn more if you're interested in claiming this bounty by resolving this issue.

","createdAt":"2018-01-15T14:21:31Z","closedAt":"2022-06-28T12:55:53Z"}]}}}},"__N_SSG":true} \ No newline at end of file +{"pageProps":{"githubData":{"data":{"search":{"nodes":[{"state":"OPEN","title":"initialBindings in combination with named graph","url":"https://github.com/comunica/comunica/issues/1154","number":1154,"repository":{"name":"comunica","nameWithOwner":"comunica/comunica","url":"https://github.com/comunica/comunica","description":"📬 A knowledge graph querying framework for JavaScript"},"assignees":{"totalCount":0,"nodes":[]},"body":"\r\n\r\n\r\n#### Issue type:\r\n\r\n- :bug: Bug \r\n\r\n____\r\n#### Description:\r\n\r\nThis query works fine:\r\n\r\n```sparql\r\nCONSTRUCT FROM WHERE { ?s ?p ?o } LIMIT 100\r\n```\r\n\r\nWith code:\r\n\r\n```js\r\nconst quadStream = await this.engine.queryQuads(query, {\r\n sources: [\r\n {\r\n type: 'sparql',\r\n value: 'https://www.goudatijdmachine.nl/sparql/repositories/gtm',\r\n },\r\n ],\r\n});\r\n```\r\n\r\nBut when adding initial bindings, we get an error:\r\n\r\n```js\r\nconst quadStream = await this.engine.queryQuads(query, {\r\n sources: [\r\n {\r\n type: 'sparql',\r\n value: 'https://www.goudatijdmachine.nl/sparql/repositories/gtm',\r\n },\r\n ],\r\n initialBindings: bindingsFactory.fromRecord({}) as unknown as Bindings,\r\n});\r\n```\r\n\r\nConversely, when we’re not querying named graphs, the initial bindings work fine:\r\n\r\n```sparql\r\nCONSTRUCT WHERE { ?s ?p ?o } LIMIT 100\r\n```\r\n____\r\n#### Environment:\r\n\r\n\r\n\r\n\r\n@comunica/query-sparql@2.6.6\r\n\r\n#### Crash log:\r\n\r\n```\r\nCannot read properties of undefined (reading '0')\",\"stack\":\"TypeError: Cannot read properties of undefined (reading '0')\\n at translateFrom (/Users/david/src/netwerk-digitaal-erfgoed/network-of-terms/node_modules/sparqlalgebrajs/lib/sparql.js:228:32)\\n at translateOperation (/Users/david/src/netwerk-digitaal-erfgoed/network-of-terms/node_modules/sparqlalgebrajs/lib/sparql.js:71:33)\\n at translateProject (/Users/david/src/netwerk-digitaal-erfgoed/network-of-terms/node_modules/sparqlalgebrajs/lib/sparql.js:369:41)\\n at translateOperation (/Users/david/src/netwerk-digitaal-erfgoed/network-of-terms/node_modules/sparqlalgebrajs/lib/sparql.js:82:36)\\n at toSparqlJs (/Users/david/src/netwerk-digitaal-erfgoed/network-of-terms/node_modules/sparqlalgebrajs/lib/sparql.js:48:18)\\n at toSparql (/Users/david/src/netwerk-digitaal-erfgoed/network-of-terms/node_modules/sparqlalgebrajs/lib/sparql.js:42:32)\\n at ActorQueryOperationSparqlEndpoint.run (/Users/david/src/netwerk-digitaal-erfgoed/network-of-terms/node_modules/@comunica/actor-query-operation-sparql-endpoint/lib/ActorQueryOperationSparqlEndpoint.js:75:52)\\n at ActorQueryOperationSparqlEndpoint.runObservable (/Users/david/src/netwerk-digitaal-erfgoed/network-of-terms/node_modules/@comunica/core/lib/Actor.js:57:29)\\n at MediatorNumber.mediate (/Users/david/src/netwerk-digitaal-erfgoed/network-of-terms/node_modules/@comunica/core/lib/Mediator.js:79:22)\\n at process.processTicksAndRejections (node:internal/process/task_queues:95:5)\",\"path\":[\"terms\"],\"locations\":[{\"line\":2,\"column\":3}],\"extensions\":{}},\"message\":\"Cannot read properties of undefined (reading '0')\"}\r\n```\r\n\r\n-----\r\n\r\n## Bounty\r\n\r\nA [bounty](https://comunica.dev/association/bounties/) has been placed on this issue by:\r\n\r\n\r\n\r\n| |\r\n|-|\r\n| [\"Comunica](https://comunica.dev/association/) |\r\n| €136 |\r\n\r\n\r\n\r\n[Click here to learn more](https://comunica.dev/association/bounty_process/) if you're interested in claiming this bounty by resolving this issue.","bodyHTML":"\n\n

Issue type:

\n
    \n
  • 🐛 Bug
  • \n
\n
\n

Description:

\n

This query works fine:

\n
CONSTRUCT FROM <http://www.ontotext.com/retain-bind-position> WHERE { ?s ?p ?o }  LIMIT 100
\n

With code:

\n
const quadStream = await this.engine.queryQuads(query, {\n  sources: [\n        {\n          type: 'sparql',\n          value: 'https://www.goudatijdmachine.nl/sparql/repositories/gtm',\n        },\n      ],\n});
\n

But when adding initial bindings, we get an error:

\n
const quadStream = await this.engine.queryQuads(query, {\n  sources: [\n        {\n          type: 'sparql',\n          value: 'https://www.goudatijdmachine.nl/sparql/repositories/gtm',\n        },\n      ],\n  initialBindings: bindingsFactory.fromRecord({}) as unknown as Bindings,\n});
\n

Conversely, when we’re not querying named graphs, the initial bindings work fine:

\n
CONSTRUCT WHERE { ?s ?p ?o } LIMIT 100
\n
\n

Environment:

\n\n\n

@comunica/query-sparql@2.6.6

\n

Crash log:

\n
Cannot read properties of undefined (reading '0')\",\"stack\":\"TypeError: Cannot read properties of undefined (reading '0')\\n    at translateFrom (/Users/david/src/netwerk-digitaal-erfgoed/network-of-terms/node_modules/sparqlalgebrajs/lib/sparql.js:228:32)\\n    at translateOperation (/Users/david/src/netwerk-digitaal-erfgoed/network-of-terms/node_modules/sparqlalgebrajs/lib/sparql.js:71:33)\\n    at translateProject (/Users/david/src/netwerk-digitaal-erfgoed/network-of-terms/node_modules/sparqlalgebrajs/lib/sparql.js:369:41)\\n    at translateOperation (/Users/david/src/netwerk-digitaal-erfgoed/network-of-terms/node_modules/sparqlalgebrajs/lib/sparql.js:82:36)\\n    at toSparqlJs (/Users/david/src/netwerk-digitaal-erfgoed/network-of-terms/node_modules/sparqlalgebrajs/lib/sparql.js:48:18)\\n    at toSparql (/Users/david/src/netwerk-digitaal-erfgoed/network-of-terms/node_modules/sparqlalgebrajs/lib/sparql.js:42:32)\\n    at ActorQueryOperationSparqlEndpoint.run (/Users/david/src/netwerk-digitaal-erfgoed/network-of-terms/node_modules/@comunica/actor-query-operation-sparql-endpoint/lib/ActorQueryOperationSparqlEndpoint.js:75:52)\\n    at ActorQueryOperationSparqlEndpoint.runObservable (/Users/david/src/netwerk-digitaal-erfgoed/network-of-terms/node_modules/@comunica/core/lib/Actor.js:57:29)\\n    at MediatorNumber.mediate (/Users/david/src/netwerk-digitaal-erfgoed/network-of-terms/node_modules/@comunica/core/lib/Mediator.js:79:22)\\n    at process.processTicksAndRejections (node:internal/process/task_queues:95:5)\",\"path\":[\"terms\"],\"locations\":[{\"line\":2,\"column\":3}],\"extensions\":{}},\"message\":\"Cannot read properties of undefined (reading '0')\"}\n
\n
\n

Bounty

\n

A bounty has been placed on this issue by:

\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n
\"Comunica
€136
\n\n

Click here to learn more if you're interested in claiming this bounty by resolving this issue.

","createdAt":"2023-02-09T11:08:02Z","closedAt":null},{"state":"CLOSED","title":"FILTER on langString literals does not work with N3 as source","url":"https://github.com/comunica/comunica/issues/1146","number":1146,"repository":{"name":"comunica","nameWithOwner":"comunica/comunica","url":"https://github.com/comunica/comunica","description":"📬 A knowledge graph querying framework for JavaScript"},"assignees":{"totalCount":1,"nodes":[{"name":"Daniel Beeke","avatarUrl":"https://avatars.githubusercontent.com/u/684215?u=44d5742e760eaa9cd2b05b5025654b028c50eacd&v=4","url":"https://github.com/danielbeeke"}]},"body":"```\r\n// add a quad with a language string\r\nconst store = new N3.Store();\r\nstore.addQuad(namedNode('http://ex.com/s'), namedNode('http://ex.com/p'), literal('abc', 'en'));\r\n\r\n// query it using SPARQL with a FILTER\r\nconst eng = new comunica.QueryEngine();\r\nconst bindings = await eng.queryBindings('SELECT ?o WHERE { ?s ?p ?o. FILTER(?o = \"abc\"@en) }', { sources: [ store ] });\r\n```\r\n\r\nAny FILTER on ?o in the example fails (with or without language string, = or !=). That is, as soon as a FILTER on the langString literal is present in the query, it won't return any results anymore. No crash or log warnings, just an empty result set.\r\n\r\nObserved on Comunica v2.6.0 in combination with N3 v1.16.3.\r\n\r\n-----\r\n\r\n## Bounty\r\n\r\nA [bounty](https://comunica.dev/association/bounties/) has been placed on this issue by:\r\n\r\n\r\n\r\n| |\r\n|-|\r\n| [\"Comunica](https://comunica.dev/association/) |\r\n| €272 |\r\n\r\n\r\n\r\n[Click here to learn more](https://comunica.dev/association/bounty_process/) if you're interested in claiming this bounty by resolving this issue.","bodyHTML":"
// add a quad with a language string\nconst store = new N3.Store();\nstore.addQuad(namedNode('http://ex.com/s'), namedNode('http://ex.com/p'), literal('abc', 'en'));\n\n// query it using SPARQL with a FILTER\nconst eng = new comunica.QueryEngine();\nconst bindings = await eng.queryBindings('SELECT ?o WHERE { ?s ?p ?o. FILTER(?o = \"abc\"@en) }', { sources: [ store ] });\n
\n

Any FILTER on ?o in the example fails (with or without language string, = or !=). That is, as soon as a FILTER on the langString literal is present in the query, it won't return any results anymore. No crash or log warnings, just an empty result set.

\n

Observed on Comunica v2.6.0 in combination with N3 v1.16.3.

\n
\n

Bounty

\n

A bounty has been placed on this issue by:

\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n
\"Comunica
€272
\n\n

Click here to learn more if you're interested in claiming this bounty by resolving this issue.

","createdAt":"2023-01-31T07:42:05Z","closedAt":"2023-03-23T09:12:08Z"},{"state":"CLOSED","title":"UTF-8 characters get corrupted when inserting into blazegraph triple store","url":"https://github.com/comunica/comunica/issues/1140","number":1140,"repository":{"name":"comunica","nameWithOwner":"comunica/comunica","url":"https://github.com/comunica/comunica","description":"📬 A knowledge graph querying framework for JavaScript"},"assignees":{"totalCount":0,"nodes":[]},"body":"\r\n\r\n\r\n#### Issue type:\r\n\r\n- :bug: Bug \r\n\r\n____\r\n#### Description:\r\n\r\n\r\n\r\nWhen using comunica to insert triples containing diacritics, the characters get corrupted, while if axios is used the triples are inserted correctly.\r\n\r\n\r\nFor example:\r\n\r\n##### Input triples:\r\n\r\n`\" \\\"Terzic\\\" .\"\r\n\r\n \" \\\"Терзић\\\" .\"\r\n\r\n \" \\\"Terzić\\\" .\"\r\n\r\n \" \\\"特尔日奇\\\" .\"\r\n`\r\n\r\n##### Triples in triple store after insertion:\r\n\r\n`\" \\\"Terzic\\\" .\"\r\n\r\n \" \\\"Терзић\\\" .\"\r\n\r\n \" \\\"Terzić\\\" .\"\r\n\r\n \" \\\"特尔日奇\\\" .\"`\r\n\r\n##### Code used to insert using comunica:\r\n\"Screenshot\r\n\r\n##### Code used to insert using axios:\r\n\"Screenshot\r\n\r\n____\r\n\r\n#### Environment:\r\n\r\n\r\n\r\n\r\n`\"@comunica/query-sparql\": \"^2.4.3\"`\r\n\r\n#### Crash log:\r\n\r\n\r\n\r\n\r\n-----\r\n\r\n## Bounty\r\n\r\nA [bounty](https://comunica.dev/association/bounties/) has been placed on this issue by:\r\n\r\n\r\n\r\n| |\r\n|-|\r\n| [\"Comunica](https://comunica.dev/association/) |\r\n| €544 |\r\n\r\n\r\n\r\n[Click here to learn more](https://comunica.dev/association/bounty_process/) if you're interested in claiming this bounty by resolving this issue.\r\n","bodyHTML":"\n\n

Issue type:

\n
    \n
  • 🐛 Bug
  • \n
\n
\n

Description:

\n\n

When using comunica to insert triples containing diacritics, the characters get corrupted, while if axios is used the triples are inserted correctly.

\n

For example:

\n
Input triples:
\n

`\"urn:uuid:1231231-321-3123-123-123 http://schema.org/normal \"Terzic\" .\"

\n

\"urn:uuid:1231231-321-3123-123-123 http://schema.org/test1 \"Терзић\" .\"

\n

\"urn:uuid:1231231-321-3123-123-123 http://schema.org/test2 \"Terzić\" .\"

\n

\"urn:uuid:1231231-321-3123-123-123 http://schema.org/test3 \"特尔日奇\" .\"
\n`

\n
Triples in triple store after insertion:
\n

`\"urn:uuid:01231231-0321-3123-0123-000000000123 http://schema.org/normal \"Terzic\" .\"

\n

\"urn:uuid:01231231-0321-3123-0123-000000000123 http://schema.org/test1 \"Те�зи�\" .\"

\n

\"urn:uuid:01231231-0321-3123-0123-000000000123 http://schema.org/test2 \"Terzi�\" .\"

\n

\"urn:uuid:01231231-0321-3123-0123-000000000123 http://schema.org/test3 \"����\" .\"`

\n
Code used to insert using comunica:
\n

\"Screenshot

\n
Code used to insert using axios:
\n

\"Screenshot

\n
\n

Environment:

\n\n\n

\"@comunica/query-sparql\": \"^2.4.3\"

\n

Crash log:

\n\n\n
\n

Bounty

\n

A bounty has been placed on this issue by:

\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n
\"Comunica
€544
\n\n

Click here to learn more if you're interested in claiming this bounty by resolving this issue.

","createdAt":"2023-01-16T15:55:01Z","closedAt":"2023-10-18T06:16:28Z"},{"state":"CLOSED","title":"Add check for query-sparql-* depencies","url":"https://github.com/comunica/comunica/issues/1139","number":1139,"repository":{"name":"comunica","nameWithOwner":"comunica/comunica","url":"https://github.com/comunica/comunica","description":"📬 A knowledge graph querying framework for JavaScript"},"assignees":{"totalCount":0,"nodes":[]},"body":"\r\n\r\n\r\n#### Issue type:\r\n\r\n- :heavy_plus_sign: Feature request \r\n\r\n____\r\n#### Description:\r\n\r\nTo avoid issues such as https://github.com/comunica/comunica/commit/e3b938940fa30b10bf2aa68a5f6ac3086399873a, we should add a CI check to ensure that all dependencies from the compiled engine configs are available in the package.json file of each engine.\r\nWe may be able to tweak our `depcheck` script for this.\r\n\r\n@jeswr any thoughts on this?\r\n\r\n-----\r\n\r\n## Bounty\r\n\r\nA [bounty](https://comunica.dev/association/bounties/) has been placed on this issue by:\r\n\r\n\r\n\r\n| |\r\n|-|\r\n| [\"Comunica](https://comunica.dev/association/) |\r\n| €136 |\r\n\r\n\r\n\r\n[Click here to learn more](https://comunica.dev/association/bounty_process/) if you're interested in claiming this bounty by resolving this issue.","bodyHTML":"\n\n

Issue type:

\n
    \n
  • ➕ Feature request
  • \n
\n
\n

Description:

\n

To avoid issues such as e3b9389, we should add a CI check to ensure that all dependencies from the compiled engine configs are available in the package.json file of each engine.
\nWe may be able to tweak our depcheck script for this.

\n

@jeswr any thoughts on this?

\n
\n

Bounty

\n

A bounty has been placed on this issue by:

\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n
\"Comunica
€136
\n\n

Click here to learn more if you're interested in claiming this bounty by resolving this issue.

","createdAt":"2023-01-11T10:54:51Z","closedAt":"2023-05-05T09:09:30Z"},{"state":"CLOSED","title":"Optional fails on N3 store","url":"https://github.com/comunica/comunica/issues/1095","number":1095,"repository":{"name":"comunica","nameWithOwner":"comunica/comunica","url":"https://github.com/comunica/comunica","description":"📬 A knowledge graph querying framework for JavaScript"},"assignees":{"totalCount":1,"nodes":[{"name":"Daniel Beeke","avatarUrl":"https://avatars.githubusercontent.com/u/684215?u=44d5742e760eaa9cd2b05b5025654b028c50eacd&v=4","url":"https://github.com/danielbeeke"}]},"body":"\r\n\r\n\r\n#### Issue type:\r\n\r\n- :bug: Bug \r\n\r\n____\r\n#### Description:\r\n\r\nGiven the following two triples I would expect four bindings as the result of the following query.\r\n```\r\n \r\n \"Lorem ipsum\"@nl\r\n\r\n```\r\n\r\n```\r\n SELECT * WHERE { \r\n ?s ?p ?o .\r\n\r\n OPTIONAL {\r\n ?s ?name .\r\n FILTER(lang(?name) = 'nl')\r\n }\r\n }\r\n```\r\n_Expectation_\r\ns, p, o and name\r\n\r\n_Actual_\r\ns, p and o\r\n\r\nWhen changing the language filter to something that does not exists I get zero bindings.\r\n\r\nSee http://danielbeeke.nl/comunica-rdfjs-optional-bug/ for a reproduction.\r\nAnd the console on https://github.com/danielbeeke/comunica-rdfjs-optional-bug.\r\n____\r\n#### Environment:\r\n\r\nI am using N3 and Comunica in a web site.\r\nN3 is fetched as an ESM module.\r\nComunica is included via a script tag.\r\n\r\n-----\r\n\r\n## Bounty\r\n\r\nA [bounty](https://comunica.dev/association/bounties/) has been placed on this issue by:\r\n\r\n\r\n\r\n| |\r\n|-|\r\n| [\"Comunica](https://comunica.dev/association/) |\r\n| €544 |\r\n\r\n\r\n\r\n[Click here to learn more](https://comunica.dev/association/bounty_process/) if you're interested in claiming this bounty by resolving this issue.","bodyHTML":"\n\n

Issue type:

\n
    \n
  • 🐛 Bug
  • \n
\n
\n

Description:

\n

Given the following two triples I would expect four bindings as the result of the following query.

\n
<http://ex.org/Pluto> <http://ex.org/type> <http://ex.org/Dog>\n<http://ex.org/Mickey> <http://ex.org/name> \"Lorem ipsum\"@nl\n\n
\n
  SELECT * WHERE { \n    ?s ?p ?o .\n\n    OPTIONAL {\n      ?s <http://ex.org/name> ?name .\n      FILTER(lang(?name) = 'nl')\n    }\n  }\n
\n

Expectation
\ns, p, o and name

\n

Actual
\ns, p and o

\n

When changing the language filter to something that does not exists I get zero bindings.

\n

See http://danielbeeke.nl/comunica-rdfjs-optional-bug/ for a reproduction.
\nAnd the console on https://github.com/danielbeeke/comunica-rdfjs-optional-bug.

\n
\n

Environment:

\n

I am using N3 and Comunica in a web site.
\nN3 is fetched as an ESM module.
\nComunica is included via a script tag.

\n
\n

Bounty

\n

A bounty has been placed on this issue by:

\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n
\"Comunica
€544
\n\n

Click here to learn more if you're interested in claiming this bounty by resolving this issue.

","createdAt":"2022-10-07T06:32:50Z","closedAt":"2023-03-08T06:36:14Z"},{"state":"CLOSED","title":"Stream halts on order by over empty source","url":"https://github.com/comunica/comunica/issues/1091","number":1091,"repository":{"name":"comunica","nameWithOwner":"comunica/comunica","url":"https://github.com/comunica/comunica","description":"📬 A knowledge graph querying framework for JavaScript"},"assignees":{"totalCount":0,"nodes":[]},"body":"\r\n\r\n\r\n#### Issue type:\r\n\r\n- :bug: Bug \r\n\r\n____\r\n#### Description:\r\n\r\nThe node process terminates when reading an empty query bindings stream. What is particularly atypical:\r\n- No error is thrown\r\n- Subsequent lines are not executed\r\n- The process exits with a `0` exit code\r\n\r\nSee [here](https://github.com/LaurensRietveld/comunica/blob/bug/executionStops/engines/query-sparql/lib/executionSeemsToStop.ts) for a minimum working example.\r\n\r\n\r\n____\r\n#### Environment:\r\n\r\n\r\n\r\n\r\n\r\n```\r\n| software | version\r\n| ---------------- | -------\r\n| Comunica Engine | 2.4.3 (dev)\r\n| node | v16.17.0\r\n| npm | 8.15.0\r\n| yarn | 1.22.19\r\n| Operating System | linux (Linux 5.15.0-46-generic)\r\n\r\n```\r\n\r\n(note, the github issue template should be updated so that it references `node ./engines/query-sparql/bin/query.js -v` instead of `node ./packages/actor-init-query/bin/query.js -v`)\r\n\r\n#### Crash log:\r\n\r\nNone\r\n\r\n-----\r\n\r\n## Bounty\r\n\r\nA [bounty](https://comunica.dev/association/bounties/) has been placed on this issue by:\r\n\r\n\r\n\r\n| |\r\n|-|\r\n| [\"Comunica](https://comunica.dev/association/) |\r\n| €544 |\r\n\r\n\r\n\r\n[Click here to learn more](https://comunica.dev/association/bounty_process/) if you're interested in claiming this bounty by resolving this issue.\r\n","bodyHTML":"\n\n

Issue type:

\n
    \n
  • 🐛 Bug
  • \n
\n
\n

Description:

\n

The node process terminates when reading an empty query bindings stream. What is particularly atypical:

\n
    \n
  • No error is thrown
  • \n
  • Subsequent lines are not executed
  • \n
  • The process exits with a 0 exit code
  • \n
\n

See here for a minimum working example.

\n
\n

Environment:

\n\n\n
| software         | version\n| ---------------- | -------\n| Comunica Engine  | 2.4.3 (dev)\n| node             | v16.17.0\n| npm              | 8.15.0\n| yarn             | 1.22.19\n| Operating System | linux (Linux 5.15.0-46-generic)\n\n
\n

(note, the github issue template should be updated so that it references node ./engines/query-sparql/bin/query.js -v instead of node ./packages/actor-init-query/bin/query.js -v)

\n

Crash log:

\n

None

\n
\n

Bounty

\n

A bounty has been placed on this issue by:

\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n
\"Comunica
€544
\n\n

Click here to learn more if you're interested in claiming this bounty by resolving this issue.

","createdAt":"2022-10-04T13:08:30Z","closedAt":"2023-05-25T10:41:47Z"},{"state":"CLOSED","title":"Invalid baseIRI when querying a local JSON-LD file","url":"https://github.com/comunica/comunica/issues/1044","number":1044,"repository":{"name":"comunica","nameWithOwner":"comunica/comunica","url":"https://github.com/comunica/comunica","description":"📬 A knowledge graph querying framework for JavaScript"},"assignees":{"totalCount":1,"nodes":[{"name":"Andrew Zhurov","avatarUrl":"https://avatars.githubusercontent.com/u/13056889?u=02b5e16b9436aa98280faddec3e5ebd92a522b55&v=4","url":"https://github.com/andrewzhurov"}]},"body":"\r\n\r\n\r\n#### Issue type:\r\n\r\n- :bug: Bug \r\n\r\n____\r\n#### Description:\r\n\r\nWhen I query a local JSON-LD file with this command\r\n\r\n```shell\r\ncomunica-sparql-file \"/Users/pheyvaer/Development/test.jsonld\" -q \"SELECT * WHERE {?s ?p ?o}\"\r\n````\r\n\r\n I get the following error \r\n\r\n```\r\nFound invalid baseIRI '/Users/pheyvaer/Development/test.jsonld' for value '/Users/pheyvaer/Development/test.jsonld'\r\n```\r\nThe error doesn't occur when adding `file://` to the path:\r\n\r\n```shell\r\ncomunica-sparql-file \"file:///Users/pheyvaer/Development/test.jsonld\" -q \"SELECT * WHERE {?s ?p ?o}\"\r\n````\r\n____\r\n#### Environment:\r\n```shell\r\n$ comunica-sparql-file -v\r\n```\r\n| software | version\r\n| ---------------- | -------\r\n| Comunica Engine | 2.3.0 \r\n| node | v14.19.2\r\n| npm | 8.10.0\r\n| yarn | 1.22.5\r\n| Operating System | darwin (Darwin 21.5.0)\r\n\r\n\r\n#### Crash log:\r\n\r\n\r\n\r\n\r\n-----\r\n\r\n## Bounty\r\n\r\nA [bounty](https://comunica.dev/association/bounties/) has been placed on this issue by:\r\n\r\n\r\n\r\n| |\r\n|-|\r\n| [\"Comunica](https://comunica.dev/association/) |\r\n| €136 |\r\n\r\n\r\n\r\n[Click here to learn more](https://comunica.dev/association/bounty_process/) if you're interested in claiming this bounty by resolving this issue.\r\n","bodyHTML":"\n\n

Issue type:

\n
    \n
  • 🐛 Bug
  • \n
\n
\n

Description:

\n

When I query a local JSON-LD file with this command

\n
comunica-sparql-file \"/Users/pheyvaer/Development/test.jsonld\" -q \"SELECT * WHERE {?s ?p ?o}\"
\n

I get the following error

\n
Found invalid baseIRI '/Users/pheyvaer/Development/test.jsonld' for value '/Users/pheyvaer/Development/test.jsonld'\n
\n

The error doesn't occur when adding file:// to the path:

\n
comunica-sparql-file \"file:///Users/pheyvaer/Development/test.jsonld\" -q \"SELECT * WHERE {?s ?p ?o}\"
\n
\n

Environment:

\n
$ comunica-sparql-file -v
\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n
softwareversion
Comunica Engine2.3.0
nodev14.19.2
npm8.10.0
yarn1.22.5
Operating Systemdarwin (Darwin 21.5.0)
\n

Crash log:

\n\n\n
\n

Bounty

\n

A bounty has been placed on this issue by:

\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n
\"Comunica
€136
\n\n

Click here to learn more if you're interested in claiming this bounty by resolving this issue.

","createdAt":"2022-08-12T09:03:58Z","closedAt":"2023-01-11T10:12:15Z"},{"state":"CLOSED","title":"\"EXISTS found, but no existence hook provided\" in Optional block","url":"https://github.com/comunica/comunica/issues/1029","number":1029,"repository":{"name":"comunica","nameWithOwner":"comunica/comunica","url":"https://github.com/comunica/comunica","description":"📬 A knowledge graph querying framework for JavaScript"},"assignees":{"totalCount":0,"nodes":[]},"body":"\r\n\r\n\r\n#### Issue type:\r\n\r\n- :bug: Bug \r\n\r\n____\r\n#### Description:\r\n\r\nThe following code test throws \"EXISTS found, but no existence hook provided\" but should pass\r\nNote that these queries worked in @comunica/actor-init-sparql-rdfjs\r\nAlso presumably similar issue to https://github.com/comunica/comunica/issues/650\r\n```\r\nimport 'mocha'\r\nimport n3 from 'n3'\r\nimport { QueryEngine } from '@comunica/query-sparql-rdfjs'\r\nimport chai from 'chai'\r\n\r\nconst sparql = new QueryEngine()\r\n\r\ndescribe('comunica sparql', () => {\r\n it('Does not support EXISTS sparql keyword', async () => {\r\n const store = new n3.Store()\r\n const subject = n3.DataFactory.namedNode('http://subject')\r\n const predicate = n3.DataFactory.namedNode('http://predicate')\r\n const object = n3.DataFactory.namedNode('http://object')\r\n const blank = n3.DataFactory.blankNode()\r\n const spo = n3.DataFactory.quad(subject, predicate, object)\r\n const bpo = n3.DataFactory.quad(blank, predicate, object)\r\n store.addQuads([spo, bpo])\r\n const quadStream = await sparql.queryQuads(`\r\n CONSTRUCT {\r\n ?s ?p ?o.\r\n }\r\n WHERE { \r\n ?s ?p ?o.\r\n OPTIONAL {\r\n FILTER EXISTS {\r\n ?s2 ?p ?o.\r\n FILTER (?s != ?s2)\r\n }\r\n }\r\n }\r\n `,\r\n { sources: [store] })\r\n const result_quads = await quadStream.toArray()\r\n chai.expect(result_quads).to.deep.equal([{\r\n termType: 'Quad',\r\n value: '',\r\n graph: {\r\n termType: 'DefaultGraph',\r\n value: '',\r\n },\r\n subject: {\r\n id: 'http://subject',\r\n },\r\n predicate: {\r\n id: 'http://predicate',\r\n },\r\n object: {\r\n id: 'http://object',\r\n },\r\n }, {\r\n termType: 'Quad',\r\n value: '',\r\n graph: {\r\n termType: 'DefaultGraph',\r\n value: '',\r\n },\r\n subject: {\r\n termType: 'BlankNode',\r\n value: 'bc_0_n3-01',\r\n },\r\n predicate: {\r\n id: 'http://predicate',\r\n },\r\n object: {\r\n id: 'http://object',\r\n },\r\n }])\r\n })\r\n})\r\n\r\n```\r\n\r\n____\r\n#### Environment:\r\n\r\n `node ./packages/actor-init-query/bin/query.js -v`--> not part of \"@comunica/query-sparql-rdfjs\": \"^2.3.0\",\r\n\r\n#### Crash log:\r\n\r\nNA\r\n\r\n-----\r\n\r\n## Bounty\r\n\r\nA [bounty](https://comunica.dev/association/bounties/) has been placed on this issue by:\r\n\r\n\r\n\r\n| |\r\n|-|\r\n| [\"Comunica](https://comunica.dev/association/) |\r\n| €136 |\r\n\r\n\r\n\r\n[Click here to learn more](https://comunica.dev/association/bounty_process/) if you're interested in claiming this bounty by resolving this issue.\r\n","bodyHTML":"\n\n

Issue type:

\n
    \n
  • 🐛 Bug
  • \n
\n
\n

Description:

\n

The following code test throws \"EXISTS found, but no existence hook provided\" but should pass
\nNote that these queries worked in @comunica/actor-init-sparql-rdfjs
\nAlso presumably similar issue to #650

\n
import 'mocha'\nimport n3 from 'n3'\nimport { QueryEngine } from '@comunica/query-sparql-rdfjs'\nimport chai from 'chai'\n\nconst sparql = new QueryEngine()\n\ndescribe('comunica sparql', () => {\n  it('Does not support EXISTS sparql keyword', async () => {\n    const store = new n3.Store()\n    const subject = n3.DataFactory.namedNode('http://subject')\n    const predicate = n3.DataFactory.namedNode('http://predicate')\n    const object = n3.DataFactory.namedNode('http://object')\n    const blank = n3.DataFactory.blankNode()\n    const spo = n3.DataFactory.quad(subject, predicate, object)\n    const bpo = n3.DataFactory.quad(blank, predicate, object)\n    store.addQuads([spo, bpo])\n    const quadStream = await sparql.queryQuads(`\n      CONSTRUCT {\n        ?s ?p ?o.\n      }\n      WHERE { \n        ?s ?p ?o.\n        OPTIONAL {\n          FILTER EXISTS {\n            ?s2 ?p ?o.\n            FILTER (?s != ?s2)\n          }\n        }\n      }\n      `,\n      { sources: [store] })\n    const result_quads = await quadStream.toArray()\n    chai.expect(result_quads).to.deep.equal([{\n      termType: 'Quad',\n      value: '',\n      graph: {\n        termType: 'DefaultGraph',\n        value: '',\n      },\n      subject: {\n        id: 'http://subject',\n      },\n      predicate: {\n        id: 'http://predicate',\n      },\n      object: {\n        id: 'http://object',\n      },\n    }, {\n      termType: 'Quad',\n      value: '',\n      graph: {\n        termType: 'DefaultGraph',\n        value: '',\n      },\n      subject: {\n        termType: 'BlankNode',\n        value: 'bc_0_n3-01',\n      },\n      predicate: {\n        id: 'http://predicate',\n      },\n      object: {\n        id: 'http://object',\n      },\n    }])\n  })\n})\n\n
\n
\n

Environment:

\n

node ./packages/actor-init-query/bin/query.js -v--> not part of \"@comunica/query-sparql-rdfjs\": \"^2.3.0\",

\n

Crash log:

\n

NA

\n
\n

Bounty

\n

A bounty has been placed on this issue by:

\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n
\"Comunica
€136
\n\n

Click here to learn more if you're interested in claiming this bounty by resolving this issue.

","createdAt":"2022-07-18T20:14:45Z","closedAt":"2023-05-25T10:58:27Z"},{"state":"CLOSED","title":"secure conversion to ActionContext object for context added to source","url":"https://github.com/comunica/comunica/issues/1003","number":1003,"repository":{"name":"comunica","nameWithOwner":"comunica/comunica","url":"https://github.com/comunica/comunica","description":"📬 A knowledge graph querying framework for JavaScript"},"assignees":{"totalCount":1,"nodes":[{"name":"Aron Buzogany","avatarUrl":"https://avatars.githubusercontent.com/u/108480125?v=4","url":"https://github.com/AronBuzogany"}]},"body":"#### Issue type:\r\n\r\n- :heavy_plus_sign: Feature request \r\n\r\n____\r\n#### Description:\r\n\r\n\r\nAt present a context can be added to a source making a new ActionContext. \r\ne.g. const context = {sources: [ {value:'path_to_source', context : new ActionContext({'@comunica/bus-context-preprocess:mapping':'path_to_mapping'})}] }\r\nI would like to be able to add a context using a plain object, and count on Comunica to convert this object to a ActionContext, like is done with the other context objects. \r\ne.g. const context = {sources: [ {value:'path_to_source', context :{'@comunica/bus-context-preprocess:mapping':'path_to_mapping'}}] }\r\n\r\n-----\r\n\r\n## Bounty\r\n\r\nA [bounty](https://comunica.dev/association/bounties/) has been placed on this issue by:\r\n\r\n\r\n\r\n| |\r\n|-|\r\n| [\"Comunica](https://comunica.dev/association/) |\r\n| €272 |\r\n\r\n\r\n\r\n[Click here to learn more](https://comunica.dev/association/bounty_process/) if you're interested in claiming this bounty by resolving this issue.","bodyHTML":"

Issue type:

\n
    \n
  • ➕ Feature request
  • \n
\n
\n

Description:

\n\n

At present a context can be added to a source making a new ActionContext.
\ne.g. const context = {sources: [ {value:'path_to_source', context : new ActionContext({'@comunica/bus-context-preprocess:mapping':'path_to_mapping'})}] }
\nI would like to be able to add a context using a plain object, and count on Comunica to convert this object to a ActionContext, like is done with the other context objects.
\ne.g. const context = {sources: [ {value:'path_to_source', context :{'@comunica/bus-context-preprocess:mapping':'path_to_mapping'}}] }

\n
\n

Bounty

\n

A bounty has been placed on this issue by:

\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n
\"Comunica
€272
\n\n

Click here to learn more if you're interested in claiming this bounty by resolving this issue.

","createdAt":"2022-05-25T14:40:02Z","closedAt":"2023-10-16T12:49:33Z"},{"state":"CLOSED","title":"Querying graphdb results in a lot of requests","url":"https://github.com/comunica/comunica/issues/994","number":994,"repository":{"name":"comunica","nameWithOwner":"comunica/comunica","url":"https://github.com/comunica/comunica","description":"📬 A knowledge graph querying framework for JavaScript"},"assignees":{"totalCount":0,"nodes":[]},"body":"#### Issue type:\r\n\r\n- :bug: Bug \r\n\r\n____\r\n#### Description:\r\n\r\nQuery to GraphDB results in a lot of requests.\r\n\r\nCode example with screenshot of the logs: https://gist.github.com/zeroxbt/6cfede66e5104471d303b69372ebb51f\r\n\r\n-----\r\n\r\n## Bounty\r\n\r\nA [bounty](https://comunica.dev/association/bounties/) has been placed on this issue by:\r\n\r\n\r\n\r\n| |\r\n|-|\r\n| [\"Comunica](https://comunica.dev/association/) |\r\n| €272 |\r\n\r\n\r\n\r\n[Click here to learn more](https://comunica.dev/association/bounty_process/) if you're interested in claiming this bounty by resolving this issue.","bodyHTML":"

Issue type:

\n
    \n
  • 🐛 Bug
  • \n
\n
\n

Description:

\n

Query to GraphDB results in a lot of requests.

\n

Code example with screenshot of the logs: https://gist.github.com/zeroxbt/6cfede66e5104471d303b69372ebb51f

\n
\n

Bounty

\n

A bounty has been placed on this issue by:

\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n
\"Comunica
€272
\n\n

Click here to learn more if you're interested in claiming this bounty by resolving this issue.

","createdAt":"2022-04-26T10:16:26Z","closedAt":"2023-01-16T14:07:43Z"},{"state":"CLOSED","title":"INSERT DATA query on solid pod crashes in browser - again","url":"https://github.com/comunica/comunica-feature-solid/issues/30","number":30,"repository":{"name":"comunica-feature-solid","nameWithOwner":"comunica/comunica-feature-solid","url":"https://github.com/comunica/comunica-feature-solid","description":"📬 Comunica packages for query execution over Solid data pods"},"assignees":{"totalCount":1,"nodes":[{"name":"Ludwig","avatarUrl":"https://avatars.githubusercontent.com/u/35169452?u=03ecc9f16e49afe4ce4399e97001ee94a342c435&v=4","url":"https://github.com/ludwigschubi"}]},"body":"_This issue has been modified by @rubensworks to describe the intended solution_\r\n\r\n**Problem:**\r\n\r\nThe external [`solid-client-authn-js`](https://github.com/inrupt/solid-client-authn-js) has a [bug](https://github.com/inrupt/solid-client-authn-js/issues/2178) that makes it pass incorrect content types on PUT requests.\r\n\r\nThis only occurs in browsers, not in Node.js.\r\n\r\n**Possible solution:**\r\n\r\nSince the bug only seems to occur when using headers using a `Headers` object, and not when passing headers as a plain record, we may be able to work around it by just converting our `Headers` object to a record.\r\n\r\n**Implementation suggestions:**\r\n\r\nThe same workaround as [here](https://github.com/comunica/comunica/blob/master/packages/actor-http-fetch/lib/ActorHttpFetch.ts#L56-L59) could be applied [here](https://github.com/comunica/comunica/blob/master/packages/actor-http-fetch/lib/FetchInitPreprocessor-browser.ts).\r\n\r\n-----\r\n\r\nOriginal issue:\r\n\r\n#### Issue type:\r\n\r\n- :bug: Bug \r\n\r\n____\r\n#### Description:\r\n\r\nI'm trying to do an insert query using `@comunica/query-sparql-solid` in a next.js + typescript app. I recently ran into another problem reported here (https://github.com/comunica/comunica-feature-solid/issues/22) with a very similar setup. I since switched from the deprecated `@comunica/actor-init-sparql-solid` to `@comunica/query-sparql-solid`. Therefore, the same pre-condition applies: the same query works when executed via command line. This is what I'm trying to do in my TypeScript code:\r\n\r\n```\r\n const insertQuery = `\r\n INSERT DATA {\r\n <${\r\n getDefaultSession().info.webId?.split(\"#\")[0]\r\n }#Seppli> 'Seppli'.\r\n }\r\n `;\r\n\r\n console.log(insertQuery);\r\n\r\n await engine.queryVoid(insertQuery, {\r\n sources: [getDefaultSession().info.webId!],\r\n \"@comunica/actor-http-inrupt-solid-client-authn:session\":\r\n getDefaultSession(),\r\n });\r\n```\r\nFull code available [here](https://github.com/remodietlicher/comunica-solid-react-test). But it fails with this error: [Unsupported patch content type: text/plain](https://pastebin.com/TMexGNpM).\r\n\r\n____\r\n#### Environment:\r\n\r\n\r\n\r\n\r\ncomunica-solid-react-test (main)$ ./node_modules/.bin/comunica-sparql-solid -v\r\n| software | version\r\n| ---------------- | -------\r\n| Comunica Engine | 2.0.6 \r\n| node | v16.14.0\r\n| npm | 8.3.1\r\n| yarn | 1.22.17\r\n| Operating System | linux (Linux 5.13.0-37-generic)\r\n\r\n#### Crash log:\r\n\r\n\r\n\r\nhttps://pastebin.com/TMexGNpM\r\n\r\n-----\r\n\r\n## Bounty\r\n\r\nA [bounty](https://comunica.dev/association/bounties/) has been placed on this issue by:\r\n\r\n\r\n\r\n| |\r\n|-|\r\n| [\"Comunica](https://comunica.dev/association/) |\r\n| €272 |\r\n\r\n\r\n\r\n[Click here to learn more](https://comunica.dev/association/bounty_process/) if you're interested in claiming this bounty by resolving this issue.\r\n","bodyHTML":"

This issue has been modified by @rubensworks to describe the intended solution

\n

Problem:

\n

The external solid-client-authn-js has a bug that makes it pass incorrect content types on PUT requests.

\n

This only occurs in browsers, not in Node.js.

\n

Possible solution:

\n

Since the bug only seems to occur when using headers using a Headers object, and not when passing headers as a plain record, we may be able to work around it by just converting our Headers object to a record.

\n

Implementation suggestions:

\n

The same workaround as here could be applied here.

\n
\n

Original issue:

\n

Issue type:

\n
    \n
  • 🐛 Bug
  • \n
\n
\n

Description:

\n

I'm trying to do an insert query using @comunica/query-sparql-solid in a next.js + typescript app. I recently ran into another problem reported here (#22) with a very similar setup. I since switched from the deprecated @comunica/actor-init-sparql-solid to @comunica/query-sparql-solid. Therefore, the same pre-condition applies: the same query works when executed via command line. This is what I'm trying to do in my TypeScript code:

\n
    const insertQuery = `\n      INSERT DATA {\n        <${\n          getDefaultSession().info.webId?.split(\"#\")[0]\n        }#Seppli> <http://xmlns.com/foaf/0.1/name> 'Seppli'.\n      }\n    `;\n\n    console.log(insertQuery);\n\n    await engine.queryVoid(insertQuery, {\n      sources: [getDefaultSession().info.webId!],\n      \"@comunica/actor-http-inrupt-solid-client-authn:session\":\n        getDefaultSession(),\n    });\n
\n

Full code available here. But it fails with this error: Unsupported patch content type: text/plain.

\n
\n

Environment:

\n\n\n

comunica-solid-react-test (main)$ ./node_modules/.bin/comunica-sparql-solid -v

\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n
softwareversion
Comunica Engine2.0.6
nodev16.14.0
npm8.3.1
yarn1.22.17
Operating Systemlinux (Linux 5.13.0-37-generic)
\n

Crash log:

\n\n\n

https://pastebin.com/TMexGNpM

\n
\n

Bounty

\n

A bounty has been placed on this issue by:

\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n
\"Comunica
€272
\n\n

Click here to learn more if you're interested in claiming this bounty by resolving this issue.

","createdAt":"2022-03-24T21:23:59Z","closedAt":"2022-09-06T08:29:56Z"},{"state":"OPEN","title":"Expose ESM modules","url":"https://github.com/comunica/comunica/issues/930","number":930,"repository":{"name":"comunica","nameWithOwner":"comunica/comunica","url":"https://github.com/comunica/comunica","description":"📬 A knowledge graph querying framework for JavaScript"},"assignees":{"totalCount":0,"nodes":[]},"body":"#### Issue type:\r\n\r\n- :heavy_plus_sign: Feature request \r\n\r\n____\r\n#### Description:\r\n\r\nCurrently, Comunica only exposes CommonJS modules for Node.js.\r\nIn the future, we should expose both ESM and CJS modules, as this will make it easier to use Comunica in other environments, like the browser.\r\n\r\nSome pointers:\r\n- https://2ality.com/2021/06/typescript-esm-nodejs.html\r\n- https://www.typescriptlang.org/docs/handbook/2/modules.html\r\n- https://github.com/RubenVerborgh/AsyncIterator/blob/main/package.json\r\n\r\nRelated to #857.\r\n\r\n-----\r\n\r\n## Bounty\r\n\r\nA [bounty](https://comunica.dev/association/bounties/) has been placed on this issue by:\r\n\r\n\r\n\r\n| |\r\n|-|\r\n| [\"Comunica](https://comunica.dev/association/) |\r\n| *Variable budget* |\r\n\r\n\r\n\r\n[Click here to learn more](https://comunica.dev/association/bounty_process/) if you're interested in claiming this bounty by resolving this issue.","bodyHTML":"

Issue type:

\n
    \n
  • ➕ Feature request
  • \n
\n
\n

Description:

\n

Currently, Comunica only exposes CommonJS modules for Node.js.
\nIn the future, we should expose both ESM and CJS modules, as this will make it easier to use Comunica in other environments, like the browser.

\n

Some pointers:

\n\n

Related to #857.

\n
\n

Bounty

\n

A bounty has been placed on this issue by:

\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n
\"Comunica
Variable budget
\n\n

Click here to learn more if you're interested in claiming this bounty by resolving this issue.

","createdAt":"2022-02-14T12:35:10Z","closedAt":null},{"state":"CLOSED","title":"ORDER BY is not implemented completely","url":"https://github.com/comunica/comunica/issues/892","number":892,"repository":{"name":"comunica","nameWithOwner":"comunica/comunica","url":"https://github.com/comunica/comunica","description":"📬 A knowledge graph querying framework for JavaScript"},"assignees":{"totalCount":1,"nodes":[{"name":"Thomas Tanon","avatarUrl":"https://avatars.githubusercontent.com/u/458123?u=8f3e73bd5196789bdbf821f0f4e309dffdffd295&v=4","url":"https://github.com/Tpt"}]},"body":"_This issue has been modified by @rubensworks to describe the intended solution_\r\n\r\nApparently, [we only support ordering by literal values](https://github.com/comunica/sparqlee/blob/7c1180638154c72d3c3292e48d000ed9770796f0/lib/util/Ordering.ts#L8), and a total ordering as mentioned in the [SPARQL spec](https://www.w3.org/TR/sparql11-query/#modOrderBy) has not been implemented yet.\r\n\r\nThe goal of this issue is to properly implement total ordering in sparqlee (with the necessary unit tests), and optionally some integration tests here in Comunica.\r\n\r\n-----\r\n\r\n#### Issue type:\r\n\r\n- :bug: Bug \r\n\r\n____\r\n#### Description:\r\n\r\nRunning queries with ORDER BY on @comunica/actor-init-sparql-file, IRIs are not sorted.\r\n\r\nRelevant paragraph in the SPARQL 1.1 Spec (https://www.w3.org/TR/sparql11-query/#modOrderBy):\r\n\r\n> The \"<\" operator (see the Operator Mapping and 17.3.1 Operator Extensibility) defines the relative order of pairs of numerics, simple literals, xsd:strings, xsd:booleans and xsd:dateTimes. Pairs of IRIs are ordered by comparing them as simple literals.\r\n\r\nExample (using VALUES for self-containment, but I've found the same issue with actual input sources):\r\n```javascript\r\nimport { newEngine } from '@comunica/actor-init-sparql-file'\r\n\r\nconst query = `\r\n PREFIX ex: \r\n SELECT ?x\r\n WHERE {\r\n VALUES ?x {ex:b ex:a ex:c}\r\n } ORDER BY ?x`;\r\n\r\nconst engine = newEngine();\r\nconst resPromise = engine.query(query);\r\n\r\n// show the results\r\nresPromise\r\n .then((result) => result.bindings())\r\n .then((ba) => ba.map((b) => Object.fromEntries(b.entries())))\r\n .then(console.log);\r\n\r\n// expected output:\r\n//\r\n// [\r\n// {\r\n// '?x': NamedNode { termType: 'NamedNode', value: 'http://example.org/a' }\r\n// },\r\n// {\r\n// '?x': NamedNode { termType: 'NamedNode', value: 'http://example.org/b' }\r\n// },\r\n// {\r\n// '?x': NamedNode { termType: 'NamedNode', value: 'http://example.org/c' }\r\n// }\r\n// ]\r\n\r\n// actual output:\r\n//\r\n// [\r\n// {\r\n// '?x': NamedNode { termType: 'NamedNode', value: 'http://example.org/b' }\r\n// },\r\n// {\r\n// '?x': NamedNode { termType: 'NamedNode', value: 'http://example.org/a' }\r\n// },\r\n// {\r\n// '?x': NamedNode { termType: 'NamedNode', value: 'http://example.org/c' }\r\n// }\r\n// ]\r\n```\r\n\r\n____\r\n#### Environment:\r\n\r\n\r\n\r\nResult of running from my package `node node_modules/@comunica/actor-init-sparql/bin/query.js -v`\r\n\r\n| software | version\r\n| ------------------- | -------\r\n| Comunica Init Actor | 1.22.3\r\n| node | v14.18.1\r\n| npm | 6.14.15\r\n| yarn | 1.22.17\r\n| Operating System | linux (Linux 5.4.0-48-generic)\r\n\r\n#### Crash log:\r\n\r\n\r\n\r\n\r\nNot applicable.\r\n\r\n-----\r\n\r\n## Bounty\r\n\r\nA [bounty](https://comunica.dev/association/bounties/) has been placed on this issue by:\r\n\r\n\r\n\r\n| |\r\n|-|\r\n| [\"Comunica](https://comunica.dev/association/) |\r\n| €544 |\r\n\r\n\r\n\r\n[Click here to learn more](https://comunica.dev/association/bounty_process/) if you're interested in claiming this bounty by resolving this issue.\r\n","bodyHTML":"

This issue has been modified by @rubensworks to describe the intended solution

\n

Apparently, we only support ordering by literal values, and a total ordering as mentioned in the SPARQL spec has not been implemented yet.

\n

The goal of this issue is to properly implement total ordering in sparqlee (with the necessary unit tests), and optionally some integration tests here in Comunica.

\n
\n

Issue type:

\n
    \n
  • 🐛 Bug
  • \n
\n
\n

Description:

\n

Running queries with ORDER BY on @comunica/actor-init-sparql-file, IRIs are not sorted.

\n

Relevant paragraph in the SPARQL 1.1 Spec (https://www.w3.org/TR/sparql11-query/#modOrderBy):

\n
\n

The \"<\" operator (see the Operator Mapping and 17.3.1 Operator Extensibility) defines the relative order of pairs of numerics, simple literals, xsd:strings, xsd:booleans and xsd:dateTimes. Pairs of IRIs are ordered by comparing them as simple literals.

\n
\n

Example (using VALUES for self-containment, but I've found the same issue with actual input sources):

\n
import { newEngine } from '@comunica/actor-init-sparql-file'\n\nconst query = `\n  PREFIX ex: <http://example.org/>\n  SELECT ?x\n  WHERE {\n    VALUES ?x {ex:b ex:a ex:c}\n  } ORDER BY ?x`;\n\nconst engine = newEngine();\nconst resPromise = engine.query(query);\n\n// show the results\nresPromise\n  .then((result) => result.bindings())\n  .then((ba) => ba.map((b) => Object.fromEntries(b.entries())))\n  .then(console.log);\n\n// expected output:\n//\n// [\n//   {\n//     '?x': NamedNode { termType: 'NamedNode', value: 'http://example.org/a' }\n//   },\n//   {\n//     '?x': NamedNode { termType: 'NamedNode', value: 'http://example.org/b' }\n//   },\n//   {\n//     '?x': NamedNode { termType: 'NamedNode', value: 'http://example.org/c' }\n//   }\n// ]\n\n// actual output:\n//\n// [\n//   {\n//     '?x': NamedNode { termType: 'NamedNode', value: 'http://example.org/b' }\n//   },\n//   {\n//     '?x': NamedNode { termType: 'NamedNode', value: 'http://example.org/a' }\n//   },\n//   {\n//     '?x': NamedNode { termType: 'NamedNode', value: 'http://example.org/c' }\n//   }\n// ]
\n
\n

Environment:

\n\n\n

Result of running from my package node node_modules/@comunica/actor-init-sparql/bin/query.js -v

\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n
softwareversion
Comunica Init Actor1.22.3
nodev14.18.1
npm6.14.15
yarn1.22.17
Operating Systemlinux (Linux 5.4.0-48-generic)
\n

Crash log:

\n\n\n

Not applicable.

\n
\n

Bounty

\n

A bounty has been placed on this issue by:

\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n
\"Comunica
€544
\n\n

Click here to learn more if you're interested in claiming this bounty by resolving this issue.

","createdAt":"2021-11-21T17:42:37Z","closedAt":"2022-05-12T07:07:51Z"},{"state":"CLOSED","title":"Include Sparqlee into the main Comunica monorepo","url":"https://github.com/comunica/sparqlee/issues/131","number":131,"repository":{"name":"sparqlee","nameWithOwner":"comunica/sparqlee","url":"https://github.com/comunica/sparqlee","description":"⚙️ SPARQL expression evaluator library - Moved to @comunica/expression-evaluator"},"assignees":{"totalCount":0,"nodes":[]},"body":"We may want to consider making this project part of the main Comunica monorepo because\r\n\r\n* there are quite a bit of interdependencies, and changes in either project require annoying interlinking,\r\n* any major changes in sparqlee require manual checking in Comunica if things like spec and integration tests still work, while making this part of the monorepo would allow us to use Comunica's CI pipeline for this.\r\n\r\nBefore we would do this move, we need to make sure that this project follows all of Comunica's coding conventions, and that we have 100% testing coverage, so this depends on #38.\r\n\r\n-----\r\n\r\n## Bounty\r\n\r\nA [bounty](https://comunica.dev/association/bounties/) has been placed on this issue by:\r\n\r\n\r\n\r\n| |\r\n|-|\r\n| [\"Comunica](https://comunica.dev/association/) |\r\n| *Variable budget* |\r\n\r\n\r\n\r\n[Click here to learn more](https://comunica.dev/association/bounty_process/) if you're interested in claiming this bounty by resolving this issue.","bodyHTML":"

We may want to consider making this project part of the main Comunica monorepo because

\n
    \n
  • there are quite a bit of interdependencies, and changes in either project require annoying interlinking,
  • \n
  • any major changes in sparqlee require manual checking in Comunica if things like spec and integration tests still work, while making this part of the monorepo would allow us to use Comunica's CI pipeline for this.
  • \n
\n

Before we would do this move, we need to make sure that this project follows all of Comunica's coding conventions, and that we have 100% testing coverage, so this depends on #38.

\n
\n

Bounty

\n

A bounty has been placed on this issue by:

\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n
\"Comunica
Variable budget
\n\n

Click here to learn more if you're interested in claiming this bounty by resolving this issue.

","createdAt":"2021-10-29T15:09:24Z","closedAt":"2023-08-25T11:06:20Z"},{"state":"CLOSED","title":"Remove dependency on Node.js APIs","url":"https://github.com/comunica/comunica/issues/857","number":857,"repository":{"name":"comunica","nameWithOwner":"comunica/comunica","url":"https://github.com/comunica/comunica","description":"📬 A knowledge graph querying framework for JavaScript"},"assignees":{"totalCount":1,"nodes":[{"name":"Thomas Tanon","avatarUrl":"https://avatars.githubusercontent.com/u/458123?u=8f3e73bd5196789bdbf821f0f4e309dffdffd295&v=4","url":"https://github.com/Tpt"}]},"body":"#### Issue type:\r\n\r\n- :heavy_plus_sign: Feature request \r\n\r\n____\r\n#### Description:\r\n\r\nCurrently, when trying to bundle Comunica via tools such as Webpack (>= 5.x) requires users to manually configure polyfills for Node.js built-ins. We should make this process easier by not directly depending on Node.js built-ins, and instead use libraries such as `readable-stream`.\r\n\r\nThis will also require some changes to several dependencies, such as RDF parsers.\r\n\r\nWe should ensure that no such Node.js built-in dependencies are added in the future, either via a linter rule if that exists, or via a webpack process during CI.\r\n\r\nWe should make sure that we don't see any performance degradations because of this.\r\n\r\n**The end-result of this issue should be that we can run webpack 5 on @comunica/query-sparql without having to configure any polyfills.**\r\n\r\nAlso add `\"sideEffects\": false` to package.json where applicable.\r\n\r\nRelated to :\r\n\r\n* https://github.com/rubensworks/jsonld-streaming-parser.js/issues/78\r\n* https://github.com/rubensworks/rdfa-streaming-parser.js\r\n* https://github.com/rubensworks/microdata-rdf-streaming-parser.js\r\n* https://github.com/rdfjs/rdfxml-streaming-parser.js\r\n* https://github.com/rubensworks/rdf-dereference.js/issues/32\r\n* *And possibly several others*\r\n\r\n-----\r\n\r\n## Bounty\r\n\r\nA [bounty](https://comunica.dev/association/bounties/) has been placed on this issue by:\r\n\r\n\r\n\r\n| |\r\n|-|\r\n| [\"Comunica](https://comunica.dev/association/) |\r\n| *Variable budget* |\r\n\r\n\r\n\r\n[Click here to learn more](https://comunica.dev/association/bounty_process/) if you're interested in claiming this bounty by resolving this issue.\r\n","bodyHTML":"

Issue type:

\n
    \n
  • ➕ Feature request
  • \n
\n
\n

Description:

\n

Currently, when trying to bundle Comunica via tools such as Webpack (>= 5.x) requires users to manually configure polyfills for Node.js built-ins. We should make this process easier by not directly depending on Node.js built-ins, and instead use libraries such as readable-stream.

\n

This will also require some changes to several dependencies, such as RDF parsers.

\n

We should ensure that no such Node.js built-in dependencies are added in the future, either via a linter rule if that exists, or via a webpack process during CI.

\n

We should make sure that we don't see any performance degradations because of this.

\n

The end-result of this issue should be that we can run webpack 5 on @comunica/query-sparql without having to configure any polyfills.

\n

Also add \"sideEffects\": false to package.json where applicable.

\n

Related to :

\n\n
\n

Bounty

\n

A bounty has been placed on this issue by:

\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n
\"Comunica
Variable budget
\n\n

Click here to learn more if you're interested in claiming this bounty by resolving this issue.

","createdAt":"2021-09-11T12:30:33Z","closedAt":"2022-08-22T12:58:13Z"},{"state":"CLOSED","title":"Send original SPARQL query string to endpoints","url":"https://github.com/comunica/comunica/issues/844","number":844,"repository":{"name":"comunica","nameWithOwner":"comunica/comunica","url":"https://github.com/comunica/comunica","description":"📬 A knowledge graph querying framework for JavaScript"},"assignees":{"totalCount":1,"nodes":[{"name":null,"avatarUrl":"https://avatars.githubusercontent.com/u/6739756?u=5e5d6c1d719da3a53c090306150a205d7f0c7370&v=4","url":"https://github.com/jasmineleonard"}]},"body":"_This issue has been modified by @rubensworks to describe the intended solution_\r\n\r\nThe problem is that we always parse the incoming query, and serialize it again when we send it to a SPARQL endpoint. Since this parsing-serializing process sometimes results in slightly different queries, this may cause issues for certain use cases. To solve this, we need to keep track of the original query string, and use that one in the case of querying a SPARQL endpoint.\r\n\r\nIn actor-init-sparql, we need to add the original query string into the context.\r\nIn `actor-query-operation-sparql-endpoint`, we need to check this context entry, and use that one if it exists.\r\n\r\nThe only difficulty here is that we have to make sure that this context entry does not propagate to places where it shouldn't. For example, if this actor is only used because of a `SERVICE` keyword, we need to make sure that the actor still uses the `SERVICE` operation instead of the full original query. We could do this by just making sure that the service operator unsets or overrides this entry.\r\n\r\n-----\r\n\r\nOriginal issue:\r\n\r\n\r\n#### Issue type:\r\n\r\n- :question: Question \r\n\r\n____\r\n#### Question:\r\n\r\nI want to query SPARQL endpoint `https://data.muziekschatten.nl/sparql`, backed by Virtuoso, using the query underneath:\r\n\r\n```sparql\r\nSELECT * WHERE {\r\n ?uri ;\r\n ?label.\r\n FILTER((?label, \"emile\"))\r\n BIND(\"no name\" AS ?name)\r\n}\r\nLIMIT 100\r\n```\r\n\r\nIt's a silly query - but the crucial parts are the `FILTER` and the `BIND`. If I execute this using Comunica...\r\n\r\n`npx comunica-sparql sparql@https://data.muziekschatten.nl/sparql -f query.rq`\r\n\r\n...where file `query.rq` contains the query above...then the result is:\r\n\r\n`[Invalid SPARQL endpoint (https://data.muziekschatten.nl/sparql) response: undefined`\r\n\r\nMy guess is that Comunica is rewriting the query, e.g. to:\r\n\r\n```sparql\r\nSELECT * WHERE {\r\n ?uri ;\r\n ?label.\r\n BIND(\"no name\" AS ?name)\r\n FILTER((?label, \"emile\"))\r\n}\r\nLIMIT 100\r\n```\r\n\r\n`FILTER` is placed after `BIND`. If I execute this query via the endpoint's query editor on `https://data.muziekschatten.nl/sparql`, then Virtuoso yields the error:\r\n\r\n`Virtuoso 37000 Error SP031: SPARQL compiler: The group does not contain triple pattern with '$label' object before bif:contains() predicate`.\r\n\r\nIs it possible to influence the way that Comunica rewrites the query?\r\n\r\n-----\r\n\r\n## Bounty\r\n\r\nA [bounty](https://comunica.dev/association/bounties/) has been placed on this issue by:\r\n\r\n\r\n\r\n| |\r\n|-|\r\n| [\"Netwerk](https://netwerkdigitaalerfgoed.nl/) |\r\n| €544 |\r\n\r\n\r\n\r\n[Click here to learn more](https://comunica.dev/association/bounty_process/) if you're interested in claiming this bounty by resolving this issue.","bodyHTML":"

This issue has been modified by @rubensworks to describe the intended solution

\n

The problem is that we always parse the incoming query, and serialize it again when we send it to a SPARQL endpoint. Since this parsing-serializing process sometimes results in slightly different queries, this may cause issues for certain use cases. To solve this, we need to keep track of the original query string, and use that one in the case of querying a SPARQL endpoint.

\n

In actor-init-sparql, we need to add the original query string into the context.
\nIn actor-query-operation-sparql-endpoint, we need to check this context entry, and use that one if it exists.

\n

The only difficulty here is that we have to make sure that this context entry does not propagate to places where it shouldn't. For example, if this actor is only used because of a SERVICE keyword, we need to make sure that the actor still uses the SERVICE operation instead of the full original query. We could do this by just making sure that the service operator unsets or overrides this entry.

\n
\n

Original issue:

\n

Issue type:

\n
    \n
  • ❓ Question
  • \n
\n
\n

Question:

\n

I want to query SPARQL endpoint https://data.muziekschatten.nl/sparql, backed by Virtuoso, using the query underneath:

\n
SELECT * WHERE {\n  ?uri <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://schema.org/Person>;\n    <http://schema.org/name> ?label.\n  FILTER(<bif:contains>(?label, \"emile\"))\n  BIND(\"no name\" AS ?name)\n}\nLIMIT 100
\n

It's a silly query - but the crucial parts are the FILTER and the BIND. If I execute this using Comunica...

\n

npx comunica-sparql sparql@https://data.muziekschatten.nl/sparql -f query.rq

\n

...where file query.rq contains the query above...then the result is:

\n

[Invalid SPARQL endpoint (https://data.muziekschatten.nl/sparql) response: undefined

\n

My guess is that Comunica is rewriting the query, e.g. to:

\n
SELECT * WHERE {\n  ?uri <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://schema.org/Person>;\n    <http://schema.org/name> ?label.\n  BIND(\"no name\" AS ?name)\n  FILTER(<bif:contains>(?label, \"emile\"))\n}\nLIMIT 100
\n

FILTER is placed after BIND. If I execute this query via the endpoint's query editor on https://data.muziekschatten.nl/sparql, then Virtuoso yields the error:

\n

Virtuoso 37000 Error SP031: SPARQL compiler: The group does not contain triple pattern with '$label' object before bif:contains() predicate.

\n

Is it possible to influence the way that Comunica rewrites the query?

\n
\n

Bounty

\n

A bounty has been placed on this issue by:

\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n
\"Netwerk
€544
\n\n

Click here to learn more if you're interested in claiming this bounty by resolving this issue.

","createdAt":"2021-07-28T15:44:07Z","closedAt":"2021-11-26T15:26:55Z"},{"state":"OPEN","title":"Implement OPT+ operator","url":"https://github.com/comunica/comunica/issues/825","number":825,"repository":{"name":"comunica","nameWithOwner":"comunica/comunica","url":"https://github.com/comunica/comunica","description":"📬 A knowledge graph querying framework for JavaScript"},"assignees":{"totalCount":0,"nodes":[]},"body":"#### Issue type:\r\n\r\n- :heavy_plus_sign: Feature request \r\n\r\n____\r\n#### Description:\r\n\r\nThe standard OPTIONAL operator is SPARQL is non-monotonic, which can lead to problem with streaming results. Concretely, intermediary results that do _not_ match with an OPTIONAL block will not be emitted until the whole relevant part of the dataset is handled. In practise, this means that some results will not become available to the user as soon as possible.\r\n\r\nThe paper [\"OPT+: A Monotonic Alternative to OPTIONAL in SPARQL\" (by Sijin Cheng and Olaf Hartig)](https://www.researchgate.net/publication/333627321_OPT_A_Monotonic_Alternativeto_OPTIONAL_in_SPARQL)\r\nintroduces the OPT+ operator, which makes OPTIONAL monotonic by changing its semantics (`A OPT+ B = (A AND B) UNION A`).\r\n\r\nThe modified nested loop join algorithm from the paper (others are proposed) seems to achieve the best results.\r\n\r\nWe can create a modified version (or provide a config option) of our OPTIONAL actor (`actor-query-operation-leftjoin-nestedloop`) that considers this modification.\r\nIn essence, this modification means that a result can be emitted twice: once _without_ the optional binding, and once _with_ the optional binding.\r\n\r\nSince this modification is not strictly spec-compliant anymore, we should not enable it by default. But having it available can be useful for many use cases, especially when we have many sources (or when we are doing link traversal).\r\n\r\n-----\r\n\r\n## Bounty\r\n\r\nA [bounty](https://comunica.dev/association/bounties/) has been placed on this issue by:\r\n\r\n\r\n\r\n| |\r\n|-|\r\n| [\"Comunica](https://comunica.dev/association/) |\r\n| €1088 |\r\n\r\n\r\n\r\n[Click here to learn more](https://comunica.dev/association/bounty_process/) if you're interested in claiming this bounty by resolving this issue.","bodyHTML":"

Issue type:

\n
    \n
  • ➕ Feature request
  • \n
\n
\n

Description:

\n

The standard OPTIONAL operator is SPARQL is non-monotonic, which can lead to problem with streaming results. Concretely, intermediary results that do not match with an OPTIONAL block will not be emitted until the whole relevant part of the dataset is handled. In practise, this means that some results will not become available to the user as soon as possible.

\n

The paper \"OPT+: A Monotonic Alternative to OPTIONAL in SPARQL\" (by Sijin Cheng and Olaf Hartig)
\nintroduces the OPT+ operator, which makes OPTIONAL monotonic by changing its semantics (A OPT+ B = (A AND B) UNION A).

\n

The modified nested loop join algorithm from the paper (others are proposed) seems to achieve the best results.

\n

We can create a modified version (or provide a config option) of our OPTIONAL actor (actor-query-operation-leftjoin-nestedloop) that considers this modification.
\nIn essence, this modification means that a result can be emitted twice: once without the optional binding, and once with the optional binding.

\n

Since this modification is not strictly spec-compliant anymore, we should not enable it by default. But having it available can be useful for many use cases, especially when we have many sources (or when we are doing link traversal).

\n
\n

Bounty

\n

A bounty has been placed on this issue by:

\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n
\"Comunica
€1088
\n\n

Click here to learn more if you're interested in claiming this bounty by resolving this issue.

","createdAt":"2021-05-28T13:11:35Z","closedAt":null},{"state":"OPEN","title":"Run CI on windows","url":"https://github.com/comunica/comunica/issues/798","number":798,"repository":{"name":"comunica","nameWithOwner":"comunica/comunica","url":"https://github.com/comunica/comunica","description":"📬 A knowledge graph querying framework for JavaScript"},"assignees":{"totalCount":0,"nodes":[]},"body":"#### Issue type:\r\n\r\n- :heavy_plus_sign: Feature request \r\n\r\n____\r\n#### Description:\r\n\r\nAs we have migrated to GitHub Actions to run our CI, it should be easy to run on Windows as well.\r\nHowever, [tests seem to fail](https://github.com/comunica/comunica/runs/2174042973?check_suite_focus=true), which is why it isn't enabled yet.\r\n\r\nMay be related to #713 and #616.\r\n\r\n-----\r\n\r\n## Bounty\r\n\r\nA [bounty](https://comunica.dev/association/bounties/) has been placed on this issue by:\r\n\r\n\r\n\r\n| |\r\n|-|\r\n| [\"Comunica](https://comunica.dev/association/) |\r\n| €272 |\r\n\r\n\r\n\r\n[Click here to learn more](https://comunica.dev/association/bounty_process/) if you're interested in claiming this bounty by resolving this issue.","bodyHTML":"

Issue type:

\n
    \n
  • ➕ Feature request
  • \n
\n
\n

Description:

\n

As we have migrated to GitHub Actions to run our CI, it should be easy to run on Windows as well.
\nHowever, tests seem to fail, which is why it isn't enabled yet.

\n

May be related to #713 and #616.

\n
\n

Bounty

\n

A bounty has been placed on this issue by:

\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n
\"Comunica
€272
\n\n

Click here to learn more if you're interested in claiming this bounty by resolving this issue.

","createdAt":"2021-03-23T10:55:56Z","closedAt":null},{"state":"OPEN","title":"Ensure backpressure is maintained in streams","url":"https://github.com/comunica/comunica/issues/759","number":759,"repository":{"name":"comunica","nameWithOwner":"comunica/comunica","url":"https://github.com/comunica/comunica","description":"📬 A knowledge graph querying framework for JavaScript"},"assignees":{"totalCount":0,"nodes":[]},"body":"#### Issue type:\r\n\r\n- :bug: Bug \r\n\r\n____\r\n#### Description:\r\n\r\nThere seem to be a couple of places where we are not adhering to Node's backpressure conventions with regards to streams.\r\n\r\nConcretely, we seem to be creating new streams (such as `Readable`, `PassThrough` and `Transform`), and `push`-ing into them (via a `'data'` handler on another stream). Node handles backpressuring via the return value of `push`, which we are ignoring in this manner.\r\n\r\nhttps://github.com/search?q=repo%3Acomunica%2Fcomunica%20on(%27data&type=code\r\n\r\nA better solution would be to simply `pipe` instead of calling `push` on each data element.\r\n\r\nRelated to https://github.com/rubensworks/rdf-parse.js/commit/269c757935c54b388e1bde076dc29c2afc2e8e7b\r\n\r\n-----\r\n\r\n## Bounty\r\n\r\nA [bounty](https://comunica.dev/association/bounties/) has been placed on this issue by:\r\n\r\n\r\n\r\n| |\r\n|-|\r\n| [\"Comunica](https://comunica.dev/association/) |\r\n| €1088 |\r\n\r\n\r\n\r\n[Click here to learn more](https://comunica.dev/association/bounty_process/) if you're interested in claiming this bounty by resolving this issue.\r\n","bodyHTML":"

Issue type:

\n
    \n
  • 🐛 Bug
  • \n
\n
\n

Description:

\n

There seem to be a couple of places where we are not adhering to Node's backpressure conventions with regards to streams.

\n

Concretely, we seem to be creating new streams (such as Readable, PassThrough and Transform), and push-ing into them (via a 'data' handler on another stream). Node handles backpressuring via the return value of push, which we are ignoring in this manner.

\n

https://github.com/search?q=repo%3Acomunica%2Fcomunica%20on(%27data&type=code

\n

A better solution would be to simply pipe instead of calling push on each data element.

\n

Related to rubensworks/rdf-parse.js@269c757

\n
\n

Bounty

\n

A bounty has been placed on this issue by:

\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n
\"Comunica
€1088
\n\n

Click here to learn more if you're interested in claiming this bounty by resolving this issue.

","createdAt":"2020-11-12T14:10:28Z","closedAt":null},{"state":"CLOSED","title":"Throwing `Projection of ungrouped variable` error on valid query","url":"https://github.com/RubenVerborgh/SPARQL.js/issues/120","number":120,"repository":{"name":"SPARQL.js","nameWithOwner":"RubenVerborgh/SPARQL.js","url":"https://github.com/RubenVerborgh/SPARQL.js","description":"A parser for the SPARQL query language in JavaScript"},"assignees":{"totalCount":1,"nodes":[{"name":"Daniel Beeke","avatarUrl":"https://avatars.githubusercontent.com/u/684215?u=44d5742e760eaa9cd2b05b5025654b028c50eacd&v=4","url":"https://github.com/danielbeeke"}]},"body":"We're encountering issues with the most recent sparqljs releases, where the error checking is too strict.\r\nThis query is valid, but throws an `Projection of ungrouped variable (?p)` error:\r\n\r\n```\r\nselect ?p (count(*) as ?n) {\r\n [ ?p [] ].\r\n}\r\n```\r\n\r\nThis seems to be introduced by this PR: #108\r\n\r\n\r\n-----\r\n\r\n## Bounty\r\n\r\nA [bounty](https://comunica.dev/association/bounties/) has been placed on this issue by:\r\n\r\n\r\n\r\n| |\r\n|-|\r\n| [\"Triply\"](https://triply.cc/) |\r\n| €272 |\r\n\r\n\r\n\r\n[Click here to learn more](https://comunica.dev/association/bounty_process/) if you're interested in claiming this bounty by resolving this issue.","bodyHTML":"

We're encountering issues with the most recent sparqljs releases, where the error checking is too strict.
\nThis query is valid, but throws an Projection of ungrouped variable (?p) error:

\n
select ?p (count(*) as ?n) {\n  [ ?p [] ].\n}\n
\n

This seems to be introduced by this PR: #108

\n
\n

Bounty

\n

A bounty has been placed on this issue by:

\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n
\"Triply\"
€272
\n\n

Click here to learn more if you're interested in claiming this bounty by resolving this issue.

","createdAt":"2020-10-29T10:13:22Z","closedAt":"2021-10-01T10:37:44Z"},{"state":"CLOSED","title":"URL encoded strings are decoded in IRIs","url":"https://github.com/rdfjs/rdfxml-streaming-parser.js/issues/39","number":39,"repository":{"name":"rdfxml-streaming-parser.js","nameWithOwner":"rdfjs/rdfxml-streaming-parser.js","url":"https://github.com/rdfjs/rdfxml-streaming-parser.js","description":"Streaming RDF/XML parser"},"assignees":{"totalCount":1,"nodes":[{"name":"Thomas Tanon","avatarUrl":"https://avatars.githubusercontent.com/u/458123?u=8f3e73bd5196789bdbf821f0f4e309dffdffd295&v=4","url":"https://github.com/Tpt"}]},"body":"Hi, I have a rdf-xml file where an IRI contains the character sequence ` `, which is a URL encoding for newlines (`\\n`). In the output of rdfxml-streaming-parser, this string is decoded, so that my IRI now instead contains `\\n`. The same can be seen for other strings such as `>` and `<`. This is different from what N3 does for turtle-family parsing. I'm not certain which approach would be correct. \r\n\r\n```javascript\r\nconst fs = require('fs');\r\nconst RdfXmlParser = require(\"rdfxml-streaming-parser\").RdfXmlParser;\r\nconst N3 = require('n3');\r\n\r\nfs.createReadStream('test.rdf')\r\n .pipe(new RdfXmlParser())\r\n .on('data', console.log)\r\n\r\nfs.createReadStream('test.ttl')\r\n .pipe(new N3.StreamParser())\r\n .on('data', console.log)\r\n```\r\n\r\ninput files: \r\n\r\n```rdf\r\n\r\n\r\n\r\n \r\n \r\n \r\n\r\n\r\n```\r\n\r\n```turtle\r\n.\r\n```\r\n\r\noutput:\r\n```\r\nQuad {\r\n subject: NamedNode { value: 'a:\\n' },\r\n predicate: NamedNode { value: 'b:b' },\r\n object: NamedNode { value: 'c:c' },\r\n graph: DefaultGraph { value: '' }\r\n}\r\nQuad {\r\n subject: NamedNode { id: 'a: ' },\r\n predicate: NamedNode { id: 'b:b' },\r\n object: NamedNode { id: 'c:c' },\r\n graph: DefaultGraph { id: '' }\r\n}\r\n```\r\n\r\n-----\r\n\r\n## Bounty\r\n\r\nA [bounty](https://comunica.dev/association/bounties/) has been placed on this issue by:\r\n\r\n\r\n\r\n| |\r\n|-|\r\n| [\"Triply\"](https://triply.cc/) |\r\n| €544 |\r\n\r\n\r\n\r\n[Click here to learn more](https://comunica.dev/association/bounty_process/) if you're interested in claiming this bounty by resolving this issue.","bodyHTML":"

Hi, I have a rdf-xml file where an IRI contains the character sequence &#xA;, which is a URL encoding for newlines (\\n). In the output of rdfxml-streaming-parser, this string is decoded, so that my IRI now instead contains \\n. The same can be seen for other strings such as &gt; and &lt;. This is different from what N3 does for turtle-family parsing. I'm not certain which approach would be correct.

\n
const fs = require('fs');\nconst RdfXmlParser = require(\"rdfxml-streaming-parser\").RdfXmlParser;\nconst N3 = require('n3');\n\nfs.createReadStream('test.rdf')\n  .pipe(new RdfXmlParser())\n  .on('data', console.log)\n\nfs.createReadStream('test.ttl')\n  .pipe(new N3.StreamParser())\n  .on('data', console.log)
\n

input files:

\n
<?xml version=\"1.0\" encoding=\"utf-8\" ?>\n<rdf:RDF xmlns:rdf=\"http://www.w3.org/1999/02/22-rdf-syntax-ns#\"\n         xmlns:ns0=\"b:\">\n\n  <rdf:Description rdf:about=\"a:&#xA;\">\n    <ns0:b rdf:resource=\"c:c\"/>\n  </rdf:Description>\n\n</rdf:RDF>
\n
<a:&#xA;><b:b><c:c>.
\n

output:

\n
Quad {\n  subject: NamedNode { value: 'a:\\n' },\n  predicate: NamedNode { value: 'b:b' },\n  object: NamedNode { value: 'c:c' },\n  graph: DefaultGraph { value: '' }\n}\nQuad {\n  subject: NamedNode { id: 'a:&#xA;' },\n  predicate: NamedNode { id: 'b:b' },\n  object: NamedNode { id: 'c:c' },\n  graph: DefaultGraph { id: '' }\n}\n
\n
\n

Bounty

\n

A bounty has been placed on this issue by:

\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n
\"Triply\"
€544
\n\n

Click here to learn more if you're interested in claiming this bounty by resolving this issue.

","createdAt":"2020-06-30T12:55:55Z","closedAt":"2022-08-25T07:26:06Z"},{"state":"CLOSED","title":"Parsing issue with SPARQL query on inverse paths in anonymous node","url":"https://github.com/RubenVerborgh/SPARQL.js/issues/99","number":99,"repository":{"name":"SPARQL.js","nameWithOwner":"RubenVerborgh/SPARQL.js","url":"https://github.com/RubenVerborgh/SPARQL.js","description":"A parser for the SPARQL query language in JavaScript"},"assignees":{"totalCount":1,"nodes":[{"name":"Daniel Beeke","avatarUrl":"https://avatars.githubusercontent.com/u/684215?u=44d5742e760eaa9cd2b05b5025654b028c50eacd&v=4","url":"https://github.com/danielbeeke"}]},"body":"_Originally reported in by https://github.com/comunica/comunica/issues/677 @jaw111._\r\n\r\nThere is an odd combination of syntax that is flagged as an error.\r\n\r\n```sparql\r\nSELECT *\r\nWHERE {\r\n ?movie a dbpedia-owl:Film ;\r\n dbpedia-owl:starring [\r\n rdfs:label \"Brad Pitt\"@en ;\r\n ^dbpedia-owl:starring ?otherMovie\r\n ] .\r\n}\r\n```\r\n\r\nGives the error:\r\n\r\n```\r\n# Parse error on line 21:\r\n...ad Pitt\"@en ; ^dbpedia-owl:starrin\r\n----------------------^\r\nExpecting 'IRIREF', 'PNAME_NS', 'VAR', '}', 'GRAPH', ';', 'a', ']', 'PNAME_LN', '.', got '^'\r\n```\r\n\r\nWhilst removing the triple pattern for `a` works just fine:\r\n\r\n```sparql\r\nSELECT *\r\nWHERE {\r\n ?movie\r\n dbpedia-owl:starring [\r\n rdfs:label \"Brad Pitt\"@en ;\r\n ^dbpedia-owl:starring ?otherMovie\r\n ] .\r\n}\r\n```\r\n\r\n-----\r\n\r\n## Bounty\r\n\r\nA [bounty](https://comunica.dev/association/bounties/) has been placed on this issue by:\r\n\r\n\r\n\r\n| |\r\n|-|\r\n| [\"Triply\"](https://triply.cc/) |\r\n| €272 |\r\n\r\n\r\n\r\n[Click here to learn more](https://comunica.dev/association/bounty_process/) if you're interested in claiming this bounty by resolving this issue.","bodyHTML":"

Originally reported in by comunica/comunica#677 @jaw111.

\n

There is an odd combination of syntax that is flagged as an error.

\n
SELECT *\nWHERE {\n  ?movie a dbpedia-owl:Film ;\n    dbpedia-owl:starring [\n      rdfs:label \"Brad Pitt\"@en ;\n      ^dbpedia-owl:starring ?otherMovie\n    ] .\n}
\n

Gives the error:

\n
# Parse error on line 21:\n...ad Pitt\"@en ;      ^dbpedia-owl:starrin\n----------------------^\nExpecting 'IRIREF', 'PNAME_NS', 'VAR', '}', 'GRAPH', ';', 'a', ']', 'PNAME_LN', '.', got '^'\n
\n

Whilst removing the triple pattern for a works just fine:

\n
SELECT *\nWHERE {\n  ?movie\n    dbpedia-owl:starring [\n      rdfs:label \"Brad Pitt\"@en ;\n      ^dbpedia-owl:starring ?otherMovie\n    ] .\n}
\n
\n

Bounty

\n

A bounty has been placed on this issue by:

\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n
\"Triply\"
€272
\n\n

Click here to learn more if you're interested in claiming this bounty by resolving this issue.

","createdAt":"2020-06-25T11:32:44Z","closedAt":"2021-11-29T13:39:03Z"},{"state":"CLOSED","title":"Achieve full test coverage","url":"https://github.com/comunica/sparqlee/issues/38","number":38,"repository":{"name":"sparqlee","nameWithOwner":"comunica/sparqlee","url":"https://github.com/comunica/sparqlee","description":"⚙️ SPARQL expression evaluator library - Moved to @comunica/expression-evaluator"},"assignees":{"totalCount":1,"nodes":[{"name":"Thomas Tanon","avatarUrl":"https://avatars.githubusercontent.com/u/458123?u=8f3e73bd5196789bdbf821f0f4e309dffdffd295&v=4","url":"https://github.com/Tpt"}]},"body":"We need additional and effective (unit/spec/integration/util) tests so that we achieve a 100% testing coverage.\r\n\r\nRelated to:\r\n\r\n* #35\r\n* #37\r\n* #34\r\n* #50\r\n* #40\r\n* #41\r\n* #21\r\n* #20\r\n-----\r\n\r\n## Bounty\r\n\r\nA [bounty](https://comunica.dev/association/bounties/) has been placed on this issue by:\r\n\r\n\r\n\r\n| |\r\n|-|\r\n| [\"Comunica](https://comunica.dev/association/) |\r\n| €544 |\r\n\r\n\r\n\r\n[Click here to learn more](https://comunica.dev/association/bounty_process/) if you're interested in claiming this bounty by resolving this issue.","bodyHTML":"

We need additional and effective (unit/spec/integration/util) tests so that we achieve a 100% testing coverage.

\n

Related to:

\n\n
\n

Bounty

\n

A bounty has been placed on this issue by:

\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n
\"Comunica
€544
\n\n

Click here to learn more if you're interested in claiming this bounty by resolving this issue.

","createdAt":"2019-05-20T15:53:09Z","closedAt":"2022-06-01T05:25:09Z"},{"state":"OPEN","title":"HTTP caching","url":"https://github.com/comunica/comunica/issues/166","number":166,"repository":{"name":"comunica","nameWithOwner":"comunica/comunica","url":"https://github.com/comunica/comunica","description":"📬 A knowledge graph querying framework for JavaScript"},"assignees":{"totalCount":1,"nodes":[{"name":null,"avatarUrl":"https://avatars.githubusercontent.com/u/5464743?u=d13cea279ad1005cc01c6f044daa4ab16ae977b7&v=4","url":"https://github.com/jaxoncreed"}]},"body":"#### Issue type:\r\n\r\n- :heavy_plus_sign: Feature request\r\n\r\n____\r\n#### Description:\r\n\r\nWe should add support for proper client-side caching of HTTP resources.\r\nWe should check both the `Expires`, `Cache-Control`, `ETag` and `Last-Modified` headers, and appropriately send requests with `If-None-Match`/`If-Modified-Since` if needed.\r\n\r\nWe should make the cache actor work on the http bus.\r\n\r\nThere may be npm packages available that can help us out.\r\n\r\nThis article contains some useful information on caching: https://link.springer.com/chapter/10.1007/978-3-319-18818-8_18\r\n\r\nMore relevant papers:\r\n* Bahn, Hyokyung, et al. \"Efficient replacement of nonuniform objects in web caches.\" Computer 35.6 (2002): 65-73.\r\n* Jin, Shudong, and Azer Bestavros. \"GreedyDual∗ Web caching algorithm: exploiting the two sources of temporal locality in Web request streams.\" Computer Communications 24.2 (2001): 174-183.\r\n* Jin, Shudong, and Azer Bestavros. \"Popularity-aware greedy dual-size web proxy caching algorithms.\" Proceedings 20th IEEE International Conference on Distributed Computing Systems. IEEE, 2000.\r\n\r\n-----\r\n\r\n**Implementation suggestions:**\r\n\r\n* A new package: `actor-http-cache` on the http bus\r\n* This new actor should be able to use a [`Cache`](https://developer.mozilla.org/en-US/docs/Web/API/Cache) from the context (interface is available in TS when using dom types).\r\n* A simple default LRUCache-based `Cache` implementation should be set here if the user provided none in the context: https://github.com/comunica/comunica/blob/master/packages/actor-init-query/lib/QueryEngineBase.ts#L110\r\nIt can be implemented using https://www.npmjs.com/package/http-cache-semantics\r\n* This actor should invoke the HTTP invalidation bus when cache entries become invalidation, to ensure that other parts of the query engine that cache things will be notified. This can be done by adding a `mediatorHttpInvalidate` to this actor, and invoking it like here: https://github.com/comunica/comunica/blob/master/packages/actor-init-query/lib/QueryEngineBase.ts#L301\r\n* This actor should also listen to manual HTTP invalidations via an HTTP invalidate observer, just like here: https://github.com/comunica/comunica/blob/master/packages/actor-rdf-resolve-quad-pattern-hypermedia/lib/ActorRdfResolveQuadPatternHypermedia.ts#L42-L44\r\n\r\n-----\r\n\r\n**Things that become possible after this issue has been resolved:**\r\n\r\n* The hardcoded cache store and cache semantics can be moved to a bus, with corresponding default actors. We should still allow values to be set for them via the context, in which case the bus should not be invoked.\r\n\r\n-----\r\n\r\n## Bounty\r\n\r\nA [bounty](https://comunica.dev/association/bounties/) has been placed on this issue by:\r\n\r\n\r\n\r\n| |\r\n|-|\r\n| [\"Comunica](https://comunica.dev/association/) |\r\n| €544 |\r\n\r\n\r\n\r\n[Click here to learn more](https://comunica.dev/association/bounty_process/) if you're interested in claiming this bounty by resolving this issue.","bodyHTML":"

Issue type:

\n
    \n
  • ➕ Feature request
  • \n
\n
\n

Description:

\n

We should add support for proper client-side caching of HTTP resources.
\nWe should check both the Expires, Cache-Control, ETag and Last-Modified headers, and appropriately send requests with If-None-Match/If-Modified-Since if needed.

\n

We should make the cache actor work on the http bus.

\n

There may be npm packages available that can help us out.

\n

This article contains some useful information on caching: https://link.springer.com/chapter/10.1007/978-3-319-18818-8_18

\n

More relevant papers:

\n
    \n
  • Bahn, Hyokyung, et al. \"Efficient replacement of nonuniform objects in web caches.\" Computer 35.6 (2002): 65-73.
  • \n
  • Jin, Shudong, and Azer Bestavros. \"GreedyDual∗ Web caching algorithm: exploiting the two sources of temporal locality in Web request streams.\" Computer Communications 24.2 (2001): 174-183.
  • \n
  • Jin, Shudong, and Azer Bestavros. \"Popularity-aware greedy dual-size web proxy caching algorithms.\" Proceedings 20th IEEE International Conference on Distributed Computing Systems. IEEE, 2000.
  • \n
\n
\n

Implementation suggestions:

\n\n
\n

Things that become possible after this issue has been resolved:

\n
    \n
  • The hardcoded cache store and cache semantics can be moved to a bus, with corresponding default actors. We should still allow values to be set for them via the context, in which case the bus should not be invoked.
  • \n
\n
\n

Bounty

\n

A bounty has been placed on this issue by:

\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n
\"Comunica
€544
\n\n

Click here to learn more if you're interested in claiming this bounty by resolving this issue.

","createdAt":"2018-07-03T10:59:23Z","closedAt":null},{"state":"CLOSED","title":"Clearer error reporting for incorrect input","url":"https://github.com/comunica/comunica/issues/119","number":119,"repository":{"name":"comunica","nameWithOwner":"comunica/comunica","url":"https://github.com/comunica/comunica","description":"📬 A knowledge graph querying framework for JavaScript"},"assignees":{"totalCount":0,"nodes":[]},"body":"_This issue has been modified by @rubensworks to describe the intended solution_\r\n\r\n**Problem:**\r\n\r\nThe problem is that some (most?) errors that can be produced by Comunica are quite cryptic.\r\nThis is a consequence of inter-actor communication happening via mediators, which can produce errors such as:\r\n```\r\nError: https://.../rdf-dereference.json#mediatorRdfParse mediated over all rejecting actors:\r\nError: Unrecognized media type: text/html\r\nError: Unrecognized media type: text/html\r\nError: Unrecognized media type: text/html\r\n at MediatorRace.js:55\r\n```\r\n\r\nSo the common format is that mediators show an error message that accumulates error messages from failing actors.\r\n\r\n**Possible solution:**\r\n\r\nOne possible solution could be to reformat these types of error messages to something roughly like:\r\n```\r\nError: RDF parsing failed: none of the configured parsers were able to handle the content type 'text/html'.\r\n Error messages of failing actors:\r\n ActorNameX: Unrecognized media type: text/html\r\n ActorNameY: Unrecognized media type: text/html\r\n ActorNameZ: Unrecognized media type: text/html\r\n```\r\n\r\n(certainly open to other suggestions)\r\n\r\n**Implementation suggestions:**\r\n\r\nWe could have mediators accept an error message format (with placeholders for things such as `contentType` in parsing actions), which can be configured via the different Components.js config files.\r\nThis would mean that every instantiated mediator would have a bus/action-specific error message format.\r\n\r\nEach mediator would also require some polishing (and alignment) in how it produces error messages.\r\n\r\n-----\r\n\r\nOriginal issue:\r\n\r\n#### Issue type:\r\n\r\n- :heavy_plus_sign: Feature request\r\n\r\n#### Description:\r\n\r\nWhen invoking `comunica-sparql` with (for instance) an error in the query, I get:\r\n\r\n```\r\nError: Unknown prefix: schema\r\n at Object.anonymous (/Users/ruben/.nvm/versions/node/v8.9.4/lib/node_modules/@comunica/actor-init-sparql/node_modules/sparqljs/lib/SparqlParser.js:498:29)\r\n at Parser.parse (/Users/ruben/.nvm/versions/node/v8.9.4/lib/node_modules/@comunica/actor-init-sparql/node_modules/sparqljs/lib/SparqlParser.js:642:36)\r\n at Parser.parser.parse (/Users/ruben/.nvm/versions/node/v8.9.4/lib/node_modules/@comunica/actor-init-sparql/node_modules/sparqljs/sparql.js:22:37)\r\n at Object.translate (/Users/ruben/.nvm/versions/node/v8.9.4/lib/node_modules/@comunica/actor-init-sparql/node_modules/sparqlalgebrajs/lib/sparqlAlgebra.js:30:25)\r\n at ActorSparqlParseAlgebra.run (/Users/ruben/.nvm/versions/node/v8.9.4/lib/node_modules/@comunica/actor-init-sparql/node_modules/@comunica/actor-sparql-parse-algebra/lib/ActorSparqlParseAlgebra.js:16:47)\r\n at MediatorRace.mediate (/Users/ruben/.nvm/versions/node/v8.9.4/lib/node_modules/@comunica/actor-init-sparql/node_modules/@comunica/core/lib/Mediator.js:80:22)\r\n at \r\n at process._tickCallback (internal/process/next_tick.js:188:7)\r\n at Function.Module.runMain (module.js:686:11)\r\n at startup (bootstrap_node.js:187:16)\r\n```\r\n\r\nWould be helpful to a) hide the stacktrace (only show it when a certain flag is set) and b) for this particular case, make the error message (a bit) more descriptive.\r\n\r\n-----\r\n\r\n## Bounty\r\n\r\nA [bounty](https://comunica.dev/association/bounties/) has been placed on this issue by:\r\n\r\n\r\n\r\n| |\r\n|-|\r\n| [\"Comunica](https://comunica.dev/association/) |\r\n| €1632 |\r\n\r\n\r\n\r\n[Click here to learn more](https://comunica.dev/association/bounty_process/) if you're interested in claiming this bounty by resolving this issue.","bodyHTML":"

This issue has been modified by @rubensworks to describe the intended solution

\n

Problem:

\n

The problem is that some (most?) errors that can be produced by Comunica are quite cryptic.
\nThis is a consequence of inter-actor communication happening via mediators, which can produce errors such as:

\n
Error: https://.../rdf-dereference.json#mediatorRdfParse mediated over all rejecting actors:\nError: Unrecognized media type: text/html\nError: Unrecognized media type: text/html\nError: Unrecognized media type: text/html\n    at MediatorRace.js:55\n
\n

So the common format is that mediators show an error message that accumulates error messages from failing actors.

\n

Possible solution:

\n

One possible solution could be to reformat these types of error messages to something roughly like:

\n
Error: RDF parsing failed: none of the configured parsers were able to handle the content type 'text/html'.\n  Error messages of failing actors:\n    ActorNameX: Unrecognized media type: text/html\n    ActorNameY: Unrecognized media type: text/html\n    ActorNameZ: Unrecognized media type: text/html\n
\n

(certainly open to other suggestions)

\n

Implementation suggestions:

\n

We could have mediators accept an error message format (with placeholders for things such as contentType in parsing actions), which can be configured via the different Components.js config files.
\nThis would mean that every instantiated mediator would have a bus/action-specific error message format.

\n

Each mediator would also require some polishing (and alignment) in how it produces error messages.

\n
\n

Original issue:

\n

Issue type:

\n
    \n
  • ➕ Feature request
  • \n
\n

Description:

\n

When invoking comunica-sparql with (for instance) an error in the query, I get:

\n
Error: Unknown prefix: schema\n    at Object.anonymous (/Users/ruben/.nvm/versions/node/v8.9.4/lib/node_modules/@comunica/actor-init-sparql/node_modules/sparqljs/lib/SparqlParser.js:498:29)\n    at Parser.parse (/Users/ruben/.nvm/versions/node/v8.9.4/lib/node_modules/@comunica/actor-init-sparql/node_modules/sparqljs/lib/SparqlParser.js:642:36)\n    at Parser.parser.parse (/Users/ruben/.nvm/versions/node/v8.9.4/lib/node_modules/@comunica/actor-init-sparql/node_modules/sparqljs/sparql.js:22:37)\n    at Object.translate (/Users/ruben/.nvm/versions/node/v8.9.4/lib/node_modules/@comunica/actor-init-sparql/node_modules/sparqlalgebrajs/lib/sparqlAlgebra.js:30:25)\n    at ActorSparqlParseAlgebra.run (/Users/ruben/.nvm/versions/node/v8.9.4/lib/node_modules/@comunica/actor-init-sparql/node_modules/@comunica/actor-sparql-parse-algebra/lib/ActorSparqlParseAlgebra.js:16:47)\n    at MediatorRace.mediate (/Users/ruben/.nvm/versions/node/v8.9.4/lib/node_modules/@comunica/actor-init-sparql/node_modules/@comunica/core/lib/Mediator.js:80:22)\n    at <anonymous>\n    at process._tickCallback (internal/process/next_tick.js:188:7)\n    at Function.Module.runMain (module.js:686:11)\n    at startup (bootstrap_node.js:187:16)\n
\n

Would be helpful to a) hide the stacktrace (only show it when a certain flag is set) and b) for this particular case, make the error message (a bit) more descriptive.

\n
\n

Bounty

\n

A bounty has been placed on this issue by:

\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n
\"Comunica
€1632
\n\n

Click here to learn more if you're interested in claiming this bounty by resolving this issue.

","createdAt":"2018-03-19T08:42:12Z","closedAt":"2023-08-25T11:06:19Z"},{"state":"CLOSED","title":"Allow HTTP timeout configuration","url":"https://github.com/comunica/comunica/issues/70","number":70,"repository":{"name":"comunica","nameWithOwner":"comunica/comunica","url":"https://github.com/comunica/comunica","description":"📬 A knowledge graph querying framework for JavaScript"},"assignees":{"totalCount":1,"nodes":[{"name":"Thomas Tanon","avatarUrl":"https://avatars.githubusercontent.com/u/458123?u=8f3e73bd5196789bdbf821f0f4e309dffdffd295&v=4","url":"https://github.com/Tpt"}]},"body":"We should allow users to pass an HTTP timeout value via the context (`httpTimeout`).\r\n\r\nThis could be implemented using our own `setTimeout` and the fetch `AbortController`: https://github.com/bitinn/node-fetch/issues/95\r\n\r\nWe should keep in mind here that we should clear our own timeout once the request completes (response object is available).\r\n\r\nAdditionally, we need an extra context option (boolean: `httpTimeoutOnBody`) to make it so that the timeout not only applies to the time until response starts coming in, but also to the time until the response body is fully available. The latter could take longer, or potentially be infinite for e.g. continuous data streams. This should also take into account that response bodies can be cancelled from within Comunica.\r\n\r\n-----\r\n\r\n## Bounty\r\n\r\nA [bounty](https://comunica.dev/association/bounties/) has been placed on this issue by:\r\n\r\n\r\n\r\n| |\r\n|-|\r\n| [\"Netwerk](https://netwerkdigitaalerfgoed.nl/) |\r\n| €1088 |\r\n\r\n\r\n\r\n[Click here to learn more](https://comunica.dev/association/bounty_process/) if you're interested in claiming this bounty by resolving this issue.","bodyHTML":"

We should allow users to pass an HTTP timeout value via the context (httpTimeout).

\n

This could be implemented using our own setTimeout and the fetch AbortController: node-fetch/node-fetch#95

\n

We should keep in mind here that we should clear our own timeout once the request completes (response object is available).

\n

Additionally, we need an extra context option (boolean: httpTimeoutOnBody) to make it so that the timeout not only applies to the time until response starts coming in, but also to the time until the response body is fully available. The latter could take longer, or potentially be infinite for e.g. continuous data streams. This should also take into account that response bodies can be cancelled from within Comunica.

\n
\n

Bounty

\n

A bounty has been placed on this issue by:

\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n
\"Netwerk
€1088
\n\n

Click here to learn more if you're interested in claiming this bounty by resolving this issue.

","createdAt":"2018-01-15T14:21:31Z","closedAt":"2022-06-28T12:55:53Z"}]}}}},"__N_SSG":true} \ No newline at end of file diff --git a/association/bounties/index.html b/association/bounties/index.html index f24b3d88..998f85f7 100644 --- a/association/bounties/index.html +++ b/association/bounties/index.html @@ -13,7 +13,7 @@ -
Comunica Association
€136

comunica/comunica

Expose ESM modules #930

comunica/comunica

Expose ESM modules #930

comunica/comunica

Implement OPT+ operator #825

comunica/comunica

Run CI on windows #798

comunica/comunica

Run CI on windows #798

comunica/comunica

Ensure backpressure is maintained in streams #759

comunica/comunica

HTTP caching #166

comunica/comunica

HTTP caching #166

Completed Bounties


comunica/comunica

FILTER on langString literals does not work with N3 as source #1146

Completed Bounties


comunica/comunica

FILTER on langString literals does not work with N3 as source #1146

comunica/comunica

UTF-8 characters get corrupted when inserting into blazegraph triple store #1140

comunica/comunica

Add check for query-sparql-* depencies #1139

comunica/comunica

Add check for query-sparql-* depencies #1139

\ No newline at end of file +
Netwerk Digitaal Erfgoed
€1088
Claimed byThomas Tanon

\ No newline at end of file