Skip to content

Commit a4c27de

Browse files
committed
remove remaining refs to Ppx_deriving_json_runtime
1 parent eb327c6 commit a4c27de

File tree

4 files changed

+11
-21
lines changed

4 files changed

+11
-21
lines changed

ppx/test/allow_any.t/prettify.ml

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,3 @@
1-
(* open Ppx_deriving_json_runtime.Primitives *)
2-
31
type variant =
42
| Other of Yojson.Basic.t [@allow_any]
53
| Foo

ppx/test/allow_any_poly.t/prettify.ml

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,3 @@
1-
(* open Ppx_deriving_json_runtime.Primitives *)
2-
31
type variant =
42
[ `Other of Yojson.Basic.t [@allow_any]
53
| `Foo

ppx/test/errors.t/run.t

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -10,31 +10,31 @@ $ ocamlopt -dsource _build/default/prettify.pp.ml
1010
"d": [ 123, [ 1.2, 2.3, 2.4 ], "i am here" ]
1111
}
1212
$ dune exec ./prettify.exe -- tag_as_string.json
13-
Fatal error: exception Ppx_deriving_json_runtime.Of_json_error(Json_error {|expected ["A"] or ["Foo"] or ["B", _] or ["C", _, _] or ["D", { _ }] but got "A"|})
13+
Fatal error: exception Melange_json.Of_json_error(Json_error {|expected ["A"] or ["Foo"] or ["B", _] or ["C", _, _] or ["D", { _ }] but got "A"|})
1414
[2]
1515
$ dune exec ./prettify.exe -- wrong_core_type.json
16-
Fatal error: exception Ppx_deriving_json_runtime.Of_json_error(Json_error {|expected int but got string: "i am a string"|})
16+
Fatal error: exception Melange_json.Of_json_error(Json_error {|expected int but got string: "i am a string"|})
1717
[2]
1818
$ dune exec ./prettify.exe -- wrong_core_type_wide.json
19-
Fatal error: exception Ppx_deriving_json_runtime.Of_json_error(Json_error {|expected int but got string: "i am a v ... "|})
19+
Fatal error: exception Melange_json.Of_json_error(Json_error {|expected int but got string: "i am a v ... "|})
2020
[2]
2121
$ dune exec ./prettify.exe -- deep_culprit.json
22-
Fatal error: exception Ppx_deriving_json_runtime.Of_json_error(Json_error {|expected string but got object: {"a": _, "foo": _, "b": _, "c": _, "d": _}|})
22+
Fatal error: exception Melange_json.Of_json_error(Json_error {|expected string but got object: {"a": _, "foo": _, "b": _, "c": _, "d": _}|})
2323
[2]
2424
$ dune exec ./prettify.exe -- wide_culprit.json
25-
Fatal error: exception Ppx_deriving_json_runtime.Of_json_error(Json_error {|expected string but got array: [123, 234, 345, 123, 234, 345, 123, 234, ...]|})
25+
Fatal error: exception Melange_json.Of_json_error(Json_error {|expected string but got array: [123, 234, 345, 123, 234, 345, 123, 234, ...]|})
2626
[2]
2727
$ dune exec ./prettify.exe -- missing_field.json
28-
Fatal error: exception Ppx_deriving_json_runtime.Of_json_error(Json_error {|expected field "b" but got {"a": _, "foo": _, "c": _, "d": _}|})
28+
Fatal error: exception Melange_json.Of_json_error(Json_error {|expected field "b" but got {"a": _, "foo": _, "c": _, "d": _}|})
2929
[2]
3030
$ dune exec ./prettify.exe -- unknown_tag.json
31-
Fatal error: exception Ppx_deriving_json_runtime.Of_json_error(Json_error {|expected ["A"] or ["Foo"] or ["B", _] or ["C", _, _] or ["D", { _ }] but got ["Bar"]|})
31+
Fatal error: exception Melange_json.Of_json_error(Json_error {|expected ["A"] or ["Foo"] or ["B", _] or ["C", _, _] or ["D", { _ }] but got ["Bar"]|})
3232
[2]
3333
$ dune exec ./prettify.exe -- wrong_tag_payload.json
34-
Fatal error: exception Ppx_deriving_json_runtime.Of_json_error(Json_error {|expected ["A"] or ["Foo"] or ["B", _] or ["C", _, _] or ["D", { _ }] but got ["B", 123, "booh"]|})
34+
Fatal error: exception Melange_json.Of_json_error(Json_error {|expected ["A"] or ["Foo"] or ["B", _] or ["C", _, _] or ["D", { _ }] but got ["B", 123, "booh"]|})
3535
[2]
3636
$ dune exec ./prettify.exe -- extra_field.json
37-
Fatal error: exception Ppx_deriving_json_runtime.Of_json_error(Json_error {|did not expect field "bar" but got {"a": _, "foo": _, "bar": _, "b": _, "c": _, "d": _}|})
37+
Fatal error: exception Melange_json.Of_json_error(Json_error {|did not expect field "bar" but got {"a": _, "foo": _, "bar": _, "b": _, "c": _, "d": _}|})
3838
[2]
3939

4040

src/native/melange_json.ml

Lines changed: 2 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,6 @@ type json = t
88

99
let classify = Classify.classify
1010
let declassify = Classify.declassify
11-
1211
let to_string t = Yojson.Basic.to_string t
1312

1413
include Errors
@@ -25,15 +24,10 @@ let to_json : json to_json = fun x -> x
2524
let () =
2625
Printexc.register_printer (function
2726
| Of_json_error (Json_error str) ->
28-
Some
29-
(sprintf
30-
"Ppx_deriving_json_runtime.Of_json_error(Json_error {|%s|})"
31-
str)
27+
Some (sprintf "Melange_json.Of_json_error(Json_error {|%s|})" str)
3228
| Of_json_error (Unexpected_variant str) ->
3329
Some
34-
(sprintf
35-
"Ppx_deriving_json_runtime.Of_json_error(Unexpected_variant \
36-
{|%s|})"
30+
(sprintf "Melange_json.Of_json_error(Unexpected_variant {|%s|})"
3731
str)
3832
| _ -> None)
3933

0 commit comments

Comments
 (0)