Skip to content

Commit 16d18b0

Browse files
ManasJayanthulrikstrid
authored andcommitted
Uses pesy to manage project config again
* Uses pesy to manage project config * Deletes dune files and keeps them out of git * Renames library to lib Doesn't necessarily have to be so. Pesy picks lib public names based on the directory name. So either the directory name had to change or the public name. * Add back dune files
1 parent b310fc1 commit 16d18b0

File tree

37 files changed

+1497
-89
lines changed

37 files changed

+1497
-89
lines changed

.ci/build-platform.yml

+2-2
Original file line numberDiff line numberDiff line change
@@ -14,8 +14,8 @@ jobs:
1414
- template: utils/use-esy.yml
1515
- script: "esy install"
1616
displayName: "esy install"
17-
# - script: "esy pesy"
18-
# displayName: "esy pesy"
17+
- script: "esy pesy"
18+
displayName: "esy pesy"
1919
- script: "esy build"
2020
displayName: "esy build"
2121
- template: utils/create-docs.yml

.ci/utils/run-tests.yml

+3-3
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,8 @@ parameters:
33

44
steps:
55
- script: |
6-
esy cp library/dune library/dune.bak
7-
esy awk 'NR==11 {$0=" (preprocess (pps bisect_ppx))"} 1' library/dune.bak > library/dune
6+
esy cp lib/dune lib/dune.bak
7+
esy awk 'NR==11 {$0=" (preprocess (pps bisect_ppx))"} 1' lib/dune.bak > lib/dune
88
displayName: "Prepare dune for coverage"
99
condition: and(succeeded(), ne('${{ parameters.platform }}', 'Windows'))
1010
@@ -46,6 +46,6 @@ steps:
4646
ArtifactName: ${{ parameters.platform }}_coverage
4747
condition: and(succeeded(), ne('${{ parameters.platform }}', 'Windows'))
4848

49-
- script: esy mv library/dune.bak library/dune
49+
- script: esy mv lib/dune.bak lib/dune
5050
displayName: "Return dune to previous state"
5151
condition: and(succeeded(), ne('${{ parameters.platform }}', 'Windows'))

.gitignore

+1-1
Original file line numberDiff line numberDiff line change
@@ -11,4 +11,4 @@ reenv.install
1111
*.install
1212
junit.xml
1313
_coverage
14-
coverage.json
14+
coverage.json

esy.lock/index.json

+629-17
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

esy.lock/opam/bos.0.2.0/opam

+47
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,47 @@
1+
opam-version: "2.0"
2+
maintainer: "Daniel Bünzli <daniel.buenzl [email protected]>"
3+
authors: ["Daniel Bünzli <daniel.buenzl [email protected]>"]
4+
homepage: "http://erratique.ch/software/bos"
5+
doc: "http://erratique.ch/software/bos/doc"
6+
dev-repo: "git+http://erratique.ch/repos/bos.git"
7+
bug-reports: "https://github.com/dbuenzli/bos/issues"
8+
tags: [ "os" "system" "cli" "command" "file" "path" "log" "unix" "org:erratique" ]
9+
license: "ISC"
10+
depends: [
11+
"ocaml" {>= "4.01.0"}
12+
"ocamlfind" {build}
13+
"ocamlbuild" {build}
14+
"topkg" {build & >= "0.9.0"}
15+
"base-unix"
16+
"rresult" {>= "0.4.0"}
17+
"astring"
18+
"fpath"
19+
"fmt" {>= "0.8.0"}
20+
"logs"
21+
"mtime" {with-test}
22+
]
23+
build: [[
24+
"ocaml" "pkg/pkg.ml" "build"
25+
"--dev-pkg" "%{pinned}%" ]]
26+
synopsis: "Basic OS interaction for OCaml"
27+
description: """
28+
Bos provides support for basic and robust interaction with the
29+
operating system in OCaml. It has functions to access the process
30+
environment, parse command line arguments, interact with the file
31+
system and run command line programs.
32+
33+
Bos works equally well on POSIX and Windows operating systems.
34+
35+
Bos depends on [Rresult][rresult], [Astring][astring], [Fmt][fmt],
36+
[Fpath][fpath] and [Logs][logs] and the OCaml Unix library. It is
37+
distributed under the ISC license.
38+
39+
[rresult]: http://erratique.ch/software/rresult
40+
[astring]: http://erratique.ch/software/astring
41+
[fmt]: http://erratique.ch/software/fmt
42+
[fpath]: http://erratique.ch/software/fpath
43+
[logs]: http://erratique.ch/software/logs"""
44+
url {
45+
src: "http://erratique.ch/software/bos/releases/bos-0.2.0.tbz"
46+
checksum: "md5=aeae7447567db459c856ee41b5a66fd2"
47+
}

esy.lock/opam/fieldslib.v0.11.0/opam

+30
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
opam-version: "2.0"
2+
maintainer: "[email protected]"
3+
authors: ["Jane Street Group, LLC <[email protected]>"]
4+
homepage: "https://github.com/janestreet/fieldslib"
5+
bug-reports: "https://github.com/janestreet/fieldslib/issues"
6+
dev-repo: "git+https://github.com/janestreet/fieldslib.git"
7+
license: "Apache-2.0"
8+
build: [
9+
["jbuilder" "build" "-p" name "-j" jobs]
10+
]
11+
conflicts: [ "jbuilder" { = "1.0+beta19" } ]
12+
depends: [
13+
"ocaml" {>= "4.04.1"}
14+
"base" {>= "v0.11" & < "v0.12"}
15+
"jbuilder" {build & >= "1.0+beta18.1"}
16+
"ocaml-migrate-parsetree" {>= "1.0"}
17+
"ppxlib" {>= "0.1.0"}
18+
]
19+
synopsis:
20+
"Syntax extension to define first class values representing record fields, to get and set record fields, iterate and fold over all fields of a record and create new record values"
21+
description: """
22+
Part of Jane Street's Core library
23+
The Core suite of libraries is an industrial strength alternative to
24+
OCaml's standard library that was developed by Jane Street, the
25+
largest industrial user of OCaml."""
26+
url {
27+
src:
28+
"https://ocaml.janestreet.com/ocaml-core/v0.11/files/fieldslib-v0.11.0.tar.gz"
29+
checksum: "md5=a42506b460a1dc47fb65a37d875211ae"
30+
}

esy.lock/opam/fmt.0.8.5/opam

+43
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,43 @@
1+
opam-version: "2.0"
2+
maintainer: "Daniel Bünzli <daniel.buenzl [email protected]>"
3+
authors: [
4+
"Daniel Bünzli <daniel.buenzl [email protected]>"
5+
"Gabriel Radanne"
6+
]
7+
homepage: "http://erratique.ch/software/fmt"
8+
doc: "http://erratique.ch/software/fmt"
9+
dev-repo: "git+http://erratique.ch/repos/fmt.git"
10+
bug-reports: "https://github.com/dbuenzli/fmt/issues"
11+
tags: [ "string" "format" "pretty-print" "org:erratique" ]
12+
license: "ISC"
13+
depends: [
14+
"ocaml" {>= "4.01.0"}
15+
"ocamlfind" {build}
16+
"ocamlbuild" {build}
17+
"topkg" {build & >= "0.9.0"}
18+
"result"
19+
"uchar"
20+
]
21+
depopts: [ "base-unix" "cmdliner" ]
22+
conflicts: [ "cmdliner" {< "0.9.8"} ]
23+
build: [[
24+
"ocaml" "pkg/pkg.ml" "build"
25+
"--dev-pkg" "%{pinned}%"
26+
"--with-base-unix" "%{base-unix:installed}%"
27+
"--with-cmdliner" "%{cmdliner:installed}%" ]]
28+
synopsis: "OCaml Format pretty-printer combinators"
29+
description: """
30+
Fmt exposes combinators to devise `Format` pretty-printing functions.
31+
32+
Fmt depends only on the OCaml standard library. The optional `Fmt_tty`
33+
library that allows to setup formatters for terminal color output
34+
depends on the Unix library. The optional `Fmt_cli` library that
35+
provides command line support for Fmt depends on [`Cmdliner`][cmdliner].
36+
37+
Fmt is distributed under the ISC license.
38+
39+
[cmdliner]: http://erratique.ch/software/cmdliner"""
40+
url {
41+
src: "http://erratique.ch/software/fmt/releases/fmt-0.8.5.tbz"
42+
checksum: "md5=77b64aa6f20f09de28f2405d6195f12c"
43+
}

esy.lock/opam/logs.0.6.2/opam

+57
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,57 @@
1+
opam-version: "2.0"
2+
maintainer: "Daniel Bünzli <daniel.buenzl [email protected]>"
3+
authors: ["Daniel Bünzli <daniel.buenzl [email protected]>"]
4+
homepage: "http://erratique.ch/software/logs"
5+
doc: "http://erratique.ch/software/logs/doc"
6+
dev-repo: "git+http://erratique.ch/repos/logs.git"
7+
bug-reports: "https://github.com/dbuenzli/logs/issues"
8+
tags: [ "log" "system" "org:erratique" ]
9+
license: "ISC"
10+
depends: [
11+
"ocaml" {>= "4.01.0"}
12+
"ocamlfind" {build}
13+
"ocamlbuild" {build}
14+
"topkg" {build}
15+
"result"
16+
"mtime" {with-test}
17+
]
18+
depopts: [
19+
"js_of_ocaml"
20+
"fmt"
21+
"cmdliner"
22+
"lwt" ]
23+
conflicts: [ "cmdliner" {< "0.9.8"} ]
24+
build: [[
25+
"ocaml" "pkg/pkg.ml" "build"
26+
"--pinned" "%{pinned}%"
27+
"--with-js_of_ocaml" "%{js_of_ocaml:installed}%"
28+
"--with-fmt" "%{fmt:installed}%"
29+
"--with-cmdliner" "%{cmdliner:installed}%"
30+
"--with-lwt" "%{lwt:installed}%" ]]
31+
synopsis: "Logging infrastructure for OCaml"
32+
description: """
33+
Logs provides a logging infrastructure for OCaml. Logging is performed
34+
on sources whose reporting level can be set independently. Log message
35+
report is decoupled from logging and is handled by a reporter.
36+
37+
A few optional log reporters are distributed with the base library and
38+
the API easily allows to implement your own.
39+
40+
`Logs` depends only on the `result` compatibility package. The
41+
optional `Logs_fmt` reporter on OCaml formatters depends on [Fmt][fmt].
42+
The optional `Logs_browser` reporter that reports to the web browser
43+
console depends on [js_of_ocaml][jsoo]. The optional `Logs_cli` library
44+
that provides command line support for controlling Logs depends on
45+
[`Cmdliner`][cmdliner]. The optional `Logs_lwt` library that provides Lwt logging
46+
functions depends on [`Lwt`][lwt]
47+
48+
Logs and its reporters are distributed under the ISC license.
49+
50+
[fmt]: http://erratique.ch/software/fmt
51+
[jsoo]: http://ocsigen.org/js_of_ocaml/
52+
[cmdliner]: http://erratique.ch/software/cmdliner
53+
[lwt]: http://ocsigen.org/lwt/"""
54+
url {
55+
src: "http://erratique.ch/software/logs/releases/logs-0.6.2.tbz"
56+
checksum: "md5=19f824c02c83c6dddc3bfb6459e4743e"
57+
}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,129 @@
1+
From 7688bb4fea24463c92e9c4870acc08495a4c77cb Mon Sep 17 00:00:00 2001
2+
From: David Allsopp <[email protected]>
3+
Date: Wed, 10 Jan 2018 15:20:46 +0000
4+
Subject: [PATCH] Provide findlib-install target
5+
6+
Allows installing the entire library using ocamlfind.
7+
---
8+
Makefile | 10 +++++++++-
9+
src/META | 17 -----------------
10+
src/META.in | 19 +++++++++++++++++++
11+
src/Makefile | 17 +++++++++++++++--
12+
4 files changed, 43 insertions(+), 20 deletions(-)
13+
delete mode 100644 src/META
14+
create mode 100644 src/META.in
15+
16+
diff --git a/Makefile b/Makefile
17+
index 6a5d08f..b40e588 100644
18+
--- a/Makefile
19+
+++ b/Makefile
20+
@@ -14,8 +14,16 @@ install:
21+
$(MAKE) -C src install
22+
$(MAKE) -C toplevel install
23+
24+
+findlib-install:
25+
+ $(MAKE) -C src findlib-install
26+
+ $(MAKE) -C toplevel install
27+
+
28+
uninstall:
29+
$(MAKE) -C src uninstall
30+
$(MAKE) -C toplevel uninstall
31+
32+
-.PHONY: all test clean install uninstall
33+
+findlib-uninstall:
34+
+ $(MAKE) -C src findlib-uninstall
35+
+ $(MAKE) -C toplevel uninstall
36+
+
37+
+.PHONY: all test clean install uninstall findlib-install findlib-uninstall
38+
diff --git a/src/META b/src/META
39+
deleted file mode 100644
40+
index 66ac170..0000000
41+
--- a/src/META
42+
+++ /dev/null
43+
@@ -1,17 +0,0 @@
44+
-# This META is the one provided by findlib when the "num" library was
45+
-# part of the core OCaml distribution. For backward compatibility,
46+
-# it installs into OCaml's standard library directory, not in a subdirectory
47+
-
48+
-requires = "num.core"
49+
-requires(toploop) = "num.core,num-top"
50+
-version = "1.0"
51+
-description = "Arbitrary-precision rational arithmetic"
52+
-package "core" (
53+
- directory = "^"
54+
- version = "1.0"
55+
- browse_interfaces = ""
56+
- archive(byte) = "nums.cma"
57+
- archive(native) = "nums.cmxa"
58+
- plugin(byte) = "nums.cma"
59+
- plugin(native) = "nums.cmxs"
60+
-)
61+
diff --git a/src/META.in b/src/META.in
62+
new file mode 100644
63+
index 0000000..b5678b7
64+
--- /dev/null
65+
+++ b/src/META.in
66+
@@ -0,0 +1,19 @@
67+
+# This META is the one provided by findlib when the "num" library was
68+
+# part of the core OCaml distribution. For backward compatibility,
69+
+# it is installed into OCaml's standard library directory. If the
70+
+# directory line below is removed, then it's installed in a
71+
+# subdirectory, as normal for a findlib package.
72+
+
73+
+requires = "num.core"
74+
+requires(toploop) = "num.core,num-top"
75+
+version = "1.0"
76+
+description = "Arbitrary-precision rational arithmetic"
77+
+package "core" (
78+
+ directory = "^"
79+
+ version = "1.0"
80+
+ browse_interfaces = ""
81+
+ archive(byte) = "nums.cma"
82+
+ archive(native) = "nums.cmxa"
83+
+ plugin(byte) = "nums.cma"
84+
+ plugin(native) = "nums.cmxs"
85+
+)
86+
diff --git a/src/Makefile b/src/Makefile
87+
index 97dc074..ff271fe 100644
88+
--- a/src/Makefile
89+
+++ b/src/Makefile
90+
@@ -80,21 +80,34 @@ endif
91+
ifeq "$(NATDYNLINK)" "true"
92+
TOINSTALL+=nums.cmxs
93+
endif
94+
+ifeq "$(SUPPORTS_SHARED_LIBRARIES)" "true"
95+
TOINSTALL_STUBS=dllnums.$(SO)
96+
+else
97+
+TOINSTALL_STUBS=
98+
+endif
99+
100+
install:
101+
+ cp META.in META
102+
$(OCAMLFIND) install num META
103+
+ rm -f META
104+
$(INSTALL_DATA) $(TOINSTALL) $(STDLIBDIR)
105+
ifeq "$(SUPPORTS_SHARED_LIBRARIES)" "true"
106+
$(INSTALL_DLL) $(TOINSTALL_STUBS) $(STDLIBDIR)/stublibs
107+
endif
108+
109+
-uninstall:
110+
+findlib-install:
111+
+ grep -Fv '^' META.in > META
112+
+ $(OCAMLFIND) install num META $(TOINSTALL) $(TOINSTALL_STUBS)
113+
+ rm -f META
114+
+
115+
+findlib-uninstall:
116+
+ $(OCAMLFIND) remove num
117+
+
118+
+uninstall: findlib-uninstall
119+
cd $(STDLIBDIR) && rm -f $(TOINSTALL)
120+
ifeq "$(SUPPORTS_SHARED_LIBRARIES)" "true"
121+
cd $(STDLIBDIR)/stublibs && rm -f $(TOINSTALL_STUBS)
122+
endif
123+
- $(OCAMLFIND) remove num
124+
125+
clean:
126+
rm -f *.cm[ioxta] *.cmx[as] *.cmti *.$(O) *.$(A) *.$(SO)
127+
--
128+
2.14.1
129+

0 commit comments

Comments
 (0)