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

Improve name lookup for trappable_error_type configuration #8833

Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
47 changes: 47 additions & 0 deletions crates/component-macro/tests/codegen.rs
Original file line number Diff line number Diff line change
Expand Up @@ -649,3 +649,50 @@ mod with_and_mixing_async {
});
}
}

mod trappable_error_type_and_versions {
struct MyError;

mod package_no_version_path_no_version {
wasmtime::component::bindgen!({
inline: "
package my:inline;
interface i {
enum e { a, b, c }
}
world foo {}
",
trappable_error_type: {
"my:inline/i/e" => super::MyError,
},
});
}
mod package_version_path_no_version {
wasmtime::component::bindgen!({
inline: "
package my:inline@1.0.0;
interface i {
enum e { a, b, c }
}
world foo {}
",
trappable_error_type: {
"my:inline/i/e" => super::MyError,
},
});
}
mod package_version_path_version {
wasmtime::component::bindgen!({
inline: "
package my:inline@1.0.0;
interface i {
enum e { a, b, c }
}
world foo {}
",
trappable_error_type: {
"my:inline/i@1.0.0/e" => super::MyError,
},
});
}
}
Loading