Skip to content

Commit 386ed69

Browse files
committed
@bs.deriving -> @deriving
1 parent 3aaf462 commit 386ed69

File tree

7 files changed

+11
-17
lines changed

7 files changed

+11
-17
lines changed

jscomp/ext/warnings.ml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -630,7 +630,7 @@ let descriptions =
630630
(101, "Unused bs attributes");
631631
(102, "Polymorphic comparison introduced (maybe unsafe)");
632632
(103, "Fragile FFI definitions");
633-
(104, "bs.deriving warning with customized message ");
633+
(104, "@deriving warning with customized message ");
634634
( 105,
635635
"External name is inferred from val name is unsafe from refactoring when \
636636
changing value name" );

jscomp/frontend/ast_attributes.ml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -169,7 +169,7 @@ let process_derive_type (attrs : t) : derive_attr * t =
169169
({bs_deriving = None}, [])
170170
(fun (st, acc) (({txt; loc}, payload) as attr) ->
171171
match txt with
172-
| "bs.deriving" | "deriving" -> (
172+
| "deriving" -> (
173173
match st.bs_deriving with
174174
| None ->
175175
( {

jscomp/frontend/bs_syntaxerr.ml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -78,7 +78,7 @@ let pp_error fmt err =
7878
| Unsupported_predicates -> "unsupported predicates"
7979
| Conflict_bs_bs_this_bs_meth ->
8080
"%@this, %@bs, %@meth can not be applied at the same time"
81-
| Duplicated_bs_deriving -> "duplicate bs.deriving attribute"
81+
| Duplicated_bs_deriving -> "duplicate @deriving attribute"
8282
| Conflict_attributes -> "conflicting attributes "
8383
| Expect_string_literal -> "expect string literal "
8484
| Expect_int_literal -> "expect int literal "

jscomp/ounit_tests/ounit_cmd_tests.ml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -271,7 +271,7 @@ let rec y = A y;;
271271
end;
272272
__LOC__ >:: begin fun _ ->
273273
let should_err = bsc_check_eval {|
274-
type -'a t = {k : 'a } [@@bs.deriving abstract]
274+
type -'a t = {k : 'a } [@@deriving abstract]
275275
|} in
276276
OUnit.assert_bool __LOC__
277277
(Ext_string.contain_substring should_err.stderr "contravariant")

jscomp/test/ast_abstract_test.res

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ let () = {
3737
| A
3838
| B [@as 3]
3939
| C
40-
[@@bs.deriving {jsConverter = newType}]
40+
[@@deriving {jsConverter = newType}]
4141
4242
let id x =
4343
eq __LOC__ (aFromJs (aToJs x )) x
@@ -54,7 +54,7 @@ let a1 = aToJs B */
5454
| D1
5555
| D2
5656
| D3
57-
[@@bs.deriving {jsConverter = newType }]
57+
[@@deriving {jsConverter = newType }]
5858
5959
6060
let b0 = bToJs D0
@@ -70,7 +70,7 @@ let () = idb D0; idb D1; idb D2 ; idb D3 */
7070
| D1
7171
| D2
7272
| D3
73-
[@@bs.deriving {jsConverter = {newType }}]
73+
[@@deriving {jsConverter = {newType }}]
7474
7575
let c0 = cToJs D0
7676
@@ -80,14 +80,14 @@ let () = idc D0; idc D1 ; idc D2; idc D3 */
8080

8181
/* type h =
8282
| JsMapperEraseType
83-
| B [@@bs.deriving {accessors; jsConverter = newType} ] */
83+
| B [@@deriving {accessors; jsConverter = newType} ] */
8484

8585
/*
8686
type z =
8787
| ZFromJs
8888
| ZToJs
8989
| ZXx (* not overridden *)
90-
[@@bs.deriving {
90+
[@@deriving {
9191
accessors;
9292
jsConverter
9393
}

jscomp/test/build.ninja

Lines changed: 1 addition & 7 deletions
Large diffs are not rendered by default.

scripts/tmp.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,7 @@ var code = n => {
6363
var polyCode = n => {
6464
var content = `type t = [ \n ${polyConstructors(
6565
n
66-
)}\n ] [@@bs.deriving jsConverter] `;
66+
)}\n ] [@@deriving jsConverter] `;
6767
var eq = `
6868
let eq (x : t option) (y: t option) =
6969
match x with

0 commit comments

Comments
 (0)