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: granular --unstable-* flags #20968

Merged
merged 12 commits into from Nov 1, 2023

Conversation

bartlomieju
Copy link
Member

@bartlomieju bartlomieju commented Oct 24, 2023

This commit adds granular --unstable-* flags:

  • "--unstable-broadcast-channel"
  • "--unstable-ffi"
  • "--unstable-fs"
  • "--unstable-http"
  • "--unstable-kv"
  • "--unstable-net"
  • "--unstable-worker-options"
  • "--unstable-cron"

These flags are meant to replace a "catch-all" flag - "--unstable", that
gives a binary control whether unstable features are enabled or not. The
downside of this flag that allowing eg. Deno KV API also enables the FFI
API (though the latter is still gated with a permission).

These flags can also be specified in deno.json file under unstable key.

Currently, "--unstable" flag works the same way - I will open a follow up
PR that will print a warning when using "--unstable" and suggest to use
concrete "--unstable-*" flag instead. We plan to phase out "--unstable"
completely in Deno 2.

@lucacasonato
Copy link
Member

I am generally in favor of this, but also --unstable-worker is so meaningless! Shouldn't we generally have flags for specific features?

@bartlomieju
Copy link
Member Author

I am generally in favor of this, but also --unstable-worker is so meaningless! Shouldn't we generally have flags for specific features?

There are potentially many unstable features for Worker API (eg. loading an import map), would we really want separate flags for each of these features if they are contained in new Worker() constructor's deno option?

@nayeemrmn
Copy link
Collaborator

I think it should be --unstable-worker-options at least.

@bartlomieju
Copy link
Member Author

I think it should be --unstable-worker-options at least.

I'm fine with that name 👍

@bartlomieju bartlomieju reopened this Oct 27, 2023
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! (once the config file test is added)

@bartlomieju bartlomieju merged commit 24c3c96 into denoland:main Nov 1, 2023
13 checks passed
@bartlomieju bartlomieju deleted the granular_unstable_flags branch November 1, 2023 22:15
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

4 participants