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

Update feature flags to specific feature flag #3376

Merged
merged 1 commit into from
Oct 12, 2023
Merged

Conversation

nekevss
Copy link
Member

@nekevss nekevss commented Oct 12, 2023

This Pull Request addresses the feature flag discussion from #3277.

It changes the following:

  • Adds a temporal and promise-resolvers feature flag
  • Sets experimental to be dependent on the feature flags

@nekevss nekevss added the enhancement New feature or request label Oct 12, 2023
@nekevss nekevss requested a review from a team October 12, 2023 02:54
@github-actions
Copy link

Test262 conformance changes

Test result main count PR count difference
Total 95,574 95,574 0
Passed 75,341 75,341 0
Ignored 19,482 19,482 0
Failed 751 751 0
Panics 0 0 0
Conformance 78.83% 78.83% 0.00%

Copy link
Member

@HalidOdat HalidOdat left a comment

Choose a reason for hiding this comment

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

Looks good to me! :)

@HalidOdat HalidOdat requested a review from a team October 12, 2023 02:59
@codecov
Copy link

codecov bot commented Oct 12, 2023

Codecov Report

All modified lines are covered by tests ✅

Comparison is base (d281988) 47.10% compared to head (f13d464) 46.05%.

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #3376      +/-   ##
==========================================
- Coverage   47.10%   46.05%   -1.05%     
==========================================
  Files         474      474              
  Lines       48737    48737              
==========================================
- Hits        22956    22448     -508     
- Misses      25781    26289     +508     
Files Coverage Δ
boa_ast/src/lib.rs 75.00% <ø> (ø)
boa_engine/src/bigint.rs 65.71% <ø> (ø)
boa_engine/src/builtins/mod.rs 92.70% <ø> (ø)
boa_engine/src/builtins/temporal/mod.rs 26.78% <ø> (ø)
boa_engine/src/context/intrinsics.rs 97.54% <ø> (ø)
boa_engine/src/object/jsobject.rs 49.25% <ø> (ø)
boa_engine/src/object/mod.rs 29.04% <ø> (ø)

... and 8 files with indirect coverage changes

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

Copy link
Member

@jedel1043 jedel1043 left a comment

Choose a reason for hiding this comment

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

I don't think we need the granularity of promise-resolvers. For temporal is understandable because we're planning to gate every builtin behind a feature, but additions to existing builtins can exist in experimental since they're simpler APIs.

@nekevss nekevss force-pushed the feature-flag-update branch from ead41a2 to f13d464 Compare October 12, 2023 03:39
@jedel1043
Copy link
Member

jedel1043 commented Oct 12, 2023

Just for the record, I do think we need a mechanism to enable experimental features individually. However, I think this can be accomplished in a backwards compatible way by using directives instead of Rust features. This would be pretty similar to how Rust handles nightly features:

  • We have an array on some part of the engine with a list of the available experimental features and their current stage.
  • Using directives, a user can select which experimental features they want to use, but only if the experimental feature is enabled.
  • At execution time, we check the directives of a script/module, and if it has the corresponding feature, we inject it into the global object then remove it after execution finishes.
  • Finally, for users who want to expose some features for all scripts, we can take a features argument on Context creation and that'll take care of injecting the additional features without removing them.

@jedel1043 jedel1043 added this pull request to the merge queue Oct 12, 2023
Merged via the queue into main with commit a6e488e Oct 12, 2023
14 checks passed
@jedel1043 jedel1043 added this to the v0.18.0 milestone Oct 12, 2023
@jedel1043 jedel1043 deleted the feature-flag-update branch October 12, 2023 04:54
sam-finch-tezos pushed a commit to trilitech/boa that referenced this pull request Nov 29, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants