Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove json type #100

Merged
merged 3 commits into from
Jul 30, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions CHANGES.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,8 @@
* `to_outbuf` becomes `to_buffer` and `stream_to_outbuf` becomes
`stream_to_buffer`
- Removed `yojson-biniou` library
- Removed deprecated `json` type aliasing type `t` which has been available
since 1.6.0 (@Leonidas-from-XIV, #100).

### Fix

Expand Down
1 change: 0 additions & 1 deletion lib/dune
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,6 @@
write.mli
read.mli
safe.mli
pretty.mli
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Any reason why this is removed?

Copy link
Member Author

@Leonidas-from-XIV Leonidas-from-XIV Jul 30, 2020

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is very much a deliberate choice. That file is never actually seen by the compiler since it is not included in yojson.cppo.mli since the compiler only ever sees write2.mli, while pretty.mli is not part of the public interface. It is also never compiled into its own module so the compiler never does any checks on it.

To wit, check out the commit right before and notice the code compiling just fine despite pretty.mli referencing a json type that was removed.

I think the whole CPPO magic is extremely intransparent and should be simplified so I opted to at least remove parts that don't seem to have any function to decrease confusion.

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ah my bad! This is unfortunate indeed, let's remove it!

write2.mli
common.mli
util.mli
Expand Down
3 changes: 0 additions & 3 deletions lib/pretty.mli

This file was deleted.

5 changes: 0 additions & 5 deletions lib/type.ml
Original file line number Diff line number Diff line change
Expand Up @@ -53,11 +53,6 @@ All possible cases defined in Yojson:
Syntax: [<"Foo">] or [<"Bar":123>].
*)

type json = t
(**
* Compatibility type alias for type `t`
*)

(*
Note to adventurers: ocamldoc does not support inline comments
on each polymorphic variant, and cppo doesn't allow to concatenate
Expand Down