Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

polywrap_native URI resolution is broken due to missing constructors #220

Open
krisbitney opened this issue Aug 22, 2023 · 0 comments
Open
Labels
bug Something isn't working

Comments

@krisbitney
Copy link
Contributor

With the recent changes to the polywrap_native Rust package, it's no longer possible for users to implement a custom URI resolver because they can't construct an FfiUriPackageOrWrapper object and the callback interface for UriPackageOrWrapper was removed.

interface FFIUriPackageOrWrapper {
  FFIUriPackageOrWrapperKind get_kind();
  [Throws=FFIError]
  FFIUri as_uri();
  [Throws=FFIError]
  FFIUriWrapper as_wrapper();
  [Throws=FFIError]
  FFIUriWrapPackage as_package();
};

We also have two FfiUriResolver concepts:

callback interface IFFIUriResolver {
  [Throws=FFIError]
  FFIUriPackageOrWrapper try_resolve_uri(FFIUri uri, FFIInvoker invoker, FFIUriResolutionContext resolution_context);
};

interface FFIUriResolver {
  [Throws=FFIError]
  FFIUriPackageOrWrapper try_resolve_uri(FFIUri uri, FFIInvoker invoker, FFIUriResolutionContext resolution_context);
};

One is a class that has no constructor, but that is needed to construct FfiRecursiveUriResolver and FfiStaticUriResolver. The other is a callback interface that is not used anywhere.

@krisbitney krisbitney added the bug Something isn't working label Aug 22, 2023
@krisbitney krisbitney changed the title polywrap_native URI resolution is broken polywrap_native URI resolution is broken due to missing constructors Aug 22, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant