дзеркало
https://github.com/l0ng-ai/openidea.git
синхронізовано 2026-11-09 19:25:54 +02:00
fix(plugins): refuse components that don't link against the host in check and install (#1471)
check_component only compared import names and the API version, so a component built from unreleased WIT (a function added under @1.0.0) or missing the plugin world's exports passed `openidea-plugin check` and installing, then failed when the IDE started it. It now links the component against the host's linker and reports the missing or mismatched function with what to do. Closes #1468
Цей коміт міститься в:
1 джерело
0d80e2c05a
коміт
04fe65328e
5 files changed
+95
-11
No files matched your search
@@ -71,7 +71,8 @@ target through rustup if needed), copies the component to the manifest's
|
||||
`wasm` path and runs `check`. `check` validates the package exactly as
|
||||
_Install Plugin from Disk…_ would — manifest, every contribution, the SVG
|
||||
sanitiser, the component — and that the component imports nothing but the
|
||||
plugin API and WASI. It prints what the user will be asked to grant.
|
||||
plugin API and WASI and links against the IDE's: every function it imports
|
||||
exists with the same signature, and it exports the plugin world. It prints what the user will be asked to grant.
|
||||
|
||||
`link` adds the folder to `links.json` in the IDE's plugins directory
|
||||
(`$OPENIDEA_PLUGINS_DIR`, default `<app-data>/ai.l0ng.openidea/plugins`). Linked
|
||||
@@ -944,6 +945,8 @@ only grows:
|
||||
its `openidea:plugin/*` imports and exports, `PluginEngine::check_component`).
|
||||
Installing and `openidea-plugin check` refuse another major or a newer
|
||||
minor with a message that says to update the IDE or rebuild with the SDK.
|
||||
They also link the component, so one that imports a function this host
|
||||
lacks under the same version (built from unreleased WIT) is refused too.
|
||||
5. **One version number**: the `wit/` package version, `ENGINE_VERSION` and
|
||||
`API_VERSION` agree, and the SDK's `wit/` copy is identical to `wit/`.
|
||||
6. **1.x calls are synchronous and pass documents whole.** Host calls block
|
||||
|
||||
Reference in new issue
Заблокувати користувача