From ca76e3cdeec4e76a36a4231eae31e49badaaea38 Mon Sep 17 00:00:00 2001 From: Shulhi Sapli Date: Sun, 20 Jul 2025 19:53:24 +0800 Subject: [PATCH 1/7] Remove meth attribute when running formatter --- compiler/syntax/src/res_parsetree_viewer.ml | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/compiler/syntax/src/res_parsetree_viewer.ml b/compiler/syntax/src/res_parsetree_viewer.ml index f7264f6fb6..fe5430ebe5 100644 --- a/compiler/syntax/src/res_parsetree_viewer.ml +++ b/compiler/syntax/src/res_parsetree_viewer.ml @@ -198,10 +198,10 @@ let filter_parsing_attrs attrs = match attr with | ( { Location.txt = - ( "res.braces" | "ns.braces" | "res.iflet" | "res.ternary" - | "res.await" | "res.template" | "res.taggedTemplate" - | "res.patVariantSpread" | "res.dictPattern" - | "res.inlineRecordDefinition" ); + ( "meth" | "res.braces" | "ns.braces" | "res.iflet" + | "res.ternary" | "res.await" | "res.template" + | "res.taggedTemplate" | "res.patVariantSpread" + | "res.dictPattern" | "res.inlineRecordDefinition" ); }, _ ) -> false From 11deaae76f61174eb755d335033bb619f2e57e62 Mon Sep 17 00:00:00 2001 From: Shulhi Sapli Date: Sun, 20 Jul 2025 20:02:15 +0800 Subject: [PATCH 2/7] Remove @meth in test --- tests/syntax_tests/data/printer/typexpr/arrow.res | 10 +++++----- .../data/printer/typexpr/expected/arrow.res.txt | 15 +++++---------- 2 files changed, 10 insertions(+), 15 deletions(-) diff --git a/tests/syntax_tests/data/printer/typexpr/arrow.res b/tests/syntax_tests/data/printer/typexpr/arrow.res index 40993fbc5a..221723275f 100644 --- a/tests/syntax_tests/data/printer/typexpr/arrow.res +++ b/tests/syntax_tests/data/printer/typexpr/arrow.res @@ -67,15 +67,15 @@ type t = @attr (fooWithSuperLongIdentifierNameLooooooooooooooooooooooooooooooooo type t = @attr @attrWithSuperLongIdentifierNameLoooooooooooooooooooooooooooooooooooooooooooooong @attrWithSuperLongIdentifierNameLoooooooooooooooooooooooooooooooooooooooooooooong (fooWithSuperLongIdentifierNameLoooooooooooooooooooooooooooooooooooooooooooooong, barWithSuperLongIdentifierNameLoooooooooooooooooooooooooooooooooooooooooooooong, bazWithSuperLongIdentifierNameLoooooooooooooooooooooooooooooooooooooooooooooong) => @attr2 @attrWithSuperLongIdentifierNameLoooooooooooooooooooooooooooooooooooooooooooooong @attrWithSuperLongIdentifierNameLoooooooooooooooooooooooooooooooooooooooooooooong (stringWithSuperLongIdentifierNameLoooooooooooooooooooooooooooooooooooooooooooooong, floatWithSuperLongIdentifierNameLoooooooooooooooooooooooooooooooooooooooooooooong) => unit -external debounce: (int, @meth unit) => unit = "debounce"; +external debounce: (int, unit) => unit = "debounce"; -external debounce: int => @meth (unit => unit) = "debounce"; +external debounce: int => (unit => unit) = "debounce"; -external debounce: (int, @meth (unit => unit)) => @meth (unit => unit) = "debounce"; +external debounce: (int, (unit => unit)) => (unit => unit) = "debounce"; -external debounce: (int, @meth (unit => unit), @meth (unit => unit)) => @meth (unit => unit) = "debounce"; +external debounce: (int, (unit => unit), (unit => unit)) => (unit => unit) = "debounce"; -external debounce: (int, @meth (unit => unit), @meth ( unit => @meth (unit => unit))) => @meth (unit => unit) = "debounce"; +external debounce: (int, (unit => unit), ( unit => (unit => unit))) => (unit => unit) = "debounce"; type returnTyp = (int, int) => @magic float type returnTyp = (intWithSuperLongIdentifierNameLoooooooooooooooooooooooooooooooooooooooooooooong, intWithSuperLongIdentifierNameLoooooooooooooooooooooooooooooooooooooooooooooong) => @magic float diff --git a/tests/syntax_tests/data/printer/typexpr/expected/arrow.res.txt b/tests/syntax_tests/data/printer/typexpr/expected/arrow.res.txt index cd0180e929..65f2550ff0 100644 --- a/tests/syntax_tests/data/printer/typexpr/expected/arrow.res.txt +++ b/tests/syntax_tests/data/printer/typexpr/expected/arrow.res.txt @@ -174,20 +174,15 @@ type t = @attr floatWithSuperLongIdentifierNameLoooooooooooooooooooooooooooooooooooooooooooooong, ) => unit -external debounce: (int, @meth unit) => unit = "debounce" +external debounce: (int, unit) => unit = "debounce" -external debounce: int => @meth (unit => unit) = "debounce" +external debounce: int => unit => unit = "debounce" -external debounce: (int, @meth (unit => unit)) => @meth (unit => unit) = "debounce" +external debounce: (int, unit => unit) => unit => unit = "debounce" -external debounce: (int, @meth (unit => unit), @meth (unit => unit)) => @meth (unit => unit) = - "debounce" +external debounce: (int, unit => unit, unit => unit) => unit => unit = "debounce" -external debounce: ( - int, - @meth (unit => unit), - @meth (unit => @meth (unit => unit)), -) => @meth (unit => unit) = "debounce" +external debounce: (int, unit => unit, unit => unit => unit) => unit => unit = "debounce" type returnTyp = (int, int) => @magic float type returnTyp = ( From fb77a3399c33082dfc55a190ce9f048f985cc529 Mon Sep 17 00:00:00 2001 From: Shulhi Sapli Date: Sun, 20 Jul 2025 20:08:34 +0800 Subject: [PATCH 3/7] WIP: More removal --- compiler/frontend/bs_syntaxerr.ml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/compiler/frontend/bs_syntaxerr.ml b/compiler/frontend/bs_syntaxerr.ml index 0233a342f2..88ea8ac270 100644 --- a/compiler/frontend/bs_syntaxerr.ml +++ b/compiler/frontend/bs_syntaxerr.ml @@ -64,7 +64,7 @@ let pp_error fmt err = | Illegal_attribute -> "Illegal attributes" | Unsupported_predicates -> "unsupported predicates" | Conflict_bs_bs_this_bs_meth -> - "%@this, %@bs, %@meth can not be applied at the same time" + "%@this and %@bs can not be applied at the same time" | Duplicated_bs_deriving -> "duplicate @deriving attribute" | Conflict_attributes -> "conflicting attributes " | Expect_string_literal -> "expect string literal " From 5606ab3ce030dc02b7daecf4a06038dcb9d7ff23 Mon Sep 17 00:00:00 2001 From: Shulhi Sapli Date: Tue, 22 Jul 2025 19:08:58 +0800 Subject: [PATCH 4/7] More @meth removal --- .../src/BucklescriptAnnotations.res | 3 - .../deadcode/src/BucklescriptAnnotations.res | 3 - .../src/BucklescriptAnnotations.res | 3 - .../parsing/errors/typexpr/bsObjSugar.res | 1 - .../typexpr/expected/bsObjSugar.res.txt | 87 +++++++++---------- tests/tests/src/meth_annotation.res | 3 +- tests/tests/src/reasonReact.res | 2 +- 7 files changed, 45 insertions(+), 57 deletions(-) diff --git a/analysis/examples/larger-project/src/BucklescriptAnnotations.res b/analysis/examples/larger-project/src/BucklescriptAnnotations.res index 053bca66b0..6693e96e64 100644 --- a/analysis/examples/larger-project/src/BucklescriptAnnotations.res +++ b/analysis/examples/larger-project/src/BucklescriptAnnotations.res @@ -11,11 +11,8 @@ type someMutableFields = { @genType type someMethods = { - @meth "send": string => unit, - @meth "on": (string, (. int) => unit) => unit, - @meth "threeargs": (int, string, int) => string, "twoArgs": (. int, string) => int, } diff --git a/tests/analysis_tests/tests-reanalyze/deadcode/src/BucklescriptAnnotations.res b/tests/analysis_tests/tests-reanalyze/deadcode/src/BucklescriptAnnotations.res index 1f37609837..a693dd0515 100644 --- a/tests/analysis_tests/tests-reanalyze/deadcode/src/BucklescriptAnnotations.res +++ b/tests/analysis_tests/tests-reanalyze/deadcode/src/BucklescriptAnnotations.res @@ -11,11 +11,8 @@ type someMutableFields = { @genType type someMethods = { - @meth "send": string => unit, - @meth "on": (string, (. int) => unit) => unit, - @meth "threeargs": (int, string, int) => string, "twoArgs": (. int, string) => int, } diff --git a/tests/gentype_tests/typescript-react-example/src/BucklescriptAnnotations.res b/tests/gentype_tests/typescript-react-example/src/BucklescriptAnnotations.res index 5ff1b5be15..c444ab311b 100644 --- a/tests/gentype_tests/typescript-react-example/src/BucklescriptAnnotations.res +++ b/tests/gentype_tests/typescript-react-example/src/BucklescriptAnnotations.res @@ -11,11 +11,8 @@ type someMutableFields = { @genType type someMethods = { - @meth "send": string => unit, - @meth "on": (string, int => unit) => unit, - @meth "threeargs": (int, string, int) => string, "twoArgs": (int, string) => int, } diff --git a/tests/syntax_tests/data/parsing/errors/typexpr/bsObjSugar.res b/tests/syntax_tests/data/parsing/errors/typexpr/bsObjSugar.res index 27d69f2caf..157b2bd539 100644 --- a/tests/syntax_tests/data/parsing/errors/typexpr/bsObjSugar.res +++ b/tests/syntax_tests/data/parsing/errors/typexpr/bsObjSugar.res @@ -20,7 +20,6 @@ type state = { } type state = { - @meth "send": string => } diff --git a/tests/syntax_tests/data/parsing/errors/typexpr/expected/bsObjSugar.res.txt b/tests/syntax_tests/data/parsing/errors/typexpr/expected/bsObjSugar.res.txt index ebb718e555..b532e0add0 100644 --- a/tests/syntax_tests/data/parsing/errors/typexpr/expected/bsObjSugar.res.txt +++ b/tests/syntax_tests/data/parsing/errors/typexpr/expected/bsObjSugar.res.txt @@ -51,85 +51,85 @@ Syntax error! - syntax_tests/data/parsing/errors/typexpr/bsObjSugar.res:25:1 + syntax_tests/data/parsing/errors/typexpr/bsObjSugar.res:24:1 - 23 │ @meth - 24 │ "send": string => - 25 │ } - 26 │ - 27 │ type state = { + 22 │ type state = { + 23 │ "send": string => + 24 │ } + 25 │ + 26 │ type state = { I'm missing a type here Syntax error! - syntax_tests/data/parsing/errors/typexpr/bsObjSugar.res:28:10 + syntax_tests/data/parsing/errors/typexpr/bsObjSugar.res:27:10 - 26 │ - 27 │ type state = { - 28 │ "age": , - 29 │ "name": string - 30 │ } + 25 │ + 26 │ type state = { + 27 │ "age": , + 28 │ "name": string + 29 │ } I'm missing a type here Syntax error! - syntax_tests/data/parsing/errors/typexpr/bsObjSugar.res:33:15 + syntax_tests/data/parsing/errors/typexpr/bsObjSugar.res:32:15 - 31 │ - 32 │ type state = { - 33 │ @set "age": , - 34 │ "name": string - 35 │ } + 30 │ + 31 │ type state = { + 32 │ @set "age": , + 33 │ "name": string + 34 │ } I'm missing a type here Syntax error! - syntax_tests/data/parsing/errors/typexpr/bsObjSugar.res:37:25 + syntax_tests/data/parsing/errors/typexpr/bsObjSugar.res:36:25 - 35 │ } - 36 │ - 37 │ type state = {.. "age": } - 38 │ type state = { - 39 │ .. + 34 │ } + 35 │ + 36 │ type state = {.. "age": } + 37 │ type state = { + 38 │ .. I'm missing a type here Syntax error! - syntax_tests/data/parsing/errors/typexpr/bsObjSugar.res:40:8-41:8 + syntax_tests/data/parsing/errors/typexpr/bsObjSugar.res:39:8-40:8 - 38 │ type state = { - 39 │ .. - 40 │ "age" - 41 │ "name": string - 42 │ } - 43 │ + 37 │ type state = { + 38 │ .. + 39 │ "age" + 40 │ "name": string + 41 │ } + 42 │ Did you forget a `:` here? It signals the start of a type Syntax error! - syntax_tests/data/parsing/errors/typexpr/bsObjSugar.res:46:3-11 + syntax_tests/data/parsing/errors/typexpr/bsObjSugar.res:45:3-11 - 44 │ type websocket = { - 45 │ "id": - 46 │ "channel": channelTyp - 47 │ } - 48 │ + 43 │ type websocket = { + 44 │ "id": + 45 │ "channel": channelTyp + 46 │ } + 47 │ I'm missing a type here Syntax error! - syntax_tests/data/parsing/errors/typexpr/bsObjSugar.res:50:7-51:0 + syntax_tests/data/parsing/errors/typexpr/bsObjSugar.res:49:7-50:0 - 48 │ - 49 │ type websocket = { - 50 │ "id" - 51 │ + 47 │ + 48 │ type websocket = { + 49 │ "id" + 50 │ Did you forget a `:` here? It signals the start of a type @@ -141,8 +141,7 @@ type nonrec state = < url: string ;protocols: [%rescript.typehole ] ;websocket: Websocket.t > type nonrec state = < url: string ;protocols: [%rescript.typehole ] > -type nonrec state = - < send: string -> [%rescript.typehole ] (a:1) [@meth ] > +type nonrec state = < send: string -> [%rescript.typehole ] (a:1) > type nonrec state = < age: [%rescript.typehole ] ;name: string > type nonrec state = < age: [%rescript.typehole ] [@set ] ;name: string > type nonrec state = < age: [%rescript.typehole ] ;.. > diff --git a/tests/tests/src/meth_annotation.res b/tests/tests/src/meth_annotation.res index 8ce1e17ac3..f6e2f7f8ba 100644 --- a/tests/tests/src/meth_annotation.res +++ b/tests/tests/src/meth_annotation.res @@ -1,5 +1,4 @@ -// The @meth annotation is for backwards compatibility. It just makes the type uncurried. -type person = {@meth "say": (string, string) => unit} +type person = {"say": (string, string) => unit} @val external john: person = "john" diff --git a/tests/tests/src/reasonReact.res b/tests/tests/src/reasonReact.res index c86c69ef87..8496a84b6b 100644 --- a/tests/tests/src/reasonReact.res +++ b/tests/tests/src/reasonReact.res @@ -117,7 +117,7 @@ and oldNewSelf<'state, 'retainedProps, 'action> = { type rec jsComponentThis<'state, 'props, 'retainedProps, 'action> = { "state": totalState<'state, 'retainedProps, 'action>, "props": {"reasonProps": 'props}, - "setState": @meth ( + "setState": ( ( totalState<'state, 'retainedProps, 'action>, 'props, From 674adb23e8a22f091c95932c8fd9b94bed1d0da9 Mon Sep 17 00:00:00 2001 From: Shulhi Sapli Date: Tue, 22 Jul 2025 19:24:33 +0800 Subject: [PATCH 5/7] Redo removal method --- .mcp.json | 15 --------------- compiler/frontend/ast_attributes.ml | 7 ++----- compiler/frontend/ast_attributes.mli | 2 +- compiler/frontend/ast_core_type_class_type.ml | 6 ------ compiler/frontend/bs_builtin_ppx.ml | 3 --- 5 files changed, 3 insertions(+), 30 deletions(-) delete mode 100644 .mcp.json diff --git a/.mcp.json b/.mcp.json deleted file mode 100644 index c71d4c907b..0000000000 --- a/.mcp.json +++ /dev/null @@ -1,15 +0,0 @@ -{ - "mcpServers": { - "ocamllsp": { - "type": "stdio", - "command": "mcp-language-server", - "args": [ - "--workspace", - "/Users/shulhi/Dev/rescript/rescript-compiler", - "--lsp", - "ocamllsp" - ], - "env": {} - } - } -} diff --git a/compiler/frontend/ast_attributes.ml b/compiler/frontend/ast_attributes.ml index 8a3eee2b91..add0c41225 100644 --- a/compiler/frontend/ast_attributes.ml +++ b/compiler/frontend/ast_attributes.ml @@ -74,15 +74,12 @@ let process_method_attributes_rev (attrs : t) = ({st with set = Some result}, acc) | _ -> (st, attr :: acc)) -type attr_kind = Nothing | Meth_callback of attr | Method of attr +type attr_kind = Nothing | Meth_callback of attr let process_attributes_rev (attrs : t) : attr_kind * t = - Ext_list.fold_left attrs (Nothing, []) - (fun (st, acc) (({txt; loc}, _) as attr) -> + Ext_list.fold_left attrs (Nothing, []) (fun (st, acc) (({txt}, _) as attr) -> match (txt, st) with | "this", (Nothing | Meth_callback _) -> (Meth_callback attr, acc) - | "meth", (Nothing | Method _) -> (Method attr, acc) - | "this", _ -> Bs_syntaxerr.err loc Conflict_bs_bs_this_bs_meth | _, _ -> (st, attr :: acc)) let external_attrs = diff --git a/compiler/frontend/ast_attributes.mli b/compiler/frontend/ast_attributes.mli index 1fae9799ea..c2adfdd19e 100644 --- a/compiler/frontend/ast_attributes.mli +++ b/compiler/frontend/ast_attributes.mli @@ -29,7 +29,7 @@ type ('a, 'b) st = {get: 'a option; set: 'b option} val process_method_attributes_rev : t -> (bool * bool, [`Get | `No_get]) st * t -type attr_kind = Nothing | Meth_callback of attr | Method of attr +type attr_kind = Nothing | Meth_callback of attr val process_attributes_rev : t -> attr_kind * t diff --git a/compiler/frontend/ast_core_type_class_type.ml b/compiler/frontend/ast_core_type_class_type.ml index 0ccdb227fd..4a4f1799d2 100644 --- a/compiler/frontend/ast_core_type_class_type.ml +++ b/compiler/frontend/ast_core_type_class_type.ml @@ -75,7 +75,6 @@ let typ_mapper (self : Bs_ast_mapper.mapper) (ty : Parsetree.core_type) = match fst (Ast_attributes.process_attributes_rev ty.ptyp_attributes) with | Meth_callback _ -> Ast_typ_uncurry.to_method_callback_type loc self ~arity ty - | Method _ -> Bs_ast_mapper.default_mapper.typ self ty | Nothing -> Bs_ast_mapper.default_mapper.typ self ty) | Ptyp_object (methods, closed_flag) -> let ( +> ) attr (typ : Parsetree.core_type) = @@ -90,8 +89,6 @@ let typ_mapper (self : Bs_ast_mapper.mapper) (ty : Parsetree.core_type) = let attrs, core_type = match Ast_attributes.process_attributes_rev attrs with | Nothing, attrs -> (attrs, ty) (* #1678 *) - | Method _, _ -> - Location.raise_errorf ~loc "%@get/set conflicts with %@meth" | Meth_callback attr, attrs -> (attrs, attr +> ty) in Ast_compatible.object_field name attrs (self.typ self core_type) @@ -100,8 +97,6 @@ let typ_mapper (self : Bs_ast_mapper.mapper) (ty : Parsetree.core_type) = let attrs, core_type = match Ast_attributes.process_attributes_rev attrs with | Nothing, attrs -> (attrs, ty) - | Method _, _ -> - Location.raise_errorf ~loc "%@get/set conflicts with %@meth" | Meth_callback attr, attrs -> (attrs, attr +> ty) in Ast_compatible.object_field name attrs @@ -113,7 +108,6 @@ let typ_mapper (self : Bs_ast_mapper.mapper) (ty : Parsetree.core_type) = let attrs, core_type = match Ast_attributes.process_attributes_rev ptyp_attrs with | Nothing, attrs -> (attrs, ty) - | Method attr, attrs -> (attrs, attr +> ty) | Meth_callback attr, attrs -> (attrs, attr +> ty) in Ast_compatible.object_field label attrs (self.typ self core_type) diff --git a/compiler/frontend/bs_builtin_ppx.ml b/compiler/frontend/bs_builtin_ppx.ml index 48096e10ff..92f55fc2d8 100644 --- a/compiler/frontend/bs_builtin_ppx.ml +++ b/compiler/frontend/bs_builtin_ppx.ml @@ -102,9 +102,6 @@ let expr_mapper ~async_context ~in_function_def (self : mapper) async_context := (old_in_function_def && !async_context) || async; in_function_def := true; Ast_async.make_function_async ~async (default_expr_mapper self e) - | Method _, _ -> - Location.raise_errorf ~loc:e.pexp_loc - "%@meth is not supported in function expression" | Meth_callback _, pexp_attributes -> (* FIXME: does it make sense to have a label for [this] ? *) async_context := false; From 4cd17d5c4135e4a3a1847b3a1d02697e8bcc5fbe Mon Sep 17 00:00:00 2001 From: Shulhi Sapli Date: Fri, 25 Jul 2025 18:03:22 +0800 Subject: [PATCH 6/7] Update test file --- .../tests-reanalyze/deadcode/expected/deadcode.txt | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/tests/analysis_tests/tests-reanalyze/deadcode/expected/deadcode.txt b/tests/analysis_tests/tests-reanalyze/deadcode/expected/deadcode.txt index 6104d9e62b..14c6a37e2c 100644 --- a/tests/analysis_tests/tests-reanalyze/deadcode/expected/deadcode.txt +++ b/tests/analysis_tests/tests-reanalyze/deadcode/expected/deadcode.txt @@ -9,10 +9,10 @@ addVariantCaseDeclaration R4 AutoAnnotate.res:15:2 path:+AutoAnnotate.annotatedVariant Scanning BootloaderResource.cmt Source:BootloaderResource.res Scanning BucklescriptAnnotations.cmt Source:BucklescriptAnnotations.res - addValueDeclaration +bar BucklescriptAnnotations.res:25:4 path:+BucklescriptAnnotations - addValueDeclaration +f BucklescriptAnnotations.res:26:6 path:+BucklescriptAnnotations - addValueReference BucklescriptAnnotations.res:26:6 --> BucklescriptAnnotations.res:25:11 - addValueReference BucklescriptAnnotations.res:25:4 --> BucklescriptAnnotations.res:26:6 + addValueDeclaration +bar BucklescriptAnnotations.res:22:4 path:+BucklescriptAnnotations + addValueDeclaration +f BucklescriptAnnotations.res:23:6 path:+BucklescriptAnnotations + addValueReference BucklescriptAnnotations.res:23:6 --> BucklescriptAnnotations.res:22:11 + addValueReference BucklescriptAnnotations.res:22:4 --> BucklescriptAnnotations.res:23:6 Scanning ComponentAsProp.cmt Source:ComponentAsProp.res addValueDeclaration +make ComponentAsProp.res:6:4 path:+ComponentAsProp addRecordLabelDeclaration title ComponentAsProp.res:6:12 path:+ComponentAsProp.props @@ -2594,9 +2594,9 @@ File References BucklescriptAnnotations is a dead module as all its items are dead. Warning Dead Value - BucklescriptAnnotations.res:25:1-70 + BucklescriptAnnotations.res:22:1-70 bar is never used - <-- line 25 + <-- line 22 @dead("bar") let bar = (x: someMethods) => { Warning Dead Exception From 7795a47d5d76e692814914e5a822244014c9ca4d Mon Sep 17 00:00:00 2001 From: Shulhi Sapli Date: Fri, 25 Jul 2025 18:05:05 +0800 Subject: [PATCH 7/7] Update CHANGELOG --- CHANGELOG.md | 1 + 1 file changed, 1 insertion(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 58bd186eef..4ebdc37838 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -30,6 +30,7 @@ - Polish arity mismatch error message a bit. https://github.com/rescript-lang/rescript/pull/7709 - Suggest related functions with the expected arity in errors when it makes sense. https://github.com/rescript-lang/rescript/pull/7712 - Improve error when a constructor expects an inline record. https://github.com/rescript-lang/rescript/pull/7713 +- Remove @meth attribute. https://github.com/rescript-lang/rescript/pull/7684 #### :house: Internal