Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@
#### :bug: Bug fix

- Fix code generation for emojis in polyvars and labels. https://github.com/rescript-lang/rescript/pull/7853
- Add `reset` to `experimental_features` to correctly reset playground. https://github.com/rescript-lang/rescript/pull/7868
- Fix crash with `@get` on external of type `unit => 'a`. https://github.com/rescript-lang/rescript/pull/7866

#### :memo: Documentation
Expand All @@ -31,6 +32,8 @@

#### :house: Internal

- Playground: Add config options for experimental features and jsx preserve mode. https://github.com/rescript-lang/rescript/pull/7865

# 12.0.0-beta.10

#### :rocket: New Feature
Expand Down
1 change: 1 addition & 0 deletions compiler/jsoo/jsoo_playground_main.ml
Original file line number Diff line number Diff line change
Expand Up @@ -378,6 +378,7 @@ module Compile = struct
(* Responsible for resetting all compiler state as if it were a new instance *)
let reset_compiler () =
warning_infos := [||];
Experimental_features.reset ();
flush_warning_buffer () |> ignore;
Warnings.reset_fatal ();
Env.reset_cache_toplevel ()
Expand Down
2 changes: 2 additions & 0 deletions compiler/ml/experimental_features.ml
Original file line number Diff line number Diff line change
Expand Up @@ -20,4 +20,6 @@ let enable_from_string (s : string) =
| Some f -> enabled_features := FeatureSet.add f !enabled_features
| None -> ()

let reset () = enabled_features := FeatureSet.empty

let is_enabled (f : feature) = FeatureSet.mem f !enabled_features
1 change: 1 addition & 0 deletions compiler/ml/experimental_features.mli
Original file line number Diff line number Diff line change
Expand Up @@ -3,3 +3,4 @@ type feature = LetUnwrap
val enable_from_string : string -> unit
val is_enabled : feature -> bool
val to_string : feature -> string
val reset : unit -> unit
Loading