Skip to content

polywrap_native URI resolution is broken due to missing constructors #220

Description

@krisbitney

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.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions