Skip to content

fix: improve sdk error messages around imports#806

Merged
zshipko merged 4 commits intomainfrom
fix-c-error-messages
Dec 13, 2024
Merged

fix: improve sdk error messages around imports#806
zshipko merged 4 commits intomainfrom
fix-c-error-messages

Conversation

@zshipko
Copy link
Copy Markdown
Contributor

@zshipko zshipko commented Dec 13, 2024

Closes #801

Updates the error from:

Unable to compile Extism plugin: incompatible import type for `extism:host/user::wrong_type`

to:

Unable to compile Extism plugin: types incompatible: expected type `(func (result i32))`, found type `(func (result i64))`

nilslice
nilslice previously approved these changes Dec 13, 2024
Copy link
Copy Markdown
Member

@nilslice nilslice left a comment

Choose a reason for hiding this comment

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

nice!

@zshipko zshipko changed the title fix: improve sdk error messages when imports have mismatched types fix: improve sdk error messages around imports Dec 13, 2024
@zshipko
Copy link
Copy Markdown
Contributor Author

zshipko commented Dec 13, 2024

Just pushed another change to update the error message when an unknown import from extism:host/env is found:

Unable to compile Extism plugin: Invalid function import from extism:host/env: something_that_doesnt_exist (type (func (result i32)))

Note: This may indicate that the PDK that was used to build this plugin has additional features that aren't available in this version of the SDK, try updating the SDK to the latest version.

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.

improve error messages around failed imports

2 participants