Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This PR introduces a new method for importing external JSON-LD contexts into the generator. Importing external base context is required to avoid generating definitions for terms that are already defined or protected in the base context.
Before this PR, three differents representations for LD contexts were coexisting insinde the generator:
This caused a number of complications in the codes, in particular with unprocessed local contexts. This lead to various bugs triggered by incorrect or inconsistent interactions between the contexts.
With the new import mechanism, all contexts share the same internal representation. A first static analysis is performed to resolve dynamic values introduced by unprocessed contexts. Even if it complicates the first stages of the generator, this greatly simplifies the generation itself by allowing a unique and consistent comparison of contexts and term definitions.
All the tests are passing, and this implementation can still generate a context for Rebase, Verite. In addition it can generate a context for Open Badges.
What is missing
json_ld::Loader
.