Skip to content

Commit

Permalink
Remove unstable native plugins (denoland#10908)
Browse files Browse the repository at this point in the history
This commit removes implementation of native plugins
alongside the unstable "Deno.openPlugin()" API.
  • Loading branch information
bartlomieju authored Jul 2, 2021
1 parent 2544ec9 commit 7dd4090
Show file tree
Hide file tree
Showing 15 changed files with 4 additions and 487 deletions.
10 changes: 0 additions & 10 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 0 additions & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@ members = [
"cli",
"core",
"runtime",
"test_plugin",
"test_util",
"extensions/broadcast_channel",
"extensions/console",
Expand Down
31 changes: 0 additions & 31 deletions cli/dts/lib.deno.unstable.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -129,37 +129,6 @@ declare namespace Deno {
speed: number | undefined;
}

/** **UNSTABLE**: new API, yet to be vetted.
*
* Open and initialize a plugin.
*
* ```ts
* import { assert } from "https://deno.land/std/testing/asserts.ts";
* const rid = Deno.openPlugin("./path/to/some/plugin.so");
*
* // The Deno.core namespace is needed to interact with plugins, but this is
* // internal so we use ts-ignore to skip type checking these calls.
* // @ts-ignore
* const { op_test_sync, op_test_async } = Deno.core.ops();
*
* assert(op_test_sync);
* assert(op_test_async);
*
* // @ts-ignore
* const result = Deno.core.opSync("op_test_sync");
*
* // @ts-ignore
* const result = await Deno.core.opAsync("op_test_sync");
* ```
*
* Requires `allow-plugin` permission.
*
* The plugin system is not stable and will change in the future, hence the
* lack of docs. For now take a look at the example
* https://github.com/denoland/deno/tree/main/test_plugin
*/
export function openPlugin(filename: string): number;

/** The log category for a diagnostic message. */
export enum DiagnosticCategory {
Warning = 0,
Expand Down
8 changes: 4 additions & 4 deletions cli/tests/integration/lsp_tests.rs
Original file line number Diff line number Diff line change
Expand Up @@ -470,7 +470,7 @@ fn lsp_hover_unstable_enabled() {
"uri": "file:///a/file.ts",
"languageId": "typescript",
"version": 1,
"text": "console.log(Deno.openPlugin);\n"
"text": "console.log(Deno.ppid);\n"
}
}),
);
Expand All @@ -495,9 +495,9 @@ fn lsp_hover_unstable_enabled() {
"contents":[
{
"language":"typescript",
"value":"function Deno.openPlugin(filename: string): number"
"value":"const Deno.ppid: number"
},
"**UNSTABLE**: new API, yet to be vetted.\n\nOpen and initialize a plugin.\n\n```ts\nimport { assert } from \"https://deno.land/std/testing/asserts.ts\";\nconst rid = Deno.openPlugin(\"./path/to/some/plugin.so\");\n\n// The Deno.core namespace is needed to interact with plugins, but this is\n// internal so we use ts-ignore to skip type checking these calls.\n// @ts-ignore\nconst { op_test_sync, op_test_async } = Deno.core.ops();\n\nassert(op_test_sync);\nassert(op_test_async);\n\n// @ts-ignore\nconst result = Deno.core.opSync(\"op_test_sync\");\n\n// @ts-ignore\nconst result = await Deno.core.opAsync(\"op_test_sync\");\n```\n\nRequires `allow-plugin` permission.\n\nThe plugin system is not stable and will change in the future, hence the\nlack of docs. For now take a look at the example\nhttps://github.com/denoland/deno/tree/main/test_plugin"
"The pid of the current process's parent."
],
"range":{
"start":{
Expand All @@ -506,7 +506,7 @@ fn lsp_hover_unstable_enabled() {
},
"end":{
"line":0,
"character":27
"character":21
}
}
}))
Expand Down
16 changes: 0 additions & 16 deletions runtime/js/40_plugins.js

This file was deleted.

1 change: 0 additions & 1 deletion runtime/js/90_deno_ns.js
Original file line number Diff line number Diff line change
Expand Up @@ -109,7 +109,6 @@
Signal: __bootstrap.signals.Signal,
SignalStream: __bootstrap.signals.SignalStream,
emit: __bootstrap.compilerApi.emit,
openPlugin: __bootstrap.plugins.openPlugin,
kill: __bootstrap.process.kill,
setRaw: __bootstrap.tty.setRaw,
consoleSize: __bootstrap.tty.consoleSize,
Expand Down
1 change: 0 additions & 1 deletion runtime/ops/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@ pub mod fs_events;
pub mod io;
pub mod os;
pub mod permissions;
pub mod plugin;
pub mod process;
pub mod runtime;
pub mod signal;
Expand Down
86 changes: 0 additions & 86 deletions runtime/ops/plugin.rs

This file was deleted.

1 change: 0 additions & 1 deletion runtime/web_worker.rs
Original file line number Diff line number Diff line change
Expand Up @@ -333,7 +333,6 @@ impl WebWorker {
deno_net::init::<Permissions>(options.unstable),
ops::os::init(),
ops::permissions::init(),
ops::plugin::init(),
ops::process::init(),
ops::signal::init(),
ops::tty::init(),
Expand Down
1 change: 0 additions & 1 deletion runtime/worker.rs
Original file line number Diff line number Diff line change
Expand Up @@ -124,7 +124,6 @@ impl MainWorker {
deno_net::init::<Permissions>(options.unstable),
ops::os::init(),
ops::permissions::init(),
ops::plugin::init(),
ops::process::init(),
ops::signal::init(),
ops::tty::init(),
Expand Down
19 changes: 0 additions & 19 deletions test_plugin/Cargo.toml

This file was deleted.

9 changes: 0 additions & 9 deletions test_plugin/README.md

This file was deleted.

114 changes: 0 additions & 114 deletions test_plugin/src/lib.rs

This file was deleted.

Loading

0 comments on commit 7dd4090

Please sign in to comment.