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

introduce unstable flag, make a few things unstable #4892

Merged
merged 4 commits into from
Apr 25, 2020
Merged

Conversation

ry
Copy link
Member

@ry ry commented Apr 24, 2020

minimal version of #4639 where we only do a runtime check. Once this is working for a few ops, we can figure out how to also do type checking.

openPlugin, link, linkSync, symlink, symlinkSync now require --unstable flag

Ref #4334

/// This is intentionally a non-recoverable check so that people cannot probe
/// for unstable APIs from stable programs.
pub fn check_unstable(&self, api_name: &str) {
// TODO(ry) Maybe use IsolateHandle::terminate_execution here to provide a
Copy link
Member

Choose a reason for hiding this comment

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

Stack trace from TerminateExecution has no meaningful info - better to return error to JS (by adding new error kind) and throw it there

Copy link
Member Author

Choose a reason for hiding this comment

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

I don't want it to be recoverable

Copy link
Member

Choose a reason for hiding this comment

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

I agree - otherwise we will get modules that progressively enhance for unstable things. I think that is an antipattern.

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 for first pass

@ry ry merged commit 0c47cd6 into denoland:master Apr 25, 2020
@ry ry mentioned this pull request Apr 27, 2020
43 tasks
SASUKE40 pushed a commit to SASUKE40/deno that referenced this pull request May 7, 2020
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.

3 participants