Skip to content

Commit 7d9d9a9

Browse files
committed
deprecate warning for fun%raw
1 parent 1f37eb7 commit 7d9d9a9

File tree

7 files changed

+7
-1
lines changed

7 files changed

+7
-1
lines changed

jscomp/syntax/ast_exp_extension.ml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -71,6 +71,7 @@ let handle_extension record_as_js_object e (self : Bs_ast_mapper.mapper)
7171
| PStr [
7272
{pstr_desc = Pstr_eval({pexp_desc = Pexp_fun(Nolabel,_,pat,body)} as e,_)}]
7373
->
74+
Location.prerr_warning loc (Preprocessor "Special raw form for function is deprecated, plain [%raw \"..\"] is recommended");
7475
let str_exp : Parsetree.expression =
7576
begin match pat.ppat_desc, body.pexp_desc with
7677
| Ppat_construct ({txt = Lident "()"}, None), Pexp_constant(

jscomp/test/bs_hashtbl_string_test.ml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
1+
[@@@warning "-22"]
22
type seed = int
33
external caml_hash_mix_string : seed -> string -> seed = "caml_hash_mix_string"
44
external final_mix : seed -> seed = "caml_hash_final_mix"

lib/4.06.1/bsdep.ml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -46734,6 +46734,7 @@ let handle_extension record_as_js_object e (self : Bs_ast_mapper.mapper)
4673446734
| PStr [
4673546735
{pstr_desc = Pstr_eval({pexp_desc = Pexp_fun(Nolabel,_,pat,body)} as e,_)}]
4673646736
->
46737+
Location.prerr_warning loc (Preprocessor "Special raw form for function is deprecated, plain [%raw \"..\"] is recommended");
4673746738
let str_exp : Parsetree.expression =
4673846739
begin match pat.ppat_desc, body.pexp_desc with
4673946740
| Ppat_construct ({txt = Lident "()"}, None), Pexp_constant(

lib/4.06.1/bsppx.ml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -303557,6 +303557,7 @@ let handle_extension record_as_js_object e (self : Bs_ast_mapper.mapper)
303557303557
| PStr [
303558303558
{pstr_desc = Pstr_eval({pexp_desc = Pexp_fun(Nolabel,_,pat,body)} as e,_)}]
303559303559
->
303560+
Location.prerr_warning loc (Preprocessor "Special raw form for function is deprecated, plain [%raw \"..\"] is recommended");
303560303561
let str_exp : Parsetree.expression =
303561303562
begin match pat.ppat_desc, body.pexp_desc with
303562303563
| Ppat_construct ({txt = Lident "()"}, None), Pexp_constant(

lib/4.06.1/unstable/js_compiler.ml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -303208,6 +303208,7 @@ let handle_extension record_as_js_object e (self : Bs_ast_mapper.mapper)
303208303208
| PStr [
303209303209
{pstr_desc = Pstr_eval({pexp_desc = Pexp_fun(Nolabel,_,pat,body)} as e,_)}]
303210303210
->
303211+
Location.prerr_warning loc (Preprocessor "Special raw form for function is deprecated, plain [%raw \"..\"] is recommended");
303211303212
let str_exp : Parsetree.expression =
303212303213
begin match pat.ppat_desc, body.pexp_desc with
303213303214
| Ppat_construct ({txt = Lident "()"}, None), Pexp_constant(

lib/4.06.1/unstable/js_refmt_compiler.ml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -303208,6 +303208,7 @@ let handle_extension record_as_js_object e (self : Bs_ast_mapper.mapper)
303208303208
| PStr [
303209303209
{pstr_desc = Pstr_eval({pexp_desc = Pexp_fun(Nolabel,_,pat,body)} as e,_)}]
303210303210
->
303211+
Location.prerr_warning loc (Preprocessor "Special raw form for function is deprecated, plain [%raw \"..\"] is recommended");
303211303212
let str_exp : Parsetree.expression =
303212303213
begin match pat.ppat_desc, body.pexp_desc with
303213303214
| Ppat_construct ({txt = Lident "()"}, None), Pexp_constant(

lib/4.06.1/whole_compiler.ml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -400371,6 +400371,7 @@ let handle_extension record_as_js_object e (self : Bs_ast_mapper.mapper)
400371400371
| PStr [
400372400372
{pstr_desc = Pstr_eval({pexp_desc = Pexp_fun(Nolabel,_,pat,body)} as e,_)}]
400373400373
->
400374+
Location.prerr_warning loc (Preprocessor "Special raw form for function is deprecated, plain [%raw \"..\"] is recommended");
400374400375
let str_exp : Parsetree.expression =
400375400376
begin match pat.ppat_desc, body.pexp_desc with
400376400377
| Ppat_construct ({txt = Lident "()"}, None), Pexp_constant(

0 commit comments

Comments
 (0)