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

Remove core/plugin.rs #4824

Merged
merged 4 commits into from
Apr 20, 2020
Merged

Remove core/plugin.rs #4824

merged 4 commits into from
Apr 20, 2020

Conversation

ry
Copy link
Member

@ry ry commented Apr 19, 2020

Depends on #4821

This simplifies the plugin interface in order to deliver op crates with a similar API.

- Removes unnecessary RwLock and Rc around the op registry table
- Preparation to move resource_table to deno_core::Isolate.
- Towards denoland#3453, denoland#4222
@ry ry requested a review from bartlomieju April 20, 2020 13:55
Comment on lines -95 to -97
let op_id = isolate
.register_op(&format!("plugin_{}_{}", rid, op.0), state.core_op(op.1));
plugin_resource.ops.insert(op.0, op_id);
Copy link
Member

Choose a reason for hiding this comment

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

This bit was used to make sure there are no ops with duplicate name - right now program will panic if you try to open a plugin that registers op with already existing name

Copy link
Member Author

@ry ry Apr 20, 2020

Choose a reason for hiding this comment

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

That's right. The plugin interface is far from stable - for now I'm opting for simplicity over safety and completeness. Once op crates are working, we can consider how to provide a better developer experience.

Copy link
Member

@bartlomieju bartlomieju left a comment

Choose a reason for hiding this comment

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

LGTM, please take a look at note I left below

@ry ry merged commit 6e5f345 into denoland:master Apr 20, 2020
@ry ry deleted the remove_core_plugin branch April 20, 2020 14:28
SASUKE40 pushed a commit to SASUKE40/deno that referenced this pull request May 7, 2020
This simplifies the plugin interface in order to deliver op crates with a similar API
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.

None yet

2 participants