SolidOS/solid-panes

Outliner crashes trying to search for embedded graph in justification code

Closed this issue · 5 comments

timbl commented

Strange bug -- justification code is not used now and simplest thing to remove it.
The code used a new (one statement) graph as a subject in the triple store to store reasons for believing things.

timbl commented

image_2020_02_03T18_06_06_323Z

Curious indeed. Possibly a similar issue

It seems to happen when trying to parse any RDF resource. Needless to say, this makes the data browser unusable.

linkeddata/rdflib.js#377

https://github.com/linkeddata/rdflib.js/blob/d5000f58258ceb8bf3352be24e919b313cf66abd/src/factories/canonical-data-factory.ts#L178

  /** Stringify a {term} to n-quads serialization. */
  termToNQ(term: Term): string {
    switch (term.termType) {
      case BlankNodeTermType:
        return '_:' + term.value
      case DefaultGraphTermType:
        return ''
      case EmptyTermType:
        return '<http://www.w3.org/1999/02/22-rdf-syntax-ns#nil>'
      case LiteralTermType:
        return Literal.toNT(term as Literal)
      case NamedNodeTermType:
        return '<' + term.value + '>'
      default:
        throw new Error(`Can't serialize nonstandard term type (was '${term.termType}')`)
    }
  },
timbl commented

Fixed it in outliner-bug branch but I can't push the branch as it (like the master branch) fails npm test

timbl commented

Overrode it so here is the PR #214