Skip to content

Pre-check of JS bindings (and checking if the script is "loadable" at all) #24

@noise64

Description

@noise64

When using componentize-js, some of the bindings (or generic js) errors are caught componentizeation. AFAIR this works because wizening boots up the component, and also checks exports.

The nice thing about this is that even if somebody using JS with non-matching bindings, or TS, but forgot to export or use the proper type, still get errors before the component is fully componentized or used

Currently we only catch and detect such errors during invoke.

One possible approach to have a similar safety guard is to implement a unit test in the skeleton, that boots the project and runs some self-checks (or create some special exposed methods in the component?)

Note that using rollup and / or using TS properly in our golem-cli templates does catch many of these, but we should aim to support JS only workflows too and early error reporting for possible other issues as well, even when wasm-rquickjs is used in other possible different settings.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions