Skip to content

Commit 57126b5

Browse files
committed
Compiler: joo_global_object is deprecated
1 parent 51e9f41 commit 57126b5

File tree

2 files changed

+2
-4
lines changed

2 files changed

+2
-4
lines changed

CHANGES.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@
1616
prevision for the merge of wasm_of_ocaml
1717
* Compiler: introduce a Targetint module
1818
that follows the semantic of the backend (js or wasm)
19+
* Compiler: warn on joo_global_object
1920
* Runtime: change Sys.os_type on windows (Cygwin -> Win32)
2021
* Runtime: backtraces are really expensive, they need to be be explicitly
2122
requested at compile time (--enable with-js-error) or at startup (OCAMLRUNPARAM=b=1)

compiler/lib/linker.ml

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -136,10 +136,7 @@ module Check = struct
136136
let freename = StringSet.diff freename Reserved.provided in
137137
let freename = StringSet.remove Global_constant.global_object freename in
138138
let freename = if has_flags then StringSet.remove "FLAG" freename else freename in
139-
if StringSet.mem Global_constant.old_global_object freename && false
140-
(* Don't warn yet, we want to give a transition period where both
141-
"globalThis" and "joo_global_object" are allowed without extra
142-
noise *)
139+
if StringSet.mem Global_constant.old_global_object freename
143140
then
144141
warn
145142
"warning: %s: 'joo_global_object' is being deprecated, please use `globalThis` \

0 commit comments

Comments
 (0)