From b8f1bc11341450828490d3855cfcec7039b5592a Mon Sep 17 00:00:00 2001 From: Jon Ludlam Date: Wed, 9 Jun 2021 22:45:36 +0100 Subject: [PATCH 01/13] Odoc-parser opam package --- odoc-parser.opam | 39 +++++++++++++++++++++++++++++++++++++++ odoc.opam | 1 + src/parser/dune | 2 +- 3 files changed, 41 insertions(+), 1 deletion(-) create mode 100644 odoc-parser.opam diff --git a/odoc-parser.opam b/odoc-parser.opam new file mode 100644 index 0000000000..5331f3d5fd --- /dev/null +++ b/odoc-parser.opam @@ -0,0 +1,39 @@ +opam-version: "2.0" + +version: "dev" +homepage: "http://github.com/ocaml/odoc" +doc: "https://ocaml.github.io/odoc/" +bug-reports: "https://github.com/ocaml/odoc/issues" +license: "ISC" + +authors: [ + "Anton Bachin " +] +maintainer: "Jon Ludlam " +dev-repo: "git+https://github.com/ocaml/odoc.git" + +synopsis: "Parser for OCamldoc" +description: """ +Odoc_parser is a library for parsing the contents of OCaml documentation +comments, formatted using 'ocamldoc' syntax. +""" + +depends: [ + "dune" {>= "2.8"} + "ocaml" {>= "4.02.0"} + "astring" + "result" +] + +build: [ + ["dune" "subst"] {pinned} + [ + "dune" + "build" + "-p" + name + "-j" + jobs + "@install" + ] +] diff --git a/odoc.opam b/odoc.opam index 2f0b9b0d99..96b4367f3d 100644 --- a/odoc.opam +++ b/odoc.opam @@ -23,6 +23,7 @@ delimited with `(** ... *)`, and outputs HTML. """ depends: [ + "odoc-parser" "astring" "cmdliner" "cppo" {build} diff --git a/src/parser/dune b/src/parser/dune index 316bf7b695..892ac8aed1 100644 --- a/src/parser/dune +++ b/src/parser/dune @@ -2,7 +2,7 @@ (library (name odoc_parser) - (public_name odoc.parser) + (public_name odoc-parser) (instrumentation (backend bisect_ppx)) (libraries astring result)) From 2317824727680d2c77604ab451219878ec8c169e Mon Sep 17 00:00:00 2001 From: Jon Ludlam Date: Wed, 7 Apr 2021 17:28:03 +0100 Subject: [PATCH 02/13] Remove esy.lock --- esy.lock/.gitattributes | 3 - esy.lock/.gitignore | 3 - esy.lock/index.json | 1044 ----------------- esy.lock/opam/alcotest.0.8.5/opam | 43 - esy.lock/opam/astring.0.8.3/opam | 38 - esy.lock/opam/base-bytes.base/opam | 9 - esy.lock/opam/base-threads.base/opam | 6 - esy.lock/opam/base-unix.base/opam | 6 - esy.lock/opam/biniou.1.2.1/opam | 45 - esy.lock/opam/bisect_ppx.2.4.1/opam | 55 - esy.lock/opam/cmdliner.1.0.2/opam | 39 - esy.lock/opam/conf-m4.1/opam | 22 - esy.lock/opam/cppo.1.6.5/opam | 23 - esy.lock/opam/dune.2.7.1/opam | 56 - esy.lock/opam/easy-format.1.3.2/opam | 46 - esy.lock/opam/fmt.0.8.9/opam | 44 - esy.lock/opam/fpath.0.7.2/opam | 34 - esy.lock/opam/jbuilder.1.0+beta20.2/opam | 39 - esy.lock/opam/lambdasoup.0.7.1/opam | 46 - esy.lock/opam/merlin.3.3.9/opam | 71 -- .../opam/ocaml-migrate-parsetree.1.8.0/opam | 38 - ...Don-t-build-manpages-for-stdlib-docs.patch | 24 - ...1-Fix-failure-to-install-tools-links.patch | 26 - .../files/fix-gcc10.patch | 34 - .../ocaml-secondary-compiler.4.08.1-1/opam | 51 - esy.lock/opam/ocamlbuild.0.14.0/opam | 36 - .../ocamlfind-secondary.1.8.1/files/META.in | 3 - .../files/ocaml-secondary-compiler.conf.in | 10 - esy.lock/opam/ocamlfind-secondary.1.8.1/opam | 32 - .../opam/ocamlfind.1.8.1/files/ocaml-stub | 4 - .../ocamlfind.1.8.1/files/ocamlfind.install | 6 - esy.lock/opam/ocamlfind.1.8.1/opam | 64 - esy.lock/opam/ppx_derivers.1.2.1/opam | 23 - esy.lock/opam/ppx_tools_versioned.5.4.0/opam | 27 - esy.lock/opam/re.1.9.0/opam | 42 - esy.lock/opam/result.1.4/opam | 22 - esy.lock/opam/seq.0.2.2/opam | 24 - esy.lock/opam/sexplib0.v0.14.0/opam | 26 - esy.lock/opam/stdlib-shims.0.3.0/opam | 31 - esy.lock/opam/topkg.1.0.3/opam | 48 - esy.lock/opam/tyxml.4.3.0/opam | 45 - esy.lock/opam/uchar.0.0.2/opam | 36 - esy.lock/opam/uuidm.0.9.7/opam | 34 - esy.lock/opam/uutf.1.0.2/opam | 40 - esy.lock/opam/yojson.1.7.0/opam | 38 - .../package.json | 6 - .../files/build.sh | 10 - .../package.json | 8 - .../files/clone-flexdll | 16 - .../files/configure-windows | 22 - .../files/esy-build | 24 - .../files/esy-configure | 29 - .../package.json | 28 - .../files/ocamlbuild-0.14.0.patch | 463 -------- .../package.json | 27 - .../files/findlib-1.8.1.patch | 471 -------- .../package.json | 61 - .../files/findlib-1.8.1.patch | 471 -------- .../files/gen-findlib-conf.sh | 14 - .../files/gen-meta.sh | 7 - .../package.json | 47 - 61 files changed, 4140 deletions(-) delete mode 100644 esy.lock/.gitattributes delete mode 100644 esy.lock/.gitignore delete mode 100644 esy.lock/index.json delete mode 100644 esy.lock/opam/alcotest.0.8.5/opam delete mode 100644 esy.lock/opam/astring.0.8.3/opam delete mode 100644 esy.lock/opam/base-bytes.base/opam delete mode 100644 esy.lock/opam/base-threads.base/opam delete mode 100644 esy.lock/opam/base-unix.base/opam delete mode 100644 esy.lock/opam/biniou.1.2.1/opam delete mode 100644 esy.lock/opam/bisect_ppx.2.4.1/opam delete mode 100644 esy.lock/opam/cmdliner.1.0.2/opam delete mode 100644 esy.lock/opam/conf-m4.1/opam delete mode 100644 esy.lock/opam/cppo.1.6.5/opam delete mode 100644 esy.lock/opam/dune.2.7.1/opam delete mode 100644 esy.lock/opam/easy-format.1.3.2/opam delete mode 100644 esy.lock/opam/fmt.0.8.9/opam delete mode 100644 esy.lock/opam/fpath.0.7.2/opam delete mode 100644 esy.lock/opam/jbuilder.1.0+beta20.2/opam delete mode 100644 esy.lock/opam/lambdasoup.0.7.1/opam delete mode 100644 esy.lock/opam/merlin.3.3.9/opam delete mode 100644 esy.lock/opam/ocaml-migrate-parsetree.1.8.0/opam delete mode 100644 esy.lock/opam/ocaml-secondary-compiler.4.08.1-1/files/0001-Don-t-build-manpages-for-stdlib-docs.patch delete mode 100644 esy.lock/opam/ocaml-secondary-compiler.4.08.1-1/files/0001-Fix-failure-to-install-tools-links.patch delete mode 100644 esy.lock/opam/ocaml-secondary-compiler.4.08.1-1/files/fix-gcc10.patch delete mode 100644 esy.lock/opam/ocaml-secondary-compiler.4.08.1-1/opam delete mode 100644 esy.lock/opam/ocamlbuild.0.14.0/opam delete mode 100644 esy.lock/opam/ocamlfind-secondary.1.8.1/files/META.in delete mode 100644 esy.lock/opam/ocamlfind-secondary.1.8.1/files/ocaml-secondary-compiler.conf.in delete mode 100644 esy.lock/opam/ocamlfind-secondary.1.8.1/opam delete mode 100644 esy.lock/opam/ocamlfind.1.8.1/files/ocaml-stub delete mode 100644 esy.lock/opam/ocamlfind.1.8.1/files/ocamlfind.install delete mode 100644 esy.lock/opam/ocamlfind.1.8.1/opam delete mode 100644 esy.lock/opam/ppx_derivers.1.2.1/opam delete mode 100644 esy.lock/opam/ppx_tools_versioned.5.4.0/opam delete mode 100644 esy.lock/opam/re.1.9.0/opam delete mode 100644 esy.lock/opam/result.1.4/opam delete mode 100644 esy.lock/opam/seq.0.2.2/opam delete mode 100644 esy.lock/opam/sexplib0.v0.14.0/opam delete mode 100644 esy.lock/opam/stdlib-shims.0.3.0/opam delete mode 100644 esy.lock/opam/topkg.1.0.3/opam delete mode 100644 esy.lock/opam/tyxml.4.3.0/opam delete mode 100644 esy.lock/opam/uchar.0.0.2/opam delete mode 100644 esy.lock/opam/uuidm.0.9.7/opam delete mode 100644 esy.lock/opam/uutf.1.0.2/opam delete mode 100644 esy.lock/opam/yojson.1.7.0/opam delete mode 100644 esy.lock/overrides/opam__s__conf_m4_opam__c__1_opam_override/package.json delete mode 100644 esy.lock/overrides/opam__s__dune_opam__c__2.7.1_opam_override/files/build.sh delete mode 100644 esy.lock/overrides/opam__s__dune_opam__c__2.7.1_opam_override/package.json delete mode 100755 esy.lock/overrides/opam__s__ocaml_secondary_compiler_opam__c__4.08.1_1_opam_override/files/clone-flexdll delete mode 100755 esy.lock/overrides/opam__s__ocaml_secondary_compiler_opam__c__4.08.1_1_opam_override/files/configure-windows delete mode 100755 esy.lock/overrides/opam__s__ocaml_secondary_compiler_opam__c__4.08.1_1_opam_override/files/esy-build delete mode 100755 esy.lock/overrides/opam__s__ocaml_secondary_compiler_opam__c__4.08.1_1_opam_override/files/esy-configure delete mode 100644 esy.lock/overrides/opam__s__ocaml_secondary_compiler_opam__c__4.08.1_1_opam_override/package.json delete mode 100644 esy.lock/overrides/opam__s__ocamlbuild_opam__c__0.14.0_opam_override/files/ocamlbuild-0.14.0.patch delete mode 100644 esy.lock/overrides/opam__s__ocamlbuild_opam__c__0.14.0_opam_override/package.json delete mode 100644 esy.lock/overrides/opam__s__ocamlfind_opam__c__1.8.1_opam_override/files/findlib-1.8.1.patch delete mode 100644 esy.lock/overrides/opam__s__ocamlfind_opam__c__1.8.1_opam_override/package.json delete mode 100644 esy.lock/overrides/opam__s__ocamlfind_secondary_opam__c__1.8.1_opam_override/files/findlib-1.8.1.patch delete mode 100644 esy.lock/overrides/opam__s__ocamlfind_secondary_opam__c__1.8.1_opam_override/files/gen-findlib-conf.sh delete mode 100644 esy.lock/overrides/opam__s__ocamlfind_secondary_opam__c__1.8.1_opam_override/files/gen-meta.sh delete mode 100644 esy.lock/overrides/opam__s__ocamlfind_secondary_opam__c__1.8.1_opam_override/package.json diff --git a/esy.lock/.gitattributes b/esy.lock/.gitattributes deleted file mode 100644 index e0b4e26c5a..0000000000 --- a/esy.lock/.gitattributes +++ /dev/null @@ -1,3 +0,0 @@ - -# Set eol to LF so files aren't converted to CRLF-eol on Windows. -* text eol=lf linguist-generated diff --git a/esy.lock/.gitignore b/esy.lock/.gitignore deleted file mode 100644 index a221be227e..0000000000 --- a/esy.lock/.gitignore +++ /dev/null @@ -1,3 +0,0 @@ - -# Reset any possible .gitignore, we want all esy.lock to be un-ignored. -!* diff --git a/esy.lock/index.json b/esy.lock/index.json deleted file mode 100644 index 22692a904e..0000000000 --- a/esy.lock/index.json +++ /dev/null @@ -1,1044 +0,0 @@ -{ - "checksum": "54a2ca2738bd3f24d15cb7a71b92c9e3", - "root": "odoc@link-dev:./package.json", - "node": { - "odoc@link-dev:./package.json": { - "id": "odoc@link-dev:./package.json", - "name": "odoc", - "version": "link-dev:./package.json", - "source": { - "type": "link-dev", - "path": ".", - "manifest": "package.json" - }, - "overrides": [], - "dependencies": [ - "ocaml@4.6.1003@d41d8cd9", "@opam/tyxml@opam:4.3.0@c1da25f1", - "@opam/sexplib0@opam:v0.14.0@ddeb6438", - "@opam/result@opam:1.4@dc720aef", - "@opam/ocamlfind-secondary@opam:1.8.1@1afa38b2", - "@opam/ocamlfind@opam:1.8.1@b7dc3072", - "@opam/markup@github:aantron/markup.ml:markup.opam#9f8e77@d41d8cd9", - "@opam/lambdasoup@opam:0.7.1@4ede102f", - "@opam/fpath@opam:0.7.2@3fd2da53", "@opam/dune@opam:2.7.1@baccb77f", - "@opam/cppo@opam:1.6.5@f8ff4f1a", - "@opam/cmdliner@opam:1.0.2@1c17346c", - "@opam/bisect_ppx@opam:2.4.1@dfb4bc5f", - "@opam/astring@opam:0.8.3@1e8f8178", - "@opam/alcotest@opam:0.8.5@4bc922ed" - ], - "devDependencies": [ - "ocaml@4.6.1003@d41d8cd9", "@opam/merlin@opam:3.3.9@e0b69f63" - ] - }, - "ocaml@4.6.1003@d41d8cd9": { - "id": "ocaml@4.6.1003@d41d8cd9", - "name": "ocaml", - "version": "4.6.1003", - "source": { - "type": "install", - "source": [ - "archive:https://registry.npmjs.org/ocaml/-/ocaml-4.6.1003.tgz#sha1:6a391e80b4d1859bdb1943fd3ef6221c7f0a9a49" - ] - }, - "overrides": [], - "dependencies": [], - "devDependencies": [] - }, - "esy-m4@github:esy-packages/esy-m4#c7cf0ac9221be2b1f9d90e83559ca08397a629e7@d41d8cd9": { - "id": - "esy-m4@github:esy-packages/esy-m4#c7cf0ac9221be2b1f9d90e83559ca08397a629e7@d41d8cd9", - "name": "esy-m4", - "version": - "github:esy-packages/esy-m4#c7cf0ac9221be2b1f9d90e83559ca08397a629e7", - "source": { - "type": "install", - "source": [ - "github:esy-packages/esy-m4#c7cf0ac9221be2b1f9d90e83559ca08397a629e7" - ] - }, - "overrides": [], - "dependencies": [], - "devDependencies": [] - }, - "@opam/yojson@opam:1.7.0@7056d985": { - "id": "@opam/yojson@opam:1.7.0@7056d985", - "name": "@opam/yojson", - "version": "opam:1.7.0", - "source": { - "type": "install", - "source": [ - "archive:https://opam.ocaml.org/cache/md5/b8/b89d39ca3f8c532abe5f547ad3b8f84d#md5:b89d39ca3f8c532abe5f547ad3b8f84d", - "archive:https://github.com/ocaml-community/yojson/releases/download/1.7.0/yojson-1.7.0.tbz#md5:b89d39ca3f8c532abe5f547ad3b8f84d" - ], - "opam": { - "name": "yojson", - "version": "1.7.0", - "path": "esy.lock/opam/yojson.1.7.0" - } - }, - "overrides": [], - "dependencies": [ - "ocaml@4.6.1003@d41d8cd9", "@opam/easy-format@opam:1.3.2@0484b3c4", - "@opam/dune@opam:2.7.1@baccb77f", "@opam/cppo@opam:1.6.5@f8ff4f1a", - "@opam/biniou@opam:1.2.1@d7570399", - "@esy-ocaml/substs@0.0.1@d41d8cd9" - ], - "devDependencies": [ - "ocaml@4.6.1003@d41d8cd9", "@opam/easy-format@opam:1.3.2@0484b3c4", - "@opam/dune@opam:2.7.1@baccb77f", "@opam/biniou@opam:1.2.1@d7570399" - ] - }, - "@opam/uutf@opam:1.0.2@4440868f": { - "id": "@opam/uutf@opam:1.0.2@4440868f", - "name": "@opam/uutf", - "version": "opam:1.0.2", - "source": { - "type": "install", - "source": [ - "archive:https://opam.ocaml.org/cache/md5/a7/a7c542405a39630c689a82bd7ef2292c#md5:a7c542405a39630c689a82bd7ef2292c", - "archive:http://erratique.ch/software/uutf/releases/uutf-1.0.2.tbz#md5:a7c542405a39630c689a82bd7ef2292c" - ], - "opam": { - "name": "uutf", - "version": "1.0.2", - "path": "esy.lock/opam/uutf.1.0.2" - } - }, - "overrides": [], - "dependencies": [ - "ocaml@4.6.1003@d41d8cd9", "@opam/uchar@opam:0.0.2@c8218eea", - "@opam/topkg@opam:1.0.3@e4e10f1c", - "@opam/ocamlfind@opam:1.8.1@b7dc3072", - "@opam/ocamlbuild@opam:0.14.0@6ac75d03", - "@opam/cmdliner@opam:1.0.2@1c17346c", - "@esy-ocaml/substs@0.0.1@d41d8cd9" - ], - "devDependencies": [ - "ocaml@4.6.1003@d41d8cd9", "@opam/uchar@opam:0.0.2@c8218eea" - ] - }, - "@opam/uuidm@opam:0.9.7@bf725775": { - "id": "@opam/uuidm@opam:0.9.7@bf725775", - "name": "@opam/uuidm", - "version": "opam:0.9.7", - "source": { - "type": "install", - "source": [ - "archive:https://opam.ocaml.org/cache/md5/54/54658248e3981d8c05237d0a4277ccd3#md5:54658248e3981d8c05237d0a4277ccd3", - "archive:https://erratique.ch/software/uuidm/releases/uuidm-0.9.7.tbz#md5:54658248e3981d8c05237d0a4277ccd3" - ], - "opam": { - "name": "uuidm", - "version": "0.9.7", - "path": "esy.lock/opam/uuidm.0.9.7" - } - }, - "overrides": [], - "dependencies": [ - "ocaml@4.6.1003@d41d8cd9", "@opam/topkg@opam:1.0.3@e4e10f1c", - "@opam/ocamlfind@opam:1.8.1@b7dc3072", - "@opam/ocamlbuild@opam:0.14.0@6ac75d03", - "@opam/cmdliner@opam:1.0.2@1c17346c", - "@esy-ocaml/substs@0.0.1@d41d8cd9" - ], - "devDependencies": [ "ocaml@4.6.1003@d41d8cd9" ] - }, - "@opam/uchar@opam:0.0.2@c8218eea": { - "id": "@opam/uchar@opam:0.0.2@c8218eea", - "name": "@opam/uchar", - "version": "opam:0.0.2", - "source": { - "type": "install", - "source": [ - "archive:https://opam.ocaml.org/cache/md5/c9/c9ba2c738d264c420c642f7bb1cf4a36#md5:c9ba2c738d264c420c642f7bb1cf4a36", - "archive:https://github.com/ocaml/uchar/releases/download/v0.0.2/uchar-0.0.2.tbz#md5:c9ba2c738d264c420c642f7bb1cf4a36" - ], - "opam": { - "name": "uchar", - "version": "0.0.2", - "path": "esy.lock/opam/uchar.0.0.2" - } - }, - "overrides": [], - "dependencies": [ - "ocaml@4.6.1003@d41d8cd9", "@opam/ocamlbuild@opam:0.14.0@6ac75d03", - "@esy-ocaml/substs@0.0.1@d41d8cd9" - ], - "devDependencies": [ "ocaml@4.6.1003@d41d8cd9" ] - }, - "@opam/tyxml@opam:4.3.0@c1da25f1": { - "id": "@opam/tyxml@opam:4.3.0@c1da25f1", - "name": "@opam/tyxml", - "version": "opam:4.3.0", - "source": { - "type": "install", - "source": [ - "archive:https://opam.ocaml.org/cache/md5/fd/fd834a567f813bf447cab5f4c3a723e2#md5:fd834a567f813bf447cab5f4c3a723e2", - "archive:https://github.com/ocsigen/tyxml/releases/download/4.3.0/tyxml-4.3.0.tbz#md5:fd834a567f813bf447cab5f4c3a723e2" - ], - "opam": { - "name": "tyxml", - "version": "4.3.0", - "path": "esy.lock/opam/tyxml.4.3.0" - } - }, - "overrides": [], - "dependencies": [ - "ocaml@4.6.1003@d41d8cd9", "@opam/uutf@opam:1.0.2@4440868f", - "@opam/seq@opam:0.2.2@e9144e45", "@opam/re@opam:1.9.0@d4d5e13d", - "@opam/dune@opam:2.7.1@baccb77f", "@esy-ocaml/substs@0.0.1@d41d8cd9" - ], - "devDependencies": [ - "ocaml@4.6.1003@d41d8cd9", "@opam/uutf@opam:1.0.2@4440868f", - "@opam/seq@opam:0.2.2@e9144e45", "@opam/re@opam:1.9.0@d4d5e13d", - "@opam/dune@opam:2.7.1@baccb77f" - ] - }, - "@opam/topkg@opam:1.0.3@e4e10f1c": { - "id": "@opam/topkg@opam:1.0.3@e4e10f1c", - "name": "@opam/topkg", - "version": "opam:1.0.3", - "source": { - "type": "install", - "source": [ - "archive:https://opam.ocaml.org/cache/md5/e2/e285f7a296d77ee7d831ba9a6bfb396f#md5:e285f7a296d77ee7d831ba9a6bfb396f", - "archive:http://erratique.ch/software/topkg/releases/topkg-1.0.3.tbz#md5:e285f7a296d77ee7d831ba9a6bfb396f" - ], - "opam": { - "name": "topkg", - "version": "1.0.3", - "path": "esy.lock/opam/topkg.1.0.3" - } - }, - "overrides": [], - "dependencies": [ - "ocaml@4.6.1003@d41d8cd9", "@opam/ocamlfind@opam:1.8.1@b7dc3072", - "@opam/ocamlbuild@opam:0.14.0@6ac75d03", - "@esy-ocaml/substs@0.0.1@d41d8cd9" - ], - "devDependencies": [ - "ocaml@4.6.1003@d41d8cd9", "@opam/ocamlbuild@opam:0.14.0@6ac75d03" - ] - }, - "@opam/stdlib-shims@opam:0.3.0@0d088929": { - "id": "@opam/stdlib-shims@opam:0.3.0@0d088929", - "name": "@opam/stdlib-shims", - "version": "opam:0.3.0", - "source": { - "type": "install", - "source": [ - "archive:https://opam.ocaml.org/cache/sha256/ba/babf72d3917b86f707885f0c5528e36c63fccb698f4b46cf2bab5c7ccdd6d84a#sha256:babf72d3917b86f707885f0c5528e36c63fccb698f4b46cf2bab5c7ccdd6d84a", - "archive:https://github.com/ocaml/stdlib-shims/releases/download/0.3.0/stdlib-shims-0.3.0.tbz#sha256:babf72d3917b86f707885f0c5528e36c63fccb698f4b46cf2bab5c7ccdd6d84a" - ], - "opam": { - "name": "stdlib-shims", - "version": "0.3.0", - "path": "esy.lock/opam/stdlib-shims.0.3.0" - } - }, - "overrides": [], - "dependencies": [ - "ocaml@4.6.1003@d41d8cd9", "@opam/dune@opam:2.7.1@baccb77f", - "@esy-ocaml/substs@0.0.1@d41d8cd9" - ], - "devDependencies": [ - "ocaml@4.6.1003@d41d8cd9", "@opam/dune@opam:2.7.1@baccb77f" - ] - }, - "@opam/sexplib0@opam:v0.14.0@ddeb6438": { - "id": "@opam/sexplib0@opam:v0.14.0@ddeb6438", - "name": "@opam/sexplib0", - "version": "opam:v0.14.0", - "source": { - "type": "install", - "source": [ - "archive:https://opam.ocaml.org/cache/md5/37/37aff0af8f8f6f759249475684aebdc4#md5:37aff0af8f8f6f759249475684aebdc4", - "archive:https://ocaml.janestreet.com/ocaml-core/v0.14/files/sexplib0-v0.14.0.tar.gz#md5:37aff0af8f8f6f759249475684aebdc4" - ], - "opam": { - "name": "sexplib0", - "version": "v0.14.0", - "path": "esy.lock/opam/sexplib0.v0.14.0" - } - }, - "overrides": [], - "dependencies": [ - "ocaml@4.6.1003@d41d8cd9", "@opam/dune@opam:2.7.1@baccb77f", - "@esy-ocaml/substs@0.0.1@d41d8cd9" - ], - "devDependencies": [ - "ocaml@4.6.1003@d41d8cd9", "@opam/dune@opam:2.7.1@baccb77f" - ] - }, - "@opam/seq@opam:0.2.2@e9144e45": { - "id": "@opam/seq@opam:0.2.2@e9144e45", - "name": "@opam/seq", - "version": "opam:0.2.2", - "source": { - "type": "install", - "source": [ - "archive:https://opam.ocaml.org/cache/md5/90/9033e02283aa3bde9f97f24e632902e3#md5:9033e02283aa3bde9f97f24e632902e3", - "archive:https://github.com/c-cube/seq/archive/0.2.2.tar.gz#md5:9033e02283aa3bde9f97f24e632902e3" - ], - "opam": { - "name": "seq", - "version": "0.2.2", - "path": "esy.lock/opam/seq.0.2.2" - } - }, - "overrides": [], - "dependencies": [ - "ocaml@4.6.1003@d41d8cd9", "@opam/dune@opam:2.7.1@baccb77f", - "@esy-ocaml/substs@0.0.1@d41d8cd9" - ], - "devDependencies": [ - "ocaml@4.6.1003@d41d8cd9", "@opam/dune@opam:2.7.1@baccb77f" - ] - }, - "@opam/result@opam:1.4@dc720aef": { - "id": "@opam/result@opam:1.4@dc720aef", - "name": "@opam/result", - "version": "opam:1.4", - "source": { - "type": "install", - "source": [ - "archive:https://opam.ocaml.org/cache/md5/d3/d3162dbc501a2af65c8c71e0866541da#md5:d3162dbc501a2af65c8c71e0866541da", - "archive:https://github.com/janestreet/result/archive/1.4.tar.gz#md5:d3162dbc501a2af65c8c71e0866541da" - ], - "opam": { - "name": "result", - "version": "1.4", - "path": "esy.lock/opam/result.1.4" - } - }, - "overrides": [], - "dependencies": [ - "ocaml@4.6.1003@d41d8cd9", "@opam/dune@opam:2.7.1@baccb77f", - "@esy-ocaml/substs@0.0.1@d41d8cd9" - ], - "devDependencies": [ - "ocaml@4.6.1003@d41d8cd9", "@opam/dune@opam:2.7.1@baccb77f" - ] - }, - "@opam/re@opam:1.9.0@d4d5e13d": { - "id": "@opam/re@opam:1.9.0@d4d5e13d", - "name": "@opam/re", - "version": "opam:1.9.0", - "source": { - "type": "install", - "source": [ - "archive:https://opam.ocaml.org/cache/md5/bd/bddaed4f386a22cace7850c9c7dac296#md5:bddaed4f386a22cace7850c9c7dac296", - "archive:https://github.com/ocaml/ocaml-re/releases/download/1.9.0/re-1.9.0.tbz#md5:bddaed4f386a22cace7850c9c7dac296" - ], - "opam": { - "name": "re", - "version": "1.9.0", - "path": "esy.lock/opam/re.1.9.0" - } - }, - "overrides": [], - "dependencies": [ - "ocaml@4.6.1003@d41d8cd9", "@opam/seq@opam:0.2.2@e9144e45", - "@opam/dune@opam:2.7.1@baccb77f", "@esy-ocaml/substs@0.0.1@d41d8cd9" - ], - "devDependencies": [ - "ocaml@4.6.1003@d41d8cd9", "@opam/seq@opam:0.2.2@e9144e45", - "@opam/dune@opam:2.7.1@baccb77f" - ] - }, - "@opam/ppx_tools_versioned@opam:5.4.0@32d1a414": { - "id": "@opam/ppx_tools_versioned@opam:5.4.0@32d1a414", - "name": "@opam/ppx_tools_versioned", - "version": "opam:5.4.0", - "source": { - "type": "install", - "source": [ - "archive:https://opam.ocaml.org/cache/md5/3e/3e809a11cae99f57c051d3d0100311f6#md5:3e809a11cae99f57c051d3d0100311f6", - "archive:https://github.com/ocaml-ppx/ppx_tools_versioned/archive/5.4.0.tar.gz#md5:3e809a11cae99f57c051d3d0100311f6" - ], - "opam": { - "name": "ppx_tools_versioned", - "version": "5.4.0", - "path": "esy.lock/opam/ppx_tools_versioned.5.4.0" - } - }, - "overrides": [], - "dependencies": [ - "ocaml@4.6.1003@d41d8cd9", - "@opam/ocaml-migrate-parsetree@opam:1.8.0@caf9847c", - "@opam/dune@opam:2.7.1@baccb77f", "@esy-ocaml/substs@0.0.1@d41d8cd9" - ], - "devDependencies": [ - "ocaml@4.6.1003@d41d8cd9", - "@opam/ocaml-migrate-parsetree@opam:1.8.0@caf9847c", - "@opam/dune@opam:2.7.1@baccb77f" - ] - }, - "@opam/ppx_derivers@opam:1.2.1@ecf0aa45": { - "id": "@opam/ppx_derivers@opam:1.2.1@ecf0aa45", - "name": "@opam/ppx_derivers", - "version": "opam:1.2.1", - "source": { - "type": "install", - "source": [ - "archive:https://opam.ocaml.org/cache/md5/5d/5dc2bf130c1db3c731fe0fffc5648b41#md5:5dc2bf130c1db3c731fe0fffc5648b41", - "archive:https://github.com/ocaml-ppx/ppx_derivers/archive/1.2.1.tar.gz#md5:5dc2bf130c1db3c731fe0fffc5648b41" - ], - "opam": { - "name": "ppx_derivers", - "version": "1.2.1", - "path": "esy.lock/opam/ppx_derivers.1.2.1" - } - }, - "overrides": [], - "dependencies": [ - "ocaml@4.6.1003@d41d8cd9", "@opam/dune@opam:2.7.1@baccb77f", - "@esy-ocaml/substs@0.0.1@d41d8cd9" - ], - "devDependencies": [ - "ocaml@4.6.1003@d41d8cd9", "@opam/dune@opam:2.7.1@baccb77f" - ] - }, - "@opam/ocamlfind-secondary@opam:1.8.1@1afa38b2": { - "id": "@opam/ocamlfind-secondary@opam:1.8.1@1afa38b2", - "name": "@opam/ocamlfind-secondary", - "version": "opam:1.8.1", - "source": { - "type": "install", - "source": [ - "archive:https://opam.ocaml.org/cache/md5/18/18ca650982c15536616dea0e422cbd8c#md5:18ca650982c15536616dea0e422cbd8c", - "archive:http://download2.camlcity.org/download/findlib-1.8.1.tar.gz#md5:18ca650982c15536616dea0e422cbd8c", - "archive:http://download.camlcity.org/download/findlib-1.8.1.tar.gz#md5:18ca650982c15536616dea0e422cbd8c" - ], - "opam": { - "name": "ocamlfind-secondary", - "version": "1.8.1", - "path": "esy.lock/opam/ocamlfind-secondary.1.8.1" - } - }, - "overrides": [ - { - "opamoverride": - "esy.lock/overrides/opam__s__ocamlfind_secondary_opam__c__1.8.1_opam_override" - } - ], - "dependencies": [ - "@opam/ocamlfind@opam:1.8.1@b7dc3072", - "@opam/ocaml-secondary-compiler@opam:4.08.1-1@85df5d8f", - "@esy-ocaml/substs@0.0.1@d41d8cd9" - ], - "devDependencies": [ - "@opam/ocamlfind@opam:1.8.1@b7dc3072", - "@opam/ocaml-secondary-compiler@opam:4.08.1-1@85df5d8f" - ] - }, - "@opam/ocamlfind@opam:1.8.1@b7dc3072": { - "id": "@opam/ocamlfind@opam:1.8.1@b7dc3072", - "name": "@opam/ocamlfind", - "version": "opam:1.8.1", - "source": { - "type": "install", - "source": [ - "archive:https://opam.ocaml.org/cache/md5/18/18ca650982c15536616dea0e422cbd8c#md5:18ca650982c15536616dea0e422cbd8c", - "archive:http://download2.camlcity.org/download/findlib-1.8.1.tar.gz#md5:18ca650982c15536616dea0e422cbd8c", - "archive:http://download.camlcity.org/download/findlib-1.8.1.tar.gz#md5:18ca650982c15536616dea0e422cbd8c" - ], - "opam": { - "name": "ocamlfind", - "version": "1.8.1", - "path": "esy.lock/opam/ocamlfind.1.8.1" - } - }, - "overrides": [ - { - "opamoverride": - "esy.lock/overrides/opam__s__ocamlfind_opam__c__1.8.1_opam_override" - } - ], - "dependencies": [ - "ocaml@4.6.1003@d41d8cd9", "@opam/conf-m4@opam:1@196bf219", - "@esy-ocaml/substs@0.0.1@d41d8cd9" - ], - "devDependencies": [ "ocaml@4.6.1003@d41d8cd9" ] - }, - "@opam/ocamlbuild@opam:0.14.0@6ac75d03": { - "id": "@opam/ocamlbuild@opam:0.14.0@6ac75d03", - "name": "@opam/ocamlbuild", - "version": "opam:0.14.0", - "source": { - "type": "install", - "source": [ - "archive:https://opam.ocaml.org/cache/sha256/87/87b29ce96958096c0a1a8eeafeb6268077b2d11e1bf2b3de0f5ebc9cf8d42e78#sha256:87b29ce96958096c0a1a8eeafeb6268077b2d11e1bf2b3de0f5ebc9cf8d42e78", - "archive:https://github.com/ocaml/ocamlbuild/archive/0.14.0.tar.gz#sha256:87b29ce96958096c0a1a8eeafeb6268077b2d11e1bf2b3de0f5ebc9cf8d42e78" - ], - "opam": { - "name": "ocamlbuild", - "version": "0.14.0", - "path": "esy.lock/opam/ocamlbuild.0.14.0" - } - }, - "overrides": [ - { - "opamoverride": - "esy.lock/overrides/opam__s__ocamlbuild_opam__c__0.14.0_opam_override" - } - ], - "dependencies": [ - "ocaml@4.6.1003@d41d8cd9", "@esy-ocaml/substs@0.0.1@d41d8cd9" - ], - "devDependencies": [ "ocaml@4.6.1003@d41d8cd9" ] - }, - "@opam/ocaml-secondary-compiler@opam:4.08.1-1@85df5d8f": { - "id": "@opam/ocaml-secondary-compiler@opam:4.08.1-1@85df5d8f", - "name": "@opam/ocaml-secondary-compiler", - "version": "opam:4.08.1-1", - "source": { - "type": "install", - "source": [ - "archive:https://opam.ocaml.org/cache/md5/72/723b6bfe8cf5abcbccc6911143f71055#md5:723b6bfe8cf5abcbccc6911143f71055", - "archive:https://github.com/ocaml/ocaml/archive/4.08.1.tar.gz#md5:723b6bfe8cf5abcbccc6911143f71055" - ], - "opam": { - "name": "ocaml-secondary-compiler", - "version": "4.08.1-1", - "path": "esy.lock/opam/ocaml-secondary-compiler.4.08.1-1" - } - }, - "overrides": [ - { - "opamoverride": - "esy.lock/overrides/opam__s__ocaml_secondary_compiler_opam__c__4.08.1_1_opam_override" - } - ], - "dependencies": [ - "ocaml@4.6.1003@d41d8cd9", "@esy-ocaml/substs@0.0.1@d41d8cd9" - ], - "devDependencies": [ "ocaml@4.6.1003@d41d8cd9" ] - }, - "@opam/ocaml-migrate-parsetree@opam:1.8.0@caf9847c": { - "id": "@opam/ocaml-migrate-parsetree@opam:1.8.0@caf9847c", - "name": "@opam/ocaml-migrate-parsetree", - "version": "opam:1.8.0", - "source": { - "type": "install", - "source": [ - "archive:https://opam.ocaml.org/cache/sha256/b1/b1c2d176ff1444041f2775786ba605be796e46dfd2acb06c96f35d2bb88b8fb5#sha256:b1c2d176ff1444041f2775786ba605be796e46dfd2acb06c96f35d2bb88b8fb5", - "archive:https://github.com/ocaml-ppx/ocaml-migrate-parsetree/releases/download/v1.8.0/ocaml-migrate-parsetree-v1.8.0.tbz#sha256:b1c2d176ff1444041f2775786ba605be796e46dfd2acb06c96f35d2bb88b8fb5" - ], - "opam": { - "name": "ocaml-migrate-parsetree", - "version": "1.8.0", - "path": "esy.lock/opam/ocaml-migrate-parsetree.1.8.0" - } - }, - "overrides": [], - "dependencies": [ - "ocaml@4.6.1003@d41d8cd9", "@opam/result@opam:1.4@dc720aef", - "@opam/ppx_derivers@opam:1.2.1@ecf0aa45", - "@opam/dune@opam:2.7.1@baccb77f", "@esy-ocaml/substs@0.0.1@d41d8cd9" - ], - "devDependencies": [ - "ocaml@4.6.1003@d41d8cd9", "@opam/result@opam:1.4@dc720aef", - "@opam/ppx_derivers@opam:1.2.1@ecf0aa45", - "@opam/dune@opam:2.7.1@baccb77f" - ] - }, - "@opam/merlin@opam:3.3.9@e0b69f63": { - "id": "@opam/merlin@opam:3.3.9@e0b69f63", - "name": "@opam/merlin", - "version": "opam:3.3.9", - "source": { - "type": "install", - "source": [ - "archive:https://opam.ocaml.org/cache/sha256/a3/a3170f1a993d810d552a21a4baa328dff0fe9ac9bf4b8aa6ba3f179a9240cf02#sha256:a3170f1a993d810d552a21a4baa328dff0fe9ac9bf4b8aa6ba3f179a9240cf02", - "archive:https://github.com/ocaml/merlin/releases/download/v3.3.9/merlin-v3.3.9.tbz#sha256:a3170f1a993d810d552a21a4baa328dff0fe9ac9bf4b8aa6ba3f179a9240cf02" - ], - "opam": { - "name": "merlin", - "version": "3.3.9", - "path": "esy.lock/opam/merlin.3.3.9" - } - }, - "overrides": [], - "dependencies": [ - "ocaml@4.6.1003@d41d8cd9", "@opam/yojson@opam:1.7.0@7056d985", - "@opam/ocamlfind@opam:1.8.1@b7dc3072", - "@opam/dune@opam:2.7.1@baccb77f", "@esy-ocaml/substs@0.0.1@d41d8cd9" - ], - "devDependencies": [ - "ocaml@4.6.1003@d41d8cd9", "@opam/yojson@opam:1.7.0@7056d985", - "@opam/ocamlfind@opam:1.8.1@b7dc3072", - "@opam/dune@opam:2.7.1@baccb77f" - ] - }, - "@opam/markup@github:aantron/markup.ml:markup.opam#9f8e77@d41d8cd9": { - "id": - "@opam/markup@github:aantron/markup.ml:markup.opam#9f8e77@d41d8cd9", - "name": "@opam/markup", - "version": "github:aantron/markup.ml:markup.opam#9f8e77", - "source": { - "type": "install", - "source": [ "github:aantron/markup.ml:markup.opam#9f8e77" ] - }, - "overrides": [], - "dependencies": [ - "@opam/uutf@opam:1.0.2@4440868f", "@opam/uchar@opam:0.0.2@c8218eea", - "@opam/dune@opam:2.7.1@baccb77f", - "@opam/bisect_ppx@opam:2.4.1@dfb4bc5f", - "@esy-ocaml/substs@0.0.1@d41d8cd9" - ], - "devDependencies": [ - "@opam/uutf@opam:1.0.2@4440868f", "@opam/uchar@opam:0.0.2@c8218eea", - "@opam/bisect_ppx@opam:2.4.1@dfb4bc5f" - ] - }, - "@opam/lambdasoup@opam:0.7.1@4ede102f": { - "id": "@opam/lambdasoup@opam:0.7.1@4ede102f", - "name": "@opam/lambdasoup", - "version": "opam:0.7.1", - "source": { - "type": "install", - "source": [ - "archive:https://opam.ocaml.org/cache/md5/da/da9884ec354960d0c76e4bb834042fb8#md5:da9884ec354960d0c76e4bb834042fb8", - "archive:https://github.com/aantron/lambdasoup/archive/0.7.1.tar.gz#md5:da9884ec354960d0c76e4bb834042fb8" - ], - "opam": { - "name": "lambdasoup", - "version": "0.7.1", - "path": "esy.lock/opam/lambdasoup.0.7.1" - } - }, - "overrides": [], - "dependencies": [ - "ocaml@4.6.1003@d41d8cd9", - "@opam/markup@github:aantron/markup.ml:markup.opam#9f8e77@d41d8cd9", - "@opam/dune@opam:2.7.1@baccb77f", "@esy-ocaml/substs@0.0.1@d41d8cd9" - ], - "devDependencies": [ - "ocaml@4.6.1003@d41d8cd9", - "@opam/markup@github:aantron/markup.ml:markup.opam#9f8e77@d41d8cd9", - "@opam/dune@opam:2.7.1@baccb77f" - ] - }, - "@opam/jbuilder@opam:1.0+beta20.2@053ddcf2": { - "id": "@opam/jbuilder@opam:1.0+beta20.2@053ddcf2", - "name": "@opam/jbuilder", - "version": "opam:1.0+beta20.2", - "source": { - "type": "install", - "source": [ - "archive:https://opam.ocaml.org/cache/md5/fb/fbe8c3b1facb206cac3fb8932b5dd5d9#md5:fbe8c3b1facb206cac3fb8932b5dd5d9", - "archive:https://github.com/ocaml/dune/releases/download/1.0%2Bbeta20.2/jbuilder-1.0+beta20.2.tbz#md5:fbe8c3b1facb206cac3fb8932b5dd5d9" - ], - "opam": { - "name": "jbuilder", - "version": "1.0+beta20.2", - "path": "esy.lock/opam/jbuilder.1.0+beta20.2" - } - }, - "overrides": [], - "dependencies": [ - "ocaml@4.6.1003@d41d8cd9", "@esy-ocaml/substs@0.0.1@d41d8cd9" - ], - "devDependencies": [ "ocaml@4.6.1003@d41d8cd9" ] - }, - "@opam/fpath@opam:0.7.2@3fd2da53": { - "id": "@opam/fpath@opam:0.7.2@3fd2da53", - "name": "@opam/fpath", - "version": "opam:0.7.2", - "source": { - "type": "install", - "source": [ - "archive:https://opam.ocaml.org/cache/md5/52/52c7ecb0bf180088336f3c645875fa41#md5:52c7ecb0bf180088336f3c645875fa41", - "archive:http://erratique.ch/software/fpath/releases/fpath-0.7.2.tbz#md5:52c7ecb0bf180088336f3c645875fa41" - ], - "opam": { - "name": "fpath", - "version": "0.7.2", - "path": "esy.lock/opam/fpath.0.7.2" - } - }, - "overrides": [], - "dependencies": [ - "ocaml@4.6.1003@d41d8cd9", "@opam/topkg@opam:1.0.3@e4e10f1c", - "@opam/result@opam:1.4@dc720aef", - "@opam/ocamlfind@opam:1.8.1@b7dc3072", - "@opam/ocamlbuild@opam:0.14.0@6ac75d03", - "@opam/astring@opam:0.8.3@1e8f8178", - "@esy-ocaml/substs@0.0.1@d41d8cd9" - ], - "devDependencies": [ - "ocaml@4.6.1003@d41d8cd9", "@opam/result@opam:1.4@dc720aef", - "@opam/astring@opam:0.8.3@1e8f8178" - ] - }, - "@opam/fmt@opam:0.8.9@e0843a5b": { - "id": "@opam/fmt@opam:0.8.9@e0843a5b", - "name": "@opam/fmt", - "version": "opam:0.8.9", - "source": { - "type": "install", - "source": [ - "archive:https://opam.ocaml.org/cache/md5/40/4001b51cde90ea4fd99a4a5033ecf411#md5:4001b51cde90ea4fd99a4a5033ecf411", - "archive:https://erratique.ch/software/fmt/releases/fmt-0.8.9.tbz#md5:4001b51cde90ea4fd99a4a5033ecf411" - ], - "opam": { - "name": "fmt", - "version": "0.8.9", - "path": "esy.lock/opam/fmt.0.8.9" - } - }, - "overrides": [], - "dependencies": [ - "ocaml@4.6.1003@d41d8cd9", "@opam/topkg@opam:1.0.3@e4e10f1c", - "@opam/stdlib-shims@opam:0.3.0@0d088929", - "@opam/seq@opam:0.2.2@e9144e45", - "@opam/ocamlfind@opam:1.8.1@b7dc3072", - "@opam/ocamlbuild@opam:0.14.0@6ac75d03", - "@opam/cmdliner@opam:1.0.2@1c17346c", - "@opam/base-unix@opam:base@87d0b2eb", - "@esy-ocaml/substs@0.0.1@d41d8cd9" - ], - "devDependencies": [ - "ocaml@4.6.1003@d41d8cd9", "@opam/stdlib-shims@opam:0.3.0@0d088929", - "@opam/seq@opam:0.2.2@e9144e45" - ] - }, - "@opam/easy-format@opam:1.3.2@0484b3c4": { - "id": "@opam/easy-format@opam:1.3.2@0484b3c4", - "name": "@opam/easy-format", - "version": "opam:1.3.2", - "source": { - "type": "install", - "source": [ - "archive:https://opam.ocaml.org/cache/sha256/34/3440c2b882d537ae5e9011eb06abb53f5667e651ea4bb3b460ea8230fa8c1926#sha256:3440c2b882d537ae5e9011eb06abb53f5667e651ea4bb3b460ea8230fa8c1926", - "archive:https://github.com/mjambon/easy-format/releases/download/1.3.2/easy-format-1.3.2.tbz#sha256:3440c2b882d537ae5e9011eb06abb53f5667e651ea4bb3b460ea8230fa8c1926" - ], - "opam": { - "name": "easy-format", - "version": "1.3.2", - "path": "esy.lock/opam/easy-format.1.3.2" - } - }, - "overrides": [], - "dependencies": [ - "ocaml@4.6.1003@d41d8cd9", "@opam/dune@opam:2.7.1@baccb77f", - "@esy-ocaml/substs@0.0.1@d41d8cd9" - ], - "devDependencies": [ - "ocaml@4.6.1003@d41d8cd9", "@opam/dune@opam:2.7.1@baccb77f" - ] - }, - "@opam/dune@opam:2.7.1@baccb77f": { - "id": "@opam/dune@opam:2.7.1@baccb77f", - "name": "@opam/dune", - "version": "opam:2.7.1", - "source": { - "type": "install", - "source": [ - "archive:https://opam.ocaml.org/cache/sha256/c3/c3528f2f8b3a2e3fe18e166fc823e6caeee8b7c78ade6b6fe4d2fa978070925d#sha256:c3528f2f8b3a2e3fe18e166fc823e6caeee8b7c78ade6b6fe4d2fa978070925d", - "archive:https://github.com/ocaml/dune/releases/download/2.7.1/dune-2.7.1.tbz#sha256:c3528f2f8b3a2e3fe18e166fc823e6caeee8b7c78ade6b6fe4d2fa978070925d" - ], - "opam": { - "name": "dune", - "version": "2.7.1", - "path": "esy.lock/opam/dune.2.7.1" - } - }, - "overrides": [ - { - "opamoverride": - "esy.lock/overrides/opam__s__dune_opam__c__2.7.1_opam_override" - } - ], - "dependencies": [ - "ocaml@4.6.1003@d41d8cd9", - "@opam/ocamlfind-secondary@opam:1.8.1@1afa38b2", - "@opam/base-unix@opam:base@87d0b2eb", - "@opam/base-threads@opam:base@36803084", - "@esy-ocaml/substs@0.0.1@d41d8cd9" - ], - "devDependencies": [ - "ocaml@4.6.1003@d41d8cd9", - "@opam/ocamlfind-secondary@opam:1.8.1@1afa38b2", - "@opam/base-unix@opam:base@87d0b2eb", - "@opam/base-threads@opam:base@36803084" - ] - }, - "@opam/cppo@opam:1.6.5@f8ff4f1a": { - "id": "@opam/cppo@opam:1.6.5@f8ff4f1a", - "name": "@opam/cppo", - "version": "opam:1.6.5", - "source": { - "type": "install", - "source": [ - "archive:https://opam.ocaml.org/cache/md5/1c/1cd25741d31417995b0973fe0b6f6c82#md5:1cd25741d31417995b0973fe0b6f6c82", - "archive:https://github.com/mjambon/cppo/archive/v1.6.5.tar.gz#md5:1cd25741d31417995b0973fe0b6f6c82" - ], - "opam": { - "name": "cppo", - "version": "1.6.5", - "path": "esy.lock/opam/cppo.1.6.5" - } - }, - "overrides": [], - "dependencies": [ - "ocaml@4.6.1003@d41d8cd9", - "@opam/jbuilder@opam:1.0+beta20.2@053ddcf2", - "@opam/base-unix@opam:base@87d0b2eb", - "@esy-ocaml/substs@0.0.1@d41d8cd9" - ], - "devDependencies": [ - "ocaml@4.6.1003@d41d8cd9", - "@opam/jbuilder@opam:1.0+beta20.2@053ddcf2", - "@opam/base-unix@opam:base@87d0b2eb" - ] - }, - "@opam/conf-m4@opam:1@196bf219": { - "id": "@opam/conf-m4@opam:1@196bf219", - "name": "@opam/conf-m4", - "version": "opam:1", - "source": { - "type": "install", - "source": [ "no-source:" ], - "opam": { - "name": "conf-m4", - "version": "1", - "path": "esy.lock/opam/conf-m4.1" - } - }, - "overrides": [ - { - "opamoverride": - "esy.lock/overrides/opam__s__conf_m4_opam__c__1_opam_override" - } - ], - "dependencies": [ - "esy-m4@github:esy-packages/esy-m4#c7cf0ac9221be2b1f9d90e83559ca08397a629e7@d41d8cd9", - "@esy-ocaml/substs@0.0.1@d41d8cd9" - ], - "devDependencies": [] - }, - "@opam/cmdliner@opam:1.0.2@1c17346c": { - "id": "@opam/cmdliner@opam:1.0.2@1c17346c", - "name": "@opam/cmdliner", - "version": "opam:1.0.2", - "source": { - "type": "install", - "source": [ - "archive:https://opam.ocaml.org/cache/md5/ab/ab2f0130e88e8dcd723ac6154c98a881#md5:ab2f0130e88e8dcd723ac6154c98a881", - "archive:http://erratique.ch/software/cmdliner/releases/cmdliner-1.0.2.tbz#md5:ab2f0130e88e8dcd723ac6154c98a881" - ], - "opam": { - "name": "cmdliner", - "version": "1.0.2", - "path": "esy.lock/opam/cmdliner.1.0.2" - } - }, - "overrides": [], - "dependencies": [ - "ocaml@4.6.1003@d41d8cd9", "@opam/topkg@opam:1.0.3@e4e10f1c", - "@opam/result@opam:1.4@dc720aef", - "@opam/ocamlfind@opam:1.8.1@b7dc3072", - "@opam/ocamlbuild@opam:0.14.0@6ac75d03", - "@esy-ocaml/substs@0.0.1@d41d8cd9" - ], - "devDependencies": [ - "ocaml@4.6.1003@d41d8cd9", "@opam/result@opam:1.4@dc720aef" - ] - }, - "@opam/bisect_ppx@opam:2.4.1@dfb4bc5f": { - "id": "@opam/bisect_ppx@opam:2.4.1@dfb4bc5f", - "name": "@opam/bisect_ppx", - "version": "opam:2.4.1", - "source": { - "type": "install", - "source": [ - "archive:https://opam.ocaml.org/cache/md5/95/9551a49de6b80aa7caf20ec693387c86#md5:9551a49de6b80aa7caf20ec693387c86", - "archive:https://github.com/aantron/bisect_ppx/archive/2.4.1.tar.gz#md5:9551a49de6b80aa7caf20ec693387c86" - ], - "opam": { - "name": "bisect_ppx", - "version": "2.4.1", - "path": "esy.lock/opam/bisect_ppx.2.4.1" - } - }, - "overrides": [], - "dependencies": [ - "ocaml@4.6.1003@d41d8cd9", - "@opam/ppx_tools_versioned@opam:5.4.0@32d1a414", - "@opam/ocaml-migrate-parsetree@opam:1.8.0@caf9847c", - "@opam/dune@opam:2.7.1@baccb77f", - "@opam/cmdliner@opam:1.0.2@1c17346c", - "@opam/base-unix@opam:base@87d0b2eb", - "@esy-ocaml/substs@0.0.1@d41d8cd9" - ], - "devDependencies": [ - "ocaml@4.6.1003@d41d8cd9", - "@opam/ppx_tools_versioned@opam:5.4.0@32d1a414", - "@opam/ocaml-migrate-parsetree@opam:1.8.0@caf9847c", - "@opam/dune@opam:2.7.1@baccb77f", - "@opam/cmdliner@opam:1.0.2@1c17346c", - "@opam/base-unix@opam:base@87d0b2eb" - ] - }, - "@opam/biniou@opam:1.2.1@d7570399": { - "id": "@opam/biniou@opam:1.2.1@d7570399", - "name": "@opam/biniou", - "version": "opam:1.2.1", - "source": { - "type": "install", - "source": [ - "archive:https://opam.ocaml.org/cache/sha256/35/35546c68b1929a8e6d27a3b39ecd17b38303a0d47e65eb9d1480c2061ea84335#sha256:35546c68b1929a8e6d27a3b39ecd17b38303a0d47e65eb9d1480c2061ea84335", - "archive:https://github.com/mjambon/biniou/releases/download/1.2.1/biniou-1.2.1.tbz#sha256:35546c68b1929a8e6d27a3b39ecd17b38303a0d47e65eb9d1480c2061ea84335" - ], - "opam": { - "name": "biniou", - "version": "1.2.1", - "path": "esy.lock/opam/biniou.1.2.1" - } - }, - "overrides": [], - "dependencies": [ - "ocaml@4.6.1003@d41d8cd9", "@opam/easy-format@opam:1.3.2@0484b3c4", - "@opam/dune@opam:2.7.1@baccb77f", "@esy-ocaml/substs@0.0.1@d41d8cd9" - ], - "devDependencies": [ - "ocaml@4.6.1003@d41d8cd9", "@opam/easy-format@opam:1.3.2@0484b3c4", - "@opam/dune@opam:2.7.1@baccb77f" - ] - }, - "@opam/base-unix@opam:base@87d0b2eb": { - "id": "@opam/base-unix@opam:base@87d0b2eb", - "name": "@opam/base-unix", - "version": "opam:base", - "source": { - "type": "install", - "source": [ "no-source:" ], - "opam": { - "name": "base-unix", - "version": "base", - "path": "esy.lock/opam/base-unix.base" - } - }, - "overrides": [], - "dependencies": [ "@esy-ocaml/substs@0.0.1@d41d8cd9" ], - "devDependencies": [] - }, - "@opam/base-threads@opam:base@36803084": { - "id": "@opam/base-threads@opam:base@36803084", - "name": "@opam/base-threads", - "version": "opam:base", - "source": { - "type": "install", - "source": [ "no-source:" ], - "opam": { - "name": "base-threads", - "version": "base", - "path": "esy.lock/opam/base-threads.base" - } - }, - "overrides": [], - "dependencies": [ "@esy-ocaml/substs@0.0.1@d41d8cd9" ], - "devDependencies": [] - }, - "@opam/base-bytes@opam:base@19d0c2ff": { - "id": "@opam/base-bytes@opam:base@19d0c2ff", - "name": "@opam/base-bytes", - "version": "opam:base", - "source": { - "type": "install", - "source": [ "no-source:" ], - "opam": { - "name": "base-bytes", - "version": "base", - "path": "esy.lock/opam/base-bytes.base" - } - }, - "overrides": [], - "dependencies": [ - "ocaml@4.6.1003@d41d8cd9", "@opam/ocamlfind@opam:1.8.1@b7dc3072", - "@esy-ocaml/substs@0.0.1@d41d8cd9" - ], - "devDependencies": [ - "ocaml@4.6.1003@d41d8cd9", "@opam/ocamlfind@opam:1.8.1@b7dc3072" - ] - }, - "@opam/astring@opam:0.8.3@1e8f8178": { - "id": "@opam/astring@opam:0.8.3@1e8f8178", - "name": "@opam/astring", - "version": "opam:0.8.3", - "source": { - "type": "install", - "source": [ - "archive:https://opam.ocaml.org/cache/md5/c5/c5bf6352b9ac27fbeab342740f4fa870#md5:c5bf6352b9ac27fbeab342740f4fa870", - "archive:http://erratique.ch/software/astring/releases/astring-0.8.3.tbz#md5:c5bf6352b9ac27fbeab342740f4fa870" - ], - "opam": { - "name": "astring", - "version": "0.8.3", - "path": "esy.lock/opam/astring.0.8.3" - } - }, - "overrides": [], - "dependencies": [ - "ocaml@4.6.1003@d41d8cd9", "@opam/topkg@opam:1.0.3@e4e10f1c", - "@opam/ocamlfind@opam:1.8.1@b7dc3072", - "@opam/ocamlbuild@opam:0.14.0@6ac75d03", - "@opam/base-bytes@opam:base@19d0c2ff", - "@esy-ocaml/substs@0.0.1@d41d8cd9" - ], - "devDependencies": [ - "ocaml@4.6.1003@d41d8cd9", "@opam/base-bytes@opam:base@19d0c2ff" - ] - }, - "@opam/alcotest@opam:0.8.5@4bc922ed": { - "id": "@opam/alcotest@opam:0.8.5@4bc922ed", - "name": "@opam/alcotest", - "version": "opam:0.8.5", - "source": { - "type": "install", - "source": [ - "archive:https://opam.ocaml.org/cache/md5/2d/2db36741c413ab93391ecc1f983aa804#md5:2db36741c413ab93391ecc1f983aa804", - "archive:https://github.com/mirage/alcotest/releases/download/0.8.5/alcotest-0.8.5.tbz#md5:2db36741c413ab93391ecc1f983aa804" - ], - "opam": { - "name": "alcotest", - "version": "0.8.5", - "path": "esy.lock/opam/alcotest.0.8.5" - } - }, - "overrides": [], - "dependencies": [ - "ocaml@4.6.1003@d41d8cd9", "@opam/uuidm@opam:0.9.7@bf725775", - "@opam/result@opam:1.4@dc720aef", "@opam/fmt@opam:0.8.9@e0843a5b", - "@opam/dune@opam:2.7.1@baccb77f", - "@opam/cmdliner@opam:1.0.2@1c17346c", - "@opam/astring@opam:0.8.3@1e8f8178", - "@esy-ocaml/substs@0.0.1@d41d8cd9" - ], - "devDependencies": [ - "ocaml@4.6.1003@d41d8cd9", "@opam/uuidm@opam:0.9.7@bf725775", - "@opam/result@opam:1.4@dc720aef", "@opam/fmt@opam:0.8.9@e0843a5b", - "@opam/dune@opam:2.7.1@baccb77f", - "@opam/cmdliner@opam:1.0.2@1c17346c", - "@opam/astring@opam:0.8.3@1e8f8178" - ] - }, - "@esy-ocaml/substs@0.0.1@d41d8cd9": { - "id": "@esy-ocaml/substs@0.0.1@d41d8cd9", - "name": "@esy-ocaml/substs", - "version": "0.0.1", - "source": { - "type": "install", - "source": [ - "archive:https://registry.npmjs.org/@esy-ocaml/substs/-/substs-0.0.1.tgz#sha1:59ebdbbaedcda123fc7ed8fb2b302b7d819e9a46" - ] - }, - "overrides": [], - "dependencies": [], - "devDependencies": [] - } - } -} \ No newline at end of file diff --git a/esy.lock/opam/alcotest.0.8.5/opam b/esy.lock/opam/alcotest.0.8.5/opam deleted file mode 100644 index 6b52889c2d..0000000000 --- a/esy.lock/opam/alcotest.0.8.5/opam +++ /dev/null @@ -1,43 +0,0 @@ -opam-version: "2.0" -maintainer: "thomas@gazagnaire.org" -authors: "Thomas Gazagnaire" -homepage: "https://github.com/mirage/alcotest/" -dev-repo: "git+https://github.com/mirage/alcotest.git" -bug-reports: "https://github.com/mirage/alcotest/issues/" -license: "ISC" -doc: "https://mirage.github.io/alcotest/" - -build: [ - ["dune" "subst"] {pinned} - ["dune" "build" "-p" name "-j" jobs] - ["dune" "runtest" "-p" name "-j" jobs] {with-test} -] - -depends: [ - "dune" {>= "1.1.0"} - "ocaml" {>= "4.02.3"} - "fmt" {>= "0.8.0"} - "astring" - "result" {< "1.5"} - "cmdliner" - "uuidm" -] - -synopsis: "Alcotest is a lightweight and colourful test framework" - -description: """ -Alcotest exposes simple interface to perform unit tests. It exposes -a simple TESTABLE module type, a check function to assert test -predicates and a run function to perform a list of unit -> unit -test callbacks. - -Alcotest provides a quiet and colorful output where only faulty runs -are fully displayed at the end of the run (with the full logs ready to -inspect), with a simple (yet expressive) query language to select the -tests to run. -""" -url { - src: - "https://github.com/mirage/alcotest/releases/download/0.8.5/alcotest-0.8.5.tbz" - checksum: "md5=2db36741c413ab93391ecc1f983aa804" -} diff --git a/esy.lock/opam/astring.0.8.3/opam b/esy.lock/opam/astring.0.8.3/opam deleted file mode 100644 index 3c0d191f8b..0000000000 --- a/esy.lock/opam/astring.0.8.3/opam +++ /dev/null @@ -1,38 +0,0 @@ -opam-version: "2.0" -maintainer: "Daniel Bünzli " -authors: ["Daniel Bünzli "] -homepage: "http://erratique.ch/software/astring" -doc: "http://erratique.ch/software/astring/doc" -dev-repo: "git+http://erratique.ch/repos/astring.git" -bug-reports: "https://github.com/dbuenzli/astring/issues" -tags: [ "string" "org:erratique" ] -license: "ISC" -depends: [ - "ocaml" {>= "4.01.0" & < "4.12.0"} - "ocamlfind" {build} - "ocamlbuild" {build} - "topkg" {build} - "base-bytes" -] -build: [[ - "ocaml" "pkg/pkg.ml" "build" - "--pinned" "%{pinned}%" ]] -synopsis: "Alternative String module for OCaml" -description: """ -Astring exposes an alternative `String` module for OCaml. This module -tries to balance minimality and expressiveness for basic, index-free, -string processing and provides types and functions for substrings, -string sets and string maps. - -Remaining compatible with the OCaml `String` module is a non-goal. The -`String` module exposed by Astring has exception safe functions, -removes deprecated and rarely used functions, alters some signatures -and names, adds a few missing functions and fully exploits OCaml's -newfound string immutability. - -Astring depends only on the OCaml standard library. It is distributed -under the ISC license.""" -url { - src: "http://erratique.ch/software/astring/releases/astring-0.8.3.tbz" - checksum: "md5=c5bf6352b9ac27fbeab342740f4fa870" -} diff --git a/esy.lock/opam/base-bytes.base/opam b/esy.lock/opam/base-bytes.base/opam deleted file mode 100644 index f1cae506c6..0000000000 --- a/esy.lock/opam/base-bytes.base/opam +++ /dev/null @@ -1,9 +0,0 @@ -opam-version: "2.0" -maintainer: " " -authors: " " -homepage: " " -depends: [ - "ocaml" {>= "4.02.0"} - "ocamlfind" {>= "1.5.3"} -] -synopsis: "Bytes library distributed with the OCaml compiler" diff --git a/esy.lock/opam/base-threads.base/opam b/esy.lock/opam/base-threads.base/opam deleted file mode 100644 index 914ff50ceb..0000000000 --- a/esy.lock/opam/base-threads.base/opam +++ /dev/null @@ -1,6 +0,0 @@ -opam-version: "2.0" -maintainer: "https://github.com/ocaml/opam-repository/issues" -description: """ -Threads library distributed with the OCaml compiler -""" - diff --git a/esy.lock/opam/base-unix.base/opam b/esy.lock/opam/base-unix.base/opam deleted file mode 100644 index b973540bcb..0000000000 --- a/esy.lock/opam/base-unix.base/opam +++ /dev/null @@ -1,6 +0,0 @@ -opam-version: "2.0" -maintainer: "https://github.com/ocaml/opam-repository/issues" -description: """ -Unix library distributed with the OCaml compiler -""" - diff --git a/esy.lock/opam/biniou.1.2.1/opam b/esy.lock/opam/biniou.1.2.1/opam deleted file mode 100644 index b706b4251a..0000000000 --- a/esy.lock/opam/biniou.1.2.1/opam +++ /dev/null @@ -1,45 +0,0 @@ -opam-version: "2.0" -build: [ - ["dune" "subst"] {pinned} - ["dune" "build" "-p" name "-j" jobs] - ["dune" "runtest" "-p" name "-j" jobs] {with-test} - ["dune" "build" "-p" name "@doc"] {with-doc} -] -maintainer: ["martin@mjambon.com"] -authors: ["Martin Jambon"] -bug-reports: "https://github.com/mjambon/biniou/issues" -homepage: "https://github.com/mjambon/biniou" -doc: "https://mjambon.github.io/biniou/" -license: "BSD-3-Clause" -dev-repo: "git+https://github.com/mjambon/biniou.git" -synopsis: - "Binary data format designed for speed, safety, ease of use and backward compatibility as protocols evolve" -description: """ - -Biniou (pronounced "be new") is a binary data format designed for speed, safety, -ease of use and backward compatibility as protocols evolve. Biniou is vastly -equivalent to JSON in terms of functionality but allows implementations several -times faster (4 times faster than yojson), with 25-35% space savings. - -Biniou data can be decoded into human-readable form without knowledge of type -definitions except for field and variant names which are represented by 31-bit -hashes. A program named bdump is provided for routine visualization of biniou -data files. - -The program atdgen is used to derive OCaml-Biniou serializers and deserializers -from type definitions. - -Biniou format specification: mjambon.github.io/atdgen-doc/biniou-format.txt""" -depends: [ - "easy-format" - "dune" {>= "1.10"} - "ocaml" {>= "4.02.3"} -] -url { - src: - "https://github.com/mjambon/biniou/releases/download/1.2.1/biniou-1.2.1.tbz" - checksum: [ - "sha256=35546c68b1929a8e6d27a3b39ecd17b38303a0d47e65eb9d1480c2061ea84335" - "sha512=82670cc77bf3e869ee26e5fbe5a5affa45a22bc8b6c4bd7e85473912780e0111baca59b34a2c14feae3543ce6e239d7fddaeab24b686a65bfe642cdb91d27ebf" - ] -} diff --git a/esy.lock/opam/bisect_ppx.2.4.1/opam b/esy.lock/opam/bisect_ppx.2.4.1/opam deleted file mode 100644 index 981cc68db0..0000000000 --- a/esy.lock/opam/bisect_ppx.2.4.1/opam +++ /dev/null @@ -1,55 +0,0 @@ -opam-version: "2.0" - -synopsis: "Code coverage for OCaml" -version: "2.4.1" -license: "MIT" -homepage: "https://github.com/aantron/bisect_ppx" -doc: "https://github.com/aantron/bisect_ppx" -bug-reports: "https://github.com/aantron/bisect_ppx/issues" - -dev-repo: "git+https://github.com/aantron/bisect_ppx.git" -authors: [ - "Xavier Clerc " - "Leonid Rozenberg " - "Anton Bachin " -] -maintainer: [ - "Anton Bachin " - "Leonid Rozenberg " -] - -depends: [ - "base-unix" - "cmdliner" {>= "1.0.0"} - "dune" - "ocaml" {>= "4.02.0"} - "ocaml" {with-test & < "4.12"} - "ocaml-migrate-parsetree" {>= "1.7.0" & < "2.0.0"} - "ppx_tools_versioned" {>= "5.4.0"} - - "ocamlfind" {with-test} - "ounit2" {with-test} -] - -build: [ - ["dune" "build" "-p" name "-j" jobs] - ["dune" "runtest" "-p" name "-j" jobs] {with-test} -] - -post-messages: [ - "Bisect_ppx 2.0.0 has deprecated some command-line options. See - https://github.com/aantron/bisect_ppx/releases/tag/2.0.0" -] - -description: "Bisect_ppx helps you test thoroughly. It is a small preprocessor -that inserts instrumentation at places in your code, such as if-then-else and -match expressions. After you run tests, Bisect_ppx gives a nice HTML report -showing which places were visited and which were missed. - -Usage is simple - add package bisect_ppx when building tests, run your tests, -then run the Bisect_ppx report tool on the generated visitation files." - -url { - src: "https://github.com/aantron/bisect_ppx/archive/2.4.1.tar.gz" - checksum: "md5=9551a49de6b80aa7caf20ec693387c86" -} diff --git a/esy.lock/opam/cmdliner.1.0.2/opam b/esy.lock/opam/cmdliner.1.0.2/opam deleted file mode 100644 index e53d593ef4..0000000000 --- a/esy.lock/opam/cmdliner.1.0.2/opam +++ /dev/null @@ -1,39 +0,0 @@ -opam-version: "2.0" -maintainer: "Daniel Bünzli " -authors: ["Daniel Bünzli "] -homepage: "http://erratique.ch/software/cmdliner" -doc: "http://erratique.ch/software/cmdliner/doc/Cmdliner" -dev-repo: "git+http://erratique.ch/repos/cmdliner.git" -bug-reports: "https://github.com/dbuenzli/cmdliner/issues" -tags: [ "cli" "system" "declarative" "org:erratique" ] -license: "ISC" -depends: [ - "ocaml" {>= "4.01.0"} - "ocamlfind" {build} - "ocamlbuild" {build} - "topkg" {>= "0.8.1" & build} - "result" {< "1.5"} -] -build: [[ - "ocaml" "pkg/pkg.ml" "build" - "--pinned" "%{pinned}%" -]] -synopsis: "Declarative definition of command line interfaces for OCaml" -description: """ -Cmdliner allows the declarative definition of command line interfaces -for OCaml. - -It provides a simple and compositional mechanism to convert command -line arguments to OCaml values and pass them to your functions. The -module automatically handles syntax errors, help messages and UNIX man -page generation. It supports programs with single or multiple commands -and respects most of the [POSIX][1] and [GNU][2] conventions. - -Cmdliner has no dependencies and is distributed under the ISC license. - -[1]: http://pubs.opengroup.org/onlinepubs/009695399/basedefs/xbd_chap12.html -[2]: http://www.gnu.org/software/libc/manual/html_node/Argument-Syntax.html""" -url { - src: "http://erratique.ch/software/cmdliner/releases/cmdliner-1.0.2.tbz" - checksum: "md5=ab2f0130e88e8dcd723ac6154c98a881" -} diff --git a/esy.lock/opam/conf-m4.1/opam b/esy.lock/opam/conf-m4.1/opam deleted file mode 100644 index c6feb2a746..0000000000 --- a/esy.lock/opam/conf-m4.1/opam +++ /dev/null @@ -1,22 +0,0 @@ -opam-version: "2.0" -maintainer: "tim@gfxmonk.net" -homepage: "http://www.gnu.org/software/m4/m4.html" -bug-reports: "https://github.com/ocaml/opam-repository/issues" -authors: "GNU Project" -license: "GPL-3.0-only" -build: [["sh" "-exc" "echo | m4"]] -depexts: [ - ["m4"] {os-family = "debian"} - ["m4"] {os-distribution = "fedora"} - ["m4"] {os-distribution = "rhel"} - ["m4"] {os-distribution = "centos"} - ["m4"] {os-distribution = "alpine"} - ["m4"] {os-distribution = "nixos"} - ["m4"] {os-family = "suse"} - ["m4"] {os-distribution = "ol"} - ["m4"] {os-distribution = "arch"} -] -synopsis: "Virtual package relying on m4" -description: - "This package can only install if the m4 binary is installed on the system." -flags: conf diff --git a/esy.lock/opam/cppo.1.6.5/opam b/esy.lock/opam/cppo.1.6.5/opam deleted file mode 100644 index 6130ff3426..0000000000 --- a/esy.lock/opam/cppo.1.6.5/opam +++ /dev/null @@ -1,23 +0,0 @@ -opam-version: "2.0" -maintainer: "martin@mjambon.com" -authors: ["Martin Jambon"] -homepage: "https://github.com/mjambon/cppo" -dev-repo: "git+https://github.com/mjambon/cppo.git" -bug-reports: "https://github.com/mjambon/cppo/issues" -license: "BSD-3-Clause" - -build: [ - ["jbuilder" "subst" "-p" name] {pinned} - ["jbuilder" "build" "-p" name "-j" jobs] - ["jbuilder" "runtest" "-p" name] {with-test} -] -depends: [ - "ocaml" - "jbuilder" {>= "1.0+beta17"} - "base-unix" -] -synopsis: "Equivalent of the C preprocessor for OCaml programs" -url { - src: "https://github.com/mjambon/cppo/archive/v1.6.5.tar.gz" - checksum: "md5=1cd25741d31417995b0973fe0b6f6c82" -} diff --git a/esy.lock/opam/dune.2.7.1/opam b/esy.lock/opam/dune.2.7.1/opam deleted file mode 100644 index 3b175872c1..0000000000 --- a/esy.lock/opam/dune.2.7.1/opam +++ /dev/null @@ -1,56 +0,0 @@ -opam-version: "2.0" -synopsis: "Fast, portable, and opinionated build system" -description: """ - -dune is a build system that was designed to simplify the release of -Jane Street packages. It reads metadata from "dune" files following a -very simple s-expression syntax. - -dune is fast, has very low-overhead, and supports parallel builds on -all platforms. It has no system dependencies; all you need to build -dune or packages using dune is OCaml. You don't need make or bash -as long as the packages themselves don't use bash explicitly. - -dune supports multi-package development by simply dropping multiple -repositories into the same directory. - -It also supports multi-context builds, such as building against -several opam roots/switches simultaneously. This helps maintaining -packages across several versions of OCaml and gives cross-compilation -for free. -""" -maintainer: ["Jane Street Group, LLC "] -authors: ["Jane Street Group, LLC "] -license: "MIT" -homepage: "https://github.com/ocaml/dune" -doc: "https://dune.readthedocs.io/" -bug-reports: "https://github.com/ocaml/dune/issues" -conflicts: [ - "dune-configurator" {< "2.3.0"} - "odoc" {< "1.3.0"} - "dune-release" {< "1.3.0"} - "js_of_ocaml-compiler" {< "3.6.0"} - "jbuilder" {= "transition"} -] -dev-repo: "git+https://github.com/ocaml/dune.git" -build: [ - # opam 2 sets OPAM_SWITCH_PREFIX, so we don't need a hardcoded path - ["ocaml" "configure.ml" "--libdir" lib] {opam-version < "2"} - ["ocaml" "bootstrap.ml" "-j" jobs] - ["./dune.exe" "build" "-p" name "--profile" "dune-bootstrap" "-j" jobs] -] -depends: [ - # Please keep the lower bound in sync with .github/workflows/workflow.yml, - # dune-project and min_ocaml_version in bootstrap.ml - ("ocaml" {>= "4.08" & < "4.12"} | ("ocaml" {< "4.08~~"} & "ocamlfind-secondary")) - "base-unix" - "base-threads" -] -x-commit-hash: "5472766b2448308a7160dfd0fca1ec711e124a5c" -url { - src: "https://github.com/ocaml/dune/releases/download/2.7.1/dune-2.7.1.tbz" - checksum: [ - "sha256=c3528f2f8b3a2e3fe18e166fc823e6caeee8b7c78ade6b6fe4d2fa978070925d" - "sha512=2b4b311824471dac8196181d7c7267f96b1b73f35341b72019f169cf6d42a19254e90bdfba2d3ecb138ad318e2e2431dd0ec6c38d9efe1da382ec95f5d9e959b" - ] -} diff --git a/esy.lock/opam/easy-format.1.3.2/opam b/esy.lock/opam/easy-format.1.3.2/opam deleted file mode 100644 index 138d0fb23e..0000000000 --- a/esy.lock/opam/easy-format.1.3.2/opam +++ /dev/null @@ -1,46 +0,0 @@ -opam-version: "2.0" -build: [ - ["dune" "subst"] {pinned} - ["dune" "build" "-p" name "-j" jobs] - ["dune" "runtest" "-p" name "-j" jobs] {with-test} - ["dune" "build" "-p" name "@doc"] {with-doc} -] -maintainer: ["martin@mjambon.com" "rudi.grinberg@gmail.com"] -authors: ["Martin Jambon"] -bug-reports: "https://github.com/mjambon/easy-format/issues" -homepage: "https://github.com/mjambon/easy-format" -doc: "https://mjambon.github.io/easy-format/" -license: "BSD-3-Clause" -dev-repo: "git+https://github.com/mjambon/easy-format.git" -synopsis: - "High-level and functional interface to the Format module of the OCaml standard library" -description: """ - -This module offers a high-level and functional interface to the Format module of -the OCaml standard library. It is a pretty-printing facility, i.e. it takes as -input some code represented as a tree and formats this code into the most -visually satisfying result, breaking and indenting lines of code where -appropriate. - -Input data must be first modelled and converted into a tree using 3 kinds of -nodes: - -* atoms -* lists -* labelled nodes - -Atoms represent any text that is guaranteed to be printed as-is. Lists can model -any sequence of items such as arrays of data or lists of definitions that are -labelled with something like "int main", "let x =" or "x:".""" -depends: [ - "dune" {>= "1.10"} - "ocaml" {>= "4.02.3"} -] -url { - src: - "https://github.com/mjambon/easy-format/releases/download/1.3.2/easy-format-1.3.2.tbz" - checksum: [ - "sha256=3440c2b882d537ae5e9011eb06abb53f5667e651ea4bb3b460ea8230fa8c1926" - "sha512=e39377a2ff020ceb9ac29e8515a89d9bdbc91dfcfa871c4e3baafa56753fac2896768e5d9822a050dc1e2ade43c8967afb69391a386c0a8ecd4e1f774e236135" - ] -} diff --git a/esy.lock/opam/fmt.0.8.9/opam b/esy.lock/opam/fmt.0.8.9/opam deleted file mode 100644 index 6751a891f6..0000000000 --- a/esy.lock/opam/fmt.0.8.9/opam +++ /dev/null @@ -1,44 +0,0 @@ -opam-version: "2.0" -maintainer: "Daniel Bünzli " -authors: [ "The fmt programmers" ] -homepage: "https://erratique.ch/software/fmt" -doc: "https://erratique.ch/software/fmt" -dev-repo: "git+https://erratique.ch/repos/fmt.git" -bug-reports: "https://github.com/dbuenzli/fmt/issues" -tags: [ "string" "format" "pretty-print" "org:erratique" ] -license: "ISC" -depends: [ - "ocaml" {>= "4.05.0"} - "ocamlfind" {build} - "ocamlbuild" {build} - "topkg" {build & >= "0.9.0"} - # Can be removed once ocaml >= 4.07 - "seq" - "stdlib-shims" -] -depopts: [ "base-unix" "cmdliner" ] -conflicts: [ "cmdliner" {< "0.9.8"} ] -build: [[ - "ocaml" "pkg/pkg.ml" "build" - "--dev-pkg" "%{pinned}%" - "--with-base-unix" "%{base-unix:installed}%" - "--with-cmdliner" "%{cmdliner:installed}%" ]] - -synopsis: """OCaml Format pretty-printer combinators""" -description: """\ - -Fmt exposes combinators to devise `Format` pretty-printing functions. - -Fmt depends only on the OCaml standard library. The optional `Fmt_tty` -library that allows to setup formatters for terminal color output -depends on the Unix library. The optional `Fmt_cli` library that -provides command line support for Fmt depends on [`Cmdliner`][cmdliner]. - -Fmt is distributed under the ISC license. - -[cmdliner]: http://erratique.ch/software/cmdliner -""" -url { -archive: "https://erratique.ch/software/fmt/releases/fmt-0.8.9.tbz" -checksum: "4001b51cde90ea4fd99a4a5033ecf411" -} diff --git a/esy.lock/opam/fpath.0.7.2/opam b/esy.lock/opam/fpath.0.7.2/opam deleted file mode 100644 index f90f49ff02..0000000000 --- a/esy.lock/opam/fpath.0.7.2/opam +++ /dev/null @@ -1,34 +0,0 @@ -opam-version: "2.0" -maintainer: "Daniel Bünzli " -authors: ["Daniel Bünzli "] -homepage: "http://erratique.ch/software/fpath" -doc: "http://erratique.ch/software/fpath/doc" -dev-repo: "git+http://erratique.ch/repos/fpath.git" -bug-reports: "https://github.com/dbuenzli/fpath/issues" -tags: [ "file" "system" "path" "org:erratique" ] -license: "ISC" -depends: [ - "ocaml" {>= "4.01.0" & < "4.12"} - "ocamlfind" {build} - "ocamlbuild" {build} - "topkg" {build & >= "0.9.0"} - "result" - "astring" -] -build: [[ - "ocaml" "pkg/pkg.ml" "build" - "--dev-pkg" "%{pinned}%" ]] -synopsis: "File system paths for OCaml" -description: """ -Fpath is an OCaml module for handling file system paths with POSIX or -Windows conventions. Fpath processes paths without accessing the file -system and is independent from any system library. - -Fpath depends on [Astring][astring] and is distributed under the ISC -license. - -[astring]: http://erratique.ch/software/astring""" -url { - src: "http://erratique.ch/software/fpath/releases/fpath-0.7.2.tbz" - checksum: "md5=52c7ecb0bf180088336f3c645875fa41" -} diff --git a/esy.lock/opam/jbuilder.1.0+beta20.2/opam b/esy.lock/opam/jbuilder.1.0+beta20.2/opam deleted file mode 100644 index 2e411c9e17..0000000000 --- a/esy.lock/opam/jbuilder.1.0+beta20.2/opam +++ /dev/null @@ -1,39 +0,0 @@ -opam-version: "2.0" -maintainer: "opensource@janestreet.com" -authors: ["Jane Street Group, LLC "] -homepage: "https://github.com/ocaml/dune" -bug-reports: "https://github.com/ocaml/dune/issues" -dev-repo: "git+https://github.com/ocaml/dune.git" -license: "Apache-2.0" -build: [ - ["ocaml" "configure.ml" "--libdir" lib] - ["ocaml" "bootstrap.ml"] - ["./boot.exe" "--subst"] {pinned} - ["./boot.exe" "-j" jobs] -] -synopsis: "Fast, portable and opinionated build system" -description: """ -jbuilder is a build system that was designed to simplify the release -of Jane Street packages. It reads metadata from "jbuild" files -following a very simple s-expression syntax. - -jbuilder is fast, it has very low-overhead and support parallel builds -on all platforms. It has no system dependencies, all you need to build -jbuilder and packages using jbuilder is OCaml. You don't need or make -or bash as long as the packages themselves don't use bash explicitely. - -jbuilder supports multi-package development by simply dropping multiple -repositories into the same directory. - -It also supports multi-context builds, such as building against -several opam roots/switches simultaneously. This helps maintaining -packages across several versions of OCaml and gives cross-compilation -for free.""" -depends: [ - "ocaml" {>= "4.02.3"} -] -url { - src: - "https://github.com/ocaml/dune/releases/download/1.0%2Bbeta20.2/jbuilder-1.0+beta20.2.tbz" - checksum: "md5=fbe8c3b1facb206cac3fb8932b5dd5d9" -} diff --git a/esy.lock/opam/lambdasoup.0.7.1/opam b/esy.lock/opam/lambdasoup.0.7.1/opam deleted file mode 100644 index 3dd3328236..0000000000 --- a/esy.lock/opam/lambdasoup.0.7.1/opam +++ /dev/null @@ -1,46 +0,0 @@ -opam-version: "2.0" - -synopsis: "Easy functional HTML scraping and manipulation with CSS selectors" - -version: "0.7.1" -license: "MIT" -homepage: "https://github.com/aantron/lambdasoup" -doc: "https://aantron.github.io/lambdasoup" -bug-reports: "https://github.com/aantron/lambdasoup/issues" - -authors: "Anton Bachin " -maintainer: "Anton Bachin " -dev-repo: "git+https://github.com/aantron/lambdasoup.git" - -depends: [ - # As a consequence of depending on Dune, Lambda Soup requires OCaml 4.02.3. - "dune" - "markup" {>= "0.7.1"} - "ocaml" {>= "4.02.0"} - - "bisect_ppx" {dev & >= "2.0.0"} - "ounit" {with-test} -] - -build: [ - ["dune" "build" "-p" name "-j" jobs] - ["dune" "runtest" "-p" name "-j" jobs] {with-test} -] - -description: """ -Lambda Soup is an HTML scraping library inspired by Python's Beautiful Soup. It -provides lazy traversals from HTML nodes to their parents, children, siblings, -etc., and to nodes matching CSS selectors. The traversals can be manipulated -using standard functional combinators such as fold, filter, and map. - -The DOM tree is mutable. You can use Lambda Soup for automatic HTML rewriting in -scripts. Lambda Soup rewrites its own ocamldoc page this way. - -A major goal of Lambda Soup is to be easy to use, including in interactive -sessions, and to have a minimal learning curve. It is a very simple library. -""" - -url { - src: "https://github.com/aantron/lambdasoup/archive/0.7.1.tar.gz" - checksum: "md5=da9884ec354960d0c76e4bb834042fb8" -} diff --git a/esy.lock/opam/merlin.3.3.9/opam b/esy.lock/opam/merlin.3.3.9/opam deleted file mode 100644 index a4fab62051..0000000000 --- a/esy.lock/opam/merlin.3.3.9/opam +++ /dev/null @@ -1,71 +0,0 @@ -opam-version: "2.0" -maintainer: "defree@gmail.com" -authors: "The Merlin team" -homepage: "https://github.com/ocaml/merlin" -bug-reports: "https://github.com/ocaml/merlin/issues" -dev-repo: "git+https://github.com/ocaml/merlin.git" -build: [ - ["dune" "subst"] {pinned} - ["dune" "build" "-p" name "-j" jobs] - ["dune" "runtest" "-p" name "-j" "1"] {with-test & os != "macos" & ocaml:version >= "4.03"} -] -depends: [ - "ocaml" {>= "4.02.3" & < "4.12"} - "dune" {>= "1.8.0"} - "ocamlfind" {>= "1.5.2"} - "yojson" {>= "1.6.0"} - "mdx" {with-test & >= "1.3.0"} - "conf-jq" {with-test} -] -synopsis: - "Editor helper, provides completion, typing and source browsing in Vim and Emacs" -description: - "Merlin is an assistant for editing OCaml code. It aims to provide the features available in modern IDEs: error reporting, auto completion, source browsing and much more." -post-messages: [ - "merlin installed. - -Quick setup for VIM -------------------- -Append this to your .vimrc to add merlin to vim's runtime-path: - let g:opamshare = substitute(system('opam config var share'),'\\n$','','''') - execute \"set rtp+=\" . g:opamshare . \"/merlin/vim\" - -Also run the following line in vim to index the documentation: - :execute \"helptags \" . g:opamshare . \"/merlin/vim/doc\" - -Quick setup for EMACS -------------------- -Add opam emacs directory to your load-path by appending this to your .emacs: - (let ((opam-share (ignore-errors (car (process-lines \"opam\" \"config\" \"var\" \"share\"))))) - (when (and opam-share (file-directory-p opam-share)) - ;; Register Merlin - (add-to-list 'load-path (expand-file-name \"emacs/site-lisp\" opam-share)) - (autoload 'merlin-mode \"merlin\" nil t nil) - ;; Automatically start it in OCaml buffers - (add-hook 'tuareg-mode-hook 'merlin-mode t) - (add-hook 'caml-mode-hook 'merlin-mode t) - ;; Use opam switch to lookup ocamlmerlin binary - (setq merlin-command 'opam))) - -Take a look at https://github.com/ocaml/merlin for more information - -Quick setup with opam-user-setup --------------------------------- - -Opam-user-setup support Merlin. - - $ opam user-setup install - -should take care of basic setup. -See https://github.com/OCamlPro/opam-user-setup -" - {success & !user-setup:installed} -] -url { - src: - "https://github.com/ocaml/merlin/releases/download/v3.3.9/merlin-v3.3.9.tbz" - checksum: [ - "sha256=a3170f1a993d810d552a21a4baa328dff0fe9ac9bf4b8aa6ba3f179a9240cf02" - "sha512=63034766c7dc7de21e3ce8624ed760a9d76b79cacbee8c17ecef2c62df00438ebd84f43a0d558cf8d9c4a800dac99e4b2f25c324f363a590cc294e46420f46aa" - ] -} diff --git a/esy.lock/opam/ocaml-migrate-parsetree.1.8.0/opam b/esy.lock/opam/ocaml-migrate-parsetree.1.8.0/opam deleted file mode 100644 index 84f1fae4a4..0000000000 --- a/esy.lock/opam/ocaml-migrate-parsetree.1.8.0/opam +++ /dev/null @@ -1,38 +0,0 @@ -opam-version: "2.0" -maintainer: "frederic.bour@lakaban.net" -authors: [ - "Frédéric Bour " - "Jérémie Dimino " -] -license: "LGPL-2.1 with OCaml linking exception" -homepage: "https://github.com/ocaml-ppx/ocaml-migrate-parsetree" -bug-reports: "https://github.com/ocaml-ppx/ocaml-migrate-parsetree/issues" -dev-repo: "git+https://github.com/ocaml-ppx/ocaml-migrate-parsetree.git" -doc: "https://ocaml-ppx.github.io/ocaml-migrate-parsetree/" -tags: [ "syntax" "org:ocamllabs" ] -build: [ - ["dune" "build" "-p" name "-j" jobs] -] -depends: [ - "result" - "ppx_derivers" - "dune" {>= "1.9.0"} - "ocaml" {>= "4.02.3" & < "4.13"} -] -synopsis: "Convert OCaml parsetrees between different versions" -description: """ -Convert OCaml parsetrees between different versions - -This library converts parsetrees, outcometree and ast mappers between -different OCaml versions. High-level functions help making PPX -rewriters independent of a compiler version. -""" -x-commit-hash: "1d72648812bb235d1576f483cacdf546e25c03d8" -url { - src: - "https://github.com/ocaml-ppx/ocaml-migrate-parsetree/releases/download/v1.8.0/ocaml-migrate-parsetree-v1.8.0.tbz" - checksum: [ - "sha256=b1c2d176ff1444041f2775786ba605be796e46dfd2acb06c96f35d2bb88b8fb5" - "sha512=c14ffacbba9fda34243b3e8310ce49414415b530bbd982eaa6c1891517c5a9a6a35887afa7d6f15f7f94e225a7f15cc25417fd3337e685d4a7d6ee160e50e66e" - ] -} diff --git a/esy.lock/opam/ocaml-secondary-compiler.4.08.1-1/files/0001-Don-t-build-manpages-for-stdlib-docs.patch b/esy.lock/opam/ocaml-secondary-compiler.4.08.1-1/files/0001-Don-t-build-manpages-for-stdlib-docs.patch deleted file mode 100644 index cda19dd2d7..0000000000 --- a/esy.lock/opam/ocaml-secondary-compiler.4.08.1-1/files/0001-Don-t-build-manpages-for-stdlib-docs.patch +++ /dev/null @@ -1,24 +0,0 @@ -From 0cf3c6ad7ce2a2b2806faceccfb0a9321da5e22a Mon Sep 17 00:00:00 2001 -From: David Allsopp -Date: Fri, 26 Jul 2019 12:12:19 +0100 -Subject: [PATCH] Don't build manpages for stdlib docs ---- - ocamldoc/Makefile | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -diff --git a/ocamldoc/Makefile b/ocamldoc/Makefile -index b109815071..e31e441f61 100644 ---- a/ocamldoc/Makefile -+++ b/ocamldoc/Makefile -@@ -170,7 +170,7 @@ LIBCMIFILES = $(LIBCMOFILES:.cmo=.cmi) - - - .PHONY: all --all: lib exe generators manpages -+all: lib exe generators - - manpages: generators - --- -2.20.1 - diff --git a/esy.lock/opam/ocaml-secondary-compiler.4.08.1-1/files/0001-Fix-failure-to-install-tools-links.patch b/esy.lock/opam/ocaml-secondary-compiler.4.08.1-1/files/0001-Fix-failure-to-install-tools-links.patch deleted file mode 100644 index 41f5f77048..0000000000 --- a/esy.lock/opam/ocaml-secondary-compiler.4.08.1-1/files/0001-Fix-failure-to-install-tools-links.patch +++ /dev/null @@ -1,26 +0,0 @@ -From 705739fa54260b7a0e6cbba0b5a99e52c79f9c09 Mon Sep 17 00:00:00 2001 -From: David Allsopp -Date: Tue, 6 Aug 2019 09:23:06 +0100 -Subject: [PATCH] Fix failure to install tools links - -In --disable-installing-bytecode-programs mode, the .opt version of the -tools is installed, but the symlink for the tool itself is not created. ---- - tools/Makefile | 1 + - 1 file changed, 1 insertion(+) - -diff --git a/tools/Makefile b/tools/Makefile -index 530dd37f34..1b3014a3ab 100644 ---- a/tools/Makefile -+++ b/tools/Makefile -@@ -197,6 +197,7 @@ else - do \ - if test -f "$$i".opt; then \ - $(INSTALL_PROG) "$$i.opt" "$(INSTALL_BINDIR)/$$i.opt$(EXE)"; \ -+ (cd "$(INSTALL_BINDIR)/" && $(LN) "$$i.opt$(EXE)" "$$i$(EXE)"); \ - fi; \ - done - endif --- -2.20.1 - diff --git a/esy.lock/opam/ocaml-secondary-compiler.4.08.1-1/files/fix-gcc10.patch b/esy.lock/opam/ocaml-secondary-compiler.4.08.1-1/files/fix-gcc10.patch deleted file mode 100644 index e37b5e883c..0000000000 --- a/esy.lock/opam/ocaml-secondary-compiler.4.08.1-1/files/fix-gcc10.patch +++ /dev/null @@ -1,34 +0,0 @@ -commit 3f10a16153308f967149917585d2bc0b9c06492c -Author: Anil Madhavapeddy -Date: Sun Jun 21 18:40:27 2020 +0100 - - Add `-fcommon` unconditionally to CFLAGS to fix gcc10 build - - Signed-off-by: Anil Madhavapeddy - -diff --git a/configure b/configure -index 9a78a4554..0c54b560b 100755 ---- a/configure -+++ b/configure -@@ -12424,7 +12424,7 @@ $as_echo "$as_me: WARNING: Consider using GCC version 4.2 or above." >&2;}; - -fno-builtin-memcmp"; - internal_cflags="$gcc_warnings" ;; #( - gcc-*) : -- common_cflags="-O2 -fno-strict-aliasing -fwrapv"; -+ common_cflags="-O2 -fno-strict-aliasing -fwrapv -fcommon"; - internal_cflags="$gcc_warnings" ;; #( - msvc-*) : - common_cflags="-nologo -O2 -Gy- -MD" -diff --git a/configure.ac b/configure.ac -index f5d8a2687..775e0e2db 100644 ---- a/configure.ac -+++ b/configure.ac -@@ -540,7 +540,7 @@ AS_CASE([$host], - -fno-builtin-memcmp"; - internal_cflags="$gcc_warnings"], - [gcc-*], -- [common_cflags="-O2 -fno-strict-aliasing -fwrapv"; -+ [common_cflags="-O2 -fno-strict-aliasing -fwrapv -fcommon"; - internal_cflags="$gcc_warnings"], - [msvc-*], - [common_cflags="-nologo -O2 -Gy- -MD" diff --git a/esy.lock/opam/ocaml-secondary-compiler.4.08.1-1/opam b/esy.lock/opam/ocaml-secondary-compiler.4.08.1-1/opam deleted file mode 100644 index 905f9b3dde..0000000000 --- a/esy.lock/opam/ocaml-secondary-compiler.4.08.1-1/opam +++ /dev/null @@ -1,51 +0,0 @@ -opam-version: "2.0" -synopsis: "OCaml 4.08.1 Secondary Switch Compiler" -maintainer: "platform@lists.ocaml.org" -authors: "Xavier Leroy and many contributors" -homepage: "https://ocaml.org" -bug-reports: "https://github.com/ocaml/ocaml/issues" -dev-repo: "git://github.com/ocaml/ocaml" -depends: "ocaml" {< "4.08.0" | >= "4.09~"} -build: [ - [ - "./configure" - "--prefix=%{_:share}%" - "--libdir=%{_:share}%/lib" - "--disable-debugger" - "--disable-installing-bytecode-programs" - "--disable-debug-runtime" - "--disable-instrumented-runtime" - "--disable-graph-lib" - "CC=cc" {os = "openbsd" | os = "freebsd" | os = "macos"} - "ASPP=cc -c" {os = "openbsd" | os = "freebsd" | os = "macos"} - ] - [make "-j%{jobs}%" {os != "cygwin"} "world.opt"] -] -install: [make "install"] -url { - src: "https://github.com/ocaml/ocaml/archive/4.08.1.tar.gz" - checksum: "md5=723b6bfe8cf5abcbccc6911143f71055" -} -extra-files: [ - ["0001-Don-t-build-manpages-for-stdlib-docs.patch" "md5=6caa580fe6031c109d2dc96b19bd40cd"] - ["0001-Fix-failure-to-install-tools-links.patch" "md5=e973762c0b3d62b0b25a26468086fae3"] - ["fix-gcc10.patch" "md5=17ecd696a8f5647a4c543280599f6974"] -] -patches: [ - "0001-Don-t-build-manpages-for-stdlib-docs.patch" - "0001-Fix-failure-to-install-tools-links.patch" - "fix-gcc10.patch" -] - -post-messages: [ - "A failure in the middle of the build may be caused by build parallelism - (enabled by default). - Please file a bug report at https://github.com/ocaml/ocaml/issues" - {failure & jobs > 1 & os != "cygwin"} - "You can try installing again including --jobs=1 - to force a sequential build instead." - {failure & jobs > 1 & os != "cygwin" & opam-version >= "2.0.5"} -] -description: "Installs an additional compiler to the opam switch in -%{_:share}%/ocaml-secondary-compiler which can be accessed using -`ocamlfind -toolchain secondary`." diff --git a/esy.lock/opam/ocamlbuild.0.14.0/opam b/esy.lock/opam/ocamlbuild.0.14.0/opam deleted file mode 100644 index 8deabeedfb..0000000000 --- a/esy.lock/opam/ocamlbuild.0.14.0/opam +++ /dev/null @@ -1,36 +0,0 @@ -opam-version: "2.0" -maintainer: "Gabriel Scherer " -authors: ["Nicolas Pouillard" "Berke Durak"] -homepage: "https://github.com/ocaml/ocamlbuild/" -bug-reports: "https://github.com/ocaml/ocamlbuild/issues" -license: "LGPL-2.1-only with OCaml-LGPL-linking-exception" -doc: "https://github.com/ocaml/ocamlbuild/blob/master/manual/manual.adoc" -dev-repo: "git+https://github.com/ocaml/ocamlbuild.git" -build: [ - [ - make - "-f" - "configure.make" - "all" - "OCAMLBUILD_PREFIX=%{prefix}%" - "OCAMLBUILD_BINDIR=%{bin}%" - "OCAMLBUILD_LIBDIR=%{lib}%" - "OCAMLBUILD_MANDIR=%{man}%" - "OCAML_NATIVE=%{ocaml:native}%" - "OCAML_NATIVE_TOOLS=%{ocaml:native}%" - ] - [make "check-if-preinstalled" "all" "opam-install"] -] -conflicts: [ - "base-ocamlbuild" - "ocamlfind" {< "1.6.2"} -] -synopsis: - "OCamlbuild is a build system with builtin rules to easily build most OCaml projects." -depends: [ - "ocaml" {>= "4.03"} -] -url { - src: "https://github.com/ocaml/ocamlbuild/archive/0.14.0.tar.gz" - checksum: "sha256=87b29ce96958096c0a1a8eeafeb6268077b2d11e1bf2b3de0f5ebc9cf8d42e78" -} diff --git a/esy.lock/opam/ocamlfind-secondary.1.8.1/files/META.in b/esy.lock/opam/ocamlfind-secondary.1.8.1/files/META.in deleted file mode 100644 index 12e3ee6619..0000000000 --- a/esy.lock/opam/ocamlfind-secondary.1.8.1/files/META.in +++ /dev/null @@ -1,3 +0,0 @@ -description = "OCaml Secondary Compiler" -version = "%{ocaml-secondary-compiler:version}%" -directory = "%{ocaml-secondary-compiler:share}%/bin" diff --git a/esy.lock/opam/ocamlfind-secondary.1.8.1/files/ocaml-secondary-compiler.conf.in b/esy.lock/opam/ocamlfind-secondary.1.8.1/files/ocaml-secondary-compiler.conf.in deleted file mode 100644 index d13023c9f6..0000000000 --- a/esy.lock/opam/ocamlfind-secondary.1.8.1/files/ocaml-secondary-compiler.conf.in +++ /dev/null @@ -1,10 +0,0 @@ -path(secondary) = "%{ocaml-secondary-compiler:share}%/lib" -destdir(secondary) = "%{ocaml-secondary-compiler:share}%/lib" -stdlib(secondary) = "%{ocaml-secondary-compiler:share}%/lib" -ocamlc(secondary) = "%{ocaml-secondary-compiler:share}%/bin/ocamlc" -ocamlopt(secondary) = "%{ocaml-secondary-compiler:share}%/bin/ocamlopt" -ocamlcp(secondary) = "%{ocaml-secondary-compiler:share}%/bin/ocamlcp" -ocamlmklib(secondary) = "%{ocaml-secondary-compiler:share}%/bin/ocamlmklib" -ocamlmktop(secondary) = "%{ocaml-secondary-compiler:share}%/bin/ocamlmktop" -ocamldoc(secondary) = "%{ocaml-secondary-compiler:share}%/bin/ocamldoc" -ocamldep(secondary) = "%{ocaml-secondary-compiler:share}%/bin/ocamldep" diff --git a/esy.lock/opam/ocamlfind-secondary.1.8.1/opam b/esy.lock/opam/ocamlfind-secondary.1.8.1/opam deleted file mode 100644 index acdb576452..0000000000 --- a/esy.lock/opam/ocamlfind-secondary.1.8.1/opam +++ /dev/null @@ -1,32 +0,0 @@ -opam-version: "2.0" -maintainer: "David Allsopp " -homepage: "https://github.com/ocaml/opam-repository" -bug-reports: "https://github.com/ocaml/opam-repository/issues" -build: ["./configure" "-sitelib" "%{ocaml-secondary-compiler:share}%/lib" "-no-camlp4"] -install: [ - [make "install-meta"] - ["mkdir" "-p" "%{lib}%/findlib.conf.d/"] - ["cp" "ocaml-secondary-compiler.conf" "%{lib}%/findlib.conf.d/"] - ["mkdir" "-p" "%{ocaml-secondary-compiler:share}%/lib/ocaml"] - ["cp" "META" "%{ocaml-secondary-compiler:share}%/lib/ocaml"] -] -depends: [ - "ocaml-secondary-compiler" - "ocamlfind" {= "1.8.1"} -] -synopsis: "ocamlfind support for ocaml-secondary-compiler" -description: """ -Exposes the compiler built by the ocaml-secondary-compielr package via --toolchain secondary. A virtual package called ocaml is also installed to -locate the binary directory via `ocamlfind -toolchain secondary query ocaml`.""" -authors: ["Gerd Stolpmann " "David Allsopp "] -substs: ["META" "ocaml-secondary-compiler.conf"] -extra-files: [ - ["META.in" "md5=8c6ea8a0158a33ed87e6c38a7d686d49"] - ["ocaml-secondary-compiler.conf.in" "md5=367a7bb68e2e1e65a31356421ddc809c"] -] -url { - src: "http://download.camlcity.org/download/findlib-1.8.1.tar.gz" - checksum: "md5=18ca650982c15536616dea0e422cbd8c" - mirrors: "http://download2.camlcity.org/download/findlib-1.8.1.tar.gz" -} diff --git a/esy.lock/opam/ocamlfind.1.8.1/files/ocaml-stub b/esy.lock/opam/ocamlfind.1.8.1/files/ocaml-stub deleted file mode 100644 index e5ad9907e8..0000000000 --- a/esy.lock/opam/ocamlfind.1.8.1/files/ocaml-stub +++ /dev/null @@ -1,4 +0,0 @@ -#!/bin/sh - -BINDIR=$(dirname "$(command -v ocamlc)") -"$BINDIR/ocaml" -I "$OCAML_TOPLEVEL_PATH" "$@" diff --git a/esy.lock/opam/ocamlfind.1.8.1/files/ocamlfind.install b/esy.lock/opam/ocamlfind.1.8.1/files/ocamlfind.install deleted file mode 100644 index 295c62545f..0000000000 --- a/esy.lock/opam/ocamlfind.1.8.1/files/ocamlfind.install +++ /dev/null @@ -1,6 +0,0 @@ -bin: [ - "src/findlib/ocamlfind" {"ocamlfind"} - "?src/findlib/ocamlfind_opt" {"ocamlfind"} - "?tools/safe_camlp4" -] -toplevel: ["src/findlib/topfind"] diff --git a/esy.lock/opam/ocamlfind.1.8.1/opam b/esy.lock/opam/ocamlfind.1.8.1/opam deleted file mode 100644 index 04cbc6ccaf..0000000000 --- a/esy.lock/opam/ocamlfind.1.8.1/opam +++ /dev/null @@ -1,64 +0,0 @@ -opam-version: "2.0" -synopsis: "A library manager for OCaml" -maintainer: "Thomas Gazagnaire " -authors: "Gerd Stolpmann " -homepage: "http://projects.camlcity.org/projects/findlib.html" -bug-reports: "https://gitlab.camlcity.org/gerd/lib-findlib/issues" -dev-repo: "git+https://gitlab.camlcity.org/gerd/lib-findlib.git" -description: """ -Findlib is a library manager for OCaml. It provides a convention how -to store libraries, and a file format ("META") to describe the -properties of libraries. There is also a tool (ocamlfind) for -interpreting the META files, so that it is very easy to use libraries -in programs and scripts. -""" -build: [ - [ - "./configure" - "-bindir" - bin - "-sitelib" - lib - "-mandir" - man - "-config" - "%{lib}%/findlib.conf" - "-no-custom" - "-no-camlp4" {!ocaml:preinstalled & ocaml:version >= "4.02.0"} - "-no-topfind" {ocaml:preinstalled} - ] - [make "all"] - [make "opt"] {ocaml:native} -] -install: [ - [ - "./configure" - "-bindir" - bin - "-sitelib" - lib - "-mandir" - man - "-config" - "%{lib}%/findlib.conf" - "-no-custom" - "-no-camlp4" {!ocaml:preinstalled & ocaml:version >= "4.02.0"} - "-no-topfind" {ocaml:preinstalled} - ] - [make "install"] - ["install" "-m" "0755" "ocaml-stub" "%{bin}%/ocaml"] {ocaml:preinstalled} -] -depends: [ - "ocaml" {>= "4.00.0" & < "4.13"} - "conf-m4" {build} -] -extra-files: [ - ["ocamlfind.install" "md5=06f2c282ab52d93aa6adeeadd82a2543"] - ["ocaml-stub" "md5=181f259c9e0bad9ef523e7d4abfdf87a"] -] -url { - src: "http://download.camlcity.org/download/findlib-1.8.1.tar.gz" - checksum: "md5=18ca650982c15536616dea0e422cbd8c" - mirrors: "http://download2.camlcity.org/download/findlib-1.8.1.tar.gz" -} -depopts: ["graphics"] diff --git a/esy.lock/opam/ppx_derivers.1.2.1/opam b/esy.lock/opam/ppx_derivers.1.2.1/opam deleted file mode 100644 index 3d10814e04..0000000000 --- a/esy.lock/opam/ppx_derivers.1.2.1/opam +++ /dev/null @@ -1,23 +0,0 @@ -opam-version: "2.0" -maintainer: "jeremie@dimino.org" -authors: ["Jérémie Dimino"] -license: "BSD-3-Clause" -homepage: "https://github.com/ocaml-ppx/ppx_derivers" -bug-reports: "https://github.com/ocaml-ppx/ppx_derivers/issues" -dev-repo: "git://github.com/ocaml-ppx/ppx_derivers.git" -build: [ - ["dune" "build" "-p" name "-j" jobs] -] -depends: [ - "ocaml" - "dune" -] -synopsis: "Shared [@@deriving] plugin registry" -description: """ -Ppx_derivers is a tiny package whose sole purpose is to allow -ppx_deriving and ppx_type_conv to inter-operate gracefully when linked -as part of the same ocaml-migrate-parsetree driver.""" -url { - src: "https://github.com/ocaml-ppx/ppx_derivers/archive/1.2.1.tar.gz" - checksum: "md5=5dc2bf130c1db3c731fe0fffc5648b41" -} diff --git a/esy.lock/opam/ppx_tools_versioned.5.4.0/opam b/esy.lock/opam/ppx_tools_versioned.5.4.0/opam deleted file mode 100644 index 9305dd1997..0000000000 --- a/esy.lock/opam/ppx_tools_versioned.5.4.0/opam +++ /dev/null @@ -1,27 +0,0 @@ -opam-version: "2.0" -version: "5.4.0" -maintainer: "frederic.bour@lakaban.net" -authors: [ - "Frédéric Bour " - "Alain Frisch " -] -license: "MIT" -homepage: "https://github.com/ocaml-ppx/ppx_tools_versioned" -bug-reports: "https://github.com/ocaml-ppx/ppx_tools_versioned/issues" -dev-repo: "git://github.com/ocaml-ppx/ppx_tools_versioned.git" -tags: [ "syntax" ] -build: [ - ["dune" "subst"] {pinned} - ["dune" "build" "-p" name "-j" jobs] - ["dune" "runtest" "-p" name "-j" jobs] {with-test} -] -depends: [ - "ocaml" {>= "4.02.0"} - "dune" {>= "1.0"} - "ocaml-migrate-parsetree" {>= "1.7.0" & < "2.0.0"} -] -synopsis: "A variant of ppx_tools based on ocaml-migrate-parsetree" -url { - src: "https://github.com/ocaml-ppx/ppx_tools_versioned/archive/5.4.0.tar.gz" - checksum: "md5=3e809a11cae99f57c051d3d0100311f6" -} diff --git a/esy.lock/opam/re.1.9.0/opam b/esy.lock/opam/re.1.9.0/opam deleted file mode 100644 index f7987544d1..0000000000 --- a/esy.lock/opam/re.1.9.0/opam +++ /dev/null @@ -1,42 +0,0 @@ -opam-version: "2.0" - -maintainer: "rudi.grinberg@gmail.com" -authors: [ - "Jerome Vouillon" - "Thomas Gazagnaire" - "Anil Madhavapeddy" - "Rudi Grinberg" - "Gabriel Radanne" -] -license: "LGPL-2.0-only with OCaml-LGPL-linking-exception" -homepage: "https://github.com/ocaml/ocaml-re" -bug-reports: "https://github.com/ocaml/ocaml-re/issues" -dev-repo: "git+https://github.com/ocaml/ocaml-re.git" - -build: [ - ["dune" "subst"] {pinned} - ["dune" "build" "-p" name "-j" jobs] - ["dune" "runtest" "-p" name "-j" jobs] {with-test} -] - -depends: [ - "ocaml" {>= "4.02"} - "dune" - "ounit" {with-test} - "seq" -] - -synopsis: "RE is a regular expression library for OCaml" -description: """ -Pure OCaml regular expressions with: -* Perl-style regular expressions (module Re.Perl) -* Posix extended regular expressions (module Re.Posix) -* Emacs-style regular expressions (module Re.Emacs) -* Shell-style file globbing (module Re.Glob) -* Compatibility layer for OCaml's built-in Str module (module Re.Str) -""" -url { - src: - "https://github.com/ocaml/ocaml-re/releases/download/1.9.0/re-1.9.0.tbz" - checksum: "md5=bddaed4f386a22cace7850c9c7dac296" -} diff --git a/esy.lock/opam/result.1.4/opam b/esy.lock/opam/result.1.4/opam deleted file mode 100644 index b44aeead8b..0000000000 --- a/esy.lock/opam/result.1.4/opam +++ /dev/null @@ -1,22 +0,0 @@ -opam-version: "2.0" -maintainer: "opensource@janestreet.com" -authors: ["Jane Street Group, LLC "] -homepage: "https://github.com/janestreet/result" -dev-repo: "git+https://github.com/janestreet/result.git" -bug-reports: "https://github.com/janestreet/result/issues" -license: "BSD-3-Clause" -build: [["dune" "build" "-p" name "-j" jobs]] -depends: [ - "ocaml" - "dune" {>= "1.0"} -] -synopsis: "Compatibility Result module" -description: """ -Projects that want to use the new result type defined in OCaml >= 4.03 -while staying compatible with older version of OCaml should use the -Result module defined in this library.""" -url { - src: - "https://github.com/janestreet/result/archive/1.4.tar.gz" - checksum: "md5=d3162dbc501a2af65c8c71e0866541da" -} diff --git a/esy.lock/opam/seq.0.2.2/opam b/esy.lock/opam/seq.0.2.2/opam deleted file mode 100644 index 5ed516543f..0000000000 --- a/esy.lock/opam/seq.0.2.2/opam +++ /dev/null @@ -1,24 +0,0 @@ -opam-version: "2.0" -synopsis: - "Compatibility package for OCaml's standard iterator type starting from 4.07" -maintainer: "simon.cruanes.2007@m4x.org" -license: "LGPL2.1" -build: [ - ["dune" "build" "-p" name "-j" jobs] -] -depends: [ - "dune" {>= "1.1.0"} - "ocaml" -] -tags: [ "iterator" "seq" "pure" "list" "compatibility" "cascade" ] -homepage: "https://github.com/c-cube/seq/" -bug-reports: "https://github.com/c-cube/seq/issues" -dev-repo: "git+https://github.com/c-cube/seq.git" -authors: "Simon Cruanes" -url { - src: "https://github.com/c-cube/seq/archive/0.2.2.tar.gz" - checksum: [ - "md5=9033e02283aa3bde9f97f24e632902e3" - "sha512=cab0eb4cb6d9788b7cbd7acbefefc15689d706c97ff7f75dd97faf3c21e466af4d0ff110541a24729db587e7172b1a30a3c2967e17ec2e49cbd923360052c07c" - ] -} diff --git a/esy.lock/opam/sexplib0.v0.14.0/opam b/esy.lock/opam/sexplib0.v0.14.0/opam deleted file mode 100644 index f7afcef364..0000000000 --- a/esy.lock/opam/sexplib0.v0.14.0/opam +++ /dev/null @@ -1,26 +0,0 @@ -opam-version: "2.0" -maintainer: "opensource@janestreet.com" -authors: ["Jane Street Group, LLC "] -homepage: "https://github.com/janestreet/sexplib0" -bug-reports: "https://github.com/janestreet/sexplib0/issues" -dev-repo: "git+https://github.com/janestreet/sexplib0.git" -doc: "https://ocaml.janestreet.com/ocaml-core/latest/doc/sexplib0/index.html" -license: "MIT" -build: [ - ["dune" "build" "-p" name "-j" jobs] -] -depends: [ - "ocaml" {>= "4.04.2"} - "dune" {>= "2.0.0"} -] -synopsis: "Library containing the definition of S-expressions and some base converters" -description: " -Part of Jane Street's Core library -The Core suite of libraries is an industrial strength alternative to -OCaml's standard library that was developed by Jane Street, the -largest industrial user of OCaml. -" -url { - src: "https://ocaml.janestreet.com/ocaml-core/v0.14/files/sexplib0-v0.14.0.tar.gz" - checksum: "md5=37aff0af8f8f6f759249475684aebdc4" -} diff --git a/esy.lock/opam/stdlib-shims.0.3.0/opam b/esy.lock/opam/stdlib-shims.0.3.0/opam deleted file mode 100644 index d657e04368..0000000000 --- a/esy.lock/opam/stdlib-shims.0.3.0/opam +++ /dev/null @@ -1,31 +0,0 @@ -opam-version: "2.0" -maintainer: "The stdlib-shims programmers" -authors: "The stdlib-shims programmers" -homepage: "https://github.com/ocaml/stdlib-shims" -doc: "https://ocaml.github.io/stdlib-shims/" -dev-repo: "git+https://github.com/ocaml/stdlib-shims.git" -bug-reports: "https://github.com/ocaml/stdlib-shims/issues" -tags: ["stdlib" "compatibility" "org:ocaml"] -license: ["typeof OCaml system"] -depends: [ - "dune" - "ocaml" {>= "4.02.3"} -] -build: [ "dune" "build" "-p" name "-j" jobs ] -synopsis: "Backport some of the new stdlib features to older compiler" -description: """ -Backport some of the new stdlib features to older compiler, -such as the Stdlib module. - -This allows projects that require compatibility with older compiler to -use these new features in their code. -""" -x-commit-hash: "fb6815e5d745f07fd567c11671149de6ef2e74c8" -url { - src: - "https://github.com/ocaml/stdlib-shims/releases/download/0.3.0/stdlib-shims-0.3.0.tbz" - checksum: [ - "sha256=babf72d3917b86f707885f0c5528e36c63fccb698f4b46cf2bab5c7ccdd6d84a" - "sha512=1151d7edc8923516e9a36995a3f8938d323aaade759ad349ed15d6d8501db61ffbe63277e97c4d86149cf371306ac23df0f581ec7e02611f58335126e1870980" - ] -} diff --git a/esy.lock/opam/topkg.1.0.3/opam b/esy.lock/opam/topkg.1.0.3/opam deleted file mode 100644 index 6e073a114b..0000000000 --- a/esy.lock/opam/topkg.1.0.3/opam +++ /dev/null @@ -1,48 +0,0 @@ -opam-version: "2.0" -maintainer: "Daniel Bünzli " -authors: ["Daniel Bünzli "] -homepage: "http://erratique.ch/software/topkg" -doc: "http://erratique.ch/software/topkg/doc" -license: "ISC" -dev-repo: "git+http://erratique.ch/repos/topkg.git" -bug-reports: "https://github.com/dbuenzli/topkg/issues" -tags: ["packaging" "ocamlbuild" "org:erratique"] -depends: [ - "ocaml" {>= "4.03.0"} - "ocamlfind" {build & >= "1.6.1"} - "ocamlbuild" ] -build: [[ - "ocaml" "pkg/pkg.ml" "build" - "--pkg-name" name - "--dev-pkg" "%{pinned}%" ]] -synopsis: """The transitory OCaml software packager""" -description: """\ - -Topkg is a packager for distributing OCaml software. It provides an -API to describe the files a package installs in a given build -configuration and to specify information about the package's -distribution, creation and publication procedures. - -The optional topkg-care package provides the `topkg` command line tool -which helps with various aspects of a package's life cycle: creating -and linting a distribution, releasing it on the WWW, publish its -documentation, add it to the OCaml opam repository, etc. - -Topkg is distributed under the ISC license and has **no** -dependencies. This is what your packages will need as a *build* -dependency. - -Topkg-care is distributed under the ISC license it depends on -[fmt][fmt], [logs][logs], [bos][bos], [cmdliner][cmdliner], -[webbrowser][webbrowser] and `opam-format`. - -[fmt]: http://erratique.ch/software/fmt -[logs]: http://erratique.ch/software/logs -[bos]: http://erratique.ch/software/bos -[cmdliner]: http://erratique.ch/software/cmdliner -[webbrowser]: http://erratique.ch/software/webbrowser -""" -url { -archive: "http://erratique.ch/software/topkg/releases/topkg-1.0.3.tbz" -checksum: "e285f7a296d77ee7d831ba9a6bfb396f" -} diff --git a/esy.lock/opam/tyxml.4.3.0/opam b/esy.lock/opam/tyxml.4.3.0/opam deleted file mode 100644 index 93872f8b3c..0000000000 --- a/esy.lock/opam/tyxml.4.3.0/opam +++ /dev/null @@ -1,45 +0,0 @@ -opam-version: "2.0" -maintainer: "dev@ocsigen.org" -homepage: "https://github.com/ocsigen/tyxml/" -bug-reports: "https://github.com/ocsigen/tyxml/issues" -doc: "https://ocsigen.org/tyxml/manual/" -dev-repo: "git+https://github.com/ocsigen/tyxml.git" -license: "LGPL-2.1-only with OCaml-LGPL-linking-exception" - -build: [ - ["dune" "subst"] {pinned} - ["dune" "build" "-p" name "-j" jobs] - ["dune" "runtest" "-p" name "-j" jobs] {with-test} -] - -depends: [ - "ocaml" {>= "4.02"} - "re" {>= "1.5.0"} - ("ocaml" {>= "4.07"} | "re" {>= "1.8.0"}) - "dune" - "alcotest" {with-test} - "seq" - "uutf" {>= "1.0.0"} -] - -synopsis:"TyXML is a library for building correct HTML and SVG documents" -description:""" -TyXML provides a set of convenient combinators that uses the OCaml -type system to ensure the validity of the generated documents. TyXML -can be used with any representation of HTML and SVG: the textual one, -provided directly by this package, or DOM trees (`js_of_ocaml-tyxml`) -virtual DOM (`virtual-dom`) and reactive or replicated trees -(`eliom`). You can also create your own representation and use it to -instantiate a new set of combinators. - -```ocaml -open Tyxml -let to_ocaml = Html.(a ~a:[a_href "ocaml.org"] [txt "OCaml!"]) -``` -""" -authors: "The ocsigen team" -url { - src: - "https://github.com/ocsigen/tyxml/releases/download/4.3.0/tyxml-4.3.0.tbz" - checksum: "md5=fd834a567f813bf447cab5f4c3a723e2" -} diff --git a/esy.lock/opam/uchar.0.0.2/opam b/esy.lock/opam/uchar.0.0.2/opam deleted file mode 100644 index 428d7aa6f8..0000000000 --- a/esy.lock/opam/uchar.0.0.2/opam +++ /dev/null @@ -1,36 +0,0 @@ -opam-version: "2.0" -maintainer: "Daniel Bünzli " -authors: ["Daniel Bünzli "] -homepage: "http://ocaml.org" -doc: "https://ocaml.github.io/uchar/" -dev-repo: "git+https://github.com/ocaml/uchar.git" -bug-reports: "https://github.com/ocaml/uchar/issues" -tags: [ "text" "character" "unicode" "compatibility" "org:ocaml.org" ] -license: "typeof OCaml system" -depends: [ - "ocaml" {>= "3.12.0"} - "ocamlbuild" {build} -] -build: [ - ["ocaml" "pkg/git.ml"] - [ - "ocaml" - "pkg/build.ml" - "native=%{ocaml:native}%" - "native-dynlink=%{ocaml:native-dynlink}%" - ] -] -synopsis: "Compatibility library for OCaml's Uchar module" -description: """ -The `uchar` package provides a compatibility library for the -[`Uchar`][1] module introduced in OCaml 4.03. - -The `uchar` package is distributed under the license of the OCaml -compiler. See [LICENSE](LICENSE) for details. - -[1]: http://caml.inria.fr/pub/docs/manual-ocaml/libref/Uchar.html""" -url { - src: - "https://github.com/ocaml/uchar/releases/download/v0.0.2/uchar-0.0.2.tbz" - checksum: "md5=c9ba2c738d264c420c642f7bb1cf4a36" -} diff --git a/esy.lock/opam/uuidm.0.9.7/opam b/esy.lock/opam/uuidm.0.9.7/opam deleted file mode 100644 index 0c59ad9390..0000000000 --- a/esy.lock/opam/uuidm.0.9.7/opam +++ /dev/null @@ -1,34 +0,0 @@ -opam-version: "2.0" -maintainer: "Daniel Bünzli " -authors: ["Daniel Bünzli "] -homepage: "https://erratique.ch/software/uuidm" -doc: "https://erratique.ch/software/uuidm/doc/Uuidm" -dev-repo: "git+https://erratique.ch/repos/uuidm.git" -bug-reports: "https://github.com/dbuenzli/uuidm/issues" -tags: [ "uuid" "codec" "org:erratique" ] -license: "ISC" -depends: [ - "ocaml" {>= "4.03.0"} - "ocamlfind" {build} - "ocamlbuild" {build} - "topkg" {build} ] -depopts: [ "cmdliner" ] -build: -[ "ocaml" "pkg/pkg.ml" "build" - "--pinned" "%{pinned}%" - "--with-cmdliner" "%{cmdliner:installed}%" ] -synopsis: """Universally unique identifiers (UUIDs) for OCaml""" -description: """\ - -Uuidm is an OCaml module implementing 128 bits universally unique -identifiers version 3, 5 (named based with MD5, SHA-1 hashing) and 4 -(random based) according to [RFC 4122][rfc4122]. - -Uuidm has no dependency and is distributed under the ISC license. - -[rfc4122]: http://tools.ietf.org/html/rfc4122 -""" -url { -archive: "https://erratique.ch/software/uuidm/releases/uuidm-0.9.7.tbz" -checksum: "54658248e3981d8c05237d0a4277ccd3" -} diff --git a/esy.lock/opam/uutf.1.0.2/opam b/esy.lock/opam/uutf.1.0.2/opam deleted file mode 100644 index 3a9f5678d2..0000000000 --- a/esy.lock/opam/uutf.1.0.2/opam +++ /dev/null @@ -1,40 +0,0 @@ -opam-version: "2.0" -maintainer: "Daniel Bünzli " -authors: ["Daniel Bünzli "] -homepage: "http://erratique.ch/software/uutf" -doc: "http://erratique.ch/software/uutf/doc/Uutf" -dev-repo: "git+http://erratique.ch/repos/uutf.git" -bug-reports: "https://github.com/dbuenzli/uutf/issues" -tags: [ "unicode" "text" "utf-8" "utf-16" "codec" "org:erratique" ] -license: "ISC" -depends: [ - "ocaml" {>= "4.01.0"} - "ocamlfind" {build} - "ocamlbuild" {build} - "topkg" {build} - "uchar" -] -depopts: ["cmdliner"] -conflicts: ["cmdliner" { < "0.9.6"} ] -build: [[ - "ocaml" "pkg/pkg.ml" "build" - "--pinned" "%{pinned}%" - "--with-cmdliner" "%{cmdliner:installed}%" ]] -synopsis: """Non-blocking streaming Unicode codec for OCaml""" -description: """\ - -Uutf is a non-blocking streaming codec to decode and encode the UTF-8, -UTF-16, UTF-16LE and UTF-16BE encoding schemes. It can efficiently -work character by character without blocking on IO. Decoders perform -character position tracking and support newline normalization. - -Functions are also provided to fold over the characters of UTF encoded -OCaml string values and to directly encode characters in OCaml -Buffer.t values. - -Uutf has no dependency and is distributed under the ISC license. -""" -url { -archive: "http://erratique.ch/software/uutf/releases/uutf-1.0.2.tbz" -checksum: "a7c542405a39630c689a82bd7ef2292c" -} diff --git a/esy.lock/opam/yojson.1.7.0/opam b/esy.lock/opam/yojson.1.7.0/opam deleted file mode 100644 index ffef0682a7..0000000000 --- a/esy.lock/opam/yojson.1.7.0/opam +++ /dev/null @@ -1,38 +0,0 @@ -opam-version: "2.0" -maintainer: "martin@mjambon.com" -authors: ["Martin Jambon"] -homepage: "https://github.com/ocaml-community/yojson" -bug-reports: "https://github.com/ocaml-community/yojson/issues" -dev-repo: "git+https://github.com/ocaml-community/yojson.git" -doc: "https://ocaml-community.github.io/yojson/" -build: [ - ["dune" "subst"] {pinned} - ["dune" "build" "-p" name "-j" jobs] -] -run-test: [["dune" "runtest" "-p" name "-j" jobs]] -depends: [ - "ocaml" {>= "4.02.3"} - "dune" - "cppo" {build} - "easy-format" - "biniou" {>= "1.2.0"} - "alcotest" {with-test & >= "0.8.5"} -] -synopsis: - "Yojson is an optimized parsing and printing library for the JSON format" -description: """ -Yojson is an optimized parsing and printing library for the JSON format. - -It addresses a few shortcomings of json-wheel including 2x speedup, -polymorphic variants and optional syntax for tuples and variants. - -ydump is a pretty-printing command-line program provided with the -yojson package. - -The program atdgen can be used to derive OCaml-JSON serializers and -deserializers from type definitions.""" -url { - src: - "https://github.com/ocaml-community/yojson/releases/download/1.7.0/yojson-1.7.0.tbz" - checksum: "md5=b89d39ca3f8c532abe5f547ad3b8f84d" -} diff --git a/esy.lock/overrides/opam__s__conf_m4_opam__c__1_opam_override/package.json b/esy.lock/overrides/opam__s__conf_m4_opam__c__1_opam_override/package.json deleted file mode 100644 index ca6a373d8c..0000000000 --- a/esy.lock/overrides/opam__s__conf_m4_opam__c__1_opam_override/package.json +++ /dev/null @@ -1,6 +0,0 @@ -{ - "build": "true", - "dependencies": { - "esy-m4": "esy-packages/esy-m4#c7cf0ac9221be2b1f9d90e83559ca08397a629e7" - } -} diff --git a/esy.lock/overrides/opam__s__dune_opam__c__2.7.1_opam_override/files/build.sh b/esy.lock/overrides/opam__s__dune_opam__c__2.7.1_opam_override/files/build.sh deleted file mode 100644 index b2a94f7510..0000000000 --- a/esy.lock/overrides/opam__s__dune_opam__c__2.7.1_opam_override/files/build.sh +++ /dev/null @@ -1,10 +0,0 @@ -#!/bin/bash - -SECONDARY_CONF="$OCAMLFIND_SECONDARY_PREFIX/lib/findlib.conf.d/ocaml-secondary-compiler.conf" - -if test -f $SECONDARY_CONF; then - export OCAMLFIND_CONF=$SECONDARY_CONF; -fi - -env -u OCAMLLIB ocaml bootstrap.ml -./dune.exe build -p dune --profile dune-bootstrap diff --git a/esy.lock/overrides/opam__s__dune_opam__c__2.7.1_opam_override/package.json b/esy.lock/overrides/opam__s__dune_opam__c__2.7.1_opam_override/package.json deleted file mode 100644 index c7d77ab678..0000000000 --- a/esy.lock/overrides/opam__s__dune_opam__c__2.7.1_opam_override/package.json +++ /dev/null @@ -1,8 +0,0 @@ -{ - "buildsInSource": true, - "build": "bash build.sh", - "install": "esy-installer dune.install", - "buildEnv": { - "OCAMLPATH": "#{ $OCAMLFIND_SECONDARY_PREFIX / 'lib' : ocaml.lib : $OCAML_SECONDARY_COMPILER_PREFIX / 'share' / 'ocaml-secondary-compiler' / 'lib' }" - } -} diff --git a/esy.lock/overrides/opam__s__ocaml_secondary_compiler_opam__c__4.08.1_1_opam_override/files/clone-flexdll b/esy.lock/overrides/opam__s__ocaml_secondary_compiler_opam__c__4.08.1_1_opam_override/files/clone-flexdll deleted file mode 100755 index 26301ddd39..0000000000 --- a/esy.lock/overrides/opam__s__ocaml_secondary_compiler_opam__c__4.08.1_1_opam_override/files/clone-flexdll +++ /dev/null @@ -1,16 +0,0 @@ -#! /bin/sh - -# clone-flexdll -# -# Brings in flexdll, if necessary - -if [ -d "flexdll" ] && [ -f "flexdll/flexdll.c" ]; then - echo "[Flexdll] Already present, no need to clone." -else - echo "[Flexdll] Cloning..." - git clone https://github.com/esy-ocaml/flexdll.git - cd flexdll - git checkout f84baaeae463f96f9582883a9cfb7dd1096757ff - cd .. - echo "[Flexdll] Clone successful!" -fi \ No newline at end of file diff --git a/esy.lock/overrides/opam__s__ocaml_secondary_compiler_opam__c__4.08.1_1_opam_override/files/configure-windows b/esy.lock/overrides/opam__s__ocaml_secondary_compiler_opam__c__4.08.1_1_opam_override/files/configure-windows deleted file mode 100755 index 4040b49ea8..0000000000 --- a/esy.lock/overrides/opam__s__ocaml_secondary_compiler_opam__c__4.08.1_1_opam_override/files/configure-windows +++ /dev/null @@ -1,22 +0,0 @@ -#! /bin/sh - -# configure-windows -# -# Creates a native Windows MingW build, based on: -# https://github.com/ocaml/ocaml/blob/trunk/README.win32.adoc - - -export prefix=C:/ocamlmgw64 -while : ; do - case "$1" in - "") break;; - -prefix|--prefix) - prefix=$2; shift;; - esac - shift -done - -echo "[configure-windows] Setting up flexdll" -./clone-flexdll -./configure --build=x86_64-unknown-cygwin --host=x86_64-w64-mingw32 --prefix=$prefix -make flexdll diff --git a/esy.lock/overrides/opam__s__ocaml_secondary_compiler_opam__c__4.08.1_1_opam_override/files/esy-build b/esy.lock/overrides/opam__s__ocaml_secondary_compiler_opam__c__4.08.1_1_opam_override/files/esy-build deleted file mode 100755 index b95356a530..0000000000 --- a/esy.lock/overrides/opam__s__ocaml_secondary_compiler_opam__c__4.08.1_1_opam_override/files/esy-build +++ /dev/null @@ -1,24 +0,0 @@ -#! /usr/bin/env bash - -# esy-build -# -# Wrapper to execute appropriate build strategy, based on platform - -set -u -set -e -set -o pipefail - -case "$(uname -s)" in - CYGWIN*|MINGW32*|MSYS*) - echo "[esy-build] Detected windows environment..." - make -j4 world.opt - make flexlink.opt - ;; - *) - echo "[esy-build] Detected OSX / Linux environment" - make -j4 world.opt - ;; -esac - -# Common build steps -make install \ No newline at end of file diff --git a/esy.lock/overrides/opam__s__ocaml_secondary_compiler_opam__c__4.08.1_1_opam_override/files/esy-configure b/esy.lock/overrides/opam__s__ocaml_secondary_compiler_opam__c__4.08.1_1_opam_override/files/esy-configure deleted file mode 100755 index fd196c5177..0000000000 --- a/esy.lock/overrides/opam__s__ocaml_secondary_compiler_opam__c__4.08.1_1_opam_override/files/esy-configure +++ /dev/null @@ -1,29 +0,0 @@ -#! /usr/bin/env bash - -# esy-configure -# -# Wrapper to delegate to configuration to the -# appropriate `configure` strategy based on the active platform. -# -# Today, OCaml has separate build strategies: -# - Linux, OSX, Cygwin (gcc) - https://github.com/ocaml/ocaml/blob/trunk/INSTALL.adoc -# - Windows, Cygin (mingw) - https://github.com/ocaml/ocaml/blob/trunk/README.win32.adoc -# -# We want `esy` to work cross-platform, so this is a shim script that will delegate to the -# appropriate script depending on the platform. We assume that if the platform is `CYGWIN` -# that the `mingw` (native executable) strategy is desired. - -set -u -set -e -set -o pipefail - -case "$(uname -s)" in - CYGWIN*|MINGW32*|MSYS*) - echo "[esy-configure] Detected windows environment..." - ./configure-windows "$@" - ;; - *) - echo "[esy-configure] Detected OSX / Linux environment" - ./configure "$@" - ;; -esac \ No newline at end of file diff --git a/esy.lock/overrides/opam__s__ocaml_secondary_compiler_opam__c__4.08.1_1_opam_override/package.json b/esy.lock/overrides/opam__s__ocaml_secondary_compiler_opam__c__4.08.1_1_opam_override/package.json deleted file mode 100644 index 948455caf8..0000000000 --- a/esy.lock/overrides/opam__s__ocaml_secondary_compiler_opam__c__4.08.1_1_opam_override/package.json +++ /dev/null @@ -1,28 +0,0 @@ -{ - "buildEnv": { - "PATH": "/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin" - }, - "build": [ - [ - "env", - "-u", - "OCAMLLIB", - "bash", "./esy-configure", - "--disable-cfi", - "--prefix", "$cur__install/share/ocaml-secondary-compiler", - "--libdir", "$cur__install/share/ocaml-secondary-compiler/lib", - "--disable-debugger", - "--disable-installing-bytecode-programs", - "--disable-debug-runtime", - "--disable-instrumented-runtime", - "--disable-graph-lib" - ], - [ - "env", - "-u", - "OCAMLLIB", - "bash", "./esy-build" - ] - ], - "buildsInSource": true -} diff --git a/esy.lock/overrides/opam__s__ocamlbuild_opam__c__0.14.0_opam_override/files/ocamlbuild-0.14.0.patch b/esy.lock/overrides/opam__s__ocamlbuild_opam__c__0.14.0_opam_override/files/ocamlbuild-0.14.0.patch deleted file mode 100644 index 4d5bea0e09..0000000000 --- a/esy.lock/overrides/opam__s__ocamlbuild_opam__c__0.14.0_opam_override/files/ocamlbuild-0.14.0.patch +++ /dev/null @@ -1,463 +0,0 @@ ---- ./Makefile -+++ ./Makefile -@@ -213,7 +213,7 @@ - rm -f man/ocamlbuild.1 - - man/options_man.byte: src/ocamlbuild_pack.cmo -- $(OCAMLC) $^ -I src man/options_man.ml -o man/options_man.byte -+ $(OCAMLC) -I +unix unix.cma $^ -I src man/options_man.ml -o man/options_man.byte - - clean:: - rm -f man/options_man.cm* ---- ./src/command.ml -+++ ./src/command.ml -@@ -148,9 +148,10 @@ - let self = string_of_command_spec_with_calls call_with_tags call_with_target resolve_virtuals in - let b = Buffer.create 256 in - (* The best way to prevent bash from switching to its windows-style -- * quote-handling is to prepend an empty string before the command name. *) -+ * quote-handling is to prepend an empty string before the command name. -+ * space seems to work, too - and the ouput is nicer *) - if Sys.os_type = "Win32" then -- Buffer.add_string b "''"; -+ Buffer.add_char b ' '; - let first = ref true in - let put_space () = - if !first then -@@ -260,7 +261,7 @@ - - let execute_many ?(quiet=false) ?(pretend=false) cmds = - add_parallel_stat (List.length cmds); -- let degraded = !*My_unix.is_degraded || Sys.os_type = "Win32" in -+ let degraded = !*My_unix.is_degraded in - let jobs = !jobs in - if jobs < 0 then invalid_arg "jobs < 0"; - let max_jobs = if jobs = 0 then None else Some jobs in ---- ./src/findlib.ml -+++ ./src/findlib.ml -@@ -66,9 +66,6 @@ - (fun command -> lexer & Lexing.from_string & run_and_read command) - command - --let run_and_read command = -- Printf.ksprintf run_and_read command -- - let rec query name = - try - Hashtbl.find packages name -@@ -135,7 +132,8 @@ - with Not_found -> s - - let list () = -- List.map before_space (split_nl & run_and_read "%s list" ocamlfind) -+ let cmd = Shell.quote_filename_if_needed ocamlfind ^ " list" in -+ List.map before_space (split_nl & run_and_read cmd) - - (* The closure algorithm is easy because the dependencies are already closed - and sorted for each package. We only have to make the union. We could also ---- ./src/main.ml -+++ ./src/main.ml -@@ -162,6 +162,9 @@ - Tags.mem "traverse" tags - || List.exists (Pathname.is_prefix path_name) !Options.include_dirs - || List.exists (Pathname.is_prefix path_name) target_dirs) -+ && ((* beware: !Options.build_dir is an absolute directory *) -+ Pathname.normalize !Options.build_dir -+ <> Pathname.normalize (Pathname.pwd/path_name)) - end - end - end ---- ./src/my_std.ml -+++ ./src/my_std.ml -@@ -271,13 +271,107 @@ - try Array.iter (fun x -> if x = basename then raise Exit) a; false - with Exit -> true - -+let command_plain = function -+| [| |] -> 0 -+| margv -> -+ let rec waitpid a b = -+ match Unix.waitpid a b with -+ | exception (Unix.Unix_error(Unix.EINTR,_,_)) -> waitpid a b -+ | x -> x -+ in -+ let pid = Unix.(create_process margv.(0) margv stdin stdout stderr) in -+ let pid', process_status = waitpid [] pid in -+ assert (pid = pid'); -+ match process_status with -+ | Unix.WEXITED n -> n -+ | Unix.WSIGNALED _ -> 2 (* like OCaml's uncaught exceptions *) -+ | Unix.WSTOPPED _ -> 127 -+ -+(* can't use Lexers because of circular dependency *) -+let split_path_win str = -+ let rec aux pos = -+ try -+ let i = String.index_from str pos ';' in -+ let len = i - pos in -+ if len = 0 then -+ aux (succ i) -+ else -+ String.sub str pos (i - pos) :: aux (succ i) -+ with Not_found | Invalid_argument _ -> -+ let len = String.length str - pos in -+ if len = 0 then [] else [String.sub str pos len] -+ in -+ aux 0 -+ -+let windows_shell = lazy begin -+ let rec iter = function -+ | [] -> [| "bash.exe" ; "--norc" ; "--noprofile" |] -+ | hd::tl -> -+ let dash = Filename.concat hd "dash.exe" in -+ if Sys.file_exists dash then [|dash|] else -+ let bash = Filename.concat hd "bash.exe" in -+ if Sys.file_exists bash = false then iter tl else -+ (* if sh.exe and bash.exe exist in the same dir, choose sh.exe *) -+ let sh = Filename.concat hd "sh.exe" in -+ if Sys.file_exists sh then [|sh|] else [|bash ; "--norc" ; "--noprofile"|] -+ in -+ split_path_win (try Sys.getenv "PATH" with Not_found -> "") |> iter -+end -+ -+let prep_windows_cmd cmd = -+ (* workaround known ocaml bug, remove later *) -+ if String.contains cmd '\t' && String.contains cmd ' ' = false then -+ " " ^ cmd -+ else -+ cmd -+ -+let run_with_shell = function -+| "" -> 0 -+| cmd -> -+ let cmd = prep_windows_cmd cmd in -+ let shell = Lazy.force windows_shell in -+ let qlen = Filename.quote cmd |> String.length in -+ (* old versions of dash had problems with bs *) -+ try -+ if qlen < 7_900 then -+ command_plain (Array.append shell [| "-ec" ; cmd |]) -+ else begin -+ (* it can still work, if the called command is a cygwin tool *) -+ let ch_closed = ref false in -+ let file_deleted = ref false in -+ let fln,ch = -+ Filename.open_temp_file -+ ~mode:[Open_binary] -+ "ocamlbuildtmp" -+ ".sh" -+ in -+ try -+ let f_slash = String.map ( fun x -> if x = '\\' then '/' else x ) fln in -+ output_string ch cmd; -+ ch_closed:= true; -+ close_out ch; -+ let ret = command_plain (Array.append shell [| "-e" ; f_slash |]) in -+ file_deleted:= true; -+ Sys.remove fln; -+ ret -+ with -+ | x -> -+ if !ch_closed = false then -+ close_out_noerr ch; -+ if !file_deleted = false then -+ (try Sys.remove fln with _ -> ()); -+ raise x -+ end -+ with -+ | (Unix.Unix_error _) as x -> -+ (* Sys.command doesn't raise an exception, so run_with_shell also won't -+ raise *) -+ Printexc.to_string x ^ ":" ^ cmd |> prerr_endline; -+ 1 -+ - let sys_command = -- match Sys.os_type with -- | "Win32" -> fun cmd -> -- if cmd = "" then 0 else -- let cmd = "bash --norc -c " ^ Filename.quote cmd in -- Sys.command cmd -- | _ -> fun cmd -> if cmd = "" then 0 else Sys.command cmd -+ if Sys.win32 then run_with_shell -+ else fun cmd -> if cmd = "" then 0 else Sys.command cmd - - (* FIXME warning fix and use Filename.concat *) - let filename_concat x y = ---- ./src/my_std.mli -+++ ./src/my_std.mli -@@ -69,3 +69,6 @@ - - val split_ocaml_version : (int * int * int * string) option - (** (major, minor, patchlevel, rest) *) -+ -+val windows_shell : string array Lazy.t -+val prep_windows_cmd : string -> string ---- ./src/ocamlbuild_executor.ml -+++ ./src/ocamlbuild_executor.ml -@@ -34,6 +34,8 @@ - job_stdin : out_channel; - job_stderr : in_channel; - job_buffer : Buffer.t; -+ job_pid : int; -+ job_tmp_file: string option; - mutable job_dying : bool; - };; - -@@ -76,6 +78,61 @@ - in - loop 0 - ;; -+ -+let open_process_full_win cmd env = -+ let (in_read, in_write) = Unix.pipe () in -+ let (out_read, out_write) = Unix.pipe () in -+ let (err_read, err_write) = Unix.pipe () in -+ Unix.set_close_on_exec in_read; -+ Unix.set_close_on_exec out_write; -+ Unix.set_close_on_exec err_read; -+ let inchan = Unix.in_channel_of_descr in_read in -+ let outchan = Unix.out_channel_of_descr out_write in -+ let errchan = Unix.in_channel_of_descr err_read in -+ let shell = Lazy.force Ocamlbuild_pack.My_std.windows_shell in -+ let test_cmd = -+ String.concat " " (List.map Filename.quote (Array.to_list shell)) ^ -+ "-ec " ^ -+ Filename.quote (Ocamlbuild_pack.My_std.prep_windows_cmd cmd) in -+ let argv,tmp_file = -+ if String.length test_cmd < 7_900 then -+ Array.append -+ shell -+ [| "-ec" ; Ocamlbuild_pack.My_std.prep_windows_cmd cmd |],None -+ else -+ let fln,ch = Filename.open_temp_file ~mode:[Open_binary] "ocamlbuild" ".sh" in -+ output_string ch (Ocamlbuild_pack.My_std.prep_windows_cmd cmd); -+ close_out ch; -+ let fln' = String.map (function '\\' -> '/' | c -> c) fln in -+ Array.append -+ shell -+ [| "-c" ; fln' |], Some fln in -+ let pid = -+ Unix.create_process_env argv.(0) argv env out_read in_write err_write in -+ Unix.close out_read; -+ Unix.close in_write; -+ Unix.close err_write; -+ (pid, inchan, outchan, errchan,tmp_file) -+ -+let close_process_full_win (pid,inchan, outchan, errchan, tmp_file) = -+ let delete tmp_file = -+ match tmp_file with -+ | None -> () -+ | Some x -> try Sys.remove x with Sys_error _ -> () in -+ let tmp_file_deleted = ref false in -+ try -+ close_in inchan; -+ close_out outchan; -+ close_in errchan; -+ let res = snd(Unix.waitpid [] pid) in -+ tmp_file_deleted := true; -+ delete tmp_file; -+ res -+ with -+ | x when tmp_file <> None && !tmp_file_deleted = false -> -+ delete tmp_file; -+ raise x -+ - (* ***) - (*** execute *) - (* XXX: Add test for non reentrancy *) -@@ -130,10 +187,16 @@ - (*** add_job *) - let add_job cmd rest result id = - (*display begin fun oc -> fp oc "Job %a is %s\n%!" print_job_id id cmd; end;*) -- let (stdout', stdin', stderr') = open_process_full cmd env in -+ let (pid,stdout', stdin', stderr', tmp_file) = -+ if Sys.win32 then open_process_full_win cmd env else -+ let a,b,c = open_process_full cmd env in -+ -1,a,b,c,None -+ in - incr jobs_active; -- set_nonblock (doi stdout'); -- set_nonblock (doi stderr'); -+ if not Sys.win32 then ( -+ set_nonblock (doi stdout'); -+ set_nonblock (doi stderr'); -+ ); - let job = - { job_id = id; - job_command = cmd; -@@ -143,7 +206,9 @@ - job_stdin = stdin'; - job_stderr = stderr'; - job_buffer = Buffer.create 1024; -- job_dying = false } -+ job_dying = false; -+ job_tmp_file = tmp_file; -+ job_pid = pid } - in - outputs := FDM.add (doi stdout') job (FDM.add (doi stderr') job !outputs); - jobs := JS.add job !jobs; -@@ -199,6 +264,7 @@ - try - read fd u 0 (Bytes.length u) - with -+ | Unix.Unix_error(Unix.EPIPE,_,_) when Sys.win32 -> 0 - | Unix.Unix_error(e,_,_) -> - let msg = error_message e in - display (fun oc -> fp oc -@@ -241,14 +307,19 @@ - decr jobs_active; - - (* PR#5371: we would get EAGAIN below otherwise *) -- clear_nonblock (doi job.job_stdout); -- clear_nonblock (doi job.job_stderr); -- -+ if not Sys.win32 then ( -+ clear_nonblock (doi job.job_stdout); -+ clear_nonblock (doi job.job_stderr); -+ ); - do_read ~loop:true (doi job.job_stdout) job; - do_read ~loop:true (doi job.job_stderr) job; - outputs := FDM.remove (doi job.job_stdout) (FDM.remove (doi job.job_stderr) !outputs); - jobs := JS.remove job !jobs; -- let status = close_process_full (job.job_stdout, job.job_stdin, job.job_stderr) in -+ let status = -+ if Sys.win32 then -+ close_process_full_win (job.job_pid, job.job_stdout, job.job_stdin, job.job_stderr, job.job_tmp_file) -+ else -+ close_process_full (job.job_stdout, job.job_stdin, job.job_stderr) in - - let shown = ref false in - ---- ./src/ocamlbuild_unix_plugin.ml -+++ ./src/ocamlbuild_unix_plugin.ml -@@ -48,12 +48,22 @@ - end - - let run_and_open s kont = -+ let s_orig = s in -+ let s = -+ (* Be consistent! My_unix.run_and_open uses My_std.sys_command and -+ sys_command uses bash. *) -+ if Sys.win32 = false then s else -+ let l = match Lazy.force My_std.windows_shell |> Array.to_list with -+ | hd::tl -> (Filename.quote hd)::tl -+ | _ -> assert false in -+ "\"" ^ (String.concat " " l) ^ " -ec " ^ Filename.quote (" " ^ s) ^ "\"" -+ in - let ic = Unix.open_process_in s in - let close () = - match Unix.close_process_in ic with - | Unix.WEXITED 0 -> () - | Unix.WEXITED _ | Unix.WSIGNALED _ | Unix.WSTOPPED _ -> -- failwith (Printf.sprintf "Error while running: %s" s) in -+ failwith (Printf.sprintf "Error while running: %s" s_orig) in - let res = try - kont ic - with e -> (close (); raise e) ---- ./src/options.ml -+++ ./src/options.ml -@@ -174,11 +174,24 @@ - build_dir := Filename.concat (Sys.getcwd ()) s - else - build_dir := s -+ -+let slashify = -+ if Sys.win32 then fun p -> String.map (function '\\' -> '/' | x -> x) p -+ else fun p ->p -+ -+let sb () = -+ match Sys.os_type with -+ | "Win32" -> -+ (try set_binary_mode_out stdout true with _ -> ()); -+ | _ -> () -+ -+ - let spec = ref ( - let print_version () = -+ sb (); - Printf.printf "ocamlbuild %s\n%!" Ocamlbuild_config.version; raise Exit_OK - in -- let print_vnum () = print_endline Ocamlbuild_config.version; raise Exit_OK in -+ let print_vnum () = sb (); print_endline Ocamlbuild_config.version; raise Exit_OK in - Arg.align - [ - "-version", Unit print_version , " Display the version"; -@@ -257,8 +270,8 @@ - "-build-dir", String set_build_dir, " Set build directory (implies no-links)"; - "-install-lib-dir", Set_string Ocamlbuild_where.libdir, " Set the install library directory"; - "-install-bin-dir", Set_string Ocamlbuild_where.bindir, " Set the install binary directory"; -- "-where", Unit (fun () -> print_endline !Ocamlbuild_where.libdir; raise Exit_OK), " Display the install library directory"; -- "-which", String (fun cmd -> print_endline (find_tool cmd); raise Exit_OK), " Display path to the tool command"; -+ "-where", Unit (fun () -> sb (); print_endline (slashify !Ocamlbuild_where.libdir); raise Exit_OK), " Display the install library directory"; -+ "-which", String (fun cmd -> sb (); print_endline (slashify (find_tool cmd)); raise Exit_OK), " Display path to the tool command"; - "-ocamlc", set_cmd ocamlc, " Set the OCaml bytecode compiler"; - "-plugin-ocamlc", set_cmd plugin_ocamlc, " Set the OCaml bytecode compiler \ - used when building myocamlbuild.ml (only)"; ---- ./src/pathname.ml -+++ ./src/pathname.ml -@@ -84,6 +84,26 @@ - | x :: xs -> x :: normalize_list xs - - let normalize x = -+ let x = -+ if Sys.win32 = false then -+ x -+ else -+ let len = String.length x in -+ let b = Bytes.create len in -+ for i = 0 to pred len do -+ match x.[i] with -+ | '\\' -> Bytes.set b i '/' -+ | c -> Bytes.set b i c -+ done; -+ if len > 1 then ( -+ let c1 = Bytes.get b 0 in -+ let c2 = Bytes.get b 1 in -+ if c2 = ':' && c1 >= 'a' && c1 <= 'z' && -+ ( len = 2 || Bytes.get b 2 = '/') then -+ Bytes.set b 0 (Char.uppercase_ascii c1) -+ ); -+ Bytes.unsafe_to_string b -+ in - if Glob.eval not_normal_form_re x then - let root, paths = split x in - join root (normalize_list paths) ---- ./src/shell.ml -+++ ./src/shell.ml -@@ -24,12 +24,26 @@ - | 'a'..'z' | 'A'..'Z' | '0'..'9' | '.' | '-' | '/' | '_' | ':' | '@' | '+' | ',' -> loop (pos + 1) - | _ -> false in - loop 0 -+ -+let generic_quote quotequote s = -+ let l = String.length s in -+ let b = Buffer.create (l + 20) in -+ Buffer.add_char b '\''; -+ for i = 0 to l - 1 do -+ if s.[i] = '\'' -+ then Buffer.add_string b quotequote -+ else Buffer.add_char b s.[i] -+ done; -+ Buffer.add_char b '\''; -+ Buffer.contents b -+let unix_quote = generic_quote "'\\''" -+ - let quote_filename_if_needed s = - if is_simple_filename s then s - (* We should probably be using [Filename.unix_quote] except that function - * isn't exported. Users on Windows will have to live with not being able to - * install OCaml into c:\o'caml. Too bad. *) -- else if Sys.os_type = "Win32" then Printf.sprintf "'%s'" s -+ else if Sys.os_type = "Win32" then unix_quote s - else Filename.quote s - let chdir dir = - reset_filesys_cache (); -@@ -37,7 +51,7 @@ - let run args target = - reset_readdir_cache (); - let cmd = String.concat " " (List.map quote_filename_if_needed args) in -- if !*My_unix.is_degraded || Sys.os_type = "Win32" then -+ if !*My_unix.is_degraded then - begin - Log.event cmd target Tags.empty; - let st = sys_command cmd in diff --git a/esy.lock/overrides/opam__s__ocamlbuild_opam__c__0.14.0_opam_override/package.json b/esy.lock/overrides/opam__s__ocamlbuild_opam__c__0.14.0_opam_override/package.json deleted file mode 100644 index b24be7b5bc..0000000000 --- a/esy.lock/overrides/opam__s__ocamlbuild_opam__c__0.14.0_opam_override/package.json +++ /dev/null @@ -1,27 +0,0 @@ -{ - "build": [ - [ - "bash", - "-c", - "#{os == 'windows' ? 'patch -p1 < ocamlbuild-0.14.0.patch' : 'true'}" - ], - [ - "make", - "-f", - "configure.make", - "all", - "OCAMLBUILD_PREFIX=#{self.install}", - "OCAMLBUILD_BINDIR=#{self.bin}", - "OCAMLBUILD_LIBDIR=#{self.lib}", - "OCAMLBUILD_MANDIR=#{self.man}", - "OCAMLBUILD_NATIVE=true", - "OCAMLBUILD_NATIVE_TOOLS=true" - ], - [ - "make", - "check-if-preinstalled", - "all", - "#{os == 'windows' ? 'install' : 'opam-install'}" - ] - ] -} diff --git a/esy.lock/overrides/opam__s__ocamlfind_opam__c__1.8.1_opam_override/files/findlib-1.8.1.patch b/esy.lock/overrides/opam__s__ocamlfind_opam__c__1.8.1_opam_override/files/findlib-1.8.1.patch deleted file mode 100644 index 3e3ee5a24f..0000000000 --- a/esy.lock/overrides/opam__s__ocamlfind_opam__c__1.8.1_opam_override/files/findlib-1.8.1.patch +++ /dev/null @@ -1,471 +0,0 @@ ---- ./Makefile -+++ ./Makefile -@@ -57,16 +57,16 @@ - cat findlib.conf.in | \ - $(SH) tools/patch '@SITELIB@' '$(OCAML_SITELIB)' >findlib.conf - if ./tools/cmd_from_same_dir ocamlc; then \ -- echo 'ocamlc="ocamlc.opt"' >>findlib.conf; \ -+ echo 'ocamlc="ocamlc.opt$(EXEC_SUFFIX)"' >>findlib.conf; \ - fi - if ./tools/cmd_from_same_dir ocamlopt; then \ -- echo 'ocamlopt="ocamlopt.opt"' >>findlib.conf; \ -+ echo 'ocamlopt="ocamlopt.opt$(EXEC_SUFFIX)"' >>findlib.conf; \ - fi - if ./tools/cmd_from_same_dir ocamldep; then \ -- echo 'ocamldep="ocamldep.opt"' >>findlib.conf; \ -+ echo 'ocamldep="ocamldep.opt$(EXEC_SUFFIX)"' >>findlib.conf; \ - fi - if ./tools/cmd_from_same_dir ocamldoc; then \ -- echo 'ocamldoc="ocamldoc.opt"' >>findlib.conf; \ -+ echo 'ocamldoc="ocamldoc.opt$(EXEC_SUFFIX)"' >>findlib.conf; \ - fi - - .PHONY: install-doc ---- ./src/findlib/findlib_config.mlp -+++ ./src/findlib/findlib_config.mlp -@@ -24,3 +24,5 @@ - | "MacOS" -> "" (* don't know *) - | _ -> failwith "Unknown Sys.os_type" - ;; -+ -+let exec_suffix = "@EXEC_SUFFIX@";; ---- ./src/findlib/findlib.ml -+++ ./src/findlib/findlib.ml -@@ -28,15 +28,20 @@ - let conf_ldconf = ref "";; - let conf_ignore_dups_in = ref ([] : string list);; - --let ocamlc_default = "ocamlc";; --let ocamlopt_default = "ocamlopt";; --let ocamlcp_default = "ocamlcp";; --let ocamloptp_default = "ocamloptp";; --let ocamlmklib_default = "ocamlmklib";; --let ocamlmktop_default = "ocamlmktop";; --let ocamldep_default = "ocamldep";; --let ocamlbrowser_default = "ocamlbrowser";; --let ocamldoc_default = "ocamldoc";; -+let add_exec str = -+ match Findlib_config.exec_suffix with -+ | "" -> str -+ | a -> str ^ a ;; -+let ocamlc_default = add_exec "ocamlc";; -+let ocamlopt_default = add_exec "ocamlopt";; -+let ocamlcp_default = add_exec "ocamlcp";; -+let ocamloptp_default = add_exec "ocamloptp";; -+let ocamlmklib_default = add_exec "ocamlmklib";; -+let ocamlmktop_default = add_exec "ocamlmktop";; -+let ocamldep_default = add_exec "ocamldep";; -+let ocamlbrowser_default = add_exec "ocamlbrowser";; -+let ocamldoc_default = add_exec "ocamldoc";; -+ - - - let init_manually ---- ./src/findlib/fl_package_base.ml -+++ ./src/findlib/fl_package_base.ml -@@ -133,7 +133,15 @@ - List.find (fun def -> def.def_var = "exists_if") p.package_defs in - let files = Fl_split.in_words def.def_value in - List.exists -- (fun file -> Sys.file_exists (Filename.concat d' file)) -+ (fun file -> -+ let fln = Filename.concat d' file in -+ let e = Sys.file_exists fln in -+ (* necessary for ppx executables *) -+ if e || Sys.os_type <> "Win32" || Filename.check_suffix fln ".exe" then -+ e -+ else -+ Sys.file_exists (fln ^ ".exe") -+ ) - files - with Not_found -> true in - ---- ./src/findlib/fl_split.ml -+++ ./src/findlib/fl_split.ml -@@ -126,10 +126,17 @@ - | '/' | '\\' -> true - | _ -> false in - let norm_dir_win() = -- if l >= 1 && s.[0] = '/' then -- Buffer.add_char b '\\' else Buffer.add_char b s.[0]; -- if l >= 2 && s.[1] = '/' then -- Buffer.add_char b '\\' else Buffer.add_char b s.[1]; -+ if l >= 1 then ( -+ if s.[0] = '/' then -+ Buffer.add_char b '\\' -+ else -+ Buffer.add_char b s.[0] ; -+ if l >= 2 then -+ if s.[1] = '/' then -+ Buffer.add_char b '\\' -+ else -+ Buffer.add_char b s.[1]; -+ ); - for k = 2 to l - 1 do - let c = s.[k] in - if is_slash c then ( ---- ./src/findlib/frontend.ml -+++ ./src/findlib/frontend.ml -@@ -31,10 +31,18 @@ - else - Sys_error (arg ^ ": " ^ Unix.error_message code) - -+let is_win = Sys.os_type = "Win32" -+ -+let () = -+ match Findlib_config.system with -+ | "win32" | "win64" | "mingw" | "cygwin" | "mingw64" | "cygwin64" -> -+ (try set_binary_mode_out stdout true with _ -> ()); -+ (try set_binary_mode_out stderr true with _ -> ()); -+ | _ -> () - - let slashify s = - match Findlib_config.system with -- | "mingw" | "mingw64" | "cygwin" -> -+ | "win32" | "win64" | "mingw" | "cygwin" | "mingw64" | "cygwin64" -> - let b = Buffer.create 80 in - String.iter - (function -@@ -49,7 +57,7 @@ - - let out_path ?(prefix="") s = - match Findlib_config.system with -- | "mingw" | "mingw64" | "cygwin" -> -+ | "win32" | "win64" | "mingw" | "mingw64" | "cygwin" -> - let u = slashify s in - prefix ^ - (if String.contains u ' ' then -@@ -273,11 +281,9 @@ - - - let identify_dir d = -- match Sys.os_type with -- | "Win32" -> -- failwith "identify_dir" (* not available *) -- | _ -> -- let s = Unix.stat d in -+ if is_win then -+ failwith "identify_dir"; (* not available *) -+ let s = Unix.stat d in - (s.Unix.st_dev, s.Unix.st_ino) - ;; - -@@ -459,6 +465,96 @@ - ) - packages - -+let rewrite_cmd s = -+ if s = "" || not is_win then -+ s -+ else -+ let s = -+ let l = String.length s in -+ let b = Buffer.create l in -+ for i = 0 to pred l do -+ match s.[i] with -+ | '/' -> Buffer.add_char b '\\' -+ | x -> Buffer.add_char b x -+ done; -+ Buffer.contents b -+ in -+ if (Filename.is_implicit s && String.contains s '\\' = false) || -+ Filename.check_suffix (String.lowercase s) ".exe" then -+ s -+ else -+ let s' = s ^ ".exe" in -+ if Sys.file_exists s' then -+ s' -+ else -+ s -+ -+let rewrite_cmd s = -+ if s = "" || not is_win then s else -+ let s = -+ let l = String.length s in -+ let b = Buffer.create l in -+ for i = 0 to pred l do -+ match s.[i] with -+ | '/' -> Buffer.add_char b '\\' -+ | x -> Buffer.add_char b x -+ done; -+ Buffer.contents b -+ in -+ if (Filename.is_implicit s && String.contains s '\\' = false) || -+ Filename.check_suffix (String.lowercase s) ".exe" then -+ s -+ else -+ let s' = s ^ ".exe" in -+ if Sys.file_exists s' then -+ s' -+ else -+ s -+ -+let rewrite_pp cmd = -+ if not is_win then cmd else -+ let module T = struct exception Keep end in -+ let is_whitespace = function -+ | ' ' | '\011' | '\012' | '\n' | '\r' | '\t' -> true -+ | _ -> false in -+ (* characters that triggers special behaviour (cmd.exe, not unix shell) *) -+ let is_unsafe_char = function -+ | '(' | ')' | '%' | '!' | '^' | '<' | '>' | '&' -> true -+ | _ -> false in -+ let len = String.length cmd in -+ let buf = Buffer.create (len + 4) in -+ let buf_cmd = Buffer.create len in -+ let rec iter_ws i = -+ if i >= len then () else -+ let cur = cmd.[i] in -+ if is_whitespace cur then ( -+ Buffer.add_char buf cur; -+ iter_ws (succ i) -+ ) -+ else -+ iter_cmd i -+ and iter_cmd i = -+ if i >= len then add_buf_cmd () else -+ let cur = cmd.[i] in -+ if is_unsafe_char cur || cur = '"' || cur = '\'' then -+ raise T.Keep; -+ if is_whitespace cur then ( -+ add_buf_cmd (); -+ Buffer.add_substring buf cmd i (len - i) -+ ) -+ else ( -+ Buffer.add_char buf_cmd cur; -+ iter_cmd (succ i) -+ ) -+ and add_buf_cmd () = -+ if Buffer.length buf_cmd > 0 then -+ Buffer.add_string buf (rewrite_cmd (Buffer.contents buf_cmd)) -+ in -+ try -+ iter_ws 0; -+ Buffer.contents buf -+ with -+ | T.Keep -> cmd - - let process_pp_spec syntax_preds packages pp_opts = - (* Returns: pp_command *) -@@ -549,7 +645,7 @@ - None -> [] - | Some cmd -> - ["-pp"; -- cmd ^ " " ^ -+ (rewrite_cmd cmd) ^ " " ^ - String.concat " " (List.map Filename.quote pp_i_options) ^ " " ^ - String.concat " " (List.map Filename.quote pp_archives) ^ " " ^ - String.concat " " (List.map Filename.quote pp_opts)] -@@ -625,9 +721,11 @@ - in - try - let preprocessor = -+ rewrite_cmd ( - resolve_path - ~base ~explicit:true -- (package_property predicates pname "ppx") in -+ (package_property predicates pname "ppx") ) -+ in - ["-ppx"; String.concat " " (preprocessor :: options)] - with Not_found -> [] - ) -@@ -895,6 +993,14 @@ - switch (e.g. -L instead of -L ) - *) - -+(* We may need to remove files on which we do not have complete control. -+ On Windows, removing a read-only file fails so try to change the -+ mode of the file first. *) -+let remove_file fname = -+ try Sys.remove fname -+ with Sys_error _ when is_win -> -+ (try Unix.chmod fname 0o666 with Unix.Unix_error _ -> ()); -+ Sys.remove fname - - let ocamlc which () = - -@@ -1022,9 +1128,12 @@ - - "-intf", - Arg.String (fun s -> pass_files := !pass_files @ [ Intf(slashify s) ]); -- -+ - "-pp", -- Arg.String (fun s -> pp_specified := true; add_spec_fn "-pp" s); -+ Arg.String (fun s -> pp_specified := true; add_spec_fn "-pp" (rewrite_pp s)); -+ -+ "-ppx", -+ Arg.String (fun s -> add_spec_fn "-ppx" (rewrite_pp s)); - - "-thread", - Arg.Unit (fun _ -> threads := threads_default); -@@ -1237,7 +1346,7 @@ - with - any -> - close_out initl; -- Sys.remove initl_file_name; -+ remove_file initl_file_name; - raise any - end; - -@@ -1245,9 +1354,9 @@ - at_exit - (fun () -> - let tr f x = try f x with _ -> () in -- tr Sys.remove initl_file_name; -- tr Sys.remove (Filename.chop_extension initl_file_name ^ ".cmi"); -- tr Sys.remove (Filename.chop_extension initl_file_name ^ ".cmo"); -+ tr remove_file initl_file_name; -+ tr remove_file (Filename.chop_extension initl_file_name ^ ".cmi"); -+ tr remove_file (Filename.chop_extension initl_file_name ^ ".cmo"); - ); - - let exclude_list = [ stdlibdir; threads_dir; vmthreads_dir ] in -@@ -1493,7 +1602,9 @@ - [ "-v", Arg.Unit (fun () -> verbose := Verbose); - "-pp", Arg.String (fun s -> - pp_specified := true; -- options := !options @ ["-pp"; s]); -+ options := !options @ ["-pp"; rewrite_pp s]); -+ "-ppx", Arg.String (fun s -> -+ options := !options @ ["-ppx"; rewrite_pp s]); - ] - ) - ) -@@ -1672,7 +1783,9 @@ - Arg.String (fun s -> add_spec_fn "-I" (slashify (resolve_path s))); - - "-pp", Arg.String (fun s -> pp_specified := true; -- add_spec_fn "-pp" s); -+ add_spec_fn "-pp" (rewrite_pp s)); -+ "-ppx", Arg.String (fun s -> add_spec_fn "-ppx" (rewrite_pp s)); -+ - ] - ) - ) -@@ -1830,7 +1943,10 @@ - output_string ch_out append; - close_out ch_out; - close_in ch_in; -- Unix.utimes outpath s.Unix.st_mtime s.Unix.st_mtime; -+ (try Unix.utimes outpath s.Unix.st_mtime s.Unix.st_mtime -+ with Unix.Unix_error(e,_,_) -> -+ prerr_endline("Warning: setting utimes for " ^ outpath -+ ^ ": " ^ Unix.error_message e)); - - prerr_endline("Installed " ^ outpath); - with -@@ -1882,6 +1998,8 @@ - Unix.openfile (Filename.concat dir owner_file) [Unix.O_RDONLY] 0 in - let f = - Unix.in_channel_of_descr fd in -+ if is_win then -+ set_binary_mode_in f false; - try - let line = input_line f in - let is_my_file = (line = pkg) in -@@ -2208,7 +2326,7 @@ - let lines = read_ldconf !ldconf in - let dlldir_norm = Fl_split.norm_dir dlldir in - let dlldir_norm_lc = string_lowercase_ascii dlldir_norm in -- let ci_filesys = (Sys.os_type = "Win32") in -+ let ci_filesys = is_win in - let check_dir d = - let d' = Fl_split.norm_dir d in - (d' = dlldir_norm) || -@@ -2356,7 +2474,7 @@ - List.iter - (fun file -> - let absfile = Filename.concat dlldir file in -- Sys.remove absfile; -+ remove_file absfile; - prerr_endline ("Removed " ^ absfile) - ) - dll_files -@@ -2365,7 +2483,7 @@ - (* Remove the files from the package directory: *) - if Sys.file_exists pkgdir then begin - let files = Sys.readdir pkgdir in -- Array.iter (fun f -> Sys.remove (Filename.concat pkgdir f)) files; -+ Array.iter (fun f -> remove_file (Filename.concat pkgdir f)) files; - Unix.rmdir pkgdir; - prerr_endline ("Removed " ^ pkgdir) - end -@@ -2415,7 +2533,9 @@ - - - let print_configuration() = -+ let sl = slashify in - let dir s = -+ let s = sl s in - if Sys.file_exists s then - s - else -@@ -2453,27 +2573,27 @@ - if md = "" then "the corresponding package directories" else dir md - ); - Printf.printf "The standard library is assumed to reside in:\n %s\n" -- (Findlib.ocaml_stdlib()); -+ (sl (Findlib.ocaml_stdlib())); - Printf.printf "The ld.conf file can be found here:\n %s\n" -- (Findlib.ocaml_ldconf()); -+ (sl (Findlib.ocaml_ldconf())); - flush stdout - | Some "conf" -> -- print_endline (Findlib.config_file()) -+ print_endline (sl (Findlib.config_file())) - | Some "path" -> -- List.iter print_endline (Findlib.search_path()) -+ List.iter ( fun x -> print_endline (sl x)) (Findlib.search_path()) - | Some "destdir" -> -- print_endline (Findlib.default_location()) -+ print_endline ( sl (Findlib.default_location())) - | Some "metadir" -> -- print_endline (Findlib.meta_directory()) -+ print_endline ( sl (Findlib.meta_directory())) - | Some "metapath" -> - let mdir = Findlib.meta_directory() in - let ddir = Findlib.default_location() in -- print_endline -- (if mdir <> "" then mdir ^ "/META.%s" else ddir ^ "/%s/META") -+ print_endline ( sl -+ (if mdir <> "" then mdir ^ "/META.%s" else ddir ^ "/%s/META")) - | Some "stdlib" -> -- print_endline (Findlib.ocaml_stdlib()) -+ print_endline ( sl (Findlib.ocaml_stdlib())) - | Some "ldconf" -> -- print_endline (Findlib.ocaml_ldconf()) -+ print_endline ( sl (Findlib.ocaml_ldconf())) - | _ -> - assert false - ;; -@@ -2481,7 +2601,7 @@ - - let ocamlcall pkg cmd = - let dir = package_directory pkg in -- let path = Filename.concat dir cmd in -+ let path = rewrite_cmd (Filename.concat dir cmd) in - begin - try Unix.access path [ Unix.X_OK ] - with -@@ -2647,6 +2767,10 @@ - | Sys_error f -> - prerr_endline ("ocamlfind: " ^ f); - exit 2 -+ | Unix.Unix_error (e, fn, f) -> -+ prerr_endline ("ocamlfind: " ^ fn ^ " " ^ f -+ ^ ": " ^ Unix.error_message e); -+ exit 2 - | Findlib.No_such_package(pkg,info) -> - prerr_endline ("ocamlfind: Package `" ^ pkg ^ "' not found" ^ - (if info <> "" then " - " ^ info else "")); ---- ./src/findlib/Makefile -+++ ./src/findlib/Makefile -@@ -90,6 +90,7 @@ - cat findlib_config.mlp | \ - $(SH) $(TOP)/tools/patch '@CONFIGFILE@' '$(OCAMLFIND_CONF)' | \ - $(SH) $(TOP)/tools/patch '@STDLIB@' '$(OCAML_CORE_STDLIB)' | \ -+ $(SH) $(TOP)/tools/patch '@EXEC_SUFFIX@' '$(EXEC_SUFFIX)' | \ - sed -e 's;@AUTOLINK@;$(OCAML_AUTOLINK);g' \ - -e 's;@SYSTEM@;$(SYSTEM);g' \ - >findlib_config.ml diff --git a/esy.lock/overrides/opam__s__ocamlfind_opam__c__1.8.1_opam_override/package.json b/esy.lock/overrides/opam__s__ocamlfind_opam__c__1.8.1_opam_override/package.json deleted file mode 100644 index 9314f87088..0000000000 --- a/esy.lock/overrides/opam__s__ocamlfind_opam__c__1.8.1_opam_override/package.json +++ /dev/null @@ -1,61 +0,0 @@ -{ - "build": [ - [ - "bash", - "-c", - "#{os == 'windows' ? 'patch -p1 < findlib-1.8.1.patch' : 'true'}" - ], - [ - "./configure", - "-bindir", - "#{self.bin}", - "-sitelib", - "#{self.lib}", - "-mandir", - "#{self.man}", - "-config", - "#{self.lib}/findlib.conf", - "-no-custom", - "-no-topfind" - ], - [ - "make", - "all" - ], - [ - "make", - "opt" - ] - ], - "install": [ - [ - "make", - "install" - ], - [ - "install", - "-m", - "0755", - "ocaml-stub", - "#{self.bin}/ocaml" - ], - [ - "mkdir", - "-p", - "#{self.toplevel}" - ], - [ - "install", - "-m", - "0644", - "src/findlib/topfind", - "#{self.toplevel}/topfind" - ] - ], - "exportedEnv": { - "OCAML_TOPLEVEL_PATH": { - "val": "#{self.toplevel}", - "scope": "global" - } - } -} diff --git a/esy.lock/overrides/opam__s__ocamlfind_secondary_opam__c__1.8.1_opam_override/files/findlib-1.8.1.patch b/esy.lock/overrides/opam__s__ocamlfind_secondary_opam__c__1.8.1_opam_override/files/findlib-1.8.1.patch deleted file mode 100644 index 3e3ee5a24f..0000000000 --- a/esy.lock/overrides/opam__s__ocamlfind_secondary_opam__c__1.8.1_opam_override/files/findlib-1.8.1.patch +++ /dev/null @@ -1,471 +0,0 @@ ---- ./Makefile -+++ ./Makefile -@@ -57,16 +57,16 @@ - cat findlib.conf.in | \ - $(SH) tools/patch '@SITELIB@' '$(OCAML_SITELIB)' >findlib.conf - if ./tools/cmd_from_same_dir ocamlc; then \ -- echo 'ocamlc="ocamlc.opt"' >>findlib.conf; \ -+ echo 'ocamlc="ocamlc.opt$(EXEC_SUFFIX)"' >>findlib.conf; \ - fi - if ./tools/cmd_from_same_dir ocamlopt; then \ -- echo 'ocamlopt="ocamlopt.opt"' >>findlib.conf; \ -+ echo 'ocamlopt="ocamlopt.opt$(EXEC_SUFFIX)"' >>findlib.conf; \ - fi - if ./tools/cmd_from_same_dir ocamldep; then \ -- echo 'ocamldep="ocamldep.opt"' >>findlib.conf; \ -+ echo 'ocamldep="ocamldep.opt$(EXEC_SUFFIX)"' >>findlib.conf; \ - fi - if ./tools/cmd_from_same_dir ocamldoc; then \ -- echo 'ocamldoc="ocamldoc.opt"' >>findlib.conf; \ -+ echo 'ocamldoc="ocamldoc.opt$(EXEC_SUFFIX)"' >>findlib.conf; \ - fi - - .PHONY: install-doc ---- ./src/findlib/findlib_config.mlp -+++ ./src/findlib/findlib_config.mlp -@@ -24,3 +24,5 @@ - | "MacOS" -> "" (* don't know *) - | _ -> failwith "Unknown Sys.os_type" - ;; -+ -+let exec_suffix = "@EXEC_SUFFIX@";; ---- ./src/findlib/findlib.ml -+++ ./src/findlib/findlib.ml -@@ -28,15 +28,20 @@ - let conf_ldconf = ref "";; - let conf_ignore_dups_in = ref ([] : string list);; - --let ocamlc_default = "ocamlc";; --let ocamlopt_default = "ocamlopt";; --let ocamlcp_default = "ocamlcp";; --let ocamloptp_default = "ocamloptp";; --let ocamlmklib_default = "ocamlmklib";; --let ocamlmktop_default = "ocamlmktop";; --let ocamldep_default = "ocamldep";; --let ocamlbrowser_default = "ocamlbrowser";; --let ocamldoc_default = "ocamldoc";; -+let add_exec str = -+ match Findlib_config.exec_suffix with -+ | "" -> str -+ | a -> str ^ a ;; -+let ocamlc_default = add_exec "ocamlc";; -+let ocamlopt_default = add_exec "ocamlopt";; -+let ocamlcp_default = add_exec "ocamlcp";; -+let ocamloptp_default = add_exec "ocamloptp";; -+let ocamlmklib_default = add_exec "ocamlmklib";; -+let ocamlmktop_default = add_exec "ocamlmktop";; -+let ocamldep_default = add_exec "ocamldep";; -+let ocamlbrowser_default = add_exec "ocamlbrowser";; -+let ocamldoc_default = add_exec "ocamldoc";; -+ - - - let init_manually ---- ./src/findlib/fl_package_base.ml -+++ ./src/findlib/fl_package_base.ml -@@ -133,7 +133,15 @@ - List.find (fun def -> def.def_var = "exists_if") p.package_defs in - let files = Fl_split.in_words def.def_value in - List.exists -- (fun file -> Sys.file_exists (Filename.concat d' file)) -+ (fun file -> -+ let fln = Filename.concat d' file in -+ let e = Sys.file_exists fln in -+ (* necessary for ppx executables *) -+ if e || Sys.os_type <> "Win32" || Filename.check_suffix fln ".exe" then -+ e -+ else -+ Sys.file_exists (fln ^ ".exe") -+ ) - files - with Not_found -> true in - ---- ./src/findlib/fl_split.ml -+++ ./src/findlib/fl_split.ml -@@ -126,10 +126,17 @@ - | '/' | '\\' -> true - | _ -> false in - let norm_dir_win() = -- if l >= 1 && s.[0] = '/' then -- Buffer.add_char b '\\' else Buffer.add_char b s.[0]; -- if l >= 2 && s.[1] = '/' then -- Buffer.add_char b '\\' else Buffer.add_char b s.[1]; -+ if l >= 1 then ( -+ if s.[0] = '/' then -+ Buffer.add_char b '\\' -+ else -+ Buffer.add_char b s.[0] ; -+ if l >= 2 then -+ if s.[1] = '/' then -+ Buffer.add_char b '\\' -+ else -+ Buffer.add_char b s.[1]; -+ ); - for k = 2 to l - 1 do - let c = s.[k] in - if is_slash c then ( ---- ./src/findlib/frontend.ml -+++ ./src/findlib/frontend.ml -@@ -31,10 +31,18 @@ - else - Sys_error (arg ^ ": " ^ Unix.error_message code) - -+let is_win = Sys.os_type = "Win32" -+ -+let () = -+ match Findlib_config.system with -+ | "win32" | "win64" | "mingw" | "cygwin" | "mingw64" | "cygwin64" -> -+ (try set_binary_mode_out stdout true with _ -> ()); -+ (try set_binary_mode_out stderr true with _ -> ()); -+ | _ -> () - - let slashify s = - match Findlib_config.system with -- | "mingw" | "mingw64" | "cygwin" -> -+ | "win32" | "win64" | "mingw" | "cygwin" | "mingw64" | "cygwin64" -> - let b = Buffer.create 80 in - String.iter - (function -@@ -49,7 +57,7 @@ - - let out_path ?(prefix="") s = - match Findlib_config.system with -- | "mingw" | "mingw64" | "cygwin" -> -+ | "win32" | "win64" | "mingw" | "mingw64" | "cygwin" -> - let u = slashify s in - prefix ^ - (if String.contains u ' ' then -@@ -273,11 +281,9 @@ - - - let identify_dir d = -- match Sys.os_type with -- | "Win32" -> -- failwith "identify_dir" (* not available *) -- | _ -> -- let s = Unix.stat d in -+ if is_win then -+ failwith "identify_dir"; (* not available *) -+ let s = Unix.stat d in - (s.Unix.st_dev, s.Unix.st_ino) - ;; - -@@ -459,6 +465,96 @@ - ) - packages - -+let rewrite_cmd s = -+ if s = "" || not is_win then -+ s -+ else -+ let s = -+ let l = String.length s in -+ let b = Buffer.create l in -+ for i = 0 to pred l do -+ match s.[i] with -+ | '/' -> Buffer.add_char b '\\' -+ | x -> Buffer.add_char b x -+ done; -+ Buffer.contents b -+ in -+ if (Filename.is_implicit s && String.contains s '\\' = false) || -+ Filename.check_suffix (String.lowercase s) ".exe" then -+ s -+ else -+ let s' = s ^ ".exe" in -+ if Sys.file_exists s' then -+ s' -+ else -+ s -+ -+let rewrite_cmd s = -+ if s = "" || not is_win then s else -+ let s = -+ let l = String.length s in -+ let b = Buffer.create l in -+ for i = 0 to pred l do -+ match s.[i] with -+ | '/' -> Buffer.add_char b '\\' -+ | x -> Buffer.add_char b x -+ done; -+ Buffer.contents b -+ in -+ if (Filename.is_implicit s && String.contains s '\\' = false) || -+ Filename.check_suffix (String.lowercase s) ".exe" then -+ s -+ else -+ let s' = s ^ ".exe" in -+ if Sys.file_exists s' then -+ s' -+ else -+ s -+ -+let rewrite_pp cmd = -+ if not is_win then cmd else -+ let module T = struct exception Keep end in -+ let is_whitespace = function -+ | ' ' | '\011' | '\012' | '\n' | '\r' | '\t' -> true -+ | _ -> false in -+ (* characters that triggers special behaviour (cmd.exe, not unix shell) *) -+ let is_unsafe_char = function -+ | '(' | ')' | '%' | '!' | '^' | '<' | '>' | '&' -> true -+ | _ -> false in -+ let len = String.length cmd in -+ let buf = Buffer.create (len + 4) in -+ let buf_cmd = Buffer.create len in -+ let rec iter_ws i = -+ if i >= len then () else -+ let cur = cmd.[i] in -+ if is_whitespace cur then ( -+ Buffer.add_char buf cur; -+ iter_ws (succ i) -+ ) -+ else -+ iter_cmd i -+ and iter_cmd i = -+ if i >= len then add_buf_cmd () else -+ let cur = cmd.[i] in -+ if is_unsafe_char cur || cur = '"' || cur = '\'' then -+ raise T.Keep; -+ if is_whitespace cur then ( -+ add_buf_cmd (); -+ Buffer.add_substring buf cmd i (len - i) -+ ) -+ else ( -+ Buffer.add_char buf_cmd cur; -+ iter_cmd (succ i) -+ ) -+ and add_buf_cmd () = -+ if Buffer.length buf_cmd > 0 then -+ Buffer.add_string buf (rewrite_cmd (Buffer.contents buf_cmd)) -+ in -+ try -+ iter_ws 0; -+ Buffer.contents buf -+ with -+ | T.Keep -> cmd - - let process_pp_spec syntax_preds packages pp_opts = - (* Returns: pp_command *) -@@ -549,7 +645,7 @@ - None -> [] - | Some cmd -> - ["-pp"; -- cmd ^ " " ^ -+ (rewrite_cmd cmd) ^ " " ^ - String.concat " " (List.map Filename.quote pp_i_options) ^ " " ^ - String.concat " " (List.map Filename.quote pp_archives) ^ " " ^ - String.concat " " (List.map Filename.quote pp_opts)] -@@ -625,9 +721,11 @@ - in - try - let preprocessor = -+ rewrite_cmd ( - resolve_path - ~base ~explicit:true -- (package_property predicates pname "ppx") in -+ (package_property predicates pname "ppx") ) -+ in - ["-ppx"; String.concat " " (preprocessor :: options)] - with Not_found -> [] - ) -@@ -895,6 +993,14 @@ - switch (e.g. -L instead of -L ) - *) - -+(* We may need to remove files on which we do not have complete control. -+ On Windows, removing a read-only file fails so try to change the -+ mode of the file first. *) -+let remove_file fname = -+ try Sys.remove fname -+ with Sys_error _ when is_win -> -+ (try Unix.chmod fname 0o666 with Unix.Unix_error _ -> ()); -+ Sys.remove fname - - let ocamlc which () = - -@@ -1022,9 +1128,12 @@ - - "-intf", - Arg.String (fun s -> pass_files := !pass_files @ [ Intf(slashify s) ]); -- -+ - "-pp", -- Arg.String (fun s -> pp_specified := true; add_spec_fn "-pp" s); -+ Arg.String (fun s -> pp_specified := true; add_spec_fn "-pp" (rewrite_pp s)); -+ -+ "-ppx", -+ Arg.String (fun s -> add_spec_fn "-ppx" (rewrite_pp s)); - - "-thread", - Arg.Unit (fun _ -> threads := threads_default); -@@ -1237,7 +1346,7 @@ - with - any -> - close_out initl; -- Sys.remove initl_file_name; -+ remove_file initl_file_name; - raise any - end; - -@@ -1245,9 +1354,9 @@ - at_exit - (fun () -> - let tr f x = try f x with _ -> () in -- tr Sys.remove initl_file_name; -- tr Sys.remove (Filename.chop_extension initl_file_name ^ ".cmi"); -- tr Sys.remove (Filename.chop_extension initl_file_name ^ ".cmo"); -+ tr remove_file initl_file_name; -+ tr remove_file (Filename.chop_extension initl_file_name ^ ".cmi"); -+ tr remove_file (Filename.chop_extension initl_file_name ^ ".cmo"); - ); - - let exclude_list = [ stdlibdir; threads_dir; vmthreads_dir ] in -@@ -1493,7 +1602,9 @@ - [ "-v", Arg.Unit (fun () -> verbose := Verbose); - "-pp", Arg.String (fun s -> - pp_specified := true; -- options := !options @ ["-pp"; s]); -+ options := !options @ ["-pp"; rewrite_pp s]); -+ "-ppx", Arg.String (fun s -> -+ options := !options @ ["-ppx"; rewrite_pp s]); - ] - ) - ) -@@ -1672,7 +1783,9 @@ - Arg.String (fun s -> add_spec_fn "-I" (slashify (resolve_path s))); - - "-pp", Arg.String (fun s -> pp_specified := true; -- add_spec_fn "-pp" s); -+ add_spec_fn "-pp" (rewrite_pp s)); -+ "-ppx", Arg.String (fun s -> add_spec_fn "-ppx" (rewrite_pp s)); -+ - ] - ) - ) -@@ -1830,7 +1943,10 @@ - output_string ch_out append; - close_out ch_out; - close_in ch_in; -- Unix.utimes outpath s.Unix.st_mtime s.Unix.st_mtime; -+ (try Unix.utimes outpath s.Unix.st_mtime s.Unix.st_mtime -+ with Unix.Unix_error(e,_,_) -> -+ prerr_endline("Warning: setting utimes for " ^ outpath -+ ^ ": " ^ Unix.error_message e)); - - prerr_endline("Installed " ^ outpath); - with -@@ -1882,6 +1998,8 @@ - Unix.openfile (Filename.concat dir owner_file) [Unix.O_RDONLY] 0 in - let f = - Unix.in_channel_of_descr fd in -+ if is_win then -+ set_binary_mode_in f false; - try - let line = input_line f in - let is_my_file = (line = pkg) in -@@ -2208,7 +2326,7 @@ - let lines = read_ldconf !ldconf in - let dlldir_norm = Fl_split.norm_dir dlldir in - let dlldir_norm_lc = string_lowercase_ascii dlldir_norm in -- let ci_filesys = (Sys.os_type = "Win32") in -+ let ci_filesys = is_win in - let check_dir d = - let d' = Fl_split.norm_dir d in - (d' = dlldir_norm) || -@@ -2356,7 +2474,7 @@ - List.iter - (fun file -> - let absfile = Filename.concat dlldir file in -- Sys.remove absfile; -+ remove_file absfile; - prerr_endline ("Removed " ^ absfile) - ) - dll_files -@@ -2365,7 +2483,7 @@ - (* Remove the files from the package directory: *) - if Sys.file_exists pkgdir then begin - let files = Sys.readdir pkgdir in -- Array.iter (fun f -> Sys.remove (Filename.concat pkgdir f)) files; -+ Array.iter (fun f -> remove_file (Filename.concat pkgdir f)) files; - Unix.rmdir pkgdir; - prerr_endline ("Removed " ^ pkgdir) - end -@@ -2415,7 +2533,9 @@ - - - let print_configuration() = -+ let sl = slashify in - let dir s = -+ let s = sl s in - if Sys.file_exists s then - s - else -@@ -2453,27 +2573,27 @@ - if md = "" then "the corresponding package directories" else dir md - ); - Printf.printf "The standard library is assumed to reside in:\n %s\n" -- (Findlib.ocaml_stdlib()); -+ (sl (Findlib.ocaml_stdlib())); - Printf.printf "The ld.conf file can be found here:\n %s\n" -- (Findlib.ocaml_ldconf()); -+ (sl (Findlib.ocaml_ldconf())); - flush stdout - | Some "conf" -> -- print_endline (Findlib.config_file()) -+ print_endline (sl (Findlib.config_file())) - | Some "path" -> -- List.iter print_endline (Findlib.search_path()) -+ List.iter ( fun x -> print_endline (sl x)) (Findlib.search_path()) - | Some "destdir" -> -- print_endline (Findlib.default_location()) -+ print_endline ( sl (Findlib.default_location())) - | Some "metadir" -> -- print_endline (Findlib.meta_directory()) -+ print_endline ( sl (Findlib.meta_directory())) - | Some "metapath" -> - let mdir = Findlib.meta_directory() in - let ddir = Findlib.default_location() in -- print_endline -- (if mdir <> "" then mdir ^ "/META.%s" else ddir ^ "/%s/META") -+ print_endline ( sl -+ (if mdir <> "" then mdir ^ "/META.%s" else ddir ^ "/%s/META")) - | Some "stdlib" -> -- print_endline (Findlib.ocaml_stdlib()) -+ print_endline ( sl (Findlib.ocaml_stdlib())) - | Some "ldconf" -> -- print_endline (Findlib.ocaml_ldconf()) -+ print_endline ( sl (Findlib.ocaml_ldconf())) - | _ -> - assert false - ;; -@@ -2481,7 +2601,7 @@ - - let ocamlcall pkg cmd = - let dir = package_directory pkg in -- let path = Filename.concat dir cmd in -+ let path = rewrite_cmd (Filename.concat dir cmd) in - begin - try Unix.access path [ Unix.X_OK ] - with -@@ -2647,6 +2767,10 @@ - | Sys_error f -> - prerr_endline ("ocamlfind: " ^ f); - exit 2 -+ | Unix.Unix_error (e, fn, f) -> -+ prerr_endline ("ocamlfind: " ^ fn ^ " " ^ f -+ ^ ": " ^ Unix.error_message e); -+ exit 2 - | Findlib.No_such_package(pkg,info) -> - prerr_endline ("ocamlfind: Package `" ^ pkg ^ "' not found" ^ - (if info <> "" then " - " ^ info else "")); ---- ./src/findlib/Makefile -+++ ./src/findlib/Makefile -@@ -90,6 +90,7 @@ - cat findlib_config.mlp | \ - $(SH) $(TOP)/tools/patch '@CONFIGFILE@' '$(OCAMLFIND_CONF)' | \ - $(SH) $(TOP)/tools/patch '@STDLIB@' '$(OCAML_CORE_STDLIB)' | \ -+ $(SH) $(TOP)/tools/patch '@EXEC_SUFFIX@' '$(EXEC_SUFFIX)' | \ - sed -e 's;@AUTOLINK@;$(OCAML_AUTOLINK);g' \ - -e 's;@SYSTEM@;$(SYSTEM);g' \ - >findlib_config.ml diff --git a/esy.lock/overrides/opam__s__ocamlfind_secondary_opam__c__1.8.1_opam_override/files/gen-findlib-conf.sh b/esy.lock/overrides/opam__s__ocamlfind_secondary_opam__c__1.8.1_opam_override/files/gen-findlib-conf.sh deleted file mode 100644 index c923ef49eb..0000000000 --- a/esy.lock/overrides/opam__s__ocamlfind_secondary_opam__c__1.8.1_opam_override/files/gen-findlib-conf.sh +++ /dev/null @@ -1,14 +0,0 @@ -OCAML_SECONDARY_COMPILER=$1 - -cat >ocaml-secondary-compiler.conf <META < Date: Tue, 18 May 2021 16:20:40 +0100 Subject: [PATCH 03/13] Fix esy build and install While the opam package has been split into odoc_parser and odoc, the esy build remains one. Package build and install steps have been amended for this. --- package.json | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/package.json b/package.json index c540c8bf63..5a3b16f389 100644 --- a/package.json +++ b/package.json @@ -9,7 +9,10 @@ "Leo White " ], "esy": { - "build": "dune build -p odoc", + "build": "dune build @install", + "install": [ + "dune install --prefix=#{self.install}" + ], "release": { "releasedBinaries": [ "odoc" From 24e035cc6851ca78a35e66bb42151215950b775c Mon Sep 17 00:00:00 2001 From: Jon Ludlam Date: Tue, 11 May 2021 15:52:53 +0100 Subject: [PATCH 04/13] Add support for code blocks with metadata --- src/document/comment.ml | 2 +- src/model/comment.ml | 2 +- src/model_desc/comment_desc.ml | 5 ++-- src/parser/ast.ml | 2 +- src/parser/lexer.mll | 24 +++++++++++++++---- src/parser/syntax.ml | 11 +++------ src/parser/test/test.ml | 43 +++++++++++++++++++++++++++++++++- src/parser/token.ml | 2 +- test/model/semantics/test.ml | 12 +++++++--- 9 files changed, 80 insertions(+), 23 deletions(-) diff --git a/src/document/comment.ml b/src/document/comment.ml index 18b5fec1b7..0c2afe3bb8 100644 --- a/src/document/comment.ml +++ b/src/document/comment.ml @@ -195,7 +195,7 @@ let rec nestable_block_element : Comment.nestable_block_element -> Block.one = fun content -> match content with | `Paragraph p -> paragraph p - | `Code_block code -> block @@ Source (source_of_code code) + | `Code_block (_, code) -> block @@ Source (source_of_code code) | `Verbatim s -> block @@ Verbatim s | `Modules ms -> module_references ms | `List (kind, items) -> diff --git a/src/model/comment.ml b/src/model/comment.ml index 1598555a08..9dd9b902ff 100644 --- a/src/model/comment.ml +++ b/src/model/comment.ml @@ -40,7 +40,7 @@ type module_reference = { type nestable_block_element = [ `Paragraph of paragraph - | `Code_block of string + | `Code_block of string option * string | `Verbatim of string | `Modules of module_reference list | `List of diff --git a/src/model_desc/comment_desc.ml b/src/model_desc/comment_desc.ml index aab5f62528..280b1a7ddb 100644 --- a/src/model_desc/comment_desc.ml +++ b/src/model_desc/comment_desc.ml @@ -18,7 +18,7 @@ and general_link_content = general_inline_element with_location list type general_block_element = [ `Paragraph of general_link_content - | `Code_block of string + | `Code_block of string option * string | `Verbatim of string | `Modules of Comment.module_reference list | `List of @@ -88,7 +88,8 @@ let rec block_element : general_block_element t = Variant (function | `Paragraph x -> C ("`Paragraph", x, link_content) - | `Code_block x -> C ("`Code_block", x, string) + | `Code_block (x, y) -> + C ("`Code_block", (x, y), Pair (Option string, string)) | `Verbatim x -> C ("`Verbatim", x, string) | `Modules x -> C ("`Modules", x, List module_reference) | `List (x1, x2) -> diff --git a/src/parser/ast.ml b/src/parser/ast.ml index dd08f47be0..f2c10cd463 100644 --- a/src/parser/ast.ml +++ b/src/parser/ast.ml @@ -16,7 +16,7 @@ type inline_element = type nestable_block_element = [ `Paragraph of inline_element with_location list - | `Code_block of string + | `Code_block of string option * string | `Verbatim of string | `Modules of string with_location list | `List of diff --git a/src/parser/lexer.mll b/src/parser/lexer.mll index e58c211231..b0fc2c4692 100644 --- a/src/parser/lexer.mll +++ b/src/parser/lexer.mll @@ -213,7 +213,7 @@ let emit_verbatim input start_offset buffer = let t = trim_trailing_blank_lines t in emit input (`Verbatim t) ~start_offset -let emit_code_block input c = +let emit_code_block input meta c = let c = trim_trailing_blank_lines c in let c = with_location_adjustments @@ -223,7 +223,7 @@ let emit_code_block input c = input c in let c = trim_leading_blank_lines c in - emit input (`Code_block c) + emit input (`Code_block (meta, c)) @@ -262,6 +262,8 @@ let raw_markup = ([^ '%'] | '%'+ [^ '%' '}'])* '%'* let raw_markup_target = ([^ ':' '%'] | '%'+ [^ ':' '%' '}'])* '%'* +let code_block_meta = + ([^ '['])* @@ -327,7 +329,10 @@ rule token input = parse { emit input (reference_token start target) } | "{[" (code_block_text as c) "]}" - { emit_code_block input c } + { emit_code_block input None c } + + | "{@" (code_block_meta as m) "[" (code_block_text as c) "]}" + { emit_code_block input (Some m) c } | "{v" { verbatim @@ -476,8 +481,17 @@ rule token input = parse ~start_offset:(Lexing.lexeme_end lexbuf) (Parse_error.not_allowed ~what:(Token.describe `End) - ~in_what:(Token.describe (`Code_block ""))); - emit_code_block input c } + ~in_what:(Token.describe (`Code_block (None, "")))); + emit_code_block input None c } + + | "{@" (code_block_meta as m) "[" (code_block_text as c) eof + { warning + input + ~start_offset:(Lexing.lexeme_end lexbuf) + (Parse_error.not_allowed + ~what:(Token.describe `End) + ~in_what:(Token.describe (`Code_block (None, "")))); + emit_code_block input (Some m) c } diff --git a/src/parser/syntax.ml b/src/parser/syntax.ml index a21fd25ff0..6134378789 100644 --- a/src/parser/syntax.ml +++ b/src/parser/syntax.ml @@ -723,8 +723,8 @@ let rec block_element_list : let block = Location.map (accepted_in_all_contexts context) block in let acc = block :: acc in consume_block_elements ~parsed_a_tag `After_text acc - | { value = (`Code_block s | `Verbatim s) as token; location } as next_token - -> + | { value = (`Code_block (_, s) | `Verbatim s) as token; location } as + next_token -> warn_if_after_tags next_token; warn_if_after_text next_token; if s = "" then @@ -732,12 +732,7 @@ let rec block_element_list : |> Error.warning input.warnings; junk input; - let block = - match token with - | `Code_block _ -> `Code_block s - | `Verbatim _ -> `Verbatim s - in - let block = accepted_in_all_contexts context block in + let block = accepted_in_all_contexts context token in let block = Location.at location block in let acc = block :: acc in consume_block_elements ~parsed_a_tag `After_text acc diff --git a/src/parser/test/test.ml b/src/parser/test/test.ml index 8d95494ec8..a999b9321a 100644 --- a/src/parser/test/test.ml +++ b/src/parser/test/test.ml @@ -52,7 +52,8 @@ module Ast_to_sexp = struct let rec nestable_block_element : Ast.nestable_block_element -> sexp = function | `Paragraph es -> List [ Atom "paragraph"; List (List.map (at inline_element) es) ] - | `Code_block c -> List [ Atom "code_block"; Atom c ] + | `Code_block (None, c) -> List [ Atom "code_block"; Atom c ] + | `Code_block (Some m, c) -> List [ Atom "code_block"; Atom m; Atom c ] | `Verbatim t -> List [ Atom "verbatim"; Atom t ] | `Modules ps -> List [ Atom "modules"; List (List.map (at str) ps) ] | `List (kind, weight, items) -> @@ -2495,6 +2496,46 @@ let%expect_test _ = "File \"f.ml\", line 2, characters 13-14:\ \nUnpaired '}' (end of markup).\ \nSuggestion: try '\\}'."))) |}] + + let code_block_with_meta = + test "{@ocaml env=f1 version>=4.06 [code goes here]}"; + [%expect + {| + ((output + (((f.ml (1 0) (1 46)) + (code_block "ocaml env=f1 version>=4.06 " "code goes here")))) + (warnings ())) |}] + + let code_block_empty_meta = + test "{@[code goes here]}"; + [%expect + {| + ((output (((f.ml (1 0) (1 19)) (code_block "" "code goes here")))) + (warnings ())) |}] + + let unterminated_code_block_with_meta = + test "{@meta[foo"; + [%expect + {| + ((output (((f.ml (1 0) (1 10)) (code_block meta foo)))) + (warnings + ( "File \"f.ml\", line 1, characters 10-10:\ + \nEnd of text is not allowed in '{[...]}' (code block)."))) |}] + + let unterminated_code_block_with_meta = + test "{@met"; + [%expect + {| + ((output + (((f.ml (1 0) (1 5)) + (paragraph + (((f.ml (1 0) (1 1)) (word {)) ((f.ml (1 1) (1 5)) (word @met))))))) + (warnings + ( "File \"f.ml\", line 1, characters 0-1:\ + \n'{': bad markup.\ + \nSuggestion: escape the brace with '\\{'." + "File \"f.ml\", line 1, characters 1-5:\ + \nUnknown tag '@met'."))) |}] end in () diff --git a/src/parser/token.ml b/src/parser/token.ml index ae5687ad1b..a14a1caba9 100644 --- a/src/parser/token.ml +++ b/src/parser/token.ml @@ -61,7 +61,7 @@ type t = | `Simple_link of string | `Begin_link_with_replacement_text of string | (* Leaf block element markup. *) - `Code_block of string + `Code_block of string option * string | `Verbatim of string | `Modules of string | (* List markup. *) diff --git a/test/model/semantics/test.ml b/test/model/semantics/test.ml index 677b4534bb..00f9a21a43 100644 --- a/test/model/semantics/test.ml +++ b/test/model/semantics/test.ml @@ -1917,7 +1917,10 @@ let%expect_test _ = [%expect {| { - "value": [ { "`Tag": { "`Author": "Foo" } }, { "`Code_block": "bar" } ], + "value": [ + { "`Tag": { "`Author": "Foo" } }, + { "`Code_block": [ "None", "bar" ] } + ], "warnings": [ "File \"f.ml\", line 2, characters 0-7:\n'{[...]}' (code block) is not allowed in the tags section.\nSuggestion: move '{[...]}' (code block) before any tags." ] @@ -2304,7 +2307,7 @@ let%expect_test _ = test "{[@author Foo]}"; [%expect {| - { "value": [ { "`Code_block": "@author Foo" } ], "warnings": [] } |}] + { "value": [ { "`Code_block": [ "None", "@author Foo" ] } ], "warnings": [] } |}] let in_verbatim = test "{v @author Foo v}"; @@ -2317,7 +2320,10 @@ let%expect_test _ = [%expect {| { - "value": [ { "`Code_block": "foo" }, { "`Tag": { "`Author": "Bar" } } ], + "value": [ + { "`Code_block": [ "None", "foo" ] }, + { "`Tag": { "`Author": "Bar" } } + ], "warnings": [ "File \"f.ml\", line 1, characters 8-19:\n'@author' should begin on its own line." ] From fb230d8ca32073434c97078e2ed1cff915a68f0a Mon Sep 17 00:00:00 2001 From: Jon Ludlam Date: Tue, 18 May 2021 14:59:09 +0100 Subject: [PATCH 05/13] Add `Odoc_parser.Warnings.to_loc` --- src/parser/dune | 2 +- src/parser/location.ml | 21 +++++++++++++++++++++ src/parser/location.mli | 2 ++ 3 files changed, 24 insertions(+), 1 deletion(-) diff --git a/src/parser/dune b/src/parser/dune index 892ac8aed1..e87ffb22b1 100644 --- a/src/parser/dune +++ b/src/parser/dune @@ -5,4 +5,4 @@ (public_name odoc-parser) (instrumentation (backend bisect_ppx)) - (libraries astring result)) + (libraries astring result compiler-libs.common)) diff --git a/src/parser/location.ml b/src/parser/location.ml index 9e2a5668db..d5abd95968 100644 --- a/src/parser/location.ml +++ b/src/parser/location.ml @@ -28,3 +28,24 @@ let span spans = let nudge_start offset span = { span with start = { span.start with column = span.start.column + offset } } + +let to_loc span = + let loc_start = + Lexing. + { + pos_fname = span.file; + pos_lnum = span.start.line; + pos_bol = 0; + pos_cnum = span.start.column; + } + in + let loc_end = + Lexing. + { + pos_fname = span.file; + pos_lnum = span.end_.line; + pos_bol = 0; + pos_cnum = span.end_.column; + } + in + Warnings.{ loc_start; loc_end; loc_ghost = false } diff --git a/src/parser/location.mli b/src/parser/location.mli index c4a59baac1..5554065bd5 100644 --- a/src/parser/location.mli +++ b/src/parser/location.mli @@ -19,3 +19,5 @@ val span : span list -> span (* This adjusts only the column number, implicitly assuming that the offset does not move the location across a newline character. *) val nudge_start : int -> span -> span + +val to_loc : span -> Warnings.loc From 9ac901adcf5fe90fbfb1f329857573f8e2db1bae Mon Sep 17 00:00:00 2001 From: Jon Ludlam Date: Tue, 18 May 2021 17:23:23 +0100 Subject: [PATCH 06/13] Sanitise Odoc_parser interface some more --- src/model/error.ml | 8 ++-- src/model/error.mli | 4 +- src/parser/error.mli | 16 ------- src/parser/lexer.mli | 2 +- src/parser/lexer.mll | 4 +- src/parser/odoc_parser.ml | 38 +++++++-------- src/parser/odoc_parser.mli | 11 ++--- src/parser/parse_error.ml | 71 +++++++++++++++-------------- src/parser/syntax.ml | 70 ++++++++++++++-------------- src/parser/syntax.mli | 5 +- src/parser/test/test.ml | 4 +- src/parser/{error.ml => warning.ml} | 22 ++------- src/parser/warning.mli | 8 ++++ 13 files changed, 122 insertions(+), 141 deletions(-) delete mode 100644 src/parser/error.mli rename src/parser/{error.ml => warning.ml} (60%) create mode 100644 src/parser/warning.mli diff --git a/src/model/error.ml b/src/model/error.ml index 3c7a6e78db..675c16b897 100644 --- a/src/model/error.ml +++ b/src/model/error.ml @@ -1,6 +1,6 @@ open Result -type full_location_payload = Odoc_parser.Error.t = { +type full_location_payload = Odoc_parser.Warning.t = { location : Location_.span; message : string; } @@ -8,7 +8,7 @@ type full_location_payload = Odoc_parser.Error.t = { type filename_only_payload = { file : string; message : string } type t = - [ `With_full_location of Odoc_parser.Error.t + [ `With_full_location of Odoc_parser.Warning.t | `With_filename_only of filename_only_payload ] let kasprintf k fmt = @@ -125,10 +125,10 @@ let handle_errors_and_warnings ~warnings_options = function let unpack_warnings ww = (ww.value, List.map (fun w -> w.w) ww.warnings) -let t_of_parser_t : Odoc_parser.Error.t -> t = +let t_of_parser_t : Odoc_parser.Warning.t -> t = fun x -> (`With_full_location x :> t) -let raise_parser_warnings { Odoc_parser.Error.value; warnings } = +let raise_parser_warnings { Odoc_parser.value; warnings } = (* Parsing errors may be fatal. *) let non_fatal = false in raise_warnings' diff --git a/src/model/error.mli b/src/model/error.mli index 97b2f28657..d11a2ec51d 100644 --- a/src/model/error.mli +++ b/src/model/error.mli @@ -60,8 +60,8 @@ val print_errors : t list -> unit val unpack_warnings : 'a with_warnings -> 'a * t list -val t_of_parser_t : Odoc_parser.Error.t -> t +val t_of_parser_t : Odoc_parser.Warning.t -> t (** Convert a parsing error into a [t]. *) -val raise_parser_warnings : 'a Odoc_parser.Error.with_warnings -> 'a +val raise_parser_warnings : Odoc_parser.t -> Odoc_parser.Ast.docs (** Like {!raise_warnings} but handle parsing errors. *) diff --git a/src/parser/error.mli b/src/parser/error.mli deleted file mode 100644 index d5ee051aab..0000000000 --- a/src/parser/error.mli +++ /dev/null @@ -1,16 +0,0 @@ -type t = { location : Location.span; message : string } - -val to_string : t -> string - -val make : - ?suggestion:string -> - ('a, Format.formatter, unit, Location.span -> t) format4 -> - 'a - -type 'a with_warnings = { value : 'a; warnings : t list } - -type warning_accumulator - -val accumulate_warnings : (warning_accumulator -> 'a) -> 'a with_warnings - -val warning : warning_accumulator -> t -> unit diff --git a/src/parser/lexer.mli b/src/parser/lexer.mli index f9a0e0a099..81338ac0b3 100644 --- a/src/parser/lexer.mli +++ b/src/parser/lexer.mli @@ -1,7 +1,7 @@ type input = { file : string; offset_to_location : int -> Location.point; - warnings : Error.warning_accumulator; + warnings : Warning.t list ref; lexbuf : Lexing.lexbuf; } diff --git a/src/parser/lexer.mll b/src/parser/lexer.mll index b0fc2c4692..6e0bc05033 100644 --- a/src/parser/lexer.mll +++ b/src/parser/lexer.mll @@ -133,7 +133,7 @@ let trim_leading_whitespace : first_line_offset:int -> string -> string = type input = { file : string; offset_to_location : int -> Location.point; - warnings : Error.warning_accumulator; + warnings : Warning.t list ref; lexbuf : Lexing.lexbuf; } @@ -173,7 +173,7 @@ let emit = let warning = with_location_adjustments (fun input location error -> - Error.warning input.warnings (error location)) + input.warnings := (error location) :: !(input.warnings)) let reference_token start target = match start with diff --git a/src/parser/odoc_parser.ml b/src/parser/odoc_parser.ml index 4af612c189..57ddbd6f60 100644 --- a/src/parser/odoc_parser.ml +++ b/src/parser/odoc_parser.ml @@ -1,6 +1,8 @@ module Ast = Ast module Location = Location -module Error = Error +module Warning = Warning + +type t = { value : Ast.docs; warnings : Warning.t list } (* odoc uses an ocamllex lexer. The "engine" for such lexers is the standard [Lexing] module. @@ -63,20 +65,20 @@ let offset_to_location : scan_to_last_newline reversed_newlines let parse_comment ~location ~text = - Error.accumulate_warnings (fun warnings -> - let token_stream = - let lexbuf = Lexing.from_string text in - let offset_to_location = - offset_to_location ~input:text ~comment_location:location - in - let input : Lexer.input = - { - file = location.Lexing.pos_fname; - offset_to_location; - warnings; - lexbuf; - } - in - Stream.from (fun _token_index -> Some (Lexer.token input lexbuf)) - in - Syntax.parse warnings token_stream) + let token_stream = + let lexbuf = Lexing.from_string text in + let offset_to_location = + offset_to_location ~input:text ~comment_location:location + in + let input : Lexer.input = + { + file = location.Lexing.pos_fname; + offset_to_location; + warnings = ref []; + lexbuf; + } + in + Stream.from (fun _token_index -> Some (Lexer.token input lexbuf)) + in + let value, warnings = Syntax.parse token_stream in + { value; warnings } diff --git a/src/parser/odoc_parser.mli b/src/parser/odoc_parser.mli index c9513338df..96a257246a 100644 --- a/src/parser/odoc_parser.mli +++ b/src/parser/odoc_parser.mli @@ -1,13 +1,12 @@ module Ast = Ast module Location = Location -module Error : sig - type t = Error.t = { location : Location.span; message : string } +module Warning : sig + type t = Warning.t = { location : Location.span; message : string } val to_string : t -> string - - type 'a with_warnings = { value : 'a; warnings : t list } end -val parse_comment : - location:Lexing.position -> text:string -> Ast.docs Error.with_warnings +type t = { value : Ast.docs; warnings : Warning.t list } + +val parse_comment : location:Lexing.position -> text:string -> t diff --git a/src/parser/parse_error.ml b/src/parser/parse_error.ml index 4f054dcc57..b627688fb0 100644 --- a/src/parser/parse_error.ml +++ b/src/parser/parse_error.ml @@ -1,26 +1,27 @@ let capitalize_ascii = Astring.String.Ascii.capitalize -let bad_markup : ?suggestion:string -> string -> Location.span -> Error.t = - fun ?suggestion -> Error.make ?suggestion "'%s': bad markup." +let bad_markup : ?suggestion:string -> string -> Location.span -> Warning.t = + fun ?suggestion -> Warning.make ?suggestion "'%s': bad markup." -let leading_zero_in_heading_level : string -> Location.span -> Error.t = - Error.make "'%s': leading zero in heading level." +let leading_zero_in_heading_level : string -> Location.span -> Warning.t = + Warning.make "'%s': leading zero in heading level." -let should_not_be_empty : what:string -> Location.span -> Error.t = - fun ~what -> Error.make "%s should not be empty." (capitalize_ascii what) +let should_not_be_empty : what:string -> Location.span -> Warning.t = + fun ~what -> Warning.make "%s should not be empty." (capitalize_ascii what) -let markup_should_not_be_used : what:string -> Location.span -> Error.t = +let markup_should_not_be_used : what:string -> Location.span -> Warning.t = fun ~what -> - Error.make "%s should not be used because it has no effect." + Warning.make "%s should not be used because it has no effect." (capitalize_ascii what) -let should_begin_on_its_own_line : what:string -> Location.span -> Error.t = +let should_begin_on_its_own_line : what:string -> Location.span -> Warning.t = fun ~what -> - Error.make "%s should begin on its own line." (capitalize_ascii what) + Warning.make "%s should begin on its own line." (capitalize_ascii what) -let should_be_followed_by_whitespace : what:string -> Location.span -> Error.t = +let should_be_followed_by_whitespace : what:string -> Location.span -> Warning.t + = fun ~what -> - Error.make "%s should be followed by space, a tab, or a new line." + Warning.make "%s should be followed by space, a tab, or a new line." (capitalize_ascii what) let not_allowed : @@ -28,40 +29,40 @@ let not_allowed : what:string -> in_what:string -> Location.span -> - Error.t = + Warning.t = fun ?suggestion ~what ~in_what -> - Error.make ?suggestion "%s is not allowed in %s." (capitalize_ascii what) + Warning.make ?suggestion "%s is not allowed in %s." (capitalize_ascii what) in_what -let no_leading_whitespace_in_verbatim : Location.span -> Error.t = - Error.make "'{v' should be followed by whitespace." +let no_leading_whitespace_in_verbatim : Location.span -> Warning.t = + Warning.make "'{v' should be followed by whitespace." -let no_trailing_whitespace_in_verbatim : Location.span -> Error.t = - Error.make "'v}' should be preceded by whitespace." +let no_trailing_whitespace_in_verbatim : Location.span -> Warning.t = + Warning.make "'v}' should be preceded by whitespace." -let stray_at : Location.span -> Error.t = Error.make "Stray '@'." +let stray_at : Location.span -> Warning.t = Warning.make "Stray '@'." -let stray_cr : Location.span -> Error.t = - Error.make "Stray '\\r' (carriage return character)." +let stray_cr : Location.span -> Warning.t = + Warning.make "Stray '\\r' (carriage return character)." -let truncated_before : Location.span -> Error.t = - Error.make "'@before' expects version number on the same line." +let truncated_before : Location.span -> Warning.t = + Warning.make "'@before' expects version number on the same line." -let truncated_param : Location.span -> Error.t = - Error.make "'@param' expects parameter name on the same line." +let truncated_param : Location.span -> Warning.t = + Warning.make "'@param' expects parameter name on the same line." -let truncated_raise : string -> Location.span -> Error.t = - Error.make "'%s' expects exception constructor on the same line." +let truncated_raise : string -> Location.span -> Warning.t = + Warning.make "'%s' expects exception constructor on the same line." -let truncated_see : Location.span -> Error.t = - Error.make +let truncated_see : Location.span -> Warning.t = + Warning.make "'@see' should be followed by , 'file', or \"document title\"." -let unknown_tag : string -> Location.span -> Error.t = - Error.make "Unknown tag '%s'." +let unknown_tag : string -> Location.span -> Warning.t = + Warning.make "Unknown tag '%s'." -let unpaired_right_brace : Location.span -> Error.t = - Error.make ~suggestion:"try '\\}'." "Unpaired '}' (end of markup)." +let unpaired_right_brace : Location.span -> Warning.t = + Warning.make ~suggestion:"try '\\}'." "Unpaired '}' (end of markup)." -let unpaired_right_bracket : Location.span -> Error.t = - Error.make ~suggestion:"try '\\]'." "Unpaired ']' (end of code)." +let unpaired_right_bracket : Location.span -> Warning.t = + Warning.make ~suggestion:"try '\\]'." "Unpaired ']' (end of code)." diff --git a/src/parser/syntax.ml b/src/parser/syntax.ml index 6134378789..493dd5b353 100644 --- a/src/parser/syntax.ml +++ b/src/parser/syntax.ml @@ -25,9 +25,11 @@ type 'a with_location = 'a Location.with_location type input = { tokens : Token.t Location.with_location Stream.t; - warnings : Error.warning_accumulator; + warnings : Warning.t list ref; } +let add_warning input warning = input.warnings := warning :: !(input.warnings) + let junk input = Stream.junk input.tokens let peek input = @@ -122,7 +124,7 @@ let rec inline_element : Parse_error.should_not_be_empty ~what:(Token.describe parent_markup) location - |> Error.warning input.warnings; + |> add_warning input; Location.at location (`Styled (s, content)) | `Simple_reference r -> @@ -150,7 +152,7 @@ let rec inline_element : Parse_error.should_not_be_empty ~what:(Token.describe parent_markup) location - |> Error.warning input.warnings; + |> add_warning input; Location.at location (`Reference (`With_text, r, content)) | `Simple_link u -> @@ -162,7 +164,7 @@ let rec inline_element : Parse_error.should_not_be_empty ~what:(Token.describe next_token) location - |> Error.warning input.warnings; + |> add_warning input; Location.at location (`Link (u, [])) | `Begin_link_with_replacement_text u as parent_markup -> @@ -174,7 +176,7 @@ let rec inline_element : Parse_error.should_not_be_empty ~what:(Token.describe parent_markup) location - |> Error.warning input.warnings; + |> add_warning input; let content, brace_location = delimited_inline_element_list ~parent_markup @@ -246,7 +248,7 @@ and delimited_inline_element_list : Parse_error.not_allowed ~what:(Token.describe blank) ~in_what:(Token.describe parent_markup) next_token.location - |> Error.warning input.warnings; + |> add_warning input; junk input; let element = Location.same next_token (`Space ws) in @@ -260,7 +262,7 @@ and delimited_inline_element_list : Parse_error.not_allowed ~what:(Token.describe bullet) ~in_what:(Token.describe parent_markup) ~suggestion next_token.location - |> Error.warning input.warnings); + |> add_warning input); let acc = inline_element input next_token.location bullet :: acc in consume_elements ~at_start_of_line:false acc @@ -269,7 +271,7 @@ and delimited_inline_element_list : ~what:(Token.describe other_token) ~in_what:(Token.describe parent_markup) next_token.location - |> Error.warning input.warnings; + |> add_warning input; let last_location = match acc with @@ -300,7 +302,7 @@ and delimited_inline_element_list : Parse_error.not_allowed ~what:(Token.describe blank) ~in_what:(Token.describe parent_markup) first_token.location - |> Error.warning input.warnings; + |> add_warning input; junk input; consume_elements ~at_start_of_line:true [] @@ -312,7 +314,7 @@ and delimited_inline_element_list : Parse_error.should_be_followed_by_whitespace ~what:(Token.print parent_markup) parent_markup_location - |> Error.warning input.warnings; + |> add_warning input; consume_elements ~at_start_of_line:false [] (* {2 Paragraphs} *) @@ -530,7 +532,7 @@ let rec block_element_list : let warn_if_after_text { Location.location; value = token } = if where_in_line = `After_text then Parse_error.should_begin_on_its_own_line ~what:(describe token) location - |> Error.warning input.warnings + |> add_warning input in let warn_if_after_tags { Location.location; value = token } = @@ -540,7 +542,7 @@ let rec block_element_list : in Parse_error.not_allowed ~what:(describe token) ~in_what:"the tags section" ~suggestion location - |> Error.warning input.warnings + |> add_warning input in let warn_because_not_at_top_level { Location.location; value = token } = @@ -551,7 +553,7 @@ let rec block_element_list : Parse_error.not_allowed ~what:(Token.describe token) ~in_what:(Token.describe parent_markup) ~suggestion location - |> Error.warning input.warnings + |> add_warning input in match peek input with @@ -595,7 +597,7 @@ let rec block_element_list : Parse_error.not_allowed ~what:(Token.describe token) ~in_what:(Token.describe parent_markup) ~suggestion location - |> Error.warning input.warnings; + |> add_warning input; junk input; consume_block_elements ~parsed_a_tag where_in_line acc @@ -635,7 +637,7 @@ let rec block_element_list : if where_in_line <> `At_start_of_line then Parse_error.should_begin_on_its_own_line ~what:(Token.describe token) location - |> Error.warning input.warnings; + |> add_warning input; junk input; @@ -645,7 +647,7 @@ let rec block_element_list : if s = "" then Parse_error.should_not_be_empty ~what:(Token.describe token) location - |> Error.warning input.warnings; + |> add_warning input; let tag = match tag with | `Author _ -> `Author s @@ -729,7 +731,7 @@ let rec block_element_list : warn_if_after_text next_token; if s = "" then Parse_error.should_not_be_empty ~what:(Token.describe token) location - |> Error.warning input.warnings; + |> add_warning input; junk input; let block = accepted_in_all_contexts context token in @@ -771,7 +773,7 @@ let rec block_element_list : if modules = [] then Parse_error.should_not_be_empty ~what:(Token.describe token) location - |> Error.warning input.warnings; + |> add_warning input; let block = accepted_in_all_contexts context (`Modules modules) in let block = Location.at location block in @@ -788,7 +790,7 @@ let rec block_element_list : in if items = [] then Parse_error.should_not_be_empty ~what:(Token.describe token) location - |> Error.warning input.warnings; + |> add_warning input; let location = Location.span [ location; brace_location ] in let block = `List (kind, `Heavy, items) in @@ -801,7 +803,7 @@ let rec block_element_list : | `After_text | `After_shorthand_bullet -> Parse_error.should_begin_on_its_own_line ~what:(Token.describe token) location - |> Error.warning input.warnings + |> add_warning input | _ -> ()); warn_if_after_tags next_token; @@ -857,13 +859,13 @@ let rec block_element_list : if where_in_line <> `At_start_of_line then Parse_error.should_begin_on_its_own_line ~what:(Token.describe token) location - |> Error.warning input.warnings; + |> add_warning input; let label = match label with | Some "" -> Parse_error.should_not_be_empty ~what:"heading label" location - |> Error.warning input.warnings; + |> add_warning input; None | _ -> label in @@ -878,7 +880,7 @@ let rec block_element_list : if content = [] then Parse_error.should_not_be_empty ~what:(Token.describe token) location - |> Error.warning input.warnings; + |> add_warning input; let location = Location.span [ location; brace_location ] in let heading = `Heading (level, label, content) in @@ -896,7 +898,7 @@ let rec block_element_list : Parse_error.markup_should_not_be_used ~what:(Token.describe token) location - |> Error.warning input.warnings; + |> add_warning input; let paragraph = `Paragraph content @@ -956,7 +958,7 @@ and shorthand_list_items : if content = [] then Parse_error.should_not_be_empty ~what:(Token.describe bullet) next_token.location - |> Error.warning input.warnings; + |> add_warning input; let acc = content :: acc in consume_list_items stream_head where_in_line acc) @@ -992,7 +994,7 @@ and explicit_list_items : Parse_error.not_allowed next_token.location ~what:(Token.describe `End) ~in_what:(Token.describe parent_markup) - |> Error.warning input.warnings; + |> add_warning input; (List.rev acc, next_token.location) | `Right_brace -> junk input; @@ -1024,7 +1026,7 @@ and explicit_list_items : | _ -> Parse_error.should_be_followed_by_whitespace next_token.location ~what:(Token.print token) - |> Error.warning input.warnings); + |> add_warning input); let content, token_after_list_item, _where_in_line = block_element_list In_explicit_list ~parent_markup:token input @@ -1033,7 +1035,7 @@ and explicit_list_items : if content = [] then Parse_error.should_not_be_empty next_token.location ~what:(Token.describe token) - |> Error.warning input.warnings; + |> add_warning input; (match token_after_list_item.value with | `Right_brace -> junk input @@ -1041,7 +1043,7 @@ and explicit_list_items : Parse_error.not_allowed token_after_list_item.location ~what:(Token.describe `End) ~in_what:(Token.describe token) - |> Error.warning input.warnings); + |> add_warning input); let acc = content :: acc in consume_list_items acc @@ -1059,7 +1061,7 @@ and explicit_list_items : Parse_error.not_allowed next_token.location ~what:(Token.describe token) ~in_what:(Token.describe parent_markup) ~suggestion - |> Error.warning input.warnings; + |> add_warning input; junk input; consume_list_items acc @@ -1069,8 +1071,8 @@ and explicit_list_items : (* {2 Entry point} *) -let parse warnings tokens = - let input = { tokens; warnings } in +let parse tokens = + let input = { tokens; warnings = ref [] } in let rec parse_block_elements () = let elements, last_token, _where_in_line = @@ -1081,7 +1083,7 @@ let parse warnings tokens = | `End -> elements | `Right_brace -> Parse_error.unpaired_right_brace last_token.location - |> Error.warning input.warnings; + |> add_warning input; let block = Location.same last_token @@ -1091,4 +1093,4 @@ let parse warnings tokens = junk input; elements @ block :: parse_block_elements () in - parse_block_elements () + (parse_block_elements (), !(input.warnings)) diff --git a/src/parser/syntax.mli b/src/parser/syntax.mli index da0497c068..d6b3bd94f7 100644 --- a/src/parser/syntax.mli +++ b/src/parser/syntax.mli @@ -1,4 +1 @@ -val parse : - Error.warning_accumulator -> - Token.t Location.with_location Stream.t -> - Ast.docs +val parse : Token.t Location.with_location Stream.t -> Ast.docs * Warning.t list diff --git a/src/parser/test/test.ml b/src/parser/test/test.ml index a999b9321a..e346e859ef 100644 --- a/src/parser/test/test.ml +++ b/src/parser/test/test.ml @@ -114,9 +114,9 @@ module Ast_to_sexp = struct let docs : Ast.docs -> sexp = fun f -> List (List.map (at block_element) f) end -let error err = Atom (Odoc_parser.Error.to_string err) +let error err = Atom (Odoc_parser.Warning.to_string err) -let parser_output formatter { Odoc_parser.Error.value; warnings } = +let parser_output formatter { Odoc_parser.value; warnings } = let value = Ast_to_sexp.docs value in let warnings = List (List.map error warnings) in let output = diff --git a/src/parser/error.ml b/src/parser/warning.ml similarity index 60% rename from src/parser/error.ml rename to src/parser/warning.ml index 63f107e71a..b2335f66e5 100644 --- a/src/parser/error.ml +++ b/src/parser/warning.ml @@ -16,24 +16,12 @@ let to_string e = let kasprintf k fmt = Format.(kfprintf (fun _ -> k (flush_str_formatter ())) str_formatter fmt) -let kmake k ?suggestion format = - format - |> kasprintf (fun message -> - match suggestion with - | None -> k message - | Some suggestion -> k (message ^ "\nSuggestion: " ^ suggestion)) +let kmake k ?suggestion = + kasprintf (fun message -> + match suggestion with + | None -> k message + | Some suggestion -> k (message ^ "\nSuggestion: " ^ suggestion)) let make ?suggestion format = let k message location = { location; message } in kmake k ?suggestion format - -type 'a with_warnings = { value : 'a; warnings : t list } - -type warning_accumulator = t list ref - -let accumulate_warnings f = - let warnings = ref [] in - let value = f warnings in - { value; warnings = List.rev !warnings } - -let warning accumulator error = accumulator := error :: !accumulator diff --git a/src/parser/warning.mli b/src/parser/warning.mli new file mode 100644 index 0000000000..7f387e6ad9 --- /dev/null +++ b/src/parser/warning.mli @@ -0,0 +1,8 @@ +type t = { location : Location.span; message : string } + +val to_string : t -> string + +val make : + ?suggestion:string -> + ('a, Format.formatter, unit, Location.span -> t) format4 -> + 'a From 11ab8a5f9be034322ecc66331f3b595f8f7ce161 Mon Sep 17 00:00:00 2001 From: Jon Ludlam Date: Tue, 18 May 2021 19:01:41 +0100 Subject: [PATCH 07/13] More tidying of the Odoc_parser interface --- src/model/error.ml | 4 ++-- src/model/error.mli | 2 +- src/model/semantics.ml | 10 ++++++---- src/model/semantics.mli | 8 +++++--- src/parser/ast.ml | 31 ++++++++++++++++++++++++++----- src/parser/lexer.mli | 2 ++ src/parser/location.mli | 37 +++++++++++++++++++++++++++++-------- src/parser/odoc_parser.ml | 5 ++--- src/parser/odoc_parser.mli | 19 ++++++++++++++++++- src/parser/syntax.ml | 9 +++++++-- src/parser/syntax.mli | 6 +++++- src/parser/test/test.ml | 6 +++--- src/parser/warning.mli | 2 ++ 13 files changed, 108 insertions(+), 33 deletions(-) diff --git a/src/model/error.ml b/src/model/error.ml index 675c16b897..91fb90d90d 100644 --- a/src/model/error.ml +++ b/src/model/error.ml @@ -128,9 +128,9 @@ let unpack_warnings ww = (ww.value, List.map (fun w -> w.w) ww.warnings) let t_of_parser_t : Odoc_parser.Warning.t -> t = fun x -> (`With_full_location x :> t) -let raise_parser_warnings { Odoc_parser.value; warnings } = +let raise_parser_warnings { Odoc_parser.ast; warnings } = (* Parsing errors may be fatal. *) let non_fatal = false in raise_warnings' (List.map (fun p -> { w = t_of_parser_t p; non_fatal }) warnings); - value + ast diff --git a/src/model/error.mli b/src/model/error.mli index d11a2ec51d..28bcc01191 100644 --- a/src/model/error.mli +++ b/src/model/error.mli @@ -63,5 +63,5 @@ val unpack_warnings : 'a with_warnings -> 'a * t list val t_of_parser_t : Odoc_parser.Warning.t -> t (** Convert a parsing error into a [t]. *) -val raise_parser_warnings : Odoc_parser.t -> Odoc_parser.Ast.docs +val raise_parser_warnings : Odoc_parser.t -> Odoc_parser.Ast.t (** Like {!raise_warnings} but handle parsing errors. *) diff --git a/src/model/semantics.ml b/src/model/semantics.ml index 8feba81ea0..fd3b14df97 100644 --- a/src/model/semantics.ml +++ b/src/model/semantics.ml @@ -2,7 +2,7 @@ module Location = Location_ module Ast = Odoc_parser.Ast type internal_tags_removed = - [ `Tag of Ast.external_tag + [ `Tag of Ast.ocamldoc_tag | `Heading of Ast.heading | Ast.nestable_block_element ] (** {!Ast.block_element} without internal tags. *) @@ -116,8 +116,10 @@ type ast_leaf_inline_element = | `Code_span of string | `Raw_markup of string option * string ] +type sections_allowed = [ `All | `No_titles | `None ] + type status = { - sections_allowed : Odoc_parser.Ast.sections_allowed; + sections_allowed : sections_allowed; parent_of_sections : Paths.Identifier.LabelParent.t; } @@ -250,7 +252,7 @@ and nestable_block_elements status elements = let tag : location:Location.span -> status -> - Ast.external_tag -> + Ast.ocamldoc_tag -> ( Comment.block_element with_location, internal_tags_removed with_location ) Result.result = @@ -459,7 +461,7 @@ let strip_internal_tags ast : internal_tags_removed with_location list * _ = loop tags ast' tl)) | ({ value = - `Tag #Ast.external_tag | `Heading _ | #Ast.nestable_block_element; + `Tag #Ast.ocamldoc_tag | `Heading _ | #Ast.nestable_block_element; _; } as hd) :: tl -> diff --git a/src/model/semantics.mli b/src/model/semantics.mli index dae17874c0..c76012bfd7 100644 --- a/src/model/semantics.mli +++ b/src/model/semantics.mli @@ -6,16 +6,18 @@ type _ handle_internal_tags = : [ `Dot of Paths.Path.Module.t * string ] option handle_internal_tags | Expect_none : unit handle_internal_tags +type sections_allowed = [ `All | `No_titles | `None ] + val ast_to_comment : internal_tags:'tags handle_internal_tags -> - sections_allowed:Odoc_parser.Ast.sections_allowed -> + sections_allowed:sections_allowed -> parent_of_sections:Paths.Identifier.LabelParent.t -> - Odoc_parser.Ast.docs -> + Odoc_parser.Ast.t -> (Comment.docs * 'tags) Error.with_warnings val parse_comment : internal_tags:'tags handle_internal_tags -> - sections_allowed:Odoc_parser.Ast.sections_allowed -> + sections_allowed:sections_allowed -> containing_definition:Paths.Identifier.LabelParent.t -> location:Lexing.position -> text:string -> diff --git a/src/parser/ast.ml b/src/parser/ast.ml index f2c10cd463..3d3bfb2171 100644 --- a/src/parser/ast.ml +++ b/src/parser/ast.ml @@ -1,8 +1,18 @@ +(** Abstract syntax tree representing ocamldoc comments *) + +(** This is a syntactic representation of ocamldoc comments. See + {{:https://ocaml.org/releases/4.12/htmlman/ocamldoc.html}The manual} for a detailed + description of the syntax understood. Note that there is no attempt at semantic + analysis, and hence these types are capable of representing values that will + be rejected by further stages, for example, invalid references or headings that + are out of range. *) + type 'a with_location = 'a Location.with_location type style = [ `Bold | `Italic | `Emphasis | `Superscript | `Subscript ] type reference_kind = [ `Simple | `With_text ] +(** References in doc comments can be of two kinds: [{!simple}] or [{{!ref}With text}]. *) type inline_element = [ `Space of string @@ -13,6 +23,11 @@ type inline_element = | `Reference of reference_kind * string with_location * inline_element with_location list | `Link of string * inline_element with_location list ] +(** Inline elements are equivalent to what would be found in a [span] in HTML. + Mostly these are straightforward. The [`Reference] constructor takes a triple + whose second element is the reference itself, and the third the replacement + text. Similarly the [`Link] constructor has the link itself as first parameter + and the second is the replacement text. *) type nestable_block_element = [ `Paragraph of inline_element with_location list @@ -23,11 +38,18 @@ type nestable_block_element = [ `Unordered | `Ordered ] * [ `Light | `Heavy ] * nestable_block_element with_location list list ] +(** Some block elements may be nested within lists or tags, but not all. + The [`List] constructor has a parameter of type [\[`Light | `Heavy\]]. + This corresponds to the syntactic constructor used (see the + {{:https://ocaml.org/releases/4.12/htmlman/ocamldoc.html#sss:ocamldoc-list}manual}). + *) type internal_tag = [ `Canonical of string with_location | `Inline | `Open | `Closed ] +(** Internal tags are used to exercise fine control over the output of odoc. They + are never rendered in the output *) -type external_tag = +type ocamldoc_tag = [ `Author of string | `Deprecated of nestable_block_element with_location list | `Param of string * nestable_block_element with_location list @@ -40,14 +62,13 @@ type external_tag = | `Since of string | `Before of string * nestable_block_element with_location list | `Version of string ] +(** ocamldoc tags are those that are specified in the {{:https://ocaml.org/releases/4.12/htmlman/ocamldoc.html#ss:ocamldoc-tags}manual}) *) -type tag = [ internal_tag | external_tag ] +type tag = [ ocamldoc_tag | internal_tag ] type heading = int * string option * inline_element with_location list type block_element = [ nestable_block_element | `Heading of heading | `Tag of tag ] -type docs = block_element with_location list - -type sections_allowed = [ `All | `No_titles | `None ] +type t = block_element with_location list diff --git a/src/parser/lexer.mli b/src/parser/lexer.mli index 81338ac0b3..af78361e1c 100644 --- a/src/parser/lexer.mli +++ b/src/parser/lexer.mli @@ -1,3 +1,5 @@ +(* Internal module, not exposed *) + type input = { file : string; offset_to_location : int -> Location.point; diff --git a/src/parser/location.mli b/src/parser/location.mli index 5554065bd5..c48a478021 100644 --- a/src/parser/location.mli +++ b/src/parser/location.mli @@ -1,23 +1,44 @@ +(** Locations in files. *) + +(** This module concerns locations in source files, both points indicating a specific + character and spans between two points. *) + +(** {2 Basic types} *) + type point = { line : int; column : int } +(** A specific character *) type span = { file : string; start : point; end_ : point } +(** A range of characters between [start] and [end_] in a particular file *) + +val span : span list -> span +(** [span spans] takes a list of spans and returns a single {!type-span} starting + at the start of the first span and ending at the end of the final span *) + +val nudge_start : int -> span -> span +(** This adjusts only the column number, implicitly assuming that the offset does + not move the location across a newline character. *) + +val to_loc : span -> Warnings.loc +(** Returns a {!Warning.loc} that represents the span *) + +(** {2 Located values} *) type +'a with_location = { location : span; value : 'a } +(** Describes values located at a particular span *) val at : span -> 'a -> 'a with_location +(** Constructor for {!with_location} *) val location : 'a with_location -> span +(** Returns the location of a located value *) val value : 'a with_location -> 'a +(** Returns the value of a located value *) val map : ('a -> 'b) -> 'a with_location -> 'b with_location +(** Map over a located value without changing its location *) val same : _ with_location -> 'b -> 'b with_location - -val span : span list -> span - -(* This adjusts only the column number, implicitly assuming that the offset does - not move the location across a newline character. *) -val nudge_start : int -> span -> span - -val to_loc : span -> Warnings.loc +(** [same x y] retuns the value y wrapped in a {!with_location} whose + location is that of [x] *) diff --git a/src/parser/odoc_parser.ml b/src/parser/odoc_parser.ml index 57ddbd6f60..78e9f5ca1b 100644 --- a/src/parser/odoc_parser.ml +++ b/src/parser/odoc_parser.ml @@ -2,7 +2,7 @@ module Ast = Ast module Location = Location module Warning = Warning -type t = { value : Ast.docs; warnings : Warning.t list } +type t = Syntax.output = { ast : Ast.t; warnings : Warning.t list } (* odoc uses an ocamllex lexer. The "engine" for such lexers is the standard [Lexing] module. @@ -80,5 +80,4 @@ let parse_comment ~location ~text = in Stream.from (fun _token_index -> Some (Lexer.token input lexbuf)) in - let value, warnings = Syntax.parse token_stream in - { value; warnings } + Syntax.parse token_stream diff --git a/src/parser/odoc_parser.mli b/src/parser/odoc_parser.mli index 96a257246a..1c4137b187 100644 --- a/src/parser/odoc_parser.mli +++ b/src/parser/odoc_parser.mli @@ -1,12 +1,29 @@ +(** Parser for ocamldoc formatted comments. *) + module Ast = Ast module Location = Location +(** Warnings produced during parsing. *) module Warning : sig type t = Warning.t = { location : Location.span; message : string } + (** Warnings are represented as human-readable text. *) val to_string : t -> string + (** [to_string] will format the location and warning as text to be + printed. *) end -type t = { value : Ast.docs; warnings : Warning.t list } +type t = { ast : Ast.t; warnings : Warning.t list } +(** [type t] is the result of parsing. *) val parse_comment : location:Lexing.position -> text:string -> t +(** [parse_comment ~location ~text] parses [text] as an ocamldoc formatted + string. The parser will try to recover from any invalid syntax encountered, + and therefore this will always produce a result of some sort with zero or + more warnings. The location passed in should represent the start of the + {i content} of the documentation comment - so for a line such as + {[ + (** A comment starting in the first column (0) *) + ]} + the location should represent the space immediately before the [A], so the + in the 4th column (3) *) diff --git a/src/parser/syntax.ml b/src/parser/syntax.ml index 493dd5b353..ab82c9f133 100644 --- a/src/parser/syntax.ml +++ b/src/parser/syntax.ml @@ -28,6 +28,8 @@ type input = { warnings : Warning.t list ref; } +(* {2 Output} *) + let add_warning input warning = input.warnings := warning :: !(input.warnings) let junk input = Stream.junk input.tokens @@ -1071,8 +1073,10 @@ and explicit_list_items : (* {2 Entry point} *) +type output = { ast : Ast.t; warnings : Warning.t list } + let parse tokens = - let input = { tokens; warnings = ref [] } in + let input : input = { tokens; warnings = ref [] } in let rec parse_block_elements () = let elements, last_token, _where_in_line = @@ -1093,4 +1097,5 @@ let parse tokens = junk input; elements @ block :: parse_block_elements () in - (parse_block_elements (), !(input.warnings)) + let ast = parse_block_elements () in + { ast; warnings = List.rev !(input.warnings) } diff --git a/src/parser/syntax.mli b/src/parser/syntax.mli index d6b3bd94f7..d17d842df5 100644 --- a/src/parser/syntax.mli +++ b/src/parser/syntax.mli @@ -1 +1,5 @@ -val parse : Token.t Location.with_location Stream.t -> Ast.docs * Warning.t list +(* Internal module, not exposed *) + +type output = { ast : Ast.t; warnings : Warning.t list } + +val parse : Token.t Location.with_location Stream.t -> output diff --git a/src/parser/test/test.ml b/src/parser/test/test.ml index e346e859ef..a3dd34a62f 100644 --- a/src/parser/test/test.ml +++ b/src/parser/test/test.ml @@ -111,13 +111,13 @@ module Ast_to_sexp = struct List [ Atom level; label; List (List.map (at inline_element) es) ] | `Tag t -> tag t - let docs : Ast.docs -> sexp = fun f -> List (List.map (at block_element) f) + let docs : Ast.t -> sexp = fun f -> List (List.map (at block_element) f) end let error err = Atom (Odoc_parser.Warning.to_string err) -let parser_output formatter { Odoc_parser.value; warnings } = - let value = Ast_to_sexp.docs value in +let parser_output formatter { Odoc_parser.ast; warnings } = + let value = Ast_to_sexp.docs ast in let warnings = List (List.map error warnings) in let output = List [ List [ Atom "output"; value ]; List [ Atom "warnings"; warnings ] ] diff --git a/src/parser/warning.mli b/src/parser/warning.mli index 7f387e6ad9..23abdbf03b 100644 --- a/src/parser/warning.mli +++ b/src/parser/warning.mli @@ -1,3 +1,5 @@ +(* This module is exposed, but via the signature declared in Octavius *) + type t = { location : Location.span; message : string } val to_string : t -> string From 5dd46c7550c6dc5be02a6419a38b74226c9dd522 Mon Sep 17 00:00:00 2001 From: Jon Ludlam Date: Thu, 20 May 2021 00:47:21 +0100 Subject: [PATCH 08/13] Rename Odoc_parser.Location to Loc --- src/model/location_.ml | 2 +- src/model/location_.mli | 2 +- src/parser/ast.ml | 2 +- src/parser/lexer.mli | 4 +- src/parser/lexer.mll | 6 +- src/parser/{location.ml => loc.ml} | 2 +- src/parser/{location.mli => loc.mli} | 2 +- src/parser/odoc_parser.ml | 16 ++-- src/parser/odoc_parser.mli | 4 +- src/parser/parse_error.ml | 42 ++++----- src/parser/syntax.ml | 133 ++++++++++++--------------- src/parser/syntax.mli | 2 +- src/parser/test/test.ml | 8 +- src/parser/warning.ml | 2 +- src/parser/warning.mli | 4 +- 15 files changed, 106 insertions(+), 125 deletions(-) rename src/parser/{location.ml => loc.ml} (95%) rename src/parser/{location.mli => loc.mli} (97%) diff --git a/src/model/location_.ml b/src/model/location_.ml index 34ba6390ae..2067aa66fb 100644 --- a/src/model/location_.ml +++ b/src/model/location_.ml @@ -1,4 +1,4 @@ -include Odoc_parser.Location +include Odoc_parser.Loc let set_end_as_offset_from_start offset span = { span with end_ = { span.start with column = span.start.column + offset } } diff --git a/src/model/location_.mli b/src/model/location_.mli index ed57d55a6d..f05e877baa 100644 --- a/src/model/location_.mli +++ b/src/model/location_.mli @@ -1,5 +1,5 @@ include module type of struct - include Odoc_parser.Location + include Odoc_parser.Loc end val set_end_as_offset_from_start : int -> span -> span diff --git a/src/parser/ast.ml b/src/parser/ast.ml index 3d3bfb2171..50ebc08868 100644 --- a/src/parser/ast.ml +++ b/src/parser/ast.ml @@ -7,7 +7,7 @@ be rejected by further stages, for example, invalid references or headings that are out of range. *) -type 'a with_location = 'a Location.with_location +type 'a with_location = 'a Loc.with_location type style = [ `Bold | `Italic | `Emphasis | `Superscript | `Subscript ] diff --git a/src/parser/lexer.mli b/src/parser/lexer.mli index af78361e1c..ce053b495e 100644 --- a/src/parser/lexer.mli +++ b/src/parser/lexer.mli @@ -2,9 +2,9 @@ type input = { file : string; - offset_to_location : int -> Location.point; + offset_to_location : int -> Loc.point; warnings : Warning.t list ref; lexbuf : Lexing.lexbuf; } -val token : input -> Lexing.lexbuf -> Token.t Location.with_location +val token : input -> Lexing.lexbuf -> Token.t Loc.with_location diff --git a/src/parser/lexer.mll b/src/parser/lexer.mll index 6e0bc05033..b1ea13aca6 100644 --- a/src/parser/lexer.mll +++ b/src/parser/lexer.mll @@ -132,7 +132,7 @@ let trim_leading_whitespace : first_line_offset:int -> string -> string = type input = { file : string; - offset_to_location : int -> Location.point; + offset_to_location : int -> Loc.point; warnings : Warning.t list ref; lexbuf : Lexing.lexbuf; } @@ -161,7 +161,7 @@ let with_location_adjustments | Some s -> end_ - String.length s in let location = { - Location.file = input.file; + Loc.file = input.file; start = input.offset_to_location start; end_ = input.offset_to_location end_; } @@ -169,7 +169,7 @@ let with_location_adjustments k input location value let emit = - with_location_adjustments (fun _ -> Location.at) + with_location_adjustments (fun _ -> Loc.at) let warning = with_location_adjustments (fun input location error -> diff --git a/src/parser/location.ml b/src/parser/loc.ml similarity index 95% rename from src/parser/location.ml rename to src/parser/loc.ml index d5abd95968..1bbad55243 100644 --- a/src/parser/location.ml +++ b/src/parser/loc.ml @@ -48,4 +48,4 @@ let to_loc span = pos_cnum = span.end_.column; } in - Warnings.{ loc_start; loc_end; loc_ghost = false } + Location.{ loc_start; loc_end; loc_ghost = false } diff --git a/src/parser/location.mli b/src/parser/loc.mli similarity index 97% rename from src/parser/location.mli rename to src/parser/loc.mli index c48a478021..9932b0de4b 100644 --- a/src/parser/location.mli +++ b/src/parser/loc.mli @@ -19,7 +19,7 @@ val nudge_start : int -> span -> span (** This adjusts only the column number, implicitly assuming that the offset does not move the location across a newline character. *) -val to_loc : span -> Warnings.loc +val to_loc : span -> Location.t (** Returns a {!Warning.loc} that represents the span *) (** {2 Located values} *) diff --git a/src/parser/odoc_parser.ml b/src/parser/odoc_parser.ml index 78e9f5ca1b..c6d8ce7fd7 100644 --- a/src/parser/odoc_parser.ml +++ b/src/parser/odoc_parser.ml @@ -1,5 +1,5 @@ module Ast = Ast -module Location = Location +module Loc = Loc module Warning = Warning type t = Syntax.output = { ast : Ast.t; warnings : Warning.t list } @@ -28,7 +28,7 @@ type t = Syntax.output = { ast : Ast.t; warnings : Warning.t list } which point it creates the table described above. The remaining function is then passed to the lexer, so it can apply the table to its emitted tokens. *) let offset_to_location : - input:string -> comment_location:Lexing.position -> int -> Location.point = + input:string -> comment_location:Lexing.position -> int -> Loc.point = fun ~input ~comment_location -> let rec find_newlines line_number input_index newlines_accumulator = if input_index >= String.length input then newlines_accumulator @@ -60,24 +60,20 @@ let offset_to_location : - comment_location.Lexing.pos_bol else column_in_comment in - { Location.line = line_in_file; column = column_in_file } + { Loc.line = line_in_file; column = column_in_file } in scan_to_last_newline reversed_newlines let parse_comment ~location ~text = + let warnings = ref [] in let token_stream = let lexbuf = Lexing.from_string text in let offset_to_location = offset_to_location ~input:text ~comment_location:location in let input : Lexer.input = - { - file = location.Lexing.pos_fname; - offset_to_location; - warnings = ref []; - lexbuf; - } + { file = location.Lexing.pos_fname; offset_to_location; warnings; lexbuf } in Stream.from (fun _token_index -> Some (Lexer.token input lexbuf)) in - Syntax.parse token_stream + Syntax.parse warnings token_stream diff --git a/src/parser/odoc_parser.mli b/src/parser/odoc_parser.mli index 1c4137b187..958ab3ef6c 100644 --- a/src/parser/odoc_parser.mli +++ b/src/parser/odoc_parser.mli @@ -1,11 +1,11 @@ (** Parser for ocamldoc formatted comments. *) module Ast = Ast -module Location = Location +module Loc = Loc (** Warnings produced during parsing. *) module Warning : sig - type t = Warning.t = { location : Location.span; message : string } + type t = Warning.t = { location : Loc.span; message : string } (** Warnings are represented as human-readable text. *) val to_string : t -> string diff --git a/src/parser/parse_error.ml b/src/parser/parse_error.ml index b627688fb0..8c95c4d535 100644 --- a/src/parser/parse_error.ml +++ b/src/parser/parse_error.ml @@ -1,68 +1,64 @@ let capitalize_ascii = Astring.String.Ascii.capitalize -let bad_markup : ?suggestion:string -> string -> Location.span -> Warning.t = +let bad_markup : ?suggestion:string -> string -> Loc.span -> Warning.t = fun ?suggestion -> Warning.make ?suggestion "'%s': bad markup." -let leading_zero_in_heading_level : string -> Location.span -> Warning.t = +let leading_zero_in_heading_level : string -> Loc.span -> Warning.t = Warning.make "'%s': leading zero in heading level." -let should_not_be_empty : what:string -> Location.span -> Warning.t = +let should_not_be_empty : what:string -> Loc.span -> Warning.t = fun ~what -> Warning.make "%s should not be empty." (capitalize_ascii what) -let markup_should_not_be_used : what:string -> Location.span -> Warning.t = +let markup_should_not_be_used : what:string -> Loc.span -> Warning.t = fun ~what -> Warning.make "%s should not be used because it has no effect." (capitalize_ascii what) -let should_begin_on_its_own_line : what:string -> Location.span -> Warning.t = +let should_begin_on_its_own_line : what:string -> Loc.span -> Warning.t = fun ~what -> Warning.make "%s should begin on its own line." (capitalize_ascii what) -let should_be_followed_by_whitespace : what:string -> Location.span -> Warning.t - = +let should_be_followed_by_whitespace : what:string -> Loc.span -> Warning.t = fun ~what -> Warning.make "%s should be followed by space, a tab, or a new line." (capitalize_ascii what) let not_allowed : - ?suggestion:string -> - what:string -> - in_what:string -> - Location.span -> - Warning.t = + ?suggestion:string -> what:string -> in_what:string -> Loc.span -> Warning.t + = fun ?suggestion ~what ~in_what -> Warning.make ?suggestion "%s is not allowed in %s." (capitalize_ascii what) in_what -let no_leading_whitespace_in_verbatim : Location.span -> Warning.t = +let no_leading_whitespace_in_verbatim : Loc.span -> Warning.t = Warning.make "'{v' should be followed by whitespace." -let no_trailing_whitespace_in_verbatim : Location.span -> Warning.t = +let no_trailing_whitespace_in_verbatim : Loc.span -> Warning.t = Warning.make "'v}' should be preceded by whitespace." -let stray_at : Location.span -> Warning.t = Warning.make "Stray '@'." +let stray_at : Loc.span -> Warning.t = Warning.make "Stray '@'." -let stray_cr : Location.span -> Warning.t = +let stray_cr : Loc.span -> Warning.t = Warning.make "Stray '\\r' (carriage return character)." -let truncated_before : Location.span -> Warning.t = +let truncated_before : Loc.span -> Warning.t = Warning.make "'@before' expects version number on the same line." -let truncated_param : Location.span -> Warning.t = +let truncated_param : Loc.span -> Warning.t = Warning.make "'@param' expects parameter name on the same line." -let truncated_raise : string -> Location.span -> Warning.t = +let truncated_raise : string -> Loc.span -> Warning.t = Warning.make "'%s' expects exception constructor on the same line." -let truncated_see : Location.span -> Warning.t = +let truncated_see : Loc.span -> Warning.t = Warning.make "'@see' should be followed by , 'file', or \"document title\"." -let unknown_tag : string -> Location.span -> Warning.t = +let unknown_tag : string -> Loc.span -> Warning.t = Warning.make "Unknown tag '%s'." -let unpaired_right_brace : Location.span -> Warning.t = +let unpaired_right_brace : Loc.span -> Warning.t = Warning.make ~suggestion:"try '\\}'." "Unpaired '}' (end of markup)." -let unpaired_right_bracket : Location.span -> Warning.t = +let unpaired_right_bracket : Loc.span -> Warning.t = Warning.make ~suggestion:"try '\\]'." "Unpaired ']' (end of code)." diff --git a/src/parser/syntax.ml b/src/parser/syntax.ml index ab82c9f133..8e489b018e 100644 --- a/src/parser/syntax.ml +++ b/src/parser/syntax.ml @@ -17,14 +17,12 @@ sequence of block elements, so [block_element_list] is the top-level parser. It is also used for list item and tag content. *) -module Location = Location - -type 'a with_location = 'a Location.with_location +type 'a with_location = 'a Loc.with_location (* {2 Input} *) type input = { - tokens : Token.t Location.with_location Stream.t; + tokens : Token.t Loc.with_location Stream.t; warnings : Warning.t list ref; } @@ -83,30 +81,30 @@ let _check_subset : token_that_always_begins_an_inline_element -> Token.t = This function consumes exactly the tokens that make up the element. *) let rec inline_element : - input -> Location.span -> _ -> Ast.inline_element with_location = + input -> Loc.span -> _ -> Ast.inline_element with_location = fun input location next_token -> match next_token with | `Space _ as token -> junk input; - Location.at location token + Loc.at location token | `Word _ as token -> junk input; - Location.at location token + Loc.at location token (* This is actually the same memory representation as the token, complete with location, and is probably the most common case. Perhaps the token can be reused somehow. The same is true of [`Space], [`Code_span]. *) | `Minus -> junk input; - Location.at location (`Word "-") + Loc.at location (`Word "-") | `Plus -> junk input; - Location.at location (`Word "+") + Loc.at location (`Word "+") | `Code_span c -> junk input; - Location.at location (`Code_span c) + Loc.at location (`Code_span c) | `Raw_markup (raw_markup_target, s) -> junk input; - Location.at location (`Raw_markup (raw_markup_target, s)) + Loc.at location (`Raw_markup (raw_markup_target, s)) | `Begin_style s as parent_markup -> junk input; @@ -120,7 +118,7 @@ let rec inline_element : ~parent_markup_location:location ~requires_leading_whitespace input in - let location = Location.span [ location; brace_location ] in + let location = Loc.span [ location; brace_location ] in if content = [] then Parse_error.should_not_be_empty @@ -128,19 +126,19 @@ let rec inline_element : location |> add_warning input; - Location.at location (`Styled (s, content)) + Loc.at location (`Styled (s, content)) | `Simple_reference r -> junk input; - let r_location = Location.nudge_start (String.length "{!") location in - let r = Location.at r_location r in + let r_location = Loc.nudge_start (String.length "{!") location in + let r = Loc.at r_location r in - Location.at location (`Reference (`Simple, r, [])) + Loc.at location (`Reference (`Simple, r, [])) | `Begin_reference_with_replacement_text r as parent_markup -> junk input; - let r_location = Location.nudge_start (String.length "{{!") location in - let r = Location.at r_location r in + let r_location = Loc.nudge_start (String.length "{{!") location in + let r = Loc.at r_location r in let content, brace_location = delimited_inline_element_list ~parent_markup @@ -148,7 +146,7 @@ let rec inline_element : input in - let location = Location.span [ location; brace_location ] in + let location = Loc.span [ location; brace_location ] in if content = [] then Parse_error.should_not_be_empty @@ -156,7 +154,7 @@ let rec inline_element : location |> add_warning input; - Location.at location (`Reference (`With_text, r, content)) + Loc.at location (`Reference (`With_text, r, content)) | `Simple_link u -> junk input; @@ -168,7 +166,7 @@ let rec inline_element : location |> add_warning input; - Location.at location (`Link (u, [])) + Loc.at location (`Link (u, [])) | `Begin_link_with_replacement_text u as parent_markup -> junk input; @@ -186,8 +184,7 @@ let rec inline_element : input in - `Link (u, content) - |> Location.at (Location.span [ location; brace_location ]) + `Link (u, content) |> Loc.at (Loc.span [ location; brace_location ]) (* Consumes tokens that make up a sequence of inline elements that is ended by a '}', a [`Right_brace] token. The brace token is also consumed. @@ -213,10 +210,10 @@ let rec inline_element : generating error messages. *) and delimited_inline_element_list : parent_markup:[< Token.t ] -> - parent_markup_location:Location.span -> + parent_markup_location:Loc.span -> requires_leading_whitespace:bool -> input -> - Ast.inline_element with_location list * Location.span = + Ast.inline_element with_location list * Loc.span = fun ~parent_markup ~parent_markup_location ~requires_leading_whitespace input -> (* [~at_start_of_line] is used to interpret [`Minus] and [`Plus]. These are word tokens if not the first non-whitespace tokens on their line. Then, @@ -224,7 +221,7 @@ and delimited_inline_element_list : let rec consume_elements : at_start_of_line:bool -> Ast.inline_element with_location list -> - Ast.inline_element with_location list * Location.span = + Ast.inline_element with_location list * Loc.span = fun ~at_start_of_line acc -> let next_token = peek input in match next_token.value with @@ -244,7 +241,7 @@ and delimited_inline_element_list : consume_elements ~at_start_of_line:false acc | `Single_newline ws -> junk input; - let element = Location.same next_token (`Space ws) in + let element = Loc.same next_token (`Space ws) in consume_elements ~at_start_of_line:true (element :: acc) | `Blank_line ws as blank -> Parse_error.not_allowed ~what:(Token.describe blank) @@ -253,7 +250,7 @@ and delimited_inline_element_list : |> add_warning input; junk input; - let element = Location.same next_token (`Space ws) in + let element = Loc.same next_token (`Space ws) in consume_elements ~at_start_of_line:true (element :: acc) | (`Minus | `Plus) as bullet -> (if at_start_of_line then @@ -362,15 +359,14 @@ let paragraph : input -> Ast.nestable_block_element with_location = | { value = `Single_newline ws; location } :: { value = #token_that_always_begins_an_inline_element; _ } :: _ -> junk input; - let acc = Location.at location (`Space ws) :: acc in + let acc = Loc.at location (`Space ws) :: acc in let acc = paragraph_line acc in additional_lines acc | _ -> List.rev acc in let elements = paragraph_line [] |> additional_lines in - `Paragraph elements - |> Location.at (Location.span (List.map Location.location elements)) + `Paragraph elements |> Loc.at (Loc.span (List.map Loc.location elements)) (* {2 Block elements} *) @@ -531,13 +527,13 @@ let rec block_element_list : | _ -> Token.describe token in - let warn_if_after_text { Location.location; value = token } = + let warn_if_after_text { Loc.location; value = token } = if where_in_line = `After_text then Parse_error.should_begin_on_its_own_line ~what:(describe token) location |> add_warning input in - let warn_if_after_tags { Location.location; value = token } = + let warn_if_after_tags { Loc.location; value = token } = if parsed_a_tag then let suggestion = Printf.sprintf "move %s before any tags." (Token.describe token) @@ -547,7 +543,7 @@ let rec block_element_list : |> add_warning input in - let warn_because_not_at_top_level { Location.location; value = token } = + let warn_because_not_at_top_level { Loc.location; value = token } = let suggestion = Printf.sprintf "move %s outside of any other markup." (Token.print token) @@ -609,11 +605,11 @@ let rec block_element_list : let recover_when_not_at_top_level context = warn_because_not_at_top_level next_token; junk input; - let words = List.map (Location.at location) (tag_to_words tag) in + let words = List.map (Loc.at location) (tag_to_words tag) in let paragraph = `Paragraph words |> accepted_in_all_contexts context - |> Location.at location + |> Loc.at location in consume_block_elements ~parsed_a_tag `At_start_of_line (paragraph :: acc) @@ -659,14 +655,12 @@ let rec block_element_list : (* TODO The location is only approximate, as we need lexer cooperation to get the real location. *) let r_location = - Location.nudge_start - (String.length "@canonical ") - location + Loc.nudge_start (String.length "@canonical ") location in - `Canonical (Location.at r_location s) + `Canonical (Loc.at r_location s) in - let tag = Location.at location (`Tag tag) in + let tag = Loc.at location (`Tag tag) in consume_block_elements ~parsed_a_tag:true `After_text (tag :: acc) | (`Deprecated | `Return) as tag -> @@ -679,10 +673,9 @@ let rec block_element_list : | `Return -> `Return content in let location = - location :: List.map Location.location content - |> Location.span + location :: List.map Loc.location content |> Loc.span in - let tag = Location.at location (`Tag tag) in + let tag = Loc.at location (`Tag tag) in consume_block_elements ~parsed_a_tag:true where_in_line (tag :: acc) | (`Param _ | `Raise _ | `Before _) as tag -> @@ -696,10 +689,9 @@ let rec block_element_list : | `Before s -> `Before (s, content) in let location = - location :: List.map Location.location content - |> Location.span + location :: List.map Loc.location content |> Loc.span in - let tag = Location.at location (`Tag tag) in + let tag = Loc.at location (`Tag tag) in consume_block_elements ~parsed_a_tag:true where_in_line (tag :: acc) | `See (kind, target) -> @@ -707,15 +699,14 @@ let rec block_element_list : block_element_list In_tag ~parent_markup:token input in let location = - location :: List.map Location.location content - |> Location.span + location :: List.map Loc.location content |> Loc.span in let tag = `Tag (`See (kind, target, content)) in - let tag = Location.at location tag in + let tag = Loc.at location tag in consume_block_elements ~parsed_a_tag:true where_in_line (tag :: acc) | (`Inline | `Open | `Closed) as tag -> - let tag = Location.at location (`Tag tag) in + let tag = Loc.at location (`Tag tag) in consume_block_elements ~parsed_a_tag:true `After_text (tag :: acc))) | { value = #token_that_always_begins_an_inline_element; _ } as next_token @@ -724,7 +715,7 @@ let rec block_element_list : warn_if_after_text next_token; let block = paragraph input in - let block = Location.map (accepted_in_all_contexts context) block in + let block = Loc.map (accepted_in_all_contexts context) block in let acc = block :: acc in consume_block_elements ~parsed_a_tag `After_text acc | { value = (`Code_block (_, s) | `Verbatim s) as token; location } as @@ -737,7 +728,7 @@ let rec block_element_list : junk input; let block = accepted_in_all_contexts context token in - let block = Location.at location block in + let block = Loc.at location block in let acc = block :: acc in consume_block_elements ~parsed_a_tag `After_text acc | { value = `Modules s as token; location } as next_token -> @@ -770,7 +761,7 @@ let rec block_element_list : (* TODO Correct locations await a full implementation of {!modules} parsing. *) let modules = - split_string " \t\r\n" s |> List.map (fun r -> Location.at location r) + split_string " \t\r\n" s |> List.map (fun r -> Loc.at location r) in if modules = [] then @@ -778,7 +769,7 @@ let rec block_element_list : |> add_warning input; let block = accepted_in_all_contexts context (`Modules modules) in - let block = Location.at location block in + let block = Loc.at location block in let acc = block :: acc in consume_block_elements ~parsed_a_tag `After_text acc | { value = `Begin_list kind as token; location } as next_token -> @@ -794,10 +785,10 @@ let rec block_element_list : Parse_error.should_not_be_empty ~what:(Token.describe token) location |> add_warning input; - let location = Location.span [ location; brace_location ] in + let location = Loc.span [ location; brace_location ] in let block = `List (kind, `Heavy, items) in let block = accepted_in_all_contexts context block in - let block = Location.at location block in + let block = Loc.at location block in let acc = block :: acc in consume_block_elements ~parsed_a_tag `After_text acc | { value = (`Minus | `Plus) as token; location } as next_token -> ( @@ -820,12 +811,11 @@ let rec block_element_list : match token with `Minus -> `Unordered | `Plus -> `Ordered in let location = - location :: List.map Location.location (List.flatten items) - |> Location.span + location :: List.map Loc.location (List.flatten items) |> Loc.span in let block = `List (kind, `Light, items) in let block = accepted_in_all_contexts context block in - let block = Location.at location block in + let block = Loc.at location block in let acc = block :: acc in consume_block_elements ~parsed_a_tag where_in_line acc) | { value = `Begin_section_heading (level, label) as token; location } as @@ -840,11 +830,11 @@ let rec block_element_list : ~parent_markup_location:location ~requires_leading_whitespace:true input in - let location = Location.span [ location; brace_location ] in + let location = Loc.span [ location; brace_location ] in let paragraph = `Paragraph content |> accepted_in_all_contexts context - |> Location.at location + |> Loc.at location in consume_block_elements ~parsed_a_tag `At_start_of_line (paragraph :: acc) @@ -884,9 +874,9 @@ let rec block_element_list : location |> add_warning input; - let location = Location.span [ location; brace_location ] in + let location = Loc.span [ location; brace_location ] in let heading = `Heading (level, label, content) in - let heading = Location.at location heading in + let heading = Loc.at location heading in let acc = heading :: acc in consume_block_elements ~parsed_a_tag `After_text acc) | { value = `Begin_paragraph_style _ as token; location } -> @@ -896,7 +886,7 @@ let rec block_element_list : ~parent_markup_location:location ~requires_leading_whitespace:true input in - let location = Location.span [ location; brace_location ] in + let location = Loc.span [ location; brace_location ] in Parse_error.markup_should_not_be_used ~what:(Token.describe token) location @@ -905,7 +895,7 @@ let rec block_element_list : let paragraph = `Paragraph content |> accepted_in_all_contexts context - |> Location.at location + |> Loc.at location in consume_block_elements ~parsed_a_tag `At_start_of_line (paragraph :: acc) @@ -984,11 +974,11 @@ and shorthand_list_items : and explicit_list_items : parent_markup:[< Token.t ] -> input -> - Ast.nestable_block_element with_location list list * Location.span = + Ast.nestable_block_element with_location list list * Loc.span = fun ~parent_markup input -> let rec consume_list_items : Ast.nestable_block_element with_location list list -> - Ast.nestable_block_element with_location list list * Location.span = + Ast.nestable_block_element with_location list list * Loc.span = fun acc -> let next_token = peek input in match next_token.value with @@ -1075,8 +1065,8 @@ and explicit_list_items : type output = { ast : Ast.t; warnings : Warning.t list } -let parse tokens = - let input : input = { tokens; warnings = ref [] } in +let parse warnings tokens = + let input : input = { tokens; warnings } in let rec parse_block_elements () = let elements, last_token, _where_in_line = @@ -1090,8 +1080,7 @@ let parse tokens = |> add_warning input; let block = - Location.same last_token - (`Paragraph [ Location.same last_token (`Word "}") ]) + Loc.same last_token (`Paragraph [ Loc.same last_token (`Word "}") ]) in junk input; diff --git a/src/parser/syntax.mli b/src/parser/syntax.mli index d17d842df5..64ab92ad02 100644 --- a/src/parser/syntax.mli +++ b/src/parser/syntax.mli @@ -2,4 +2,4 @@ type output = { ast : Ast.t; warnings : Warning.t list } -val parse : Token.t Location.with_location Stream.t -> output +val parse : Warning.t list ref -> Token.t Loc.with_location Stream.t -> output diff --git a/src/parser/test/test.ml b/src/parser/test/test.ml index a3dd34a62f..d139e0267d 100644 --- a/src/parser/test/test.ml +++ b/src/parser/test/test.ml @@ -3,14 +3,14 @@ open Odoc_parser type sexp = Sexplib0.Sexp.t = Atom of string | List of sexp list module Location_to_sexp = struct - let point : Location.point -> sexp = + let point : Loc.point -> sexp = fun { line; column } -> List [ Atom (string_of_int line); Atom (string_of_int column) ] - let span : Location.span -> sexp = + let span : Loc.span -> sexp = fun { file; start; end_ } -> List [ Atom file; point start; point end_ ] - let at : ('a -> sexp) -> 'a Location.with_location -> sexp = + let at : ('a -> sexp) -> 'a Loc.with_location -> sexp = fun f { location; value } -> List [ span location; f value ] end @@ -125,7 +125,7 @@ let parser_output formatter { Odoc_parser.ast; warnings } = Sexplib0.Sexp.pp_hum formatter output; Format.pp_print_flush formatter () -let test ?(location = { Location.line = 1; column = 0 }) str = +let test ?(location = { Loc.line = 1; column = 0 }) str = let dummy_filename = "f.ml" in let location = { diff --git a/src/parser/warning.ml b/src/parser/warning.ml index b2335f66e5..41b8037581 100644 --- a/src/parser/warning.ml +++ b/src/parser/warning.ml @@ -1,4 +1,4 @@ -type t = { location : Location.span; message : string } +type t = { location : Loc.span; message : string } let to_string e = let { location; message } = e in diff --git a/src/parser/warning.mli b/src/parser/warning.mli index 23abdbf03b..3c40b878b7 100644 --- a/src/parser/warning.mli +++ b/src/parser/warning.mli @@ -1,10 +1,10 @@ (* This module is exposed, but via the signature declared in Octavius *) -type t = { location : Location.span; message : string } +type t = { location : Loc.span; message : string } val to_string : t -> string val make : ?suggestion:string -> - ('a, Format.formatter, unit, Location.span -> t) format4 -> + ('a, Format.formatter, unit, Loc.span -> t) format4 -> 'a From bbcc7d184ec9f21a2ccb04e88ae400f982c39a56 Mon Sep 17 00:00:00 2001 From: Jon Ludlam Date: Wed, 9 Jun 2021 23:06:34 +0100 Subject: [PATCH 09/13] github actions fix --- .github/workflows/build.yml | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index be86931765..18a2df9396 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -34,9 +34,11 @@ jobs: # Do not pin odoc to not break Mdx installation opam-pin: false ocaml-version: ${{ matrix.ocaml-version }} + opam-local-packages: | + odoc.opam - name: Install dependencies - run: opam install -y --deps-only -t ./odoc.opam + run: opam install -y --deps-only -t ./odoc.opam ./odoc-parser.opam - name: dune runtest run: opam exec -- dune runtest From 5c8478f8617595e09e37283b0f1c60f71caeaecc Mon Sep 17 00:00:00 2001 From: Jon Ludlam Date: Thu, 10 Jun 2021 00:15:11 +0100 Subject: [PATCH 10/13] Fix dune files pointing at odoc_parser rather than odoc-parser --- src/loader/dune | 2 +- src/model/dune | 2 +- src/parser/test/dune | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/loader/dune b/src/loader/dune index a6b842122a..f40d3d4055 100644 --- a/src/loader/dune +++ b/src/loader/dune @@ -22,4 +22,4 @@ (preprocess (action (run %{bin:cppo} -V OCAML:%{ocaml_version} %{input-file}))) - (libraries compiler-libs.common odoc_model odoc_parser)) + (libraries compiler-libs.common odoc_model odoc-parser)) diff --git a/src/model/dune b/src/model/dune index 514d1e3e67..bfe82fb9ea 100644 --- a/src/model/dune +++ b/src/model/dune @@ -12,4 +12,4 @@ (public_name odoc.model) (instrumentation (backend bisect_ppx)) - (libraries result compiler-libs.common odoc_parser)) + (libraries result compiler-libs.common odoc-parser)) diff --git a/src/parser/test/dune b/src/parser/test/dune index 072a95a30e..7a46d5acd1 100644 --- a/src/parser/test/dune +++ b/src/parser/test/dune @@ -5,4 +5,4 @@ (>= %{ocaml_version} 4.04.1)) (preprocess (pps ppx_expect)) - (libraries sexplib0 odoc_parser)) + (libraries sexplib0 odoc-parser)) From 744baba2469c139409b97ca2d1497491d9551fd9 Mon Sep 17 00:00:00 2001 From: Jon Ludlam Date: Thu, 10 Jun 2021 00:35:48 +0100 Subject: [PATCH 11/13] Fix stray reference to Octavius --- src/parser/warning.mli | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/parser/warning.mli b/src/parser/warning.mli index 3c40b878b7..baf28eff78 100644 --- a/src/parser/warning.mli +++ b/src/parser/warning.mli @@ -1,4 +1,4 @@ -(* This module is exposed, but via the signature declared in Octavius *) +(* This module is exposed, but via the signature declared in Odoc_parser *) type t = { location : Loc.span; message : string } From 7fa647bfc2c8ae85d8de90de3db2ea2b7f618214 Mon Sep 17 00:00:00 2001 From: Jules Aguillon Date: Thu, 10 Jun 2021 11:16:43 +0200 Subject: [PATCH 12/13] Run the tests for the 'odoc' package only - The parser package can't its tests run because of a circular dependency with ppx_expect. - Run the tests from Odoc's build script. This is the build script that Dune would have generated. However: - Increase the required Dune version to 2.8. Which breaks esy. --- dune-project | 2 +- odoc-parser.opam | 2 +- odoc.opam | 14 ++++++++++++-- src/parser/test/dune | 1 + test/html/dune | 1 + test/integration/dune | 4 ++-- test/latex/dune | 1 + test/man/dune | 1 + test/model/dune | 1 + test/model/semantics/dune | 3 ++- test/odoc_print/dune | 4 ++-- test/pages/dune | 1 + test/xref2/dune | 3 +++ 13 files changed, 29 insertions(+), 9 deletions(-) diff --git a/dune-project b/dune-project index 7e1d9cab26..9be7107897 100644 --- a/dune-project +++ b/dune-project @@ -1,3 +1,3 @@ -(lang dune 2.7) +(lang dune 2.8) (name odoc) (cram enable) diff --git a/odoc-parser.opam b/odoc-parser.opam index 5331f3d5fd..d3c4e9f060 100644 --- a/odoc-parser.opam +++ b/odoc-parser.opam @@ -26,7 +26,7 @@ depends: [ ] build: [ - ["dune" "subst"] {pinned} + ["dune" "subst"] {pinned} [ "dune" "build" diff --git a/odoc.opam b/odoc.opam index 96b4367f3d..e416955b28 100644 --- a/odoc.opam +++ b/odoc.opam @@ -27,7 +27,7 @@ depends: [ "astring" "cmdliner" "cppo" {build} - "dune" {>= "2.7.0"} + "dune" {>= "2.8.0"} "fpath" "ocaml" {>= "4.02.0"} "result" @@ -53,5 +53,15 @@ depends: [ build: [ ["dune" "subst"] {pinned} - ["dune" "build" "-p" name "-j" jobs] + [ + "dune" + "build" + "-p" + name + "-j" + jobs + "@install" + "@runtest" {with-test} + "@doc" {with-doc} + ] ] diff --git a/src/parser/test/dune b/src/parser/test/dune index 7a46d5acd1..955677be3c 100644 --- a/src/parser/test/dune +++ b/src/parser/test/dune @@ -1,5 +1,6 @@ (library (name odoc_parser_test) + (package odoc) (inline_tests) (enabled_if (>= %{ocaml_version} 4.04.1)) diff --git a/test/html/dune b/test/html/dune index 9a72e3ed93..fcd24651fb 100644 --- a/test/html/dune +++ b/test/html/dune @@ -4,6 +4,7 @@ (rule (alias runtest) + (package odoc) (action (run %{exe:test.exe})) (deps diff --git a/test/integration/dune b/test/integration/dune index 6ed1ffbdbb..7d215d022c 100644 --- a/test/integration/dune +++ b/test/integration/dune @@ -1,3 +1,3 @@ (cram - (deps - (package odoc))) + (package odoc) + (deps %{bin:odoc})) diff --git a/test/latex/dune b/test/latex/dune index 0ddf0a06f1..94f0812464 100644 --- a/test/latex/dune +++ b/test/latex/dune @@ -4,6 +4,7 @@ (rule (alias runtest) + (package odoc) (action (run %{exe:test.exe})) (deps diff --git a/test/man/dune b/test/man/dune index 0ddf0a06f1..94f0812464 100644 --- a/test/man/dune +++ b/test/man/dune @@ -4,6 +4,7 @@ (rule (alias runtest) + (package odoc) (action (run %{exe:test.exe})) (deps diff --git a/test/model/dune b/test/model/dune index eaecf8649c..6982b56698 100644 --- a/test/model/dune +++ b/test/model/dune @@ -7,4 +7,5 @@ (../xref2/compile.exe as compile)))) (cram + (package odoc) (deps %{bin:odoc} %{bin:odoc_print} %{bin:compile})) diff --git a/test/model/semantics/dune b/test/model/semantics/dune index 49f806d0d1..b3f476a0c9 100644 --- a/test/model/semantics/dune +++ b/test/model/semantics/dune @@ -1,8 +1,9 @@ (library (name odoc_model_semantics_test) + (package odoc) (inline_tests) (enabled_if (>= %{ocaml_version} 4.04.1)) (preprocess (pps ppx_expect)) - (libraries sexplib0 odoc_model type_desc_to_yojson)) + (libraries sexplib0 odoc.model type_desc_to_yojson)) diff --git a/test/odoc_print/dune b/test/odoc_print/dune index 1226f1e1d6..e464f10a22 100644 --- a/test/odoc_print/dune +++ b/test/odoc_print/dune @@ -1,9 +1,9 @@ (library (name type_desc_to_yojson) (modules type_desc_to_yojson) - (libraries odoc_model_desc yojson)) + (libraries odoc.model_desc yojson)) (executable (name odoc_print) (modules odoc_print) - (libraries odoc_odoc cmdliner type_desc_to_yojson)) + (libraries odoc.odoc cmdliner type_desc_to_yojson)) diff --git a/test/pages/dune b/test/pages/dune index c72425b3db..4e16eb66b9 100644 --- a/test/pages/dune +++ b/test/pages/dune @@ -4,6 +4,7 @@ (../odoc_print/odoc_print.exe as odoc_print)))) (cram + (package odoc) (enabled_if (>= %{ocaml_version} 4.04.1)) (deps %{bin:odoc} %{bin:odoc_print})) diff --git a/test/xref2/dune b/test/xref2/dune index 7cc36a9008..a9dc805523 100644 --- a/test/xref2/dune +++ b/test/xref2/dune @@ -10,11 +10,13 @@ (./compile.exe as compile)))) (cram + (package odoc) (deps %{bin:odoc} %{bin:odoc_print} %{bin:compile})) (subdir v407_and_above (cram + (package odoc) (deps %{bin:odoc} %{bin:odoc_print} %{bin:compile}) (enabled_if (>= %{ocaml_version} 4.07.0)))) @@ -22,6 +24,7 @@ (subdir v408_and_above (cram + (package odoc) (deps %{bin:odoc} %{bin:odoc_print} %{bin:compile}) (enabled_if (>= %{ocaml_version} 4.08.0)))) From 14948421bbdfd2c2e393d51c44c74bc9889ebb64 Mon Sep 17 00:00:00 2001 From: Jon Ludlam Date: Thu, 10 Jun 2021 23:40:26 +0100 Subject: [PATCH 13/13] Update esy dune to 2.8 --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index 5a3b16f389..1c4265c874 100644 --- a/package.json +++ b/package.json @@ -37,7 +37,7 @@ "@opam/bisect_ppx": "2.4.1", "@opam/cmdliner": "1.0.2", "@opam/cppo": "1.6.5", - "@opam/dune": "2.7.1", + "@opam/dune": "2.8.5", "@opam/fpath": "0.7.2", "@opam/lambdasoup": "0.7.1", "@opam/markup": "*",