Open gkellogg opened 4 years ago
Tests over here: https://github.com/w3c/json-ld-api/pull/490 It's failing at some low level with new basic tests. Haven't debugged yet, but looks like scoped contexts are just overwriting top level contexts?
Bisect for basic additive scoped context fails here:
In the code that does processing just to validate, I think the bug can be fixed with activeCtx: rval.clone()
instead of just rval
. That seems an unfortunate efficiency issue. Is the passed activeCtx supposed to be mutated?
There was code to freeze these contests, but it was too expensive too. Might be worth doing it to see where it’s being modified and only duo when necessary.
Given the lack of activity in this issue, I implemented the fix mentioned above and tested it with the updated test suite.
Fix in MR #411
The proposed patch was added to jsonld.js 3.2.0 and is live on playground now. I think this issue is fixed. Please test. There is the possibility of a performance regression due to this, but another issue was opened to handle that case.
From https://github.com/w3c/wot-thing-description/issues/894
Compacting the following:
with the following context:
prevents "title" from being used in the output:
Instead, it uses "dct:title". Removing
"@context": {}
from the context makes it work and use "title" instead.