digitalbazaar / jsonld.js

A JSON-LD Processor and API implementation in JavaScript
https://json-ld.org/
Other
1.66k stars 195 forks source link

frame.js state.graphStack is not used. #371

Closed davidlehn closed 4 years ago

davidlehn commented 4 years ago

lib/frame.js tracks graphs with state.graphStack but it doesn't look like they are used.

@gkellogg Was there a plan for this? Pending tests that would need it? Maybe something that didn't make it over from ruby?

It might be a good point for a debugging hook.

gkellogg commented 4 years ago

Perhaps we should add tests that would flesh out the need for this.

Intuitively, if pushing onto a shared stack when processing a named graph, you would need to revert to the previous state after processing, but a test that could fail would be useful. Or, if we can't come up with one, perhaps it's not really necessary after all.

gkellogg commented 4 years ago

See https://github.com/w3c/json-ld-framing/pull/97, I now believe graphStack serves no purpose.

davidlehn commented 4 years ago

Closed in https://github.com/digitalbazaar/jsonld.js/pull/377.