Skip to content

Embedder API gaps for implements/external-id #14862

Open

Description

@jrandolf

A few gaps in how implements/external-id are exposed through the embedder API:

  • Component::get_export and Instance::get_export return only the ComponentItem, so an export's attributes are only reachable by iterating component_type().exports(). The data is stored in info::Export::Instance but never read.
  • Root-level type imports (e.g. (import "t" (external-id "x") (type (eq $u)))) are missing from component_type().imports(), while root type exports are present.
  • ComponentExtern's lifetime is tied to the &Engine borrow even though its strings borrow from the type (ty.get_import(&engine.clone(), "p") doesn't compile), and the struct isn't #[non_exhaustive], so adding a field (say, a version suffix for canonical names) would be a breaking change.
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