Skip to content

fix(bindgen): populate imported resource lower metadata#1450

Merged
andreiltd merged 1 commit into
bytecodealliance:mainfrom
andreiltd:fix/import-res-meta
May 6, 2026
Merged

fix(bindgen): populate imported resource lower metadata#1450
andreiltd merged 1 commit into
bytecodealliance:mainfrom
andreiltd:fix/import-res-meta

Conversation

@andreiltd
Copy link
Copy Markdown
Member

The failure shows up with async imports that return resources inside result, for example filesystem ops like this:

result<own<descriptor>, error-code>

throws:

missing/invalid resource metadata

Basically imports_resource_types maps WIT type id to the runtime resource type. But the lowering for own<T> needs the reverse mapping: given the concrete resource type, find the WIT resource type id so it can generate correct func.

@andreiltd andreiltd requested a review from vados-cosmonic as a code owner May 6, 2026 16:08
Copy link
Copy Markdown
Collaborator

@vados-cosmonic vados-cosmonic left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM 🚀

Thanks for fixing this bit of the metadata (it's as bit messy to have both those lookups, I know!)

@andreiltd andreiltd force-pushed the fix/import-res-meta branch from 7342e43 to 4236e44 Compare May 6, 2026 17:46
@andreiltd andreiltd enabled auto-merge May 6, 2026 17:57
@andreiltd andreiltd added this pull request to the merge queue May 6, 2026
@github-merge-queue github-merge-queue Bot removed this pull request from the merge queue due to failed status checks May 6, 2026
@andreiltd andreiltd added this pull request to the merge queue May 6, 2026
Merged via the queue into bytecodealliance:main with commit 287148c May 6, 2026
37 checks passed
@andreiltd andreiltd deleted the fix/import-res-meta branch May 6, 2026 18:41
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.

2 participants