From 2983e34b6d5eac6df58036c1ce71c393537f0e22 Mon Sep 17 00:00:00 2001 From: mununki Date: Thu, 19 Sep 2024 15:06:52 +0900 Subject: [PATCH 1/4] deprecate jsx 3 from bsb --- jscomp/bsb/bsb_jsx.ml | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/jscomp/bsb/bsb_jsx.ml b/jscomp/bsb/bsb_jsx.ml index b9fbd08661..f01c9b95b6 100644 --- a/jscomp/bsb/bsb_jsx.ml +++ b/jscomp/bsb/bsb_jsx.ml @@ -43,7 +43,13 @@ let from_map map = match m.?(Bsb_build_schemas.jsx_version) with | Some (Flo { loc; flo }) -> ( match flo with - | "3" -> version := Some Jsx_v3 + | "3" -> + let loc_end = + {loc with Lexing.pos_cnum = loc.Lexing.pos_cnum + 1} + in + let loc = {Warnings.loc_start = loc; loc_end; loc_ghost = false} in + Location.deprecated loc "deprecated: jsx 3 is deprecated, use jsx 4 instead"; + version := Some Jsx_v3 | "4" -> version := Some Jsx_v4 | _ -> Bsb_exception.errorf ~loc "Unsupported jsx version %s" flo ) From 5828322e1a8358984ea0049344eb6bd327af6565 Mon Sep 17 00:00:00 2001 From: mununki Date: Thu, 19 Sep 2024 15:12:05 +0900 Subject: [PATCH 2/4] clean up --- jscomp/bsb/bsb_jsx.ml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/jscomp/bsb/bsb_jsx.ml b/jscomp/bsb/bsb_jsx.ml index f01c9b95b6..f6ea2a894e 100644 --- a/jscomp/bsb/bsb_jsx.ml +++ b/jscomp/bsb/bsb_jsx.ml @@ -48,7 +48,7 @@ let from_map map = {loc with Lexing.pos_cnum = loc.Lexing.pos_cnum + 1} in let loc = {Warnings.loc_start = loc; loc_end; loc_ghost = false} in - Location.deprecated loc "deprecated: jsx 3 is deprecated, use jsx 4 instead"; + Location.deprecated loc "jsx 3 is deprecated, use jsx 4 instead"; version := Some Jsx_v3 | "4" -> version := Some Jsx_v4 | _ -> Bsb_exception.errorf ~loc "Unsupported jsx version %s" flo From 9473874b61b142682120678b8a33c121522314c5 Mon Sep 17 00:00:00 2001 From: mununki Date: Thu, 19 Sep 2024 15:12:34 +0900 Subject: [PATCH 3/4] changelog --- CHANGELOG.md | 1 + 1 file changed, 1 insertion(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index bf653d33ed..acab43fa31 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -19,6 +19,7 @@ - Fix comment removed when function signature has `type` keyword. https://github.com/rescript-lang/rescript-compiler/pull/6997 - Fix parse error on doc comment before "and" in type def. https://github.com/rescript-lang/rescript-compiler/pull/7001 - Fix tuple coercion. https://github.com/rescript-lang/rescript-compiler/pull/7024 +- Deprecate JSX 3 https://github.com/rescript-lang/rescript-compiler/pull/7042 # 11.1.3 From 5875abffaf14ff3a3dd6596591682194c1252846 Mon Sep 17 00:00:00 2001 From: mununki Date: Fri, 20 Sep 2024 09:33:31 +0900 Subject: [PATCH 4/4] fix changelog --- CHANGELOG.md | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index acab43fa31..3d8d088f1f 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -10,6 +10,10 @@ > - :house: [Internal] > - :nail_care: [Polish] +# 11.1.5 (Unreleased) + +- Deprecate JSX 3 https://github.com/rescript-lang/rescript-compiler/pull/7042 + # 11.1.4 - Fix issue where long layout break added a trailing comma in partial application `...`. https://github.com/rescript-lang/rescript-compiler/pull/6949 @@ -19,7 +23,6 @@ - Fix comment removed when function signature has `type` keyword. https://github.com/rescript-lang/rescript-compiler/pull/6997 - Fix parse error on doc comment before "and" in type def. https://github.com/rescript-lang/rescript-compiler/pull/7001 - Fix tuple coercion. https://github.com/rescript-lang/rescript-compiler/pull/7024 -- Deprecate JSX 3 https://github.com/rescript-lang/rescript-compiler/pull/7042 # 11.1.3