Skip to content

Commit dc195a4

Browse files
ngorogiannisfacebook-github-bot
authored andcommitted
[opam] vendor pyml/ppx_show and edit out stdcompat dependency
Summary: To migrate to OCaml 5.3.0 we need to either fix the incompatibility between stdcompat and 5.3.0, or remove it as a dependency from pyml and ppx_show. The latter is simpler. Reviewed By: martintrojer Differential Revision: D73922174 Privacy Context Container: L1208441 fbshipit-source-id: 36696c4e0a83f86bd1ef17e6157228591fbbbe53
1 parent 01aaa26 commit dc195a4

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

56 files changed

+13950
-33
lines changed

build-infer.sh

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -179,6 +179,8 @@ install_opam_deps () {
179179
if [ "$USE_OPAM_LOCK" == yes ]; then
180180
locked=.locked
181181
fi
182+
opam pin add --no-action ppx_show "$INFER_ROOT"/dependencies/ppx_show
183+
opam pin add --no-action pyml "$INFER_ROOT"/dependencies/pyml
182184
opam install --deps-only "$INFER_ROOT"/opam/infer.opam$locked
183185
}
184186

dependencies/ppx_show/CHANGES.md

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
# 2021-02-28, version 0.2.1
2+
3+
- Fix #1: incompatibility with toplevel
4+
(Reported by Daian Yue).
5+
6+
# 2020-05-21, version 0.2.0
7+
8+
- Reverse the parenthesis and the constructor name for single argument,
9+
to make more outputs parsable by OCaml (e.g. `Constructor (ref (42))`)
10+
(Suggested by Sebastien Mondet).
11+
12+
- Update to ppxlib 0.9.0.

dependencies/ppx_show/COPYING

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
BSD 2-Clause License
2+
3+
Copyright (c) 2019-2021, Thierry Martinez.
4+
All rights reserved.
5+
6+
Redistribution and use in source and binary forms, with or without
7+
modification, are permitted provided that the following conditions are met:
8+
9+
1. Redistributions of source code must retain the above copyright notice, this
10+
list of conditions and the following disclaimer.
11+
2. Redistributions in binary form must reproduce the above copyright notice,
12+
this list of conditions and the following disclaimer in the documentation
13+
and/or other materials provided with the distribution.
14+
15+
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
16+
ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
17+
WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
18+
DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR
19+
ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
20+
(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
21+
LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
22+
ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
23+
(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
24+
SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.

dependencies/ppx_show/Makefile

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
DUNE=dune
2+
FLAGS=
3+
4+
.PHONY : all
5+
all :
6+
$(DUNE) build $(FLAGS)
7+
8+
.PHONY : clean
9+
clean :
10+
$(DUNE) clean $(FLAGS)
11+
12+
.PHONY : install
13+
install :
14+
$(DUNE) build @install $(FLAGS)
15+
$(DUNE) install $(FLAGS)
16+
17+
.PHONY : doc
18+
doc :
19+
$(DUNE) build @doc $(FLAGS)
20+
21+
.PHONY : test
22+
test :
23+
$(DUNE) runtest $(FLAGS)

dependencies/ppx_show/README.md

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
# OCaml PPX deriver for deriving `show` based on `ppxlib`.
2+
3+
This library reimplements the `show` plugin from [`ppx_deriving`]
4+
directly as a `ppxlib` deriver.
5+
6+
[`ppx_deriving`]: https://github.com/ocaml-ppx/ppx_deriving
7+
8+
## Usage
9+
10+
`ppx_show` can be used with [`dune`] by using the [`preprocess`] field.
11+
`ppx_show.runtime` has to be added to runtime [`libraries`].
12+
13+
[`dune`]: https://github.com/ocaml/dune
14+
[`preprocess`]: https://dune.readthedocs.io/en/latest/concepts.html#preprocessing-with-ppx-rewriters
15+
[`libraries`]: https://dune.readthedocs.io/en/latest/concepts.html#library-deps
16+
17+
```lisp
18+
(executable
19+
...
20+
(preprocess (pps ppx_show))
21+
(libraries ppx_show.runtime)
22+
...)
23+
```

dependencies/ppx_show/dune-project

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
(lang dune 1.11)
2+
3+
(generate_opam_files true)
4+
5+
(license "BSD-2-Clause")
6+
(maintainers "Thierry Martinez <[email protected]>")
7+
(authors "Thierry Martinez <[email protected]>")
8+
(source (uri "git+https://github.com/thierry-martinez/ppx_show.git"))
9+
(homepage "https://github.com/thierry-martinez/ppx_show")
10+
(bug_reports "https://github.com/thierry-martinez/ppx_show")
11+
(documentation "https://github.com/thierry-martinez/ppx_show")
12+
(version "0.2.0")
13+
14+
(package
15+
(name ppx_show)
16+
(synopsis "OCaml PPX deriver for deriving show based on ppxlib")
17+
(depends
18+
(dune (>= 1.11.0))
19+
(ppxlib (>= 0.9.0))))

dependencies/ppx_show/ppx_show.opam

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
# This file is generated by dune, edit dune-project instead
2+
opam-version: "2.0"
3+
version: "0.2.0"
4+
synopsis: "OCaml PPX deriver for deriving show based on ppxlib"
5+
maintainer: ["Thierry Martinez <[email protected]>"]
6+
authors: ["Thierry Martinez <[email protected]>"]
7+
license: "BSD-2-Clause"
8+
homepage: "https://github.com/thierry-martinez/ppx_show"
9+
doc: "https://github.com/thierry-martinez/ppx_show"
10+
bug-reports: "https://github.com/thierry-martinez/ppx_show"
11+
depends: [
12+
"dune" {>= "1.11.0"}
13+
"ppxlib" {>= "0.9.0"}
14+
]
15+
build: [
16+
["dune" "subst"] {pinned}
17+
[
18+
"dune"
19+
"build"
20+
"-p"
21+
name
22+
"-j"
23+
jobs
24+
"@install"
25+
"@runtest" {with-test}
26+
"@doc" {with-doc}
27+
]
28+
]
29+
dev-repo: "git+https://github.com/thierry-martinez/ppx_show.git"

dependencies/ppx_show/runtime/dune

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
(library
2+
(name ppx_show_runtime)
3+
(public_name ppx_show.runtime))
Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
module Format = Format
2+
3+
module String = String
4+
5+
module Int32 = Int32
6+
7+
module Int64 = Int64
8+
9+
module Nativeint = Nativeint
10+
11+
module Bytes = Bytes
12+
13+
module Lazy = Lazy
14+
15+
let pp_list pp_item fmt items =
16+
Format.pp_open_box fmt 1;
17+
Format.pp_print_string fmt "[";
18+
begin match items with
19+
| [] -> ()
20+
| hd :: tl ->
21+
pp_item fmt hd;
22+
tl |> List.iter begin fun item ->
23+
Format.pp_print_string fmt ";";
24+
Format.pp_print_space fmt ();
25+
pp_item fmt item
26+
end
27+
end;
28+
Format.pp_print_string fmt "]";
29+
Format.pp_close_box fmt ()
Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
module Format = Format
2+
3+
module String = String
4+
5+
module Int32 = Int32
6+
7+
module Int64 = Int64
8+
9+
module Nativeint = Nativeint
10+
11+
module Bytes = Bytes
12+
13+
module Lazy = Lazy
14+
15+
val pp_list :
16+
(Format.formatter -> 'a -> unit) ->
17+
Format.formatter -> 'a list -> unit

0 commit comments

Comments
 (0)