Skip to content

Commit

Permalink
Deprecate JSX 3 (#7042)
Browse files Browse the repository at this point in the history
* deprecate jsx 3 from bsb

* clean up

* changelog

* fix changelog
  • Loading branch information
mununki authored Sep 20, 2024
1 parent 3d8ca49 commit 5b9d693
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 1 deletion.
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
8 changes: 7 additions & 1 deletion jscomp/bsb/bsb_jsx.ml
Original file line number Diff line number Diff line change
Expand Up @@ -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
)
Expand Down

0 comments on commit 5b9d693

Please sign in to comment.