From 0e5caddc300915b7338e5bf806c7d2835b7065af Mon Sep 17 00:00:00 2001 From: Woonki Moon Date: Thu, 8 Dec 2022 02:46:27 +0900 Subject: [PATCH 1/3] sync latest syntax --- jscomp/napkin/CHANGELOG.md | 2 ++ lib/4.06.1/unstable/js_compiler.ml | 5 +---- lib/4.06.1/unstable/js_playground_compiler.ml | 7 ++----- lib/4.06.1/whole_compiler.ml | 7 ++----- syntax | 2 +- 5 files changed, 8 insertions(+), 15 deletions(-) diff --git a/jscomp/napkin/CHANGELOG.md b/jscomp/napkin/CHANGELOG.md index e12a288505..66abd7ebe2 100644 --- a/jscomp/napkin/CHANGELOG.md +++ b/jscomp/napkin/CHANGELOG.md @@ -51,6 +51,8 @@ - Fix issue where the JSX fragment without children build error https://github.com/rescript-lang/syntax/pull/704 - Fix issue where async as an id cannot be used with application and labelled arguments https://github.com/rescript-lang/syntax/issues/707 - Treat await as almost-unary operator weaker than pipe so `await foo->bar` means `await (foo->bar)` https://github.com/rescript-lang/syntax/pull/711 +- Fix build error where aliasing arguments to `_` in the make function with JSX V4. https://github.com/rescript-lang/syntax/pull/720 +- Fix parsing of spread props as an expression in JSX V4 https://github.com/rescript-lang/syntax/pull/721 #### :eyeglasses: Spec Compliance diff --git a/lib/4.06.1/unstable/js_compiler.ml b/lib/4.06.1/unstable/js_compiler.ml index 5a0a5f5c34..54cfafa6c2 100644 --- a/lib/4.06.1/unstable/js_compiler.ml +++ b/lib/4.06.1/unstable/js_compiler.ml @@ -275780,10 +275780,7 @@ let transformStructureItem ~config mapper item = | Pexp_fun ( _arg_label, _default, - { - ppat_desc = - Ppat_construct ({txt = Lident "()"}, _) | Ppat_any; - }, + {ppat_desc = Ppat_construct ({txt = Lident "()"}, _)}, expr ) -> (patternsWithLabel, patternsWithNolabel, expr) | Pexp_fun diff --git a/lib/4.06.1/unstable/js_playground_compiler.ml b/lib/4.06.1/unstable/js_playground_compiler.ml index 956cbf991d..bceba48f7f 100644 --- a/lib/4.06.1/unstable/js_playground_compiler.ml +++ b/lib/4.06.1/unstable/js_playground_compiler.ml @@ -275780,10 +275780,7 @@ let transformStructureItem ~config mapper item = | Pexp_fun ( _arg_label, _default, - { - ppat_desc = - Ppat_construct ({txt = Lident "()"}, _) | Ppat_any; - }, + {ppat_desc = Ppat_construct ({txt = Lident "()"}, _)}, expr ) -> (patternsWithLabel, patternsWithNolabel, expr) | Pexp_fun @@ -285935,7 +285932,7 @@ and parseJsxProp p = (Location.mkloc "ns.namedArgLoc" loc, Parsetree.PStr []) in let attrExpr = - let e = parsePrimaryExpr ~operand:(parseAtomicExpr p) p in + let e = parsePrimaryExpr ~operand:(parseExpr p) p in {e with pexp_attributes = propLocAttr :: e.pexp_attributes} in (* using label "spreadProps" to distinguish from others *) diff --git a/lib/4.06.1/whole_compiler.ml b/lib/4.06.1/whole_compiler.ml index c68f33d3b9..c05257f7f3 100644 --- a/lib/4.06.1/whole_compiler.ml +++ b/lib/4.06.1/whole_compiler.ml @@ -286164,10 +286164,7 @@ let transformStructureItem ~config mapper item = | Pexp_fun ( _arg_label, _default, - { - ppat_desc = - Ppat_construct ({txt = Lident "()"}, _) | Ppat_any; - }, + {ppat_desc = Ppat_construct ({txt = Lident "()"}, _)}, expr ) -> (patternsWithLabel, patternsWithNolabel, expr) | Pexp_fun @@ -299467,7 +299464,7 @@ and parseJsxProp p = (Location.mkloc "ns.namedArgLoc" loc, Parsetree.PStr []) in let attrExpr = - let e = parsePrimaryExpr ~operand:(parseAtomicExpr p) p in + let e = parsePrimaryExpr ~operand:(parseExpr p) p in {e with pexp_attributes = propLocAttr :: e.pexp_attributes} in (* using label "spreadProps" to distinguish from others *) diff --git a/syntax b/syntax index c4544b4d91..51e4e16668 160000 --- a/syntax +++ b/syntax @@ -1 +1 @@ -Subproject commit c4544b4d91b3692c2ddd96fe68225714c1d90608 +Subproject commit 51e4e16668a6ada802ea4d9d2a0e1aa966fdeee2 From 27da0cf8d18413e308b4234866422a704c2fd34c Mon Sep 17 00:00:00 2001 From: Woonki Moon Date: Thu, 8 Dec 2022 03:05:38 +0900 Subject: [PATCH 2/3] changelog --- CHANGELOG.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index a25e4b254d..cf0c7db5e2 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -23,6 +23,8 @@ - Fix issue where no error was reported when ? was used for non-optional fields. https://github.com/rescript-lang/rescript-compiler/pull/5853 - Fix issue where optional fields in inline records were not supported and would cause type errors https://github.com/rescript-lang/rescript-compiler/pull/5827 +- Fix build error where aliasing arguments to `_` in the make function with JSX V4. https://github.com/rescript-lang/syntax/pull/720 +- Fix parsing of spread props as an expression in JSX V4 https://github.com/rescript-lang/syntax/pull/721 # 10.1.0-rc.5 From 44f62b952ebf9b134aeff978456e50c22e599abc Mon Sep 17 00:00:00 2001 From: Cristiano Calcagno Date: Wed, 7 Dec 2022 20:02:56 +0100 Subject: [PATCH 3/3] Update CHANGELOG.md --- CHANGELOG.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index cf0c7db5e2..4265be1a70 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -16,6 +16,8 @@ - Prevent inlining of async functions in additional cases https://github.com/rescript-lang/rescript-compiler/issues/5860 - Revert to ubuntu-18.04 in CI to support Linux versions with older glibc https://github.com/rescript-lang/rescript-compiler/issues/5868 +- Fix build error where aliasing arguments to `_` in the make function with JSX V4. https://github.com/rescript-lang/syntax/pull/720 +- Fix parsing of spread props as an expression in JSX V4 https://github.com/rescript-lang/syntax/pull/721 # 10.1.0 @@ -23,8 +25,6 @@ - Fix issue where no error was reported when ? was used for non-optional fields. https://github.com/rescript-lang/rescript-compiler/pull/5853 - Fix issue where optional fields in inline records were not supported and would cause type errors https://github.com/rescript-lang/rescript-compiler/pull/5827 -- Fix build error where aliasing arguments to `_` in the make function with JSX V4. https://github.com/rescript-lang/syntax/pull/720 -- Fix parsing of spread props as an expression in JSX V4 https://github.com/rescript-lang/syntax/pull/721 # 10.1.0-rc.5