diff --git a/CHANGELOG.md b/CHANGELOG.md index bf653d33ed..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 diff --git a/jscomp/bsb/bsb_jsx.ml b/jscomp/bsb/bsb_jsx.ml index b9fbd08661..f6ea2a894e 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 "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 )