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

Resolve trappable error types with fully qualified package paths #6795

Merged
merged 2 commits into from
Aug 3, 2023

Conversation

elliottt
Copy link
Member

@elliottt elliottt commented Aug 3, 2023

Switch to parsing the trappable_error_type field of the bindgen! macro to expect the first part of the path to be a wit package path. Instead of types::error: MyError, you would now pass "namespace:package/types"::error: MyError. This allows us to resolve the referenced type in wit without ambiguity, when it's used across interfaces.

@elliottt elliottt requested review from a team as code owners August 3, 2023 00:27
@elliottt elliottt requested review from jameysharp and pchickey and removed request for a team August 3, 2023 00:27
@github-actions github-actions bot added the wasi Issues pertaining to WASI label Aug 3, 2023
@elliottt elliottt force-pushed the trevor/trappable-types branch 4 times, most recently from f39e0bb to 8f4dfb1 Compare August 3, 2023 17:12
@pchickey pchickey added this pull request to the merge queue Aug 3, 2023
@github-merge-queue github-merge-queue bot removed this pull request from the merge queue due to a conflict with the base branch Aug 3, 2023
@elliottt elliottt force-pushed the trevor/trappable-types branch from 8f4dfb1 to 5f242d2 Compare August 3, 2023 18:27
@elliottt elliottt enabled auto-merge August 3, 2023 18:27
@elliottt elliottt added this pull request to the merge queue Aug 3, 2023
@github-merge-queue github-merge-queue bot removed this pull request from the merge queue due to failed status checks Aug 3, 2023
@pchickey pchickey added this pull request to the merge queue Aug 3, 2023
@pchickey
Copy link
Contributor

pchickey commented Aug 3, 2023

This got kicked from the merge queue for what appears to be s390x taking too long, which tends to happen with some frequency during the business day. I put it back in

Merged via the queue into bytecodealliance:main with commit 217de07 Aug 3, 2023
geekbeast pushed a commit to geekbeast/wasmtime that referenced this pull request Aug 6, 2023
… feature/preview2

* 'feature/preview2' of github.com:geekbeast/wasmtime:
  Change preview2 builder methods to use `&mut self` (bytecodealliance#6770)
  Add a bindgen test that exercises using error types from a different interface (bytecodealliance#6802)
  Resolve trappable error types with fully qualified package paths (bytecodealliance#6795)
  Update the dev-dependency for wit-bindgen to 0.9.0 (bytecodealliance#6800)
  Fix incorrect sample code in documentation (bytecodealliance#6796) (bytecodealliance#6797)
  Update preview1 to trap on misaligned pointers (bytecodealliance#6776)
  Fix posix-signals-on-macos on aarch64-apple-darwin (bytecodealliance#6793)
  consistient WASI preview1 rights reporting (bytecodealliance#6784)
  Wasmtime: Introduce `{Module,Component}::resources_required` (bytecodealliance#6789)
eduardomourar pushed a commit to eduardomourar/wasmtime that referenced this pull request Aug 18, 2023
…ecodealliance#6795)

* Switch trappable_error_type to take a fully-qualified type path

* Print trappable error types from other interfaces with their module path
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
wasi Issues pertaining to WASI
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants