Skip to content

Conversation

dOrgJelli
Copy link
Contributor

@dOrgJelli dOrgJelli commented Apr 19, 2023

This PR implements resolution context passing to subinvokes. This way, context can be tracked across all nested wrapper calls. This allows for full resolution history tracking, as well as preventing potential recursive resolutions when using resolver extension wrappers.

Changes:

  • Moved UriResolutionResult helper from uri-resolvers-js to core-js so that it can be used in libraries that don't depend on uri-resolvers-js.
  • UriResolutionContex.createSubContext(): using a copy of the resolvingUriMap to prevent the sub context from overriding it in the parent context. History is not passed to the sub context and is instead left to the parent to control how it integrates with the parent history.
  • PluginMethod: plugin methods now accept a resolution context as argument. This can be used in plugin sub invokes or resolutions, to track nested resolution.
  • UriResolverWrapper: tryResolveUri and invokeWrapper can(and are) now combined into just a single invoke to the client
  • WasmWrapper: resolution context is passed to the subinvoke call
  • PolywrapCoreClient: instead of passing the core resolution context to the resolution and invocation processes, seperate sub contexts are created for them. This means that subinvokes will now be tracked in the resolution context.

@nerfZael nerfZael marked this pull request as ready for review April 21, 2023 10:36
@nerfZael nerfZael requested a review from Niraj-Kamdar April 21, 2023 10:37
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants