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

feat: remove conditional unstable type-checking #21825

Merged
merged 8 commits into from
Jan 14, 2024

Conversation

bartlomieju
Copy link
Member

This commit removes conditional type-checking of unstable APIs.

Before this commit deno check (or any other type-checking command and the LSP)
would error out if there was an unstable API in the code, but not --unstable flag
provided.

This situation hinders DX and makes it harder to configure Deno. Failing during
runtime unless --unstable flag is provided is enough in this case.

@bartlomieju bartlomieju added this to the 1.40 milestone Jan 6, 2024
@bartlomieju
Copy link
Member Author

I wonder if we should remove all the code related to "unstable" from the LSP. Thoughts on that?

Copy link
Collaborator

@nayeemrmn nayeemrmn left a comment

Choose a reason for hiding this comment

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

LGTM

Copy link
Member

@dsherret dsherret left a comment

Choose a reason for hiding this comment

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

LGTM

@bartlomieju bartlomieju merged commit 0d51c1f into denoland:main Jan 14, 2024
14 checks passed
@bartlomieju bartlomieju deleted the remove_unstable_typechecking branch January 14, 2024 17:29
bartlomieju added a commit that referenced this pull request Jan 21, 2024
bartlomieju added a commit to bartlomieju/deno that referenced this pull request Jan 22, 2024
@jsejcksn
Copy link
Contributor

Does this change completely prevent the ability to type-check code that is intended to use only stable features (in order to detect invalid unstable references prior to runtime), or is there some alternative mechanism to do so?

@bartlomieju
Copy link
Member Author

Does this change completely prevent the ability to type-check code that is intended to use only stable features (in order to detect invalid unstable references prior to runtime), or is there some alternative mechanism to do so?

That's correct. Now all APIs are unconditionally type-checked.

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.

4 participants