Skip to content

Resource handles can't move between labels that share a host resource type #14861

Open

Description

@jrandolf

When a component imports the same interface under two labels and the host implements both with the same host resource type (the usual named_imports setup), passing a primary.r handle to secondary.use traps. Handle checks compare per-import resource tables, which is stricter than the spec's resource-type identity check.

Trapping here is arguably the more useful behavior since it keeps labels isolated, but it'd be good to decide and document it. The trap message is also misleading, as it calls these host resources "guest-defined": expected guest-defined resource but found a different guest-defined resource.

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

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions