diff --git a/406.esy.lock/.gitattributes b/406.esy.lock/.gitattributes new file mode 100644 index 000000000..25366aee7 --- /dev/null +++ b/406.esy.lock/.gitattributes @@ -0,0 +1,3 @@ + +# Set eol to LF so files aren't converted to CRLF-eol on Windows. +* text eol=lf diff --git a/406.esy.lock/.gitignore b/406.esy.lock/.gitignore new file mode 100644 index 000000000..a221be227 --- /dev/null +++ b/406.esy.lock/.gitignore @@ -0,0 +1,3 @@ + +# Reset any possible .gitignore, we want all esy.lock to be un-ignored. +!* diff --git a/406.esy.lock/index.json b/406.esy.lock/index.json new file mode 100644 index 000000000..fc627ac69 --- /dev/null +++ b/406.esy.lock/index.json @@ -0,0 +1,515 @@ +{ + "checksum": "dcbf718a3ed67a1788617fe234324e9b", + "root": "reason-react@link-dev:./406.json", + "node": { + "reason-react@link-dev:./406.json": { + "id": "reason-react@link-dev:./406.json", + "name": "reason-react", + "version": "link-dev:./406.json", + "source": { "type": "link-dev", "path": ".", "manifest": "406.json" }, + "overrides": [], + "dependencies": [ + "ocaml@4.6.10@d41d8cd9", "@opam/result@opam:1.3@bee8bf2e", + "@opam/reason@opam:3.4.0@9dac40ad", + "@opam/ocamlfind@opam:1.8.0@f744a0c5", + "@opam/merlin-extend@opam:0.3@0af73a50", + "@opam/dune@opam:1.9.1@61bdaadf", "@opam/cppo@opam:1.6.5@bec3dbd9" + ], + "devDependencies": [ "@opam/merlin@opam:3.2.2@829ee6dd" ] + }, + "ocaml@4.6.10@d41d8cd9": { + "id": "ocaml@4.6.10@d41d8cd9", + "name": "ocaml", + "version": "4.6.10", + "source": { + "type": "install", + "source": [ + "archive:https://registry.npmjs.org/ocaml/-/ocaml-4.6.10.tgz#sha1:33c67d0275dc1aeba25b11557192aefcd3cf0a6a" + ] + }, + "overrides": [], + "dependencies": [], + "devDependencies": [] + }, + "@opam/yojson@opam:1.7.0@2d92307e": { + "id": "@opam/yojson@opam:1.7.0@2d92307e", + "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": "406.esy.lock/opam/yojson.1.7.0" + } + }, + "overrides": [], + "dependencies": [ + "ocaml@4.6.10@d41d8cd9", "@opam/easy-format@opam:1.3.1@9abfd4ed", + "@opam/dune@opam:1.9.1@61bdaadf", "@opam/cppo@opam:1.6.5@bec3dbd9", + "@opam/biniou@opam:1.2.0@c8516f18", + "@esy-ocaml/substs@0.0.1@d41d8cd9" + ], + "devDependencies": [ + "ocaml@4.6.10@d41d8cd9", "@opam/easy-format@opam:1.3.1@9abfd4ed", + "@opam/biniou@opam:1.2.0@c8516f18" + ] + }, + "@opam/result@opam:1.3@bee8bf2e": { + "id": "@opam/result@opam:1.3@bee8bf2e", + "name": "@opam/result", + "version": "opam:1.3", + "source": { + "type": "install", + "source": [ + "archive:https://opam.ocaml.org/cache/md5/4b/4beebefd41f7f899b6eeba7414e7ae01#md5:4beebefd41f7f899b6eeba7414e7ae01", + "archive:https://github.com/janestreet/result/releases/download/1.3/result-1.3.tbz#md5:4beebefd41f7f899b6eeba7414e7ae01" + ], + "opam": { + "name": "result", + "version": "1.3", + "path": "406.esy.lock/opam/result.1.3" + } + }, + "overrides": [], + "dependencies": [ + "ocaml@4.6.10@d41d8cd9", "@opam/jbuilder@opam:transition@58bdfe0a", + "@esy-ocaml/substs@0.0.1@d41d8cd9" + ], + "devDependencies": [ "ocaml@4.6.10@d41d8cd9" ] + }, + "@opam/reason@opam:3.4.0@9dac40ad": { + "id": "@opam/reason@opam:3.4.0@9dac40ad", + "name": "@opam/reason", + "version": "opam:3.4.0", + "source": { + "type": "install", + "source": [ + "archive:https://opam.ocaml.org/cache/md5/1b/1b6cba03588e5fba3b5eb693c0d02dea#md5:1b6cba03588e5fba3b5eb693c0d02dea", + "archive:https://registry.npmjs.org/@esy-ocaml/reason/-/reason-3.4.0.tgz#md5:1b6cba03588e5fba3b5eb693c0d02dea" + ], + "opam": { + "name": "reason", + "version": "3.4.0", + "path": "406.esy.lock/opam/reason.3.4.0" + } + }, + "overrides": [], + "dependencies": [ + "ocaml@4.6.10@d41d8cd9", "@opam/result@opam:1.3@bee8bf2e", + "@opam/ocamlfind@opam:1.8.0@f744a0c5", + "@opam/ocaml-migrate-parsetree@opam:1.2.0@23e55f71", + "@opam/merlin-extend@opam:0.3@0af73a50", + "@opam/menhir@opam:20181113@0c8257a8", + "@opam/dune@opam:1.9.1@61bdaadf", "@esy-ocaml/substs@0.0.1@d41d8cd9" + ], + "devDependencies": [ + "ocaml@4.6.10@d41d8cd9", "@opam/result@opam:1.3@bee8bf2e", + "@opam/ocaml-migrate-parsetree@opam:1.2.0@23e55f71", + "@opam/merlin-extend@opam:0.3@0af73a50", + "@opam/menhir@opam:20181113@0c8257a8" + ] + }, + "@opam/ppx_derivers@opam:1.2.1@0b458500": { + "id": "@opam/ppx_derivers@opam:1.2.1@0b458500", + "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": "406.esy.lock/opam/ppx_derivers.1.2.1" + } + }, + "overrides": [], + "dependencies": [ + "ocaml@4.6.10@d41d8cd9", "@opam/dune@opam:1.9.1@61bdaadf", + "@esy-ocaml/substs@0.0.1@d41d8cd9" + ], + "devDependencies": [ "ocaml@4.6.10@d41d8cd9" ] + }, + "@opam/ocamlfind@opam:1.8.0@f744a0c5": { + "id": "@opam/ocamlfind@opam:1.8.0@f744a0c5", + "name": "@opam/ocamlfind", + "version": "opam:1.8.0", + "source": { + "type": "install", + "source": [ + "archive:https://opam.ocaml.org/cache/md5/a7/a710c559667672077a93d34eb6a42e5b#md5:a710c559667672077a93d34eb6a42e5b", + "archive:http://download2.camlcity.org/download/findlib-1.8.0.tar.gz#md5:a710c559667672077a93d34eb6a42e5b", + "archive:http://download.camlcity.org/download/findlib-1.8.0.tar.gz#md5:a710c559667672077a93d34eb6a42e5b" + ], + "opam": { + "name": "ocamlfind", + "version": "1.8.0", + "path": "406.esy.lock/opam/ocamlfind.1.8.0" + } + }, + "overrides": [ + { + "opamoverride": + "406.esy.lock/overrides/opam__s__ocamlfind_opam__c__1.8.0_opam_override" + } + ], + "dependencies": [ + "ocaml@4.6.10@d41d8cd9", "@opam/conf-m4@opam:1@dd7dde42", + "@esy-ocaml/substs@0.0.1@d41d8cd9" + ], + "devDependencies": [ "ocaml@4.6.10@d41d8cd9" ] + }, + "@opam/ocamlbuild@opam:0.14.0@427a2331": { + "id": "@opam/ocamlbuild@opam:0.14.0@427a2331", + "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": "406.esy.lock/opam/ocamlbuild.0.14.0" + } + }, + "overrides": [ + { + "opamoverride": + "406.esy.lock/overrides/opam__s__ocamlbuild_opam__c__0.14.0_opam_override" + } + ], + "dependencies": [ + "ocaml@4.6.10@d41d8cd9", "@esy-ocaml/substs@0.0.1@d41d8cd9" + ], + "devDependencies": [ "ocaml@4.6.10@d41d8cd9" ] + }, + "@opam/ocaml-migrate-parsetree@opam:1.2.0@23e55f71": { + "id": "@opam/ocaml-migrate-parsetree@opam:1.2.0@23e55f71", + "name": "@opam/ocaml-migrate-parsetree", + "version": "opam:1.2.0", + "source": { + "type": "install", + "source": [ + "archive:https://opam.ocaml.org/cache/md5/cc/cc6fb09ad6f99156c7dba47711c62c6f#md5:cc6fb09ad6f99156c7dba47711c62c6f", + "archive:https://github.com/ocaml-ppx/ocaml-migrate-parsetree/releases/download/v1.2.0/ocaml-migrate-parsetree-v1.2.0.tbz#md5:cc6fb09ad6f99156c7dba47711c62c6f" + ], + "opam": { + "name": "ocaml-migrate-parsetree", + "version": "1.2.0", + "path": "406.esy.lock/opam/ocaml-migrate-parsetree.1.2.0" + } + }, + "overrides": [], + "dependencies": [ + "ocaml@4.6.10@d41d8cd9", "@opam/result@opam:1.3@bee8bf2e", + "@opam/ppx_derivers@opam:1.2.1@0b458500", + "@opam/dune@opam:1.9.1@61bdaadf", "@esy-ocaml/substs@0.0.1@d41d8cd9" + ], + "devDependencies": [ + "ocaml@4.6.10@d41d8cd9", "@opam/result@opam:1.3@bee8bf2e", + "@opam/ppx_derivers@opam:1.2.1@0b458500" + ] + }, + "@opam/merlin-extend@opam:0.3@0af73a50": { + "id": "@opam/merlin-extend@opam:0.3@0af73a50", + "name": "@opam/merlin-extend", + "version": "opam:0.3", + "source": { + "type": "install", + "source": [ + "archive:https://opam.ocaml.org/cache/md5/9c/9c6dfd4f53328f02f12fcc265f4e2dda#md5:9c6dfd4f53328f02f12fcc265f4e2dda", + "archive:https://github.com/let-def/merlin-extend/archive/v0.3.tar.gz#md5:9c6dfd4f53328f02f12fcc265f4e2dda" + ], + "opam": { + "name": "merlin-extend", + "version": "0.3", + "path": "406.esy.lock/opam/merlin-extend.0.3" + } + }, + "overrides": [ + { + "opamoverride": + "406.esy.lock/overrides/opam__s__merlin_extend_opam__c__0.3_opam_override" + } + ], + "dependencies": [ + "ocaml@4.6.10@d41d8cd9", "@opam/ocamlfind@opam:1.8.0@f744a0c5", + "@opam/cppo@opam:1.6.5@bec3dbd9", "@esy-ocaml/substs@0.0.1@d41d8cd9" + ], + "devDependencies": [ "ocaml@4.6.10@d41d8cd9" ] + }, + "@opam/merlin@opam:3.2.2@829ee6dd": { + "id": "@opam/merlin@opam:3.2.2@829ee6dd", + "name": "@opam/merlin", + "version": "opam:3.2.2", + "source": { + "type": "install", + "source": [ + "archive:https://opam.ocaml.org/cache/md5/ed/ede35b65f8ac9c440cfade5445662c54#md5:ede35b65f8ac9c440cfade5445662c54", + "archive:https://github.com/ocaml/merlin/releases/download/v3.2.2/merlin-v3.2.2.tbz#md5:ede35b65f8ac9c440cfade5445662c54" + ], + "opam": { + "name": "merlin", + "version": "3.2.2", + "path": "406.esy.lock/opam/merlin.3.2.2" + } + }, + "overrides": [], + "dependencies": [ + "ocaml@4.6.10@d41d8cd9", "@opam/yojson@opam:1.7.0@2d92307e", + "@opam/ocamlfind@opam:1.8.0@f744a0c5", + "@opam/dune@opam:1.9.1@61bdaadf", "@esy-ocaml/substs@0.0.1@d41d8cd9" + ], + "devDependencies": [ + "ocaml@4.6.10@d41d8cd9", "@opam/yojson@opam:1.7.0@2d92307e", + "@opam/ocamlfind@opam:1.8.0@f744a0c5" + ] + }, + "@opam/menhir@opam:20181113@0c8257a8": { + "id": "@opam/menhir@opam:20181113@0c8257a8", + "name": "@opam/menhir", + "version": "opam:20181113", + "source": { + "type": "install", + "source": [ + "archive:https://opam.ocaml.org/cache/md5/69/69ce441a06ea131cd43e7b44c4303f3c#md5:69ce441a06ea131cd43e7b44c4303f3c", + "archive:https://gitlab.inria.fr/fpottier/menhir/repository/20181113/archive.tar.gz#md5:69ce441a06ea131cd43e7b44c4303f3c" + ], + "opam": { + "name": "menhir", + "version": "20181113", + "path": "406.esy.lock/opam/menhir.20181113" + } + }, + "overrides": [], + "dependencies": [ + "ocaml@4.6.10@d41d8cd9", "@opam/ocamlfind@opam:1.8.0@f744a0c5", + "@opam/ocamlbuild@opam:0.14.0@427a2331", + "@esy-ocaml/substs@0.0.1@d41d8cd9" + ], + "devDependencies": [ "ocaml@4.6.10@d41d8cd9" ] + }, + "@opam/jbuilder@opam:transition@58bdfe0a": { + "id": "@opam/jbuilder@opam:transition@58bdfe0a", + "name": "@opam/jbuilder", + "version": "opam:transition", + "source": { + "type": "install", + "source": [ "no-source:" ], + "opam": { + "name": "jbuilder", + "version": "transition", + "path": "406.esy.lock/opam/jbuilder.transition" + } + }, + "overrides": [], + "dependencies": [ + "ocaml@4.6.10@d41d8cd9", "@opam/dune@opam:1.9.1@61bdaadf", + "@esy-ocaml/substs@0.0.1@d41d8cd9" + ], + "devDependencies": [ + "ocaml@4.6.10@d41d8cd9", "@opam/dune@opam:1.9.1@61bdaadf" + ] + }, + "@opam/easy-format@opam:1.3.1@9abfd4ed": { + "id": "@opam/easy-format@opam:1.3.1@9abfd4ed", + "name": "@opam/easy-format", + "version": "opam:1.3.1", + "source": { + "type": "install", + "source": [ + "archive:https://opam.ocaml.org/cache/md5/4e/4e163700fb88fdcd6b8976c3a216c8ea#md5:4e163700fb88fdcd6b8976c3a216c8ea", + "archive:https://github.com/mjambon/easy-format/archive/v1.3.1.tar.gz#md5:4e163700fb88fdcd6b8976c3a216c8ea" + ], + "opam": { + "name": "easy-format", + "version": "1.3.1", + "path": "406.esy.lock/opam/easy-format.1.3.1" + } + }, + "overrides": [], + "dependencies": [ + "ocaml@4.6.10@d41d8cd9", "@opam/jbuilder@opam:transition@58bdfe0a", + "@esy-ocaml/substs@0.0.1@d41d8cd9" + ], + "devDependencies": [ "ocaml@4.6.10@d41d8cd9" ] + }, + "@opam/dune@opam:1.9.1@61bdaadf": { + "id": "@opam/dune@opam:1.9.1@61bdaadf", + "name": "@opam/dune", + "version": "opam:1.9.1", + "source": { + "type": "install", + "source": [ + "archive:https://opam.ocaml.org/cache/sha256/c9/c9a1e258a14d96fd95fb525e7659c371e8b1d253905e3d39c5b2efa280b4927c#sha256:c9a1e258a14d96fd95fb525e7659c371e8b1d253905e3d39c5b2efa280b4927c", + "archive:https://github.com/ocaml/dune/releases/download/1.9.1/dune-1.9.1.tbz#sha256:c9a1e258a14d96fd95fb525e7659c371e8b1d253905e3d39c5b2efa280b4927c" + ], + "opam": { + "name": "dune", + "version": "1.9.1", + "path": "406.esy.lock/opam/dune.1.9.1" + } + }, + "overrides": [ + { + "opamoverride": + "406.esy.lock/overrides/opam__s__dune_opam__c__1.9.1_opam_override" + } + ], + "dependencies": [ + "ocaml@4.6.10@d41d8cd9", "@opam/base-unix@opam:base@87d0b2eb", + "@opam/base-threads@opam:base@36803084", + "@esy-ocaml/substs@0.0.1@d41d8cd9" + ], + "devDependencies": [ + "ocaml@4.6.10@d41d8cd9", "@opam/base-unix@opam:base@87d0b2eb", + "@opam/base-threads@opam:base@36803084" + ] + }, + "@opam/cppo@opam:1.6.5@bec3dbd9": { + "id": "@opam/cppo@opam:1.6.5@bec3dbd9", + "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": "406.esy.lock/opam/cppo.1.6.5" + } + }, + "overrides": [], + "dependencies": [ + "ocaml@4.6.10@d41d8cd9", "@opam/jbuilder@opam:transition@58bdfe0a", + "@opam/base-unix@opam:base@87d0b2eb", + "@esy-ocaml/substs@0.0.1@d41d8cd9" + ], + "devDependencies": [ + "ocaml@4.6.10@d41d8cd9", "@opam/base-unix@opam:base@87d0b2eb" + ] + }, + "@opam/conf-which@opam:1@56319cdb": { + "id": "@opam/conf-which@opam:1@56319cdb", + "name": "@opam/conf-which", + "version": "opam:1", + "source": { + "type": "install", + "source": [ "no-source:" ], + "opam": { + "name": "conf-which", + "version": "1", + "path": "406.esy.lock/opam/conf-which.1" + } + }, + "overrides": [], + "dependencies": [ "@esy-ocaml/substs@0.0.1@d41d8cd9" ], + "devDependencies": [] + }, + "@opam/conf-m4@opam:1@dd7dde42": { + "id": "@opam/conf-m4@opam:1@dd7dde42", + "name": "@opam/conf-m4", + "version": "opam:1", + "source": { + "type": "install", + "source": [ "no-source:" ], + "opam": { + "name": "conf-m4", + "version": "1", + "path": "406.esy.lock/opam/conf-m4.1" + } + }, + "overrides": [], + "dependencies": [ "@esy-ocaml/substs@0.0.1@d41d8cd9" ], + "devDependencies": [] + }, + "@opam/biniou@opam:1.2.0@c8516f18": { + "id": "@opam/biniou@opam:1.2.0@c8516f18", + "name": "@opam/biniou", + "version": "opam:1.2.0", + "source": { + "type": "install", + "source": [ + "archive:https://opam.ocaml.org/cache/md5/f3/f3e92358e832ed94eaf23ce622ccc2f9#md5:f3e92358e832ed94eaf23ce622ccc2f9", + "archive:https://github.com/mjambon/biniou/archive/v1.2.0.tar.gz#md5:f3e92358e832ed94eaf23ce622ccc2f9" + ], + "opam": { + "name": "biniou", + "version": "1.2.0", + "path": "406.esy.lock/opam/biniou.1.2.0" + } + }, + "overrides": [], + "dependencies": [ + "ocaml@4.6.10@d41d8cd9", "@opam/jbuilder@opam:transition@58bdfe0a", + "@opam/easy-format@opam:1.3.1@9abfd4ed", + "@opam/conf-which@opam:1@56319cdb", + "@esy-ocaml/substs@0.0.1@d41d8cd9" + ], + "devDependencies": [ + "ocaml@4.6.10@d41d8cd9", "@opam/easy-format@opam:1.3.1@9abfd4ed" + ] + }, + "@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": "406.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": "406.esy.lock/opam/base-threads.base" + } + }, + "overrides": [], + "dependencies": [ "@esy-ocaml/substs@0.0.1@d41d8cd9" ], + "devDependencies": [] + }, + "@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/406.esy.lock/opam/base-threads.base/opam b/406.esy.lock/opam/base-threads.base/opam new file mode 100644 index 000000000..914ff50ce --- /dev/null +++ b/406.esy.lock/opam/base-threads.base/opam @@ -0,0 +1,6 @@ +opam-version: "2.0" +maintainer: "https://github.com/ocaml/opam-repository/issues" +description: """ +Threads library distributed with the OCaml compiler +""" + diff --git a/406.esy.lock/opam/base-unix.base/opam b/406.esy.lock/opam/base-unix.base/opam new file mode 100644 index 000000000..b973540bc --- /dev/null +++ b/406.esy.lock/opam/base-unix.base/opam @@ -0,0 +1,6 @@ +opam-version: "2.0" +maintainer: "https://github.com/ocaml/opam-repository/issues" +description: """ +Unix library distributed with the OCaml compiler +""" + diff --git a/406.esy.lock/opam/biniou.1.2.0/opam b/406.esy.lock/opam/biniou.1.2.0/opam new file mode 100644 index 000000000..8c205dc17 --- /dev/null +++ b/406.esy.lock/opam/biniou.1.2.0/opam @@ -0,0 +1,25 @@ +opam-version: "2.0" +maintainer: "martin@mjambon.com" +authors: ["Martin Jambon"] + +homepage: "https://github.com/mjambon/biniou" +bug-reports: "https://github.com/mjambon/biniou/issues" +dev-repo: "git+https://github.com/mjambon/biniou.git" +license: "BSD-3-Clause" + +build: [ + ["jbuilder" "build" "-p" name "-j" jobs] + ["jbuilder" "runtest" "-p" name] {with-test} +] +depends: [ + "ocaml" {>= "4.02.3"} + "conf-which" {build} + "jbuilder" {build & >= "1.0+beta7"} + "easy-format" +] +synopsis: + "Binary data format designed for speed, safety, ease of use and backward compatibility as protocols evolve" +url { + src: "https://github.com/mjambon/biniou/archive/v1.2.0.tar.gz" + checksum: "md5=f3e92358e832ed94eaf23ce622ccc2f9" +} diff --git a/406.esy.lock/opam/conf-m4.1/opam b/406.esy.lock/opam/conf-m4.1/opam new file mode 100644 index 000000000..981e70213 --- /dev/null +++ b/406.esy.lock/opam/conf-m4.1/opam @@ -0,0 +1,23 @@ +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" +build: [["sh" "-exc" "echo | m4"]] +depexts: [ + ["m4"] {os-distribution = "debian"} + ["m4"] {os-distribution = "ubuntu"} + ["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/406.esy.lock/opam/conf-which.1/opam b/406.esy.lock/opam/conf-which.1/opam new file mode 100644 index 000000000..802239a5b --- /dev/null +++ b/406.esy.lock/opam/conf-which.1/opam @@ -0,0 +1,20 @@ +opam-version: "2.0" +maintainer: "unixjunkie@sdf.org" +homepage: "http://www.gnu.org/software/which/" +authors: "Carlo Wood" +bug-reports: "https://github.com/ocaml/opam-repository/issues" +license: "GPL-2+" +build: [["which" "which"]] +depexts: [ + ["which"] {os-distribution = "centos"} + ["which"] {os-distribution = "fedora"} + ["which"] {os-family = "suse"} + ["debianutils"] {os-distribution = "debian"} + ["debianutils"] {os-distribution = "ubuntu"} + ["which"] {os-distribution = "nixos"} + ["which"] {os-distribution = "arch"} +] +synopsis: "Virtual package relying on which" +description: + "This package can only install if the which program is installed on the system." +flags: conf diff --git a/406.esy.lock/opam/cppo.1.6.5/opam b/406.esy.lock/opam/cppo.1.6.5/opam new file mode 100644 index 000000000..74f8e925a --- /dev/null +++ b/406.esy.lock/opam/cppo.1.6.5/opam @@ -0,0 +1,23 @@ +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" {build & >= "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/406.esy.lock/opam/dune.1.9.1/opam b/406.esy.lock/opam/dune.1.9.1/opam new file mode 100644 index 000000000..2db60bd2b --- /dev/null +++ b/406.esy.lock/opam/dune.1.9.1/opam @@ -0,0 +1,50 @@ +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: "MIT" +depends: [ + "ocaml" {>= "4.02"} + "base-unix" + "base-threads" +] +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"] + ["./boot.exe" "--release" "--subst"] {pinned} + ["./boot.exe" "--release" "-j" jobs] +] +conflicts: [ + "jbuilder" {!= "transition"} + "odoc" {< "1.3.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, it has very low-overhead and support parallel builds on +all platforms. It has no system dependencies, all you need to build +dune and packages using dune is OCaml. You don't need or 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. +""" +url { + src: "https://github.com/ocaml/dune/releases/download/1.9.1/dune-1.9.1.tbz" + checksum: [ + "sha256=c9a1e258a14d96fd95fb525e7659c371e8b1d253905e3d39c5b2efa280b4927c" + "sha512=842d0aa7fbe97bc5a0fde974fa9ddd95d8e2f60a7018b60779cf782282e2bc362f4ae347cd7795b857a8e05ebb9d82f1236c0e4d1e7ec10d3b210028bc2058c1" + ] +} diff --git a/406.esy.lock/opam/easy-format.1.3.1/opam b/406.esy.lock/opam/easy-format.1.3.1/opam new file mode 100644 index 000000000..7c36f6621 --- /dev/null +++ b/406.esy.lock/opam/easy-format.1.3.1/opam @@ -0,0 +1,20 @@ +opam-version: "2.0" +maintainer: "martin@mjambon.com" +authors: ["Martin Jambon"] +homepage: "http://mjambon.com/easy-format.html" +bug-reports: "https://github.com/mjambon/easy-format/issues" +dev-repo: "git+https://github.com/mjambon/easy-format.git" +build: [ + ["jbuilder" "build" "-p" name "-j" jobs] + ["jbuilder" "runtest" "-p" name] {with-test} +] +depends: [ + "ocaml" {>= "4.02.3"} + "jbuilder" {build} +] +synopsis: + "High-level and functional interface to the Format module of the OCaml standard library" +url { + src: "https://github.com/mjambon/easy-format/archive/v1.3.1.tar.gz" + checksum: "md5=4e163700fb88fdcd6b8976c3a216c8ea" +} diff --git a/406.esy.lock/opam/jbuilder.transition/opam b/406.esy.lock/opam/jbuilder.transition/opam new file mode 100644 index 000000000..3e3174a5f --- /dev/null +++ b/406.esy.lock/opam/jbuilder.transition/opam @@ -0,0 +1,15 @@ +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: "MIT" +depends: ["ocaml" "dune"] +post-messages: [ + "Jbuilder has been renamed and the jbuilder package is now a transition \ + package. Use the dune package instead." +] +synopsis: + "This is a transition package, jbuilder is now named dune. Use the dune" +description: "package instead." diff --git a/406.esy.lock/opam/menhir.20181113/opam b/406.esy.lock/opam/menhir.20181113/opam new file mode 100644 index 000000000..d207e08ca --- /dev/null +++ b/406.esy.lock/opam/menhir.20181113/opam @@ -0,0 +1,32 @@ +opam-version: "2.0" +maintainer: "francois.pottier@inria.fr" +authors: [ + "François Pottier " + "Yann Régis-Gianas " +] +homepage: "http://gitlab.inria.fr/fpottier/menhir" +dev-repo: "git+https://gitlab.inria.fr/fpottier/menhir.git" +bug-reports: "menhir@inria.fr" +build: [ + [make "-f" "Makefile" "PREFIX=%{prefix}%" "USE_OCAMLFIND=true" "docdir=%{doc}%/menhir" "libdir=%{lib}%/menhir" "mandir=%{man}%/man1"] +] +install: [ + [make "-f" "Makefile" "install" "PREFIX=%{prefix}%" "docdir=%{doc}%/menhir" "libdir=%{lib}%/menhir" "mandir=%{man}%/man1"] +] +remove: [ + [make "-f" "Makefile" "uninstall" "PREFIX=%{prefix}%" "docdir=%{doc}%/menhir" "libdir=%{lib}%/menhir" "mandir=%{man}%/man1"] +] +depends: [ + "ocaml" {>= "4.02"} + "ocamlfind" {build} + "ocamlbuild" {build} +] +synopsis: "An LR(1) parser generator" +url { + src: + "https://gitlab.inria.fr/fpottier/menhir/repository/20181113/archive.tar.gz" + checksum: [ + "md5=69ce441a06ea131cd43e7b44c4303f3c" + "sha512=4ddefcd71d305bfb933a4056da57e36c13c99ec6dfcc4695814798fbbd78b4d65828381ebcb0e58c4c0394105ac763af3d475474e05e408f7080315bc3cf6176" + ] +} diff --git a/406.esy.lock/opam/merlin-extend.0.3/opam b/406.esy.lock/opam/merlin-extend.0.3/opam new file mode 100644 index 000000000..03ed72e73 --- /dev/null +++ b/406.esy.lock/opam/merlin-extend.0.3/opam @@ -0,0 +1,24 @@ +opam-version: "2.0" +maintainer: "Frederic Bour " +authors: "Frederic Bour " +homepage: "https://github.com/let-def/merlin-extend" +bug-reports: "https://github.com/let-def/merlin-extend" +license: "MIT" +dev-repo: "git+https://github.com/let-def/merlin-extend.git" +build: [make] +install: [make "install"] +remove: ["ocamlfind" "remove" "merlin_extend"] +depends: [ + "ocaml" {>= "4.02.3" & < "4.08.0"} + "ocamlfind" {build} + "cppo" {build} +] +synopsis: "A protocol to provide custom frontend to Merlin" +description: """ +This protocol allows to replace the OCaml frontend of Merlin. +It extends what used to be done with the `-pp' flag to handle a few more cases.""" +flags: light-uninstall +url { + src: "https://github.com/let-def/merlin-extend/archive/v0.3.tar.gz" + checksum: "md5=9c6dfd4f53328f02f12fcc265f4e2dda" +} diff --git a/406.esy.lock/opam/merlin.3.2.2/opam b/406.esy.lock/opam/merlin.3.2.2/opam new file mode 100644 index 000000000..63929817c --- /dev/null +++ b/406.esy.lock/opam/merlin.3.2.2/opam @@ -0,0 +1,74 @@ +opam-version: "2.0" +name: "merlin" +synopsis: "Installation with Opam" +description: """ +If you have a working [Opam](https://opam.ocaml.org/) installation, Merlin is only two commands away: + +```shell +opam install merlin +opam user-setup install +``` + +[opam-user-setup](https://github.com/OCamlPro/opam-user-setup) takes care of configuring Emacs and Vim to make best use of your current install. + +You can also [configure the editor](#editor-setup) yourself, if you prefer.""" +maintainer: "defree@gmail.com" +authors: "The Merlin team" +homepage: "https://github.com/ocaml/merlin" +bug-reports: "https://github.com/ocaml/merlin/issues" +depends: [ + "ocaml" {>= "4.02.1" & < "4.08"} + "dune" {build} + "ocamlfind" {>= "1.5.2"} + "yojson" + "craml" {with-test} +] +build: [ + ["dune" "subst"] {pinned} + ["dune" "build" "-p" name "-j" jobs] +] +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} +dev-repo: "git+https://github.com/ocaml/merlin.git" +url { + src: + "https://github.com/ocaml/merlin/releases/download/v3.2.2/merlin-v3.2.2.tbz" + checksum: "md5=ede35b65f8ac9c440cfade5445662c54" +} diff --git a/406.esy.lock/opam/ocaml-migrate-parsetree.1.2.0/opam b/406.esy.lock/opam/ocaml-migrate-parsetree.1.2.0/opam new file mode 100644 index 000000000..379509695 --- /dev/null +++ b/406.esy.lock/opam/ocaml-migrate-parsetree.1.2.0/opam @@ -0,0 +1,34 @@ +opam-version: "2.0" +maintainer: "frederic.bour@lakaban.net" +authors: [ + "Frédéric Bour " + "Jérémie Dimino " +] +license: "LGPL-2.1" +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" {build & >= "1.6.0"} + "ocaml" {>= "4.02.3" & < "4.08.0"} +] +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. +""" +url { + src: + "https://github.com/ocaml-ppx/ocaml-migrate-parsetree/releases/download/v1.2.0/ocaml-migrate-parsetree-v1.2.0.tbz" + checksum: "md5=cc6fb09ad6f99156c7dba47711c62c6f" +} diff --git a/406.esy.lock/opam/ocamlbuild.0.14.0/opam b/406.esy.lock/opam/ocamlbuild.0.14.0/opam new file mode 100644 index 000000000..dd4bf68a5 --- /dev/null +++ b/406.esy.lock/opam/ocamlbuild.0.14.0/opam @@ -0,0 +1,36 @@ +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 with OCaml 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/406.esy.lock/opam/ocamlfind.1.8.0/files/no-awk-check.patch b/406.esy.lock/opam/ocamlfind.1.8.0/files/no-awk-check.patch new file mode 100644 index 000000000..c9e80da63 --- /dev/null +++ b/406.esy.lock/opam/ocamlfind.1.8.0/files/no-awk-check.patch @@ -0,0 +1,19 @@ +commit 40142bc941e6e308686e86be6fc2da92f346a22f +Author: Kate +Date: Tue Mar 19 16:29:06 2019 +0000 + + Remove awk from the set of checked unix tools as it's not used anywhere + +diff --git a/configure b/configure +index d9b587c..20e8dca 100755 +--- a/configure ++++ b/configure +@@ -184,7 +184,7 @@ echo "Configuring core..." + + # Some standard Unix tools must be available: + +-for tool in sed awk ocaml ocamlc uname rm make cat m4 dirname basename; do ++for tool in sed ocaml ocamlc uname rm make cat m4 dirname basename; do + if in_path $tool; then true; else + echo "configure: $tool not in PATH; this is required" 1>&2 + exit 1 diff --git a/406.esy.lock/opam/ocamlfind.1.8.0/files/ocaml-stub b/406.esy.lock/opam/ocamlfind.1.8.0/files/ocaml-stub new file mode 100644 index 000000000..e5ad9907e --- /dev/null +++ b/406.esy.lock/opam/ocamlfind.1.8.0/files/ocaml-stub @@ -0,0 +1,4 @@ +#!/bin/sh + +BINDIR=$(dirname "$(command -v ocamlc)") +"$BINDIR/ocaml" -I "$OCAML_TOPLEVEL_PATH" "$@" diff --git a/406.esy.lock/opam/ocamlfind.1.8.0/files/ocamlfind.install b/406.esy.lock/opam/ocamlfind.1.8.0/files/ocamlfind.install new file mode 100644 index 000000000..295c62545 --- /dev/null +++ b/406.esy.lock/opam/ocamlfind.1.8.0/files/ocamlfind.install @@ -0,0 +1,6 @@ +bin: [ + "src/findlib/ocamlfind" {"ocamlfind"} + "?src/findlib/ocamlfind_opt" {"ocamlfind"} + "?tools/safe_camlp4" +] +toplevel: ["src/findlib/topfind"] diff --git a/406.esy.lock/opam/ocamlfind.1.8.0/opam b/406.esy.lock/opam/ocamlfind.1.8.0/opam new file mode 100644 index 000000000..e587a3c10 --- /dev/null +++ b/406.esy.lock/opam/ocamlfind.1.8.0/opam @@ -0,0 +1,68 @@ +opam-version: "2.0" +maintainer: "Thomas Gazagnaire " +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" +patches: ["no-awk-check.patch"] +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: [ + [make "install"] + ["install" "-m" "0755" "ocaml-stub" "%{bin}%/ocaml"] {ocaml:preinstalled} +] +remove: [ + ["ocamlfind" "remove" "bytes"] + [ + "./configure" + "-bindir" + bin + "-sitelib" + lib + "-mandir" + man + "-config" + "%{lib}%/findlib.conf" + "-no-camlp4" {!ocaml:preinstalled & ocaml:version >= "4.02.0"} + "-no-topfind" {ocaml:preinstalled} + ] + [make "uninstall"] + ["rm" "-f" "%{bin}%/ocaml"] {ocaml:preinstalled} +] +depends: [ + "ocaml" {>= "4.00.0"} + "conf-m4" {build} +] +synopsis: "A library manager for OCaml" +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.""" +authors: "Gerd Stolpmann " +extra-files: [ + ["ocamlfind.install" "md5=06f2c282ab52d93aa6adeeadd82a2543"] + ["ocaml-stub" "md5=181f259c9e0bad9ef523e7d4abfdf87a"] + ["no-awk-check.patch" "md5=0378123bf1a45fccdea434c053ddb687"] +] +url { + src: "http://download.camlcity.org/download/findlib-1.8.0.tar.gz" + checksum: "md5=a710c559667672077a93d34eb6a42e5b" + mirrors: "http://download2.camlcity.org/download/findlib-1.8.0.tar.gz" +} diff --git a/406.esy.lock/opam/ppx_derivers.1.2.1/opam b/406.esy.lock/opam/ppx_derivers.1.2.1/opam new file mode 100644 index 000000000..19e8b0f90 --- /dev/null +++ b/406.esy.lock/opam/ppx_derivers.1.2.1/opam @@ -0,0 +1,23 @@ +opam-version: "2.0" +maintainer: "jeremie@dimino.org" +authors: ["Jérémie Dimino"] +license: "BSD3" +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" {build} +] +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/406.esy.lock/opam/reason.3.4.0/opam b/406.esy.lock/opam/reason.3.4.0/opam new file mode 100644 index 000000000..a5cdfcde5 --- /dev/null +++ b/406.esy.lock/opam/reason.3.4.0/opam @@ -0,0 +1,31 @@ +opam-version: "2.0" +maintainer: "Jordan Walke " +authors: [ "Jordan Walke " ] +license: "MIT" +homepage: "https://github.com/facebook/reason" +doc: "http://reasonml.github.io/" +bug-reports: "https://github.com/facebook/reason/issues" +dev-repo: "git://github.com/facebook/reason.git" +tags: [ "syntax" ] +build: [ + ["dune" "build" "-p" name "-j" jobs] + ["dune" "runtest" "-p" name "-j" jobs] {with-test} +] +depends: [ + "ocaml" {>= "4.02" & < "4.08"} + "dune" {build & >= "1.4"} + "ocamlfind" {build} + "menhir" {>= "20170418"} + "merlin-extend" {>= "0.3"} + "result" + "ocaml-migrate-parsetree" +] +synopsis: "Reason: Syntax & Toolchain for OCaml" +description: """ +Reason gives OCaml a new syntax that is remniscient of languages like +JavaScript. It's also the umbrella project for a set of tools for the OCaml & +JavaScript ecosystem.""" +url { + src: "https://registry.npmjs.org/@esy-ocaml/reason/-/reason-3.4.0.tgz" + checksum: "md5=1b6cba03588e5fba3b5eb693c0d02dea" +} diff --git a/406.esy.lock/opam/result.1.3/opam b/406.esy.lock/opam/result.1.3/opam new file mode 100644 index 000000000..8b156d61f --- /dev/null +++ b/406.esy.lock/opam/result.1.3/opam @@ -0,0 +1,22 @@ +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: "BSD3" +build: [["jbuilder" "build" "-p" name "-j" jobs]] +depends: [ + "ocaml" + "jbuilder" {build & >= "1.0+beta11"} +] +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/releases/download/1.3/result-1.3.tbz" + checksum: "md5=4beebefd41f7f899b6eeba7414e7ae01" +} diff --git a/406.esy.lock/opam/yojson.1.7.0/opam b/406.esy.lock/opam/yojson.1.7.0/opam new file mode 100644 index 000000000..54591c67c --- /dev/null +++ b/406.esy.lock/opam/yojson.1.7.0/opam @@ -0,0 +1,38 @@ +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" {build} + "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/406.esy.lock/overrides/opam__s__dune_opam__c__1.9.1_opam_override/package.json b/406.esy.lock/overrides/opam__s__dune_opam__c__1.9.1_opam_override/package.json new file mode 100644 index 000000000..064c7e390 --- /dev/null +++ b/406.esy.lock/overrides/opam__s__dune_opam__c__1.9.1_opam_override/package.json @@ -0,0 +1,14 @@ +{ + "build": [ + [ + "ocaml", + "bootstrap.ml" + ], + [ + "./boot.exe", + "--release", + "-j", + "4" + ] + ] +} diff --git a/406.esy.lock/overrides/opam__s__merlin_extend_opam__c__0.3_opam_override/files/merlin-extend-winfix-4.2.3007.patch b/406.esy.lock/overrides/opam__s__merlin_extend_opam__c__0.3_opam_override/files/merlin-extend-winfix-4.2.3007.patch new file mode 100644 index 000000000..1e59ebb36 --- /dev/null +++ b/406.esy.lock/overrides/opam__s__merlin_extend_opam__c__0.3_opam_override/files/merlin-extend-winfix-4.2.3007.patch @@ -0,0 +1,34 @@ +--- ./extend_helper.ml ++++ ./extend_helper.ml +@@ -1,13 +1,6 @@ +-(*pp cppo -V OCAML:`ocamlc -version` *) + open Parsetree + open Extend_protocol + +-#if OCAML_VERSION < (4, 3, 0) +-# define CONST_STRING Asttypes.Const_string +-#else +-# define CONST_STRING Parsetree.Pconst_string +-#endif +- + (** Default implementation for [Reader_def.print_outcome] using + [Oprint] from compiler-libs *) + let print_outcome_using_oprint ppf = function +@@ -28,7 +21,7 @@ + pstr_loc = Location.none; + pstr_desc = Pstr_eval ({ + pexp_loc = Location.none; +- pexp_desc = Pexp_constant (CONST_STRING (msg, None)); ++ pexp_desc = Pexp_constant (Asttypes.Const_string (msg, None)); + pexp_attributes = []; + }, []); + }] +@@ -112,7 +105,7 @@ + let msg = match payload with + | PStr [{ + pstr_desc = Pstr_eval ({ +- pexp_desc = Pexp_constant (CONST_STRING (msg, _)); ++ pexp_desc = Pexp_constant (Asttypes.Const_string (msg, _)); + }, _); + }] -> msg + | _ -> "Warning: extension produced an incorrect syntax-error node" diff --git a/406.esy.lock/overrides/opam__s__merlin_extend_opam__c__0.3_opam_override/files/merlin-extend-winfix.patch b/406.esy.lock/overrides/opam__s__merlin_extend_opam__c__0.3_opam_override/files/merlin-extend-winfix.patch new file mode 100644 index 000000000..40c46b159 --- /dev/null +++ b/406.esy.lock/overrides/opam__s__merlin_extend_opam__c__0.3_opam_override/files/merlin-extend-winfix.patch @@ -0,0 +1,34 @@ +--- ./extend_helper.ml ++++ ./extend_helper.ml +@@ -1,13 +1,6 @@ +-(*pp cppo -V OCAML:`ocamlc -version` *) + open Parsetree + open Extend_protocol + +-#if OCAML_VERSION < (4, 3, 0) +-# define CONST_STRING Asttypes.Const_string +-#else +-# define CONST_STRING Parsetree.Pconst_string +-#endif +- + (** Default implementation for [Reader_def.print_outcome] using + [Oprint] from compiler-libs *) + let print_outcome_using_oprint ppf = function +@@ -28,7 +21,7 @@ + pstr_loc = Location.none; + pstr_desc = Pstr_eval ({ + pexp_loc = Location.none; +- pexp_desc = Pexp_constant (CONST_STRING (msg, None)); ++ pexp_desc = Pexp_constant (Parsetree.Pconst_string (msg, None)); + pexp_attributes = []; + }, []); + }] +@@ -112,7 +105,7 @@ + let msg = match payload with + | PStr [{ + pstr_desc = Pstr_eval ({ +- pexp_desc = Pexp_constant (CONST_STRING (msg, _)); ++ pexp_desc = Pexp_constant (Parsetree.Pconst_string (msg, _)); + }, _); + }] -> msg + | _ -> "Warning: extension produced an incorrect syntax-error node" diff --git a/406.esy.lock/overrides/opam__s__merlin_extend_opam__c__0.3_opam_override/package.json b/406.esy.lock/overrides/opam__s__merlin_extend_opam__c__0.3_opam_override/package.json new file mode 100644 index 000000000..acc90eb32 --- /dev/null +++ b/406.esy.lock/overrides/opam__s__merlin_extend_opam__c__0.3_opam_override/package.json @@ -0,0 +1,15 @@ +{ + "buildEnv": { + "PATCH_CMD": "#{ocaml.version == '4.2.3007' ? 'patch -p1 < merlin-extend-winfix-4.2.3007.patch' : 'patch -p1 < merlin-extend-winfix.patch'}" + }, + "build": [ + [ + "bash", + "-c", + "#{os == 'windows' ? $PATCH_CMD : 'true'}" + ], + [ + "make" + ] + ] +} diff --git a/406.esy.lock/overrides/opam__s__ocamlbuild_opam__c__0.14.0_opam_override/files/ocamlbuild-0.14.0.patch b/406.esy.lock/overrides/opam__s__ocamlbuild_opam__c__0.14.0_opam_override/files/ocamlbuild-0.14.0.patch new file mode 100644 index 000000000..4d5bea0e0 --- /dev/null +++ b/406.esy.lock/overrides/opam__s__ocamlbuild_opam__c__0.14.0_opam_override/files/ocamlbuild-0.14.0.patch @@ -0,0 +1,463 @@ +--- ./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/406.esy.lock/overrides/opam__s__ocamlbuild_opam__c__0.14.0_opam_override/package.json b/406.esy.lock/overrides/opam__s__ocamlbuild_opam__c__0.14.0_opam_override/package.json new file mode 100644 index 000000000..b24be7b5b --- /dev/null +++ b/406.esy.lock/overrides/opam__s__ocamlbuild_opam__c__0.14.0_opam_override/package.json @@ -0,0 +1,27 @@ +{ + "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/406.esy.lock/overrides/opam__s__ocamlfind_opam__c__1.8.0_opam_override/files/findlib-1.8.0.patch b/406.esy.lock/overrides/opam__s__ocamlfind_opam__c__1.8.0_opam_override/files/findlib-1.8.0.patch new file mode 100644 index 000000000..5d3d1895f --- /dev/null +++ b/406.esy.lock/overrides/opam__s__ocamlfind_opam__c__1.8.0_opam_override/files/findlib-1.8.0.patch @@ -0,0 +1,489 @@ +--- ./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.config_file ++ print_endline (sl Findlib_config.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 +@@ -113,7 +114,7 @@ + $(OCAMLC) -a -o num_top.cma $(NUMTOP_OBJECTS) + + clean: +- rm -f *.cmi *.cmo *.cma *.cmx *.a *.o *.cmxa \ ++ rm -f *.cmi *.cmo *.cma *.cmx *.lib *.a *.o *.cmxa \ + fl_meta.ml findlib_config.ml findlib.mml topfind.ml topfind \ + ocamlfind$(EXEC_SUFFIX) ocamlfind_opt$(EXEC_SUFFIX) + +@@ -121,7 +122,7 @@ + mkdir -p "$(prefix)$(OCAML_SITELIB)/$(NAME)" + mkdir -p "$(prefix)$(OCAMLFIND_BIN)" + test $(INSTALL_TOPFIND) -eq 0 || cp topfind "$(prefix)$(OCAML_CORE_STDLIB)" +- files=`$(SH) $(TOP)/tools/collect_files $(TOP)/Makefile.config findlib.cmi findlib.mli findlib.cma findlib.cmxa findlib.a findlib.cmxs topfind.cmi topfind.mli fl_package_base.mli fl_package_base.cmi fl_metascanner.mli fl_metascanner.cmi fl_metatoken.cmi findlib_top.cma findlib_top.cmxa findlib_top.a findlib_top.cmxs findlib_dynload.cma findlib_dynload.cmxa findlib_dynload.a findlib_dynload.cmxs fl_dynload.mli fl_dynload.cmi META` && \ ++ files=`$(SH) $(TOP)/tools/collect_files $(TOP)/Makefile.config findlib.cmi findlib.mli findlib.cma findlib.cmxa findlib$(LIB_SUFFIX) findlib.cmxs topfind.cmi topfind.mli fl_package_base.mli fl_package_base.cmi fl_metascanner.mli fl_metascanner.cmi fl_metatoken.cmi findlib_top.cma findlib_top.cmxa findlib_top$(LIB_SUFFIX) findlib_top.cmxs findlib_dynload.cma findlib_dynload.cmxa findlib_dynload$(LIB_SUFFIX) findlib_dynload.cmxs fl_dynload.mli fl_dynload.cmi META` && \ + cp $$files "$(prefix)$(OCAML_SITELIB)/$(NAME)" + f="ocamlfind$(EXEC_SUFFIX)"; { test -f ocamlfind_opt$(EXEC_SUFFIX) && f="ocamlfind_opt$(EXEC_SUFFIX)"; }; \ + cp $$f "$(prefix)$(OCAMLFIND_BIN)/ocamlfind$(EXEC_SUFFIX)" diff --git a/406.esy.lock/overrides/opam__s__ocamlfind_opam__c__1.8.0_opam_override/package.json b/406.esy.lock/overrides/opam__s__ocamlfind_opam__c__1.8.0_opam_override/package.json new file mode 100644 index 000000000..136b66c52 --- /dev/null +++ b/406.esy.lock/overrides/opam__s__ocamlfind_opam__c__1.8.0_opam_override/package.json @@ -0,0 +1,61 @@ +{ + "build": [ + [ + "bash", + "-c", + "#{os == 'windows' ? 'patch -p1 < findlib-1.8.0.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/406.json b/406.json new file mode 100644 index 000000000..06cdbf296 --- /dev/null +++ b/406.json @@ -0,0 +1,47 @@ +{ + "name": "reason-react", + "version": "0.5.3", + "description": "React bindings for Reason", + "author": "", + "license": "MIT", + "repository": { + "type": "git", + "url": "git+https://github.com/reasonml/reason-react.git" + }, + "homepage": "https://reasonml.github.io/reason-react/", + "devDependencies": { + "@opam/merlin": "*" + }, + "dependencies": { + "@opam/dune": "*", + "@opam/merlin-extend": " >= 0.3", + "@opam/ocamlfind": "*", + "@opam/reason": "3.4.0", + "@opam/result": "*", + "@opam/cppo": "*", + "ocaml": "~4.6.0" + }, + "bin": { + "reactjs_jsx_ppx_v3.exe": "./_build/default/jsx_ppx/reactjs_jsx_ppx_v3.exe" + }, + "esy": { + "buildsInSource": "_build", + "build": [ + [ + "dune", + "build", + "-p", + "reactjs_jsx_ppx_v3" + ] + ], + "install": [ + [ + "esy-installer", + "reactjs_jsx_ppx_v3.install" + ] + ] + }, + "scripts": { + "test": "esy x ocamlc -dsource -ppx reactjs_jsx_ppx_v3 -pp 'refmt --print binary --parse re' -impl './jsx_ppx/test.re'" + } +} diff --git a/_build/default/jsx_ppx/reactjs_jsx_ppx_v3.exe b/_build/default/jsx_ppx/reactjs_jsx_ppx_v3.exe index 8cc6aa3dc..baddba240 100755 Binary files a/_build/default/jsx_ppx/reactjs_jsx_ppx_v3.exe and b/_build/default/jsx_ppx/reactjs_jsx_ppx_v3.exe differ diff --git a/esy.json b/esy.json index d8377b1b1..6773a8a43 100644 --- a/esy.json +++ b/esy.json @@ -10,9 +10,7 @@ }, "homepage": "https://reasonml.github.io/reason-react/", "devDependencies": { - "@opam/merlin": "*", - "@opam/ppx_tools": "~4.2.0", - "ocaml": "~4.2.0" + "@opam/merlin": "*" }, "dependencies": { "@opam/dune": "*", @@ -20,20 +18,32 @@ "@opam/ocamlfind": "*", "@opam/reason": "3.4.0", "@opam/result": "*", + "@opam/cppo": "*", "ocaml": "~4.2.0" }, "bin": { - "reactjs_jsx_ppx_v3.exe": - "./_build/default/jsx_ppx/reactjs_jsx_ppx_v3.exe" + "reactjs_jsx_ppx_v3.exe": "./_build/default/jsx_ppx/reactjs_jsx_ppx_v3.exe" }, "esy": { "buildsInSource": "_build", - "build": [ [ "dune", "build", "-p", "reactjs_jsx_ppx_v3" ] ], - "install": [ [ "esy-installer", "reactjs_jsx_ppx_v3.install" ] ] + "build": [ + [ + "dune", + "build", + "-p", + "reactjs_jsx_ppx_v3" + ] + ], + "install": [ + [ + "esy-installer", + "reactjs_jsx_ppx_v3.install" + ] + ] }, "scripts": { "test": "yarn test", "dsource": "esy x ocamlc -dsource -ppx reactjs_jsx_ppx_v3 -pp 'refmt --print binary --parse re' -impl './jsx_ppx/test.re'", "dparsetree": "esy x ocamlc -dparsetree -ppx reactjs_jsx_ppx_v3 -pp 'refmt --print binary --parse re' -impl './jsx_ppx/test.re'" } -} \ No newline at end of file +} diff --git a/esy.lock/index.json b/esy.lock/index.json index 88fdece35..7e3b87c44 100644 --- a/esy.lock/index.json +++ b/esy.lock/index.json @@ -1,5 +1,5 @@ { - "checksum": "ed700ffb3d07a55ba29df8c4c2ae9313", + "checksum": "d4db4ada6575b1289296a8f036c4b931", "root": "reason-react@link-dev:./esy.json", "node": { "reason-react@link-dev:./esy.json": { @@ -13,12 +13,9 @@ "@opam/reason@opam:3.4.0@9dac40ad", "@opam/ocamlfind@opam:1.8.0@f744a0c5", "@opam/merlin-extend@opam:0.3@0af73a50", - "@opam/dune@opam:1.9.1@61bdaadf" + "@opam/dune@opam:1.9.1@61bdaadf", "@opam/cppo@opam:1.6.5@bec3dbd9" ], - "devDependencies": [ - "ocaml@4.2.3007@d41d8cd9", "@opam/ppx_tools@opam:4.02.3@3df89f8f", - "@opam/merlin@opam:3.2.2@829ee6dd" - ] + "devDependencies": [ "@opam/merlin@opam:3.2.2@829ee6dd" ] }, "ocaml@4.2.3007@d41d8cd9": { "id": "ocaml@4.2.3007@d41d8cd9", @@ -131,31 +128,6 @@ "@opam/menhir@opam:20181113@0c8257a8" ] }, - "@opam/ppx_tools@opam:4.02.3@3df89f8f": { - "id": "@opam/ppx_tools@opam:4.02.3@3df89f8f", - "name": "@opam/ppx_tools", - "version": "opam:4.02.3", - "source": { - "type": "install", - "source": [ - "archive:https://opam.ocaml.org/cache/md5/47/47b1fb5681b2bcfa9cdaee45a899dfe9#md5:47b1fb5681b2bcfa9cdaee45a899dfe9", - "archive:https://github.com/alainfrisch/ppx_tools/archive/v4.02.3.tar.gz#md5:47b1fb5681b2bcfa9cdaee45a899dfe9" - ], - "opam": { - "name": "ppx_tools", - "version": "4.02.3", - "path": "esy.lock/opam/ppx_tools.4.02.3" - } - }, - "overrides": [], - "dependencies": [ - "ocaml@4.2.3007@d41d8cd9", "@opam/ocamlfind@opam:1.8.0@f744a0c5", - "@esy-ocaml/substs@0.0.1@d41d8cd9" - ], - "devDependencies": [ - "ocaml@4.2.3007@d41d8cd9", "@opam/ocamlfind@opam:1.8.0@f744a0c5" - ] - }, "@opam/ppx_derivers@opam:1.2.1@0b458500": { "id": "@opam/ppx_derivers@opam:1.2.1@0b458500", "name": "@opam/ppx_derivers", diff --git a/esy.lock/opam/ppx_tools.4.02.3/opam b/esy.lock/opam/ppx_tools.4.02.3/opam deleted file mode 100644 index 6db9dd5c6..000000000 --- a/esy.lock/opam/ppx_tools.4.02.3/opam +++ /dev/null @@ -1,21 +0,0 @@ -opam-version: "2.0" -maintainer: "alain.frisch@lexifi.com" -authors: [ "Alain Frisch " ] -license: "MIT" -homepage: "https://github.com/alainfrisch/ppx_tools" -bug-reports: "https://github.com/alainfrisch/ppx_tools/issues" -dev-repo: "git://github.com/alainfrisch/ppx_tools.git#4.02" -tags: [ "syntax" ] -build: [[make "all"]] -install: [[make "install"]] -remove: [["ocamlfind" "remove" "ppx_tools"]] -depends: [ - "ocaml" {>= "4.02.0" & < "4.03.0"} - "ocamlfind" {>= "1.5.0"} -] -synopsis: "Tools for authors of ppx rewriters and other syntactic tools" -flags: light-uninstall -url { - src: "https://github.com/alainfrisch/ppx_tools/archive/v4.02.3.tar.gz" - checksum: "md5=47b1fb5681b2bcfa9cdaee45a899dfe9" -} diff --git a/jsx_ppx/dune b/jsx_ppx/dune index 43408cdca..8642a8127 100644 --- a/jsx_ppx/dune +++ b/jsx_ppx/dune @@ -1,5 +1,22 @@ +(rule + (targets reactjs_jsx_ppx_v3.ml) + (deps + (:dep reactjs_jsx_ppx_v3.cppo.ml)) + (action + (run %{bin:cppo} -V OCAML:%{ocaml_version} -U BS_COMPILER_IN_BROWSER %{dep} + -o %{targets}))) + +(rule + (targets reactjs_jsx_ppx_v3.mli) + (deps + (:dep reactjs_jsx_ppx_v3.cppo.mli)) + (action + (run %{bin:cppo} -V OCAML:%{ocaml_version} -D BS_NO_COMPILER_PATCH %{dep} + -o %{targets}))) + (executable (name reactjs_jsx_ppx_v3) (public_name reactjs_jsx_ppx_v3) (libraries compiler-libs.common) - (flags (:standard -w -9))) \ No newline at end of file + (flags + (:standard -w -9))) diff --git a/jsx_ppx/reactjs_jsx_ppx_v3.ml b/jsx_ppx/reactjs_jsx_ppx_v3.cppo.ml similarity index 91% rename from jsx_ppx/reactjs_jsx_ppx_v3.ml rename to jsx_ppx/reactjs_jsx_ppx_v3.cppo.ml index fd2540149..e8929882a 100644 --- a/jsx_ppx/reactjs_jsx_ppx_v3.ml +++ b/jsx_ppx/reactjs_jsx_ppx_v3.cppo.ml @@ -3,7 +3,6 @@ a ReasonReact-specific function call. Aka, this is a macro, using OCaml's ppx facilities; https://whitequark.org/blog/2014/04/16/a-guide-to-extension- points-in-ocaml/ - You wouldn't use this file directly; it's used by BuckleScript's bsconfig.json. Specifically, there's a field called `react-jsx` inside the field `reason`, which enables this ppx through some internal call in bsb @@ -11,34 +10,26 @@ (* There are two different transforms that can be selected in this file (v2 and v3): - v2: transform `[@JSX] div(~props1=a, ~props2=b, ~children=[foo, bar], ())` into `ReactDOMRe.createElement("div", ~props={"props1": 1, "props2": b}, [|foo, bar|])`. - transform `[@JSX] div(~props1=a, ~props2=b, ~children=foo, ())` into `ReactDOMRe.createElementVariadic("div", ~props={"props1": 1, "props2": b}, foo)`. - transform the upper-cased case `[@JSX] Foo.createElement(~key=a, ~ref=b, ~foo=bar, ~children=[], ())` into `ReasonReact.element(~key=a, ~ref=b, Foo.make(~foo=bar, [||]))` - transform `[@JSX] [foo]` into `ReactDOMRe.createElement(ReasonReact.fragment, [|foo|])` - v3: transform `[@JSX] div(~props1=a, ~props2=b, ~children=[foo, bar], ())` into `ReactDOMRe.createDOMElementVariadic("div", ReactDOMRe.domProps(~props1=1, ~props2=b), [|foo, bar|])`. - transform the upper-cased case `[@JSX] Foo.createElement(~key=a, ~ref=b, ~foo=bar, ~children=[], ())` into `React.createElement(Foo.make, Foo.makeProps(~key=a, ~ref=b, ~foo=bar, ()))` - transform the upper-cased case `[@JSX] Foo.createElement(~foo=bar, ~children=[foo, bar], ())` into `React.createElementVariadic(Foo.make, Foo.makeProps(~foo=bar, ~children=React.null, ()), [|foo, bar|])` - transform `[@JSX] [foo]` into `ReactDOMRe.createElement(ReasonReact.fragment, [|foo|])` *) @@ -52,6 +43,30 @@ open Longident let rec find_opt p = function | [] -> None | x :: l -> if p x then Some x else find_opt p l + +#if OCAML_VERSION >= (4,3,0) + +let nolabel = Nolabel +let labelled str = Labelled str +let optional str = Optional str +let isOptional str = match str with +| Optional _ -> true +| _ -> false +let isLabelled str = match str with +| Labelled _ -> true +| _ -> false +let getLabel str = match str with +| Optional str | Labelled str -> str +| Nolabel -> "" +let optionIdent = Lident "option" + +let argIsKeyRef = function + | (Labelled ("key" | "ref"), _) | (Optional ("key" | "ref"), _) -> true + | _ -> false +let constantString ~loc str = Ast_helper.Exp.constant ~loc (Pconst_string (str, None)) + +#else + let nolabel = "" let labelled str = str let optional str = "?" ^ str @@ -64,6 +79,8 @@ let argIsKeyRef = function | (("key" | "ref"), _) | (("?key" | "?ref"), _) -> true | _ -> false let constantString ~loc str = Ast_helper.Exp.constant ~loc (Asttypes.Const_string (str, None)) + +#endif let safeTypeFromValue valueStr = let valueStr = getLabel valueStr in match String.sub valueStr 0 1 with @@ -115,8 +132,13 @@ let transformChildrenIfList ~loc ~mapper theList = let extractChildren ?(removeLastPositionUnit=false) ~loc propsAndChildren = let rec allButLast_ lst acc = match lst with | [] -> [] +#if OCAML_VERSION >= (4,3,0) + | (Nolabel, {pexp_desc = Pexp_construct ({txt = Lident "()"}, None)})::[] -> acc + | (Nolabel, _)::rest -> raise (Invalid_argument "JSX: found non-labelled argument before the last position") +#else | ("", {pexp_desc = Pexp_construct ({txt = Lident "()"}, None)})::[] -> acc - | ("", _)::rest -> raise (Invalid_argument "JSX: found non-labelled argument before the last position") + | ("", _)::_rest -> raise (Invalid_argument "JSX: found non-labelled argument before the last position") +#endif | arg::rest -> allButLast_ rest (arg::acc) in let allButLast lst = allButLast_ lst [] |> List.rev in @@ -151,7 +173,7 @@ let getFnName binding = | _ -> raise (Invalid_argument "react.component calls cannot be destructured.") (* Lookup the value of `props` otherwise raise Invalid_argument error *) -let getPropsNameValue acc (loc, exp) = +let getPropsNameValue _acc (loc, exp) = match (loc, exp) with | ({ txt = Lident "props" }, { pexp_desc = Pexp_ident {txt = Lident str} }) -> { propsName = str } | ({ txt }, _) -> raise (Invalid_argument ("react.component only accepts props as an option, given: " ^ Longident.last txt)) @@ -182,7 +204,11 @@ let filenameFromLoc (pstr_loc: Location.t) = let fileName = try Filename.chop_extension (Filename.basename fileName) with | Invalid_argument _-> fileName in +#if OCAML_VERSION >= (4,3,0) + let fileName = String.capitalize_ascii fileName in +#else let fileName = String.capitalize fileName in +#endif fileName (* Build a string representation of a module name with segments separated by $ *) @@ -199,7 +225,6 @@ let makeModuleName fileName nestedModules fnName = (* AST node builders - These functions help us build AST nodes that are needed when transforming a [@react.component] into a constructor and a props external *) @@ -230,11 +255,11 @@ let rec recursivelyMakeNamedArgsForExternal list args = ptyp_attributes = []; }]); } - | (label, Some ({ptyp_desc = Ptyp_constr ({txt=(Lident "option")}, [type_])}), _) -> { + | (_label, Some ({ptyp_desc = Ptyp_constr ({txt=(Lident "option")}, [type_])}), _) -> { type_ with ptyp_desc = Ptyp_constr ({loc=type_.ptyp_loc; txt=optionIdent}, [type_]); } - | (label, Some type_, Some _) -> { + | (_label, Some type_, Some _) -> { ptyp_loc = loc; ptyp_attributes = []; ptyp_desc = Ptyp_constr ({loc; txt=optionIdent}, [type_]); @@ -244,7 +269,11 @@ let rec recursivelyMakeNamedArgsForExternal list args = ptyp_loc = loc; ptyp_attributes = []; } +#if OCAML_VERSION >= (4,3,0) + | (label, Some ({ptyp_desc = Ptyp_constr ({txt=Lident "option"}, _)} as type_), _) when isOptional label -> +#else | (label, Some ({ptyp_desc = Ptyp_constr ({txt=Ldot (Lident "*predef*","option")}, _)} as type_), _) when isOptional label -> +#endif type_ | (label, Some (type_), None) when isOptional label -> { type_ with @@ -299,11 +328,24 @@ let makePropsName ~loc name = ppat_attributes = []; } +#if OCAML_VERSION >= (4,3,0) +let makeObjectField loc (str, _attrs, type_) = + (* intentionally not using attrs - they probably don't work on object fields. use on *Props instead *) + Otag ({ loc; txt = str }, [], {type_ with ptyp_attributes = []}) +#endif + (* Build an AST node representing a "closed" Js.t object representing a component's props *) let makePropsType ~loc namedTypeList = Typ.mk ~loc ( Ptyp_constr({txt= Ldot (Lident("Js"), "t"); loc}, [{ +#if OCAML_VERSION >= (4,3,0) + ptyp_desc = Ptyp_object( + List.map (makeObjectField loc) namedTypeList, + Closed + ); +#else ptyp_desc = Ptyp_object(namedTypeList, Closed); +#endif ptyp_loc = loc; ptyp_attributes = []; }]) @@ -337,10 +379,15 @@ let jsxMapper () = (childrenArg := Some expression; [(labelled "children", Exp.ident ~loc {loc; txt = Ldot (Lident "React", "null")})])) @ [(nolabel, Exp.construct ~loc {loc; txt = Lident "()"} None)] in - let isCap str = let first = String.sub str 0 1 in let capped = String.uppercase first in first = capped in + let isCap str = let first = String.sub str 0 1 in +#if OCAML_VERSION >= (4,3,0) + let capped = String.uppercase_ascii first in first = capped in +#else + let capped = String.uppercase first in first = capped in +#endif let ident = match modulePath with | Lident _ -> Ldot (modulePath, "make") - | (Ldot (modulePath, value) as fullPath) when isCap value -> Ldot (fullPath, "make") + | (Ldot (_modulePath, value) as fullPath) when isCap value -> Ldot (fullPath, "make") | modulePath -> modulePath in let propsIdent = match ident with | Lident path -> Lident (path ^ "Props") @@ -498,10 +545,17 @@ let jsxMapper () = let expr = mapper.expr mapper expr in match expr.pexp_desc with (* TODO: make this show up with a loc. *) +#if OCAML_VERSION >= (4,3,0) + | Pexp_fun (Labelled "key", _, _, _) + | Pexp_fun (Optional "key", _, _, _) -> raise (Invalid_argument "Key cannot be accessed inside of a component. Don't worry - you can always key a component from its parent!") + | Pexp_fun (Labelled "ref", _, _, _) + | Pexp_fun (Optional "ref", _, _, _) -> raise (Invalid_argument "Ref cannot be passed as a normal prop. Please use `forwardRef` API instead.") +#else | Pexp_fun ("key", _, _, _) | Pexp_fun ("?key", _, _, _) -> raise (Invalid_argument "Key cannot be accessed inside of a component. Don't worry - you can always key a component from its parent!") | Pexp_fun ("ref", _, _, _) | Pexp_fun ("?ref", _, _, _) -> raise (Invalid_argument "Ref cannot be passed as a normal prop. Please use `forwardRef` API instead.") +#endif | Pexp_fun (arg, default, pattern, expression) when isOptional arg || isLabelled arg -> let alias = (match pattern with | {ppat_desc = Ppat_alias (_, {txt}) | Ppat_var {txt}} -> txt @@ -512,10 +566,17 @@ let jsxMapper () = | _ -> None) in recursivelyTransformNamedArgsForMake mapper expression ((arg, default, pattern, alias, pattern.ppat_loc, type_) :: list) +#if OCAML_VERSION >= (4,3,0) + | Pexp_fun (Nolabel, _, { ppat_desc = (Ppat_construct ({txt = Lident "()"}, _) | Ppat_any)}, expression) -> + (expression.pexp_desc, list, None) + | Pexp_fun (Nolabel, _, { ppat_desc = Ppat_var ({txt})}, expression) -> + (expression.pexp_desc, list, Some txt) +#else | Pexp_fun ("", _, { ppat_desc = (Ppat_construct ({txt = Lident "()"}, _) | Ppat_any)}, expression) -> (expression.pexp_desc, list, None) | Pexp_fun ("", _, { ppat_desc = Ppat_var ({txt})}, expression) -> (expression.pexp_desc, list, Some txt) +#endif | innerExpression -> (innerExpression, list, None) in @@ -526,7 +587,7 @@ let jsxMapper () = type_ with ptyp_desc = Ptyp_constr ({loc=type_.ptyp_loc; txt=optionIdent}, [type_]); }) :: types - | (Some type_, name, Some default) -> + | (Some type_, name, Some _default) -> (getLabel name, [], { ptyp_desc = Ptyp_constr ({loc; txt=optionIdent}, [type_]); ptyp_loc = loc; @@ -553,7 +614,7 @@ let jsxMapper () = | _ -> types in - let argToConcreteType types (name, loc, type_) = match name with + let argToConcreteType types (name, _loc, type_) = match name with | name when isLabelled name || isOptional name -> (getLabel name, [], type_) :: types (* return value *) @@ -578,7 +639,11 @@ let jsxMapper () = (match ptyp_desc with | Ptyp_arrow (name, type_, ({ptyp_desc = Ptyp_arrow _} as rest)) when isLabelled name || isOptional name -> getPropTypes ((name, ptyp_loc, type_)::types) rest +#if OCAML_VERSION >= (4,3,0) + | Ptyp_arrow (Nolabel, _type, rest) -> +#else | Ptyp_arrow ("", _type, rest) -> +#endif getPropTypes types rest | Ptyp_arrow (name, type_, returnValue) when isLabelled name || isOptional name -> (returnValue, (name, returnValue.ptyp_loc, type_)::types) @@ -639,9 +704,11 @@ let jsxMapper () = let (wrapExpression, realReturnExpression) = spelunkForFunExpression returnExpression in ((fun expressionDesc -> {expression with pexp_desc = Pexp_let (recursive, vbs, wrapExpression expressionDesc)}), realReturnExpression) (* let make = React.forwardRef((~prop) => ...) *) - | { - pexp_desc = Pexp_apply (wrapperExpression, [("", innerFunctionExpression)]) - } -> +#if OCAML_VERSION >= (4,3,0) + | { pexp_desc = Pexp_apply (wrapperExpression, [(Nolabel, innerFunctionExpression)]) } -> +#else + | { pexp_desc = Pexp_apply (wrapperExpression, [("", innerFunctionExpression)]) } -> +#endif let (wrapExpression, realReturnExpression) = spelunkForFunExpression innerFunctionExpression in ((fun expressionDesc -> { expression with pexp_desc = @@ -681,7 +748,7 @@ let jsxMapper () = in let namedTypeList = List.fold_left argToType [] namedArgList in let externalDecl = makeExternalDecl fnName attr_loc namedArgListWithKeyAndRef namedTypeList in - let makeLet innerExpression (label, default, pattern, alias, loc, _type) = + let makeLet innerExpression (label, default, pattern, _alias, loc, _type) = let labelString = (match label with | label when isOptional label || isLabelled label -> getLabel label | _ -> raise (Invalid_argument "This should never happen")) in let expression = (Exp.apply ~loc (Exp.ident ~loc {txt = (Lident "##"); loc }) @@ -767,7 +834,7 @@ let jsxMapper () = let reactComponentTransform mapper structures = List.fold_right (transformComponentDefinition mapper) structures [] in - let transformComponentSignature mapper signature returnSignatures = match signature with + let transformComponentSignature _mapper signature returnSignatures = match signature with | ({ psig_loc; psig_desc = Psig_value ({ @@ -783,7 +850,11 @@ let jsxMapper () = (match ptyp_desc with | Ptyp_arrow (name, type_, ({ptyp_desc = Ptyp_arrow _} as rest)) when isOptional name || isLabelled name -> getPropTypes ((name, ptyp_loc, type_)::types) rest +#if OCAML_VERSION >= (4,3,0) + | Ptyp_arrow (Nolabel, _type, rest) -> +#else | Ptyp_arrow ("", _type, rest) -> +#endif getPropTypes types rest | Ptyp_arrow (name, type_, returnValue) when isOptional name || isLabelled name -> (returnValue, (name, returnValue.ptyp_loc, type_)::types) @@ -878,7 +949,6 @@ let jsxMapper () = future when JSX PPX changes). So the architecture for switching between JSX behavior stayed here. To create a new JSX ppx, copy paste this entire file and change the relevant parts. - Description of architecture: in bucklescript's bsconfig.json, you can specify a project-wide JSX version. You can also specify a file-level JSX version. This degree of freedom allows a person to convert a project @@ -898,10 +968,19 @@ let jsxMapper () = (* no file-level jsx config found *) | ([], _) -> default_mapper.structure mapper structure (* {jsx: 2} *) - | ((_, {pexp_desc = Pexp_constant (Const_int version)})::rest, recordFieldsWithoutJsx) -> begin +#if OCAML_VERSION >= (4,3,0) + | ((_, {pexp_desc = Pexp_constant (Pconst_integer (version, None))})::rest, recordFieldsWithoutJsx) -> begin +#else + | ((_, {pexp_desc = Pexp_constant (Const_int version)})::_rest, recordFieldsWithoutJsx) -> begin +#endif (match version with +#if OCAML_VERSION >= (4,3,0) + | "2" -> jsxVersion := Some 2 + | "3" -> jsxVersion := Some 3 +#else | 2 -> jsxVersion := Some 2 | 3 -> jsxVersion := Some 3 +#endif | _ -> raise (Invalid_argument "JSX: the file-level bs.config's jsx version must be 2 or 3")); match recordFieldsWithoutJsx with (* record empty now, remove the whole bs.config attribute *) @@ -976,8 +1055,7 @@ let jsxMapper () = { default_mapper with structure; expr; signature; module_binding; } -(* #if BS_COMPILER_IN_BROWSER then - +#ifdef BS_COMPILER_IN_BROWSER module Js = struct module Unsafe = struct type any @@ -996,7 +1074,6 @@ module Js = struct external string : string -> js_string t = "caml_js_from_string" external to_string : js_string t -> string = "caml_js_to_string" end - (* keep in sync with jscomp/core/jsoo_main.ml `let implementation` *) let rewrite code = let mapper = jsxMapper () in @@ -1030,10 +1107,8 @@ let rewrite code = Js.Unsafe.(obj [| "js_error_msg" , inject @@ Js.string (Printexc.to_string e) |]) - let export (field : string) v = Js.Unsafe.set (Js.Unsafe.global) field v - let make_ppx name = export name (Js.Unsafe.(obj @@ -1042,9 +1117,8 @@ let make_ppx name = Js.wrap_meth_callback (fun _ code -> rewrite (Js.to_string code)); |])) +let () = make_ppx "jsxv2" -let () = make_ppx "jsxv2" *) - -(* #else *) +#else let () = Ast_mapper.register "JSX" (fun _argv -> jsxMapper ()) -(* #end *) +#endif diff --git a/jsx_ppx/reactjs_jsx_ppx_v3.mli b/jsx_ppx/reactjs_jsx_ppx_v3.cppo.mli similarity index 81% rename from jsx_ppx/reactjs_jsx_ppx_v3.mli rename to jsx_ppx/reactjs_jsx_ppx_v3.cppo.mli index 4900fe06f..d04961f30 100644 --- a/jsx_ppx/reactjs_jsx_ppx_v3.mli +++ b/jsx_ppx/reactjs_jsx_ppx_v3.cppo.mli @@ -1,4 +1,4 @@ -(* +(* This file's shared between the Reason repo and the BuckleScript repo. In Reason, it's in src. In BuckleScript, it's in vendor/reason We periodically copy this file from Reason (the source of truth) to BuckleScript, then @@ -6,6 +6,6 @@ BuckleScript's on OCaml 4.02 while Reason's on 4.04; so the #if macros surround the pieces of code that are different between the two compilers. *) -(* #if undefined BS_NO_COMPILER_PATCH then *) -(* val ast_mapper : Ast_mapper.mapper *) -(* #end *) +#ifndef BS_NO_COMPILER_PATCH +val ast_mapper : Ast_mapper.mapper +#endif