Skip to content

Conversation

@nerfZael
Copy link
Contributor

@nerfZael nerfZael commented May 15, 2023

Here is the analogous PR in the JS client: polywrap/javascript-client#3

This PR implements resolution context passing to subinvocations. 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:

  • UriResolutionContex.createSubContext(): History is not passed to the sub context and is instead left to the parent to control how it integrates with the parent history.
  • Subinvoker: A new client invoker wrapper structure used as the invoker passed to wrappers. This "Subinvoker" includes the resolution context into the subinvocation (unlike in the JS version where it is done through wrappers state in the wasm wrapper and through client override in the plugin wrapper. This will also be changed in the JS client to mimick the Rust version).
  • PolywrapClient: instead of passing the resolution context to the load wrapper and invocation processes, seperate sub contexts are created for them. This allows for users to track the load and invocation processes separately

@nerfZael nerfZael changed the base branch from main to nerfzael-get-env-from-resolution-path May 15, 2023 20:00
@nerfZael nerfZael marked this pull request as ready for review May 16, 2023 10:52
@nerfZael nerfZael requested review from cbrzn and namesty and removed request for namesty May 16, 2023 10:52
@nerfZael nerfZael changed the base branch from nerfzael-get-env-from-resolution-path to main May 16, 2023 22:07
@nerfZael nerfZael merged commit f5f9a87 into main May 16, 2023
@cbrzn cbrzn deleted the nerfzael-subinvoke-resolution-context branch May 31, 2023 18:30
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.

3 participants