diff --git a/.gitignore b/.gitignore index 1e75be2e..6305c781 100644 --- a/.gitignore +++ b/.gitignore @@ -1,26 +1,6 @@ .DS_Store .merlin -.bsb.lock npm-debug.log -/lib/ -examples/**/lib -examples/*/_build -examples/*/_opam -examples/*/node_modules -node_modules -node_modules/ -log_types.txt *.install -_esy _build -_esy -static/codemirror-5.36.0 -_old -tmp -examples/markdown-reason-react/ editor-extensions/vscode/*.zip -editor-extensions/vscode/src/syntaxes/out -bsb_modules -_esy/ -.test-failures -RunTests.exe diff --git a/.npmignore b/.npmignore deleted file mode 100644 index b62af3b6..00000000 --- a/.npmignore +++ /dev/null @@ -1,8 +0,0 @@ -editor-extensions -examples -_build -_esy -ExamplesTests.exe -.github -.vscode -.circleci diff --git a/Readme.md b/Readme.md index 3fbb2490..c74a2203 100644 --- a/Readme.md +++ b/Readme.md @@ -15,13 +15,6 @@ This is a preliminary version for early testing, the CLI is not stable yet. dune build ``` -or - -``` -esy -``` - - ## Usage ### dump diff --git a/esy.lock.json b/esy.lock.json deleted file mode 100644 index d74e685f..00000000 --- a/esy.lock.json +++ /dev/null @@ -1,545 +0,0 @@ -{ - "hash": "66d48e5e247da5a4bd10ba45545abc8d", - "root": "root@path:./esy.json", - "node": { - "root@path:./esy.json": { - "record": { - "name": "root", - "version": "path:./esy.json", - "source": "path:./esy.json", - "files": [], - "opam": null - }, - "dependencies": [ - "@esy-ocaml/reason@3.3.7", "@opam/dune@opam:1.5.1", - "@opam/ocaml-migrate-parsetree@opam:1.1.0", - "@opam/ppx_tools@opam:5.1+4.06.0", - "@opam/ppx_tools_versioned@opam:5.2.1", "@opam/ppxlib@opam:0.3.1", - "ocaml@4.7.1001", "rex-json@1.4.0" - ] - }, - "rex-json@1.4.0": { - "record": { - "name": "rex-json", - "version": "1.4.0", - "source": - "archive:https://registry.npmjs.org/rex-json/-/rex-json-1.4.0.tgz#sha1:d93796d0a33920ca977a177aec5628950ebeb04a", - "files": [], - "opam": null - }, - "dependencies": [] - }, - "ocaml@4.7.1001": { - "record": { - "name": "ocaml", - "version": "4.7.1001", - "source": - "archive:https://registry.npmjs.org/ocaml/-/ocaml-4.7.1001.tgz#sha1:0578762cdfc327ace59e00e99b023bdfdcb5ac16", - "files": [], - "opam": null - }, - "dependencies": [] - }, - "@opam/stdio@opam:v0.11.0": { - "record": { - "name": "@opam/stdio", - "version": "opam:v0.11.0", - "source": - "archive:https://ocaml.janestreet.com/ocaml-core/v0.11/files/stdio-v0.11.0.tar.gz#md5:2db42ee38c91b3ff7126c2634c407b99", - "files": [], - "opam": { - "name": "stdio", - "version": "v0.11.0", - "opam": - "opam-version: \"2.0\"\nname: \"stdio\"\nversion: \"v0.11.0\"\nsynopsis: \"Standard IO library for OCaml\"\ndescription: \"\"\"\nStdio implements simple input/output functionalities for OCaml.\n\nIt re-exports the input/output functions of the OCaml standard\nlibraries using a more consistent API.\"\"\"\nmaintainer: \"opensource@janestreet.com\"\nauthors: \"Jane Street Group, LLC \"\nlicense: \"Apache-2.0\"\nhomepage: \"https://github.com/janestreet/stdio\"\nbug-reports: \"https://github.com/janestreet/stdio/issues\"\ndepends: [\n \"ocaml\" {>= \"4.04.1\"}\n \"base\" {>= \"v0.11\" & < \"v0.12\"}\n \"jbuilder\" {build & >= \"1.0+beta18.1\"}\n]\nbuild: [\"jbuilder\" \"build\" \"-p\" name \"-j\" jobs]\ndev-repo: \"git+https://github.com/janestreet/stdio.git\"\nurl {\n src:\n \"https://ocaml.janestreet.com/ocaml-core/v0.11/files/stdio-v0.11.0.tar.gz\"\n checksum: \"md5=2db42ee38c91b3ff7126c2634c407b99\"\n}", - "override": null - } - }, - "dependencies": [ - "@esy-ocaml/substs@0.0.1", "@opam/base@opam:v0.11.1", - "@opam/jbuilder@opam:transition", "ocaml@4.7.1001" - ] - }, - "@opam/sexplib0@opam:v0.11.0": { - "record": { - "name": "@opam/sexplib0", - "version": "opam:v0.11.0", - "source": - "archive:https://ocaml.janestreet.com/ocaml-core/v0.11/files/sexplib0-v0.11.0.tar.gz#md5:1c14ba30b471e49f1b23fea5ff99ea6b", - "files": [], - "opam": { - "name": "sexplib0", - "version": "v0.11.0", - "opam": - "opam-version: \"2.0\"\nname: \"sexplib0\"\nversion: \"v0.11.0\"\nsynopsis:\n \"Library containing the definition of S-expressions and some base converters\"\ndescription: \"\"\"\nPart of Jane Street's Core library\nThe Core suite of libraries is an industrial strength alternative to\nOCaml's standard library that was developed by Jane Street, the\nlargest industrial user of OCaml.\"\"\"\nmaintainer: \"opensource@janestreet.com\"\nauthors: \"Jane Street Group, LLC \"\nlicense: \"Apache-2.0\"\nhomepage: \"https://github.com/janestreet/sexplib0\"\nbug-reports: \"https://github.com/janestreet/sexplib0/issues\"\ndepends: [\n \"ocaml\" {>= \"4.04.1\"}\n \"jbuilder\" {build & >= \"1.0+beta18.1\"}\n]\nconflicts: [\n \"sexplib\" {< \"v0.11\"}\n]\nbuild: [\"jbuilder\" \"build\" \"-p\" name \"-j\" jobs]\ndev-repo: \"git+https://github.com/janestreet/sexplib0.git\"\nurl {\n src:\n \"https://ocaml.janestreet.com/ocaml-core/v0.11/files/sexplib0-v0.11.0.tar.gz\"\n checksum: \"md5=1c14ba30b471e49f1b23fea5ff99ea6b\"\n}", - "override": null - } - }, - "dependencies": [ - "@esy-ocaml/substs@0.0.1", "@opam/jbuilder@opam:transition", - "ocaml@4.7.1001" - ] - }, - "@opam/result@opam:1.3": { - "record": { - "name": "@opam/result", - "version": "opam:1.3", - "source": - "archive:https://github.com/janestreet/result/releases/download/1.3/result-1.3.tbz#md5:4beebefd41f7f899b6eeba7414e7ae01", - "files": [], - "opam": { - "name": "result", - "version": "1.3", - "opam": - "opam-version: \"2.0\"\nname: \"result\"\nversion: \"1.3\"\nsynopsis: \"Compatibility Result module\"\ndescription: \"\"\"\nProjects that want to use the new result type defined in OCaml >= 4.03\nwhile staying compatible with older version of OCaml should use the\nResult module defined in this library.\"\"\"\nmaintainer: \"opensource@janestreet.com\"\nauthors: \"Jane Street Group, LLC \"\nlicense: \"BSD3\"\nhomepage: \"https://github.com/janestreet/result\"\nbug-reports: \"https://github.com/janestreet/result/issues\"\ndepends: [\n \"ocaml\"\n \"jbuilder\" {build & >= \"1.0+beta11\"}\n]\nbuild: [\"jbuilder\" \"build\" \"-p\" name \"-j\" jobs]\ndev-repo: \"git+https://github.com/janestreet/result.git\"\nurl {\n src:\n \"https://github.com/janestreet/result/releases/download/1.3/result-1.3.tbz\"\n checksum: \"md5=4beebefd41f7f899b6eeba7414e7ae01\"\n}", - "override": null - } - }, - "dependencies": [ - "@esy-ocaml/substs@0.0.1", "@opam/jbuilder@opam:transition", - "ocaml@4.7.1001" - ] - }, - "@opam/ppxlib@opam:0.3.1": { - "record": { - "name": "@opam/ppxlib", - "version": "opam:0.3.1", - "source": - "archive:https://github.com/ocaml-ppx/ppxlib/releases/download/0.3.1/ppxlib-0.3.1.tbz#md5:d83dd03bc744651d4642b84063bffcf9", - "files": [], - "opam": { - "name": "ppxlib", - "version": "0.3.1", - "opam": - "opam-version: \"2.0\"\nname: \"ppxlib\"\nversion: \"0.3.1\"\nsynopsis: \"\"\ndescription: \"\"\"\nA comprehensive toolbox for ppx development. It features:\n- a OCaml AST / parser / pretty-printer snapshot,to create a full\n frontend independent of the version of OCaml;\n- a library for library for ppx rewriters in general, and type-driven\n code generators in particular;\n- a feature-full driver for OCaml AST transformers;\n- a quotation mechanism allowing to write values representing the\n OCaml AST in the OCaml syntax;\n- a generator of open recursion classes from type definitions.\"\"\"\nmaintainer: \"opensource@janestreet.com\"\nauthors: \"Jane Street Group, LLC \"\nlicense: \"MIT\"\nhomepage: \"https://github.com/ocaml-ppx/ppxlib\"\ndoc: \"https://ocaml-ppx.github.io/ppxlib/\"\nbug-reports: \"https://github.com/ocaml-ppx/ppxlib/issues\"\ndepends: [\n \"base\" {>= \"v0.11.0\"}\n \"jbuilder\" {build & >= \"1.0+beta18.1\"}\n \"ocaml-compiler-libs\" {>= \"v0.11.0\"}\n \"ocaml-migrate-parsetree\" {>= \"1.0.9\"}\n \"ppx_derivers\" {>= \"1.0\"}\n \"stdio\" {>= \"v0.11.0\"}\n \"ocaml\" {>= \"4.04.1\"}\n]\nbuild: [\"jbuilder\" \"build\" \"-p\" name \"-j\" jobs]\ndev-repo: \"git+https://github.com/ocaml-ppx/ppxlib.git\"\nurl {\n src:\n \"https://github.com/ocaml-ppx/ppxlib/releases/download/0.3.1/ppxlib-0.3.1.tbz\"\n checksum: \"md5=d83dd03bc744651d4642b84063bffcf9\"\n}", - "override": null - } - }, - "dependencies": [ - "@esy-ocaml/substs@0.0.1", "@opam/base@opam:v0.11.1", - "@opam/jbuilder@opam:transition", - "@opam/ocaml-compiler-libs@opam:v0.11.0", - "@opam/ocaml-migrate-parsetree@opam:1.1.0", - "@opam/ppx_derivers@opam:1.0", "@opam/stdio@opam:v0.11.0", - "ocaml@4.7.1001" - ] - }, - "@opam/ppx_tools_versioned@opam:5.2.1": { - "record": { - "name": "@opam/ppx_tools_versioned", - "version": "opam:5.2.1", - "source": - "archive:https://github.com/ocaml-ppx/ppx_tools_versioned/archive/5.2.1.tar.gz#md5:1ae6ae43ec161fbbf12c2b4d3a7e26f5", - "files": [], - "opam": { - "name": "ppx_tools_versioned", - "version": "5.2.1", - "opam": - "opam-version: \"2.0\"\nname: \"ppx_tools_versioned\"\nversion: \"5.2.1\"\nsynopsis: \"A variant of ppx_tools based on ocaml-migrate-parsetree\"\nmaintainer: \"frederic.bour@lakaban.net\"\nauthors: [\n \"Frédéric Bour \"\n \"Alain Frisch \"\n]\nlicense: \"MIT\"\ntags: \"syntax\"\nhomepage: \"https://github.com/let-def/ppx_tools_versioned\"\nbug-reports: \"https://github.com/let-def/ppx_tools_versioned/issues\"\ndepends: [\n \"ocaml\" {>= \"4.02.0\"}\n \"jbuilder\" {build & >= \"1.0+beta17\"}\n \"ocaml-migrate-parsetree\" {>= \"1.0.10\"}\n]\nbuild: [\n [\"jbuilder\" \"subst\" \"-p\" name] {pinned}\n [\"jbuilder\" \"build\" \"-p\" name \"-j\" jobs]\n [\"jbuilder\" \"runtest\" \"-p\" name \"-j\" jobs] {with-test}\n]\ndev-repo: \"git://github.com/let-def/ppx_tools_versioned.git\"\nurl {\n src:\n \"https://github.com/ocaml-ppx/ppx_tools_versioned/archive/5.2.1.tar.gz\"\n checksum: \"md5=1ae6ae43ec161fbbf12c2b4d3a7e26f5\"\n}", - "override": null - } - }, - "dependencies": [ - "@esy-ocaml/substs@0.0.1", "@opam/jbuilder@opam:transition", - "@opam/ocaml-migrate-parsetree@opam:1.1.0", "ocaml@4.7.1001" - ] - }, - "@opam/ppx_tools@opam:5.1+4.06.0": { - "record": { - "name": "@opam/ppx_tools", - "version": "opam:5.1+4.06.0", - "source": - "archive:https://github.com/ocaml-ppx/ppx_tools/archive/5.1+4.06.0.tar.gz#md5:6ba2e9690b1f579ba562b86022d1c308", - "files": [], - "opam": { - "name": "ppx_tools", - "version": "5.1+4.06.0", - "opam": - "opam-version: \"2.0\"\nname: \"ppx_tools\"\nversion: \"5.1+4.06.0\"\nsynopsis: \"Tools for authors of ppx rewriters and other syntactic tools\"\nmaintainer: \"alain.frisch@lexifi.com\"\nauthors: \"Alain Frisch \"\nlicense: \"MIT\"\ntags: \"syntax\"\nhomepage: \"https://github.com/ocaml-ppx/ppx_tools\"\nbug-reports: \"https://github.com/ocaml-ppx/ppx_tools/issues\"\ndepends: [\n \"ocaml\" {>= \"4.06.0\" & < \"4.08\"}\n \"ocamlfind\" {>= \"1.5.0\"}\n]\nflags: light-uninstall\nbuild: [make \"all\"]\ninstall: [make \"install\"]\nremove: [\"ocamlfind\" \"remove\" \"ppx_tools\"]\ndev-repo: \"git://github.com/ocaml-ppx/ppx_tools.git\"\nurl {\n src: \"https://github.com/ocaml-ppx/ppx_tools/archive/5.1+4.06.0.tar.gz\"\n checksum: \"md5=6ba2e9690b1f579ba562b86022d1c308\"\n}", - "override": null - } - }, - "dependencies": [ - "@esy-ocaml/substs@0.0.1", "@opam/ocamlfind@opam:1.8.0", - "ocaml@4.7.1001" - ] - }, - "@opam/ppx_derivers@opam:1.0": { - "record": { - "name": "@opam/ppx_derivers", - "version": "opam:1.0", - "source": - "archive:https://github.com/ocaml-ppx/ppx_derivers/archive/1.0.tar.gz#md5:4ddce8f43fdb9b0ef0ab6a7cbfebc3e3", - "files": [], - "opam": { - "name": "ppx_derivers", - "version": "1.0", - "opam": - "opam-version: \"2.0\"\nname: \"ppx_derivers\"\nversion: \"1.0\"\nsynopsis: \"Shared [@@deriving] plugin registry\"\ndescription: \"\"\"\nPpx_derivers is a tiny package whose sole purpose is to allow\nppx_deriving and ppx_type_conv to inter-operate gracefully when linked\nas part of the same ocaml-migrate-parsetree driver.\"\"\"\nmaintainer: \"jeremie@dimino.org\"\nauthors: \"Jérémie Dimino\"\nlicense: \"BSD3\"\nhomepage: \"https://github.com/ocaml-ppx/ppx_derivers\"\nbug-reports: \"https://github.com/ocaml-ppx/ppx_derivers/issues\"\ndepends: [\n \"ocaml\"\n \"jbuilder\" {build & >= \"1.0+beta7\"}\n]\nbuild: [\"jbuilder\" \"build\" \"-p\" name \"-j\" jobs]\ndev-repo: \"git://github.com/ocaml-ppx/ppx_derivers.git\"\nurl {\n src: \"https://github.com/ocaml-ppx/ppx_derivers/archive/1.0.tar.gz\"\n checksum: \"md5=4ddce8f43fdb9b0ef0ab6a7cbfebc3e3\"\n}", - "override": null - } - }, - "dependencies": [ - "@esy-ocaml/substs@0.0.1", "@opam/jbuilder@opam:transition", - "ocaml@4.7.1001" - ] - }, - "@opam/ocamlfind@opam:1.8.0": { - "record": { - "name": "@opam/ocamlfind", - "version": "opam:1.8.0", - "source": [ - "archive:http://download.camlcity.org/download/findlib-1.8.0.tar.gz#md5:a710c559667672077a93d34eb6a42e5b", - "archive:http://download2.camlcity.org/download/findlib-1.8.0.tar.gz#md5:a710c559667672077a93d34eb6a42e5b" - ], - "files": [ - { - "name": "ocaml-stub", - "content": - "#!/bin/sh\n\nBINDIR=$(dirname \"$(command -v ocamlc)\")\n\"$BINDIR/ocaml\" -I \"$OCAML_TOPLEVEL_PATH\" \"$@\"\n" - }, - { - "name": "ocamlfind.install", - "content": - "bin: [\n \"src/findlib/ocamlfind\" {\"ocamlfind\"}\n \"?src/findlib/ocamlfind_opt\" {\"ocamlfind\"}\n \"?tools/safe_camlp4\"\n]\ntoplevel: [\"src/findlib/topfind\"]\n" - }, - { - "name": "findlib-1.8.0.patch", - "content": - "--- ./Makefile\n+++ ./Makefile\n@@ -57,16 +57,16 @@\n \tcat findlib.conf.in | \\\n \t $(SH) tools/patch '@SITELIB@' '$(OCAML_SITELIB)' >findlib.conf\n \tif ./tools/cmd_from_same_dir ocamlc; then \\\n-\t\techo 'ocamlc=\"ocamlc.opt\"' >>findlib.conf; \\\n+\t\techo 'ocamlc=\"ocamlc.opt$(EXEC_SUFFIX)\"' >>findlib.conf; \\\n \tfi\n \tif ./tools/cmd_from_same_dir ocamlopt; then \\\n-\t\techo 'ocamlopt=\"ocamlopt.opt\"' >>findlib.conf; \\\n+\t\techo 'ocamlopt=\"ocamlopt.opt$(EXEC_SUFFIX)\"' >>findlib.conf; \\\n \tfi\n \tif ./tools/cmd_from_same_dir ocamldep; then \\\n-\t\techo 'ocamldep=\"ocamldep.opt\"' >>findlib.conf; \\\n+\t\techo 'ocamldep=\"ocamldep.opt$(EXEC_SUFFIX)\"' >>findlib.conf; \\\n \tfi\n \tif ./tools/cmd_from_same_dir ocamldoc; then \\\n-\t\techo 'ocamldoc=\"ocamldoc.opt\"' >>findlib.conf; \\\n+\t\techo 'ocamldoc=\"ocamldoc.opt$(EXEC_SUFFIX)\"' >>findlib.conf; \\\n \tfi\n \n .PHONY: install-doc\n--- ./src/findlib/findlib_config.mlp\n+++ ./src/findlib/findlib_config.mlp\n@@ -24,3 +24,5 @@\n | \"MacOS\" -> \"\" (* don't know *)\n | _ -> failwith \"Unknown Sys.os_type\"\n ;;\n+\n+let exec_suffix = \"@EXEC_SUFFIX@\";;\n--- ./src/findlib/findlib.ml\n+++ ./src/findlib/findlib.ml\n@@ -28,15 +28,20 @@\n let conf_ldconf = ref \"\";;\n let conf_ignore_dups_in = ref ([] : string list);;\n \n-let ocamlc_default = \"ocamlc\";;\n-let ocamlopt_default = \"ocamlopt\";;\n-let ocamlcp_default = \"ocamlcp\";;\n-let ocamloptp_default = \"ocamloptp\";;\n-let ocamlmklib_default = \"ocamlmklib\";;\n-let ocamlmktop_default = \"ocamlmktop\";;\n-let ocamldep_default = \"ocamldep\";;\n-let ocamlbrowser_default = \"ocamlbrowser\";;\n-let ocamldoc_default = \"ocamldoc\";;\n+let add_exec str =\n+ match Findlib_config.exec_suffix with\n+ | \"\" -> str\n+ | a -> str ^ a ;;\n+let ocamlc_default = add_exec \"ocamlc\";;\n+let ocamlopt_default = add_exec \"ocamlopt\";;\n+let ocamlcp_default = add_exec \"ocamlcp\";;\n+let ocamloptp_default = add_exec \"ocamloptp\";;\n+let ocamlmklib_default = add_exec \"ocamlmklib\";;\n+let ocamlmktop_default = add_exec \"ocamlmktop\";;\n+let ocamldep_default = add_exec \"ocamldep\";;\n+let ocamlbrowser_default = add_exec \"ocamlbrowser\";;\n+let ocamldoc_default = add_exec \"ocamldoc\";;\n+\n \n \n let init_manually \n--- ./src/findlib/fl_package_base.ml\n+++ ./src/findlib/fl_package_base.ml\n@@ -133,7 +133,15 @@\n \t List.find (fun def -> def.def_var = \"exists_if\") p.package_defs in\n \tlet files = Fl_split.in_words def.def_value in\n \tList.exists \n-\t (fun file -> Sys.file_exists (Filename.concat d' file))\n+\t (fun file ->\n+ let fln = Filename.concat d' file in\n+ let e = Sys.file_exists fln in\n+ (* necessary for ppx executables *)\n+ if e || Sys.os_type <> \"Win32\" || Filename.check_suffix fln \".exe\" then\n+ e\n+ else\n+ Sys.file_exists (fln ^ \".exe\")\n+ )\n \t files\n with Not_found -> true in\n \n--- ./src/findlib/fl_split.ml\n+++ ./src/findlib/fl_split.ml\n@@ -126,10 +126,17 @@\n | '/' | '\\\\' -> true\n | _ -> false in\n let norm_dir_win() =\n- if l >= 1 && s.[0] = '/' then\n- Buffer.add_char b '\\\\' else Buffer.add_char b s.[0];\n- if l >= 2 && s.[1] = '/' then\n- Buffer.add_char b '\\\\' else Buffer.add_char b s.[1];\n+ if l >= 1 then (\n+ if s.[0] = '/' then\n+ Buffer.add_char b '\\\\'\n+ else\n+ Buffer.add_char b s.[0] ;\n+ if l >= 2 then\n+ if s.[1] = '/' then\n+ Buffer.add_char b '\\\\'\n+ else\n+ Buffer.add_char b s.[1];\n+ );\n for k = 2 to l - 1 do\n let c = s.[k] in\n if is_slash c then (\n--- ./src/findlib/frontend.ml\n+++ ./src/findlib/frontend.ml\n@@ -31,10 +31,18 @@\n else\n Sys_error (arg ^ \": \" ^ Unix.error_message code)\n \n+let is_win = Sys.os_type = \"Win32\"\n+\n+let () =\n+ match Findlib_config.system with\n+ | \"win32\" | \"win64\" | \"mingw\" | \"cygwin\" | \"mingw64\" | \"cygwin64\" ->\n+ (try set_binary_mode_out stdout true with _ -> ());\n+ (try set_binary_mode_out stderr true with _ -> ());\n+ | _ -> ()\n \n let slashify s =\n match Findlib_config.system with\n- | \"mingw\" | \"mingw64\" | \"cygwin\" ->\n+ | \"win32\" | \"win64\" | \"mingw\" | \"cygwin\" | \"mingw64\" | \"cygwin64\" ->\n let b = Buffer.create 80 in\n String.iter\n (function\n@@ -49,7 +57,7 @@\n \n let out_path ?(prefix=\"\") s =\n match Findlib_config.system with\n- | \"mingw\" | \"mingw64\" | \"cygwin\" ->\n+ | \"win32\" | \"win64\" | \"mingw\" | \"mingw64\" | \"cygwin\" ->\n \tlet u = slashify s in\n \tprefix ^ \n \t (if String.contains u ' ' then\n@@ -273,11 +281,9 @@\n \n \n let identify_dir d =\n- match Sys.os_type with\n- | \"Win32\" ->\n-\tfailwith \"identify_dir\" (* not available *)\n- | _ ->\n-\tlet s = Unix.stat d in\n+ if is_win then\n+ failwith \"identify_dir\"; (* not available *)\n+ let s = Unix.stat d in\n \t(s.Unix.st_dev, s.Unix.st_ino)\n ;;\n \n@@ -459,6 +465,96 @@\n )\n packages\n \n+let rewrite_cmd s =\n+ if s = \"\" || not is_win then\n+ s\n+ else\n+ let s =\n+ let l = String.length s in\n+ let b = Buffer.create l in\n+ for i = 0 to pred l do\n+ match s.[i] with\n+ | '/' -> Buffer.add_char b '\\\\'\n+ | x -> Buffer.add_char b x\n+ done;\n+ Buffer.contents b\n+ in\n+ if (Filename.is_implicit s && String.contains s '\\\\' = false) ||\n+ Filename.check_suffix (String.lowercase s) \".exe\" then\n+ s\n+ else\n+ let s' = s ^ \".exe\" in\n+ if Sys.file_exists s' then\n+ s'\n+ else\n+ s\n+\n+let rewrite_cmd s =\n+ if s = \"\" || not is_win then s else\n+ let s =\n+ let l = String.length s in\n+ let b = Buffer.create l in\n+ for i = 0 to pred l do\n+ match s.[i] with\n+ | '/' -> Buffer.add_char b '\\\\'\n+ | x -> Buffer.add_char b x\n+ done;\n+ Buffer.contents b\n+ in\n+ if (Filename.is_implicit s && String.contains s '\\\\' = false) ||\n+ Filename.check_suffix (String.lowercase s) \".exe\" then\n+ s\n+ else\n+ let s' = s ^ \".exe\" in\n+ if Sys.file_exists s' then\n+ s'\n+ else\n+ s\n+\n+let rewrite_pp cmd =\n+ if not is_win then cmd else\n+ let module T = struct exception Keep end in\n+ let is_whitespace = function\n+ | ' ' | '\\011' | '\\012' | '\\n' | '\\r' | '\\t' -> true\n+ | _ -> false in\n+ (* characters that triggers special behaviour (cmd.exe, not unix shell) *)\n+ let is_unsafe_char = function\n+ | '(' | ')' | '%' | '!' | '^' | '<' | '>' | '&' -> true\n+ | _ -> false in\n+ let len = String.length cmd in\n+ let buf = Buffer.create (len + 4) in\n+ let buf_cmd = Buffer.create len in\n+ let rec iter_ws i =\n+ if i >= len then () else\n+ let cur = cmd.[i] in\n+ if is_whitespace cur then (\n+ Buffer.add_char buf cur;\n+ iter_ws (succ i)\n+ )\n+ else\n+ iter_cmd i\n+ and iter_cmd i =\n+ if i >= len then add_buf_cmd () else\n+ let cur = cmd.[i] in\n+ if is_unsafe_char cur || cur = '\"' || cur = '\\'' then\n+ raise T.Keep;\n+ if is_whitespace cur then (\n+ add_buf_cmd ();\n+ Buffer.add_substring buf cmd i (len - i)\n+ )\n+ else (\n+ Buffer.add_char buf_cmd cur;\n+ iter_cmd (succ i)\n+ )\n+ and add_buf_cmd () =\n+ if Buffer.length buf_cmd > 0 then\n+ Buffer.add_string buf (rewrite_cmd (Buffer.contents buf_cmd))\n+ in\n+ try\n+ iter_ws 0;\n+ Buffer.contents buf\n+ with\n+ | T.Keep -> cmd\n \n let process_pp_spec syntax_preds packages pp_opts =\n (* Returns: pp_command *)\n@@ -549,7 +645,7 @@\n None -> []\n | Some cmd ->\n \t[\"-pp\";\n-\t cmd ^ \" \" ^\n+\t (rewrite_cmd cmd) ^ \" \" ^\n \t String.concat \" \" (List.map Filename.quote pp_i_options) ^ \" \" ^\n \t String.concat \" \" (List.map Filename.quote pp_archives) ^ \" \" ^\n \t String.concat \" \" (List.map Filename.quote pp_opts)]\n@@ -625,9 +721,11 @@\n in\n try\n let preprocessor =\n+ rewrite_cmd (\n resolve_path\n ~base ~explicit:true\n- (package_property predicates pname \"ppx\") in\n+ (package_property predicates pname \"ppx\") )\n+ in\n [\"-ppx\"; String.concat \" \" (preprocessor :: options)]\n with Not_found -> []\n )\n@@ -895,6 +993,14 @@\n switch (e.g. -L instead of -L )\n *)\n \n+(* We may need to remove files on which we do not have complete control.\n+ On Windows, removing a read-only file fails so try to change the\n+ mode of the file first. *)\n+let remove_file fname =\n+ try Sys.remove fname\n+ with Sys_error _ when is_win ->\n+ (try Unix.chmod fname 0o666 with Unix.Unix_error _ -> ());\n+ Sys.remove fname\n \n let ocamlc which () =\n \n@@ -1022,9 +1128,12 @@\n \n \t \"-intf\", \n \t Arg.String (fun s -> pass_files := !pass_files @ [ Intf(slashify s) ]);\n- \n+\n \t \"-pp\", \n-\t Arg.String (fun s -> pp_specified := true; add_spec_fn \"-pp\" s);\n+\t Arg.String (fun s -> pp_specified := true; add_spec_fn \"-pp\" (rewrite_pp s));\n+\n+ \"-ppx\",\n+ Arg.String (fun s -> add_spec_fn \"-ppx\" (rewrite_pp s));\n \t \n \t \"-thread\", \n \t Arg.Unit (fun _ -> threads := threads_default);\n@@ -1237,7 +1346,7 @@\n with\n any ->\n \tclose_out initl;\n-\tSys.remove initl_file_name;\n+\tremove_file initl_file_name;\n \traise any\n end;\n \n@@ -1245,9 +1354,9 @@\n at_exit\n (fun () ->\n \tlet tr f x = try f x with _ -> () in\n-\ttr Sys.remove initl_file_name;\n-\ttr Sys.remove (Filename.chop_extension initl_file_name ^ \".cmi\");\n-\ttr Sys.remove (Filename.chop_extension initl_file_name ^ \".cmo\");\n+\ttr remove_file initl_file_name;\n+\ttr remove_file (Filename.chop_extension initl_file_name ^ \".cmi\");\n+\ttr remove_file (Filename.chop_extension initl_file_name ^ \".cmo\");\n );\n \n let exclude_list = [ stdlibdir; threads_dir; vmthreads_dir ] in\n@@ -1493,7 +1602,9 @@\n \t [ \"-v\", Arg.Unit (fun () -> verbose := Verbose);\n \t \"-pp\", Arg.String (fun s ->\n \t\t\t\t pp_specified := true;\n-\t\t\t\t options := !options @ [\"-pp\"; s]);\n+\t\t\t\t options := !options @ [\"-pp\"; rewrite_pp s]);\n+ \"-ppx\", Arg.String (fun s ->\n+\t\t\t\t options := !options @ [\"-ppx\"; rewrite_pp s]);\n \t ]\n )\n )\n@@ -1672,7 +1783,9 @@\n \t Arg.String (fun s -> add_spec_fn \"-I\" (slashify (resolve_path s)));\n \n \t \"-pp\", Arg.String (fun s -> pp_specified := true;\n-\t\t \t add_spec_fn \"-pp\" s);\n+ add_spec_fn \"-pp\" (rewrite_pp s));\n+ \"-ppx\", Arg.String (fun s -> add_spec_fn \"-ppx\" (rewrite_pp s));\n+\n \t ]\n \t)\n )\n@@ -1830,7 +1943,10 @@\n output_string ch_out append;\n close_out ch_out;\n close_in ch_in;\n- Unix.utimes outpath s.Unix.st_mtime s.Unix.st_mtime;\n+ (try Unix.utimes outpath s.Unix.st_mtime s.Unix.st_mtime\n+ with Unix.Unix_error(e,_,_) ->\n+ prerr_endline(\"Warning: setting utimes for \" ^ outpath\n+ ^ \": \" ^ Unix.error_message e));\n \n prerr_endline(\"Installed \" ^ outpath);\n with\n@@ -1882,6 +1998,8 @@\n Unix.openfile (Filename.concat dir owner_file) [Unix.O_RDONLY] 0 in\n let f =\n Unix.in_channel_of_descr fd in\n+ if is_win then\n+ set_binary_mode_in f false;\n try\n let line = input_line f in\n let is_my_file = (line = pkg) in\n@@ -2208,7 +2326,7 @@\n let lines = read_ldconf !ldconf in\n let dlldir_norm = Fl_split.norm_dir dlldir in\n let dlldir_norm_lc = string_lowercase_ascii dlldir_norm in\n- let ci_filesys = (Sys.os_type = \"Win32\") in\n+ let ci_filesys = is_win in\n let check_dir d =\n let d' = Fl_split.norm_dir d in\n (d' = dlldir_norm) || \n@@ -2356,7 +2474,7 @@\n List.iter\n (fun file ->\n let absfile = Filename.concat dlldir file in\n- Sys.remove absfile;\n+ remove_file absfile;\n prerr_endline (\"Removed \" ^ absfile)\n )\n dll_files\n@@ -2365,7 +2483,7 @@\n (* Remove the files from the package directory: *)\n if Sys.file_exists pkgdir then begin\n let files = Sys.readdir pkgdir in\n- Array.iter (fun f -> Sys.remove (Filename.concat pkgdir f)) files;\n+ Array.iter (fun f -> remove_file (Filename.concat pkgdir f)) files;\n Unix.rmdir pkgdir;\n prerr_endline (\"Removed \" ^ pkgdir)\n end\n@@ -2415,7 +2533,9 @@\n \n \n let print_configuration() =\n+ let sl = slashify in\n let dir s =\n+ let s = sl s in\n if Sys.file_exists s then\n s\n else\n@@ -2453,27 +2573,27 @@\n \t if md = \"\" then \"the corresponding package directories\" else dir md\n \t );\n \tPrintf.printf \"The standard library is assumed to reside in:\\n %s\\n\"\n-\t (Findlib.ocaml_stdlib());\n+ (sl (Findlib.ocaml_stdlib()));\n \tPrintf.printf \"The ld.conf file can be found here:\\n %s\\n\"\n-\t (Findlib.ocaml_ldconf());\n+ (sl (Findlib.ocaml_ldconf()));\n \tflush stdout\n | Some \"conf\" ->\n-\tprint_endline Findlib_config.config_file\n+ print_endline (sl Findlib_config.config_file)\n | Some \"path\" ->\n-\tList.iter print_endline (Findlib.search_path())\n+ List.iter ( fun x -> print_endline (sl x)) (Findlib.search_path())\n | Some \"destdir\" ->\n-\tprint_endline (Findlib.default_location())\n+ print_endline ( sl (Findlib.default_location()))\n | Some \"metadir\" ->\n-\tprint_endline (Findlib.meta_directory())\n+ print_endline ( sl (Findlib.meta_directory()))\n | Some \"metapath\" ->\n let mdir = Findlib.meta_directory() in\n let ddir = Findlib.default_location() in\n-\tprint_endline \n- (if mdir <> \"\" then mdir ^ \"/META.%s\" else ddir ^ \"/%s/META\")\n+ print_endline ( sl\n+ (if mdir <> \"\" then mdir ^ \"/META.%s\" else ddir ^ \"/%s/META\"))\n | Some \"stdlib\" ->\n-\tprint_endline (Findlib.ocaml_stdlib())\n+ print_endline ( sl (Findlib.ocaml_stdlib()))\n | Some \"ldconf\" ->\n-\tprint_endline (Findlib.ocaml_ldconf())\n+ print_endline ( sl (Findlib.ocaml_ldconf()))\n | _ ->\n \tassert false\n ;;\n@@ -2481,7 +2601,7 @@\n \n let ocamlcall pkg cmd =\n let dir = package_directory pkg in\n- let path = Filename.concat dir cmd in\n+ let path = rewrite_cmd (Filename.concat dir cmd) in\n begin\n try Unix.access path [ Unix.X_OK ]\n with\n@@ -2647,6 +2767,10 @@\n | Sys_error f ->\n prerr_endline (\"ocamlfind: \" ^ f);\n exit 2\n+ | Unix.Unix_error (e, fn, f) ->\n+ prerr_endline (\"ocamlfind: \" ^ fn ^ \" \" ^ f\n+ ^ \": \" ^ Unix.error_message e);\n+ exit 2\n | Findlib.No_such_package(pkg,info) ->\n prerr_endline (\"ocamlfind: Package `\" ^ pkg ^ \"' not found\" ^\n \t\t (if info <> \"\" then \" - \" ^ info else \"\"));\n--- ./src/findlib/Makefile\n+++ ./src/findlib/Makefile\n@@ -90,6 +90,7 @@\n \tcat findlib_config.mlp | \\\n \t $(SH) $(TOP)/tools/patch '@CONFIGFILE@' '$(OCAMLFIND_CONF)' | \\\n \t $(SH) $(TOP)/tools/patch '@STDLIB@' '$(OCAML_CORE_STDLIB)' | \\\n+\t\t\t$(SH) $(TOP)/tools/patch '@EXEC_SUFFIX@' '$(EXEC_SUFFIX)' | \\\n \t\tsed -e 's;@AUTOLINK@;$(OCAML_AUTOLINK);g' \\\n \t\t -e 's;@SYSTEM@;$(SYSTEM);g' \\\n \t\t >findlib_config.ml\n@@ -113,7 +114,7 @@\n \t$(OCAMLC) -a -o num_top.cma $(NUMTOP_OBJECTS)\n \n clean:\n-\trm -f *.cmi *.cmo *.cma *.cmx *.a *.o *.cmxa \\\n+\trm -f *.cmi *.cmo *.cma *.cmx *.lib *.a *.o *.cmxa \\\n \t fl_meta.ml findlib_config.ml findlib.mml topfind.ml topfind \\\n \t ocamlfind$(EXEC_SUFFIX) ocamlfind_opt$(EXEC_SUFFIX)\n \n@@ -121,7 +122,7 @@\n \tmkdir -p \"$(prefix)$(OCAML_SITELIB)/$(NAME)\"\n \tmkdir -p \"$(prefix)$(OCAMLFIND_BIN)\"\n \ttest $(INSTALL_TOPFIND) -eq 0 || cp topfind \"$(prefix)$(OCAML_CORE_STDLIB)\"\n-\tfiles=`$(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` && \\\n+\tfiles=`$(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` && \\\n \tcp $$files \"$(prefix)$(OCAML_SITELIB)/$(NAME)\"\n \tf=\"ocamlfind$(EXEC_SUFFIX)\"; { test -f ocamlfind_opt$(EXEC_SUFFIX) && f=\"ocamlfind_opt$(EXEC_SUFFIX)\"; }; \\\n \tcp $$f \"$(prefix)$(OCAMLFIND_BIN)/ocamlfind$(EXEC_SUFFIX)\"\n" - } - ], - "opam": { - "name": "ocamlfind", - "version": "1.8.0", - "opam": - "opam-version: \"2.0\"\nname: \"ocamlfind\"\nversion: \"1.8.0\"\nsynopsis: \"A library manager for OCaml\"\ndescription: \"\"\"\nFindlib is a library manager for OCaml. It provides a convention how\nto store libraries, and a file format (\"META\") to describe the\nproperties of libraries. There is also a tool (ocamlfind) for\ninterpreting the META files, so that it is very easy to use libraries\nin programs and scripts.\"\"\"\nmaintainer: \"Thomas Gazagnaire \"\nauthors: \"Gerd Stolpmann \"\nhomepage: \"http://projects.camlcity.org/projects/findlib.html\"\nbug-reports: \"https://gitlab.camlcity.org/gerd/lib-findlib/issues\"\ndepends: [\n \"ocaml\" {>= \"4.00.0\"}\n \"conf-m4\" {build}\n]\nbuild: [\n [\n \"./configure\"\n \"-bindir\"\n bin\n \"-sitelib\"\n lib\n \"-mandir\"\n man\n \"-config\"\n \"%{lib}%/findlib.conf\"\n \"-no-custom\"\n \"-no-topfind\" {ocaml:preinstalled}\n ]\n [make \"all\"]\n [make \"opt\"] {ocaml:native}\n]\ninstall: [\n [make \"install\"]\n [\"install\" \"-m\" \"0755\" \"ocaml-stub\" \"%{bin}%/ocaml\"] {ocaml:preinstalled}\n]\nremove: [\n [\"ocamlfind\" \"remove\" \"bytes\"]\n [\n \"./configure\"\n \"-bindir\"\n bin\n \"-sitelib\"\n lib\n \"-mandir\"\n man\n \"-config\"\n \"%{lib}%/findlib.conf\"\n \"-no-topfind\" {ocaml:preinstalled}\n ]\n [make \"uninstall\"]\n [\"rm\" \"-f\" \"%{bin}%/ocaml\"] {ocaml:preinstalled}\n]\ndev-repo: \"git+https://gitlab.camlcity.org/gerd/lib-findlib.git\"\nextra-files: [\n [\"ocamlfind.install\" \"md5=06f2c282ab52d93aa6adeeadd82a2543\"]\n [\"ocaml-stub\" \"md5=181f259c9e0bad9ef523e7d4abfdf87a\"]\n]\nurl {\n src: \"http://download.camlcity.org/download/findlib-1.8.0.tar.gz\"\n checksum: \"md5=a710c559667672077a93d34eb6a42e5b\"\n mirrors: \"http://download2.camlcity.org/download/findlib-1.8.0.tar.gz\"\n}", - "override": { - "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", - "exclusive": false - } - } - } - } - }, - "dependencies": [ - "@esy-ocaml/substs@0.0.1", "@opam/conf-m4@opam:1", "ocaml@4.7.1001" - ] - }, - "@opam/ocamlbuild@opam:0.12.0": { - "record": { - "name": "@opam/ocamlbuild", - "version": "opam:0.12.0", - "source": - "archive:https://github.com/ocaml/ocamlbuild/archive/0.12.0.tar.gz#md5:442baa19470bd49150f153122e22907b", - "files": [ - { - "name": "ocamlbuild-0.12.0.patch", - "content": - "--- ./Makefile\n+++ ./Makefile\n@@ -213,7 +213,7 @@\n \trm -f man/ocamlbuild.1\n \n man/options_man.byte: src/ocamlbuild_pack.cmo\n-\t$(OCAMLC) $^ -I src man/options_man.ml -o man/options_man.byte\n+\t$(OCAMLC) -I +unix unix.cma $^ -I src man/options_man.ml -o man/options_man.byte\n \n clean::\n \trm -f man/options_man.cm*\n--- ./src/command.ml\n+++ ./src/command.ml\n@@ -148,9 +148,10 @@\n let self = string_of_command_spec_with_calls call_with_tags call_with_target resolve_virtuals in\n let b = Buffer.create 256 in\n (* The best way to prevent bash from switching to its windows-style\n- * quote-handling is to prepend an empty string before the command name. *)\n+ * quote-handling is to prepend an empty string before the command name.\n+ * space seems to work, too - and the ouput is nicer *)\n if Sys.os_type = \"Win32\" then\n- Buffer.add_string b \"''\";\n+ Buffer.add_char b ' ';\n let first = ref true in\n let put_space () =\n if !first then\n@@ -260,7 +261,7 @@\n \n let execute_many ?(quiet=false) ?(pretend=false) cmds =\n add_parallel_stat (List.length cmds);\n- let degraded = !*My_unix.is_degraded || Sys.os_type = \"Win32\" in\n+ let degraded = !*My_unix.is_degraded in\n let jobs = !jobs in\n if jobs < 0 then invalid_arg \"jobs < 0\";\n let max_jobs = if jobs = 0 then None else Some jobs in\n--- ./src/findlib.ml\n+++ ./src/findlib.ml\n@@ -66,9 +66,6 @@\n (fun command -> lexer & Lexing.from_string & run_and_read command)\n command\n \n-let run_and_read command =\n- Printf.ksprintf run_and_read command\n-\n let rec query name =\n try\n Hashtbl.find packages name\n@@ -135,7 +132,8 @@\n with Not_found -> s\n \n let list () =\n- List.map before_space (split_nl & run_and_read \"%s list\" ocamlfind)\n+ let cmd = Shell.quote_filename_if_needed ocamlfind ^ \" list\" in\n+ List.map before_space (split_nl & run_and_read cmd)\n \n (* The closure algorithm is easy because the dependencies are already closed\n and sorted for each package. We only have to make the union. We could also\n--- ./src/main.ml\n+++ ./src/main.ml\n@@ -162,6 +162,9 @@\n Tags.mem \"traverse\" tags\n || List.exists (Pathname.is_prefix path_name) !Options.include_dirs\n || List.exists (Pathname.is_prefix path_name) target_dirs)\n+ && ((* beware: !Options.build_dir is an absolute directory *)\n+ Pathname.normalize !Options.build_dir\n+ <> Pathname.normalize (Pathname.pwd/path_name))\n end\n end\n end\n--- ./src/my_std.ml\n+++ ./src/my_std.ml\n@@ -271,13 +271,107 @@\n try Array.iter (fun x -> if x = basename then raise Exit) a; false\n with Exit -> true\n \n+let command_plain = function\n+| [| |] -> 0\n+| margv ->\n+ let rec waitpid a b =\n+ match Unix.waitpid a b with\n+ | exception (Unix.Unix_error(Unix.EINTR,_,_)) -> waitpid a b\n+ | x -> x\n+ in\n+ let pid = Unix.(create_process margv.(0) margv stdin stdout stderr) in\n+ let pid', process_status = waitpid [] pid in\n+ assert (pid = pid');\n+ match process_status with\n+ | Unix.WEXITED n -> n\n+ | Unix.WSIGNALED _ -> 2 (* like OCaml's uncaught exceptions *)\n+ | Unix.WSTOPPED _ -> 127\n+\n+(* can't use Lexers because of circular dependency *)\n+let split_path_win str =\n+ let rec aux pos =\n+ try\n+ let i = String.index_from str pos ';' in\n+ let len = i - pos in\n+ if len = 0 then\n+ aux (succ i)\n+ else\n+ String.sub str pos (i - pos) :: aux (succ i)\n+ with Not_found | Invalid_argument _ ->\n+ let len = String.length str - pos in\n+ if len = 0 then [] else [String.sub str pos len]\n+ in\n+ aux 0\n+\n+let windows_shell = lazy begin\n+ let rec iter = function\n+ | [] -> [| \"bash.exe\" ; \"--norc\" ; \"--noprofile\" |]\n+ | hd::tl ->\n+ let dash = Filename.concat hd \"dash.exe\" in\n+ if Sys.file_exists dash then [|dash|] else\n+ let bash = Filename.concat hd \"bash.exe\" in\n+ if Sys.file_exists bash = false then iter tl else\n+ (* if sh.exe and bash.exe exist in the same dir, choose sh.exe *)\n+ let sh = Filename.concat hd \"sh.exe\" in\n+ if Sys.file_exists sh then [|sh|] else [|bash ; \"--norc\" ; \"--noprofile\"|]\n+ in\n+ split_path_win (try Sys.getenv \"PATH\" with Not_found -> \"\") |> iter\n+end\n+\n+let prep_windows_cmd cmd =\n+ (* workaround known ocaml bug, remove later *)\n+ if String.contains cmd '\\t' && String.contains cmd ' ' = false then\n+ \" \" ^ cmd\n+ else\n+ cmd\n+\n+let run_with_shell = function\n+| \"\" -> 0\n+| cmd ->\n+ let cmd = prep_windows_cmd cmd in\n+ let shell = Lazy.force windows_shell in\n+ let qlen = Filename.quote cmd |> String.length in\n+ (* old versions of dash had problems with bs *)\n+ try\n+ if qlen < 7_900 then\n+ command_plain (Array.append shell [| \"-ec\" ; cmd |])\n+ else begin\n+ (* it can still work, if the called command is a cygwin tool *)\n+ let ch_closed = ref false in\n+ let file_deleted = ref false in\n+ let fln,ch =\n+ Filename.open_temp_file\n+ ~mode:[Open_binary]\n+ \"ocamlbuildtmp\"\n+ \".sh\"\n+ in\n+ try\n+ let f_slash = String.map ( fun x -> if x = '\\\\' then '/' else x ) fln in\n+ output_string ch cmd;\n+ ch_closed:= true;\n+ close_out ch;\n+ let ret = command_plain (Array.append shell [| \"-e\" ; f_slash |]) in\n+ file_deleted:= true;\n+ Sys.remove fln;\n+ ret\n+ with\n+ | x ->\n+ if !ch_closed = false then\n+ close_out_noerr ch;\n+ if !file_deleted = false then\n+ (try Sys.remove fln with _ -> ());\n+ raise x\n+ end\n+ with\n+ | (Unix.Unix_error _) as x ->\n+ (* Sys.command doesn't raise an exception, so run_with_shell also won't\n+ raise *)\n+ Printexc.to_string x ^ \":\" ^ cmd |> prerr_endline;\n+ 1\n+\n let sys_command =\n- match Sys.os_type with\n- | \"Win32\" -> fun cmd ->\n- if cmd = \"\" then 0 else\n- let cmd = \"bash --norc -c \" ^ Filename.quote cmd in\n- Sys.command cmd\n- | _ -> fun cmd -> if cmd = \"\" then 0 else Sys.command cmd\n+ if Sys.win32 then run_with_shell\n+ else fun cmd -> if cmd = \"\" then 0 else Sys.command cmd\n \n (* FIXME warning fix and use Filename.concat *)\n let filename_concat x y =\n--- ./src/my_std.mli\n+++ ./src/my_std.mli\n@@ -69,3 +69,6 @@\n \n val split_ocaml_version : (int * int * int * string) option\n (** (major, minor, patchlevel, rest) *)\n+\n+val windows_shell : string array Lazy.t\n+val prep_windows_cmd : string -> string\n--- ./src/ocamlbuild_executor.ml\n+++ ./src/ocamlbuild_executor.ml\n@@ -34,6 +34,8 @@\n job_stdin : out_channel;\n job_stderr : in_channel;\n job_buffer : Buffer.t;\n+ job_pid : int;\n+ job_tmp_file: string option;\n mutable job_dying : bool;\n };;\n \n@@ -76,6 +78,61 @@\n in\n loop 0\n ;;\n+\n+let open_process_full_win cmd env =\n+ let (in_read, in_write) = Unix.pipe () in\n+ let (out_read, out_write) = Unix.pipe () in\n+ let (err_read, err_write) = Unix.pipe () in\n+ Unix.set_close_on_exec in_read;\n+ Unix.set_close_on_exec out_write;\n+ Unix.set_close_on_exec err_read;\n+ let inchan = Unix.in_channel_of_descr in_read in\n+ let outchan = Unix.out_channel_of_descr out_write in\n+ let errchan = Unix.in_channel_of_descr err_read in\n+ let shell = Lazy.force Ocamlbuild_pack.My_std.windows_shell in\n+ let test_cmd =\n+ String.concat \" \" (List.map Filename.quote (Array.to_list shell)) ^\n+ \"-ec \" ^\n+ Filename.quote (Ocamlbuild_pack.My_std.prep_windows_cmd cmd) in\n+ let argv,tmp_file =\n+ if String.length test_cmd < 7_900 then\n+ Array.append\n+ shell\n+ [| \"-ec\" ; Ocamlbuild_pack.My_std.prep_windows_cmd cmd |],None\n+ else\n+ let fln,ch = Filename.open_temp_file ~mode:[Open_binary] \"ocamlbuild\" \".sh\" in\n+ output_string ch (Ocamlbuild_pack.My_std.prep_windows_cmd cmd);\n+ close_out ch;\n+ let fln' = String.map (function '\\\\' -> '/' | c -> c) fln in\n+ Array.append\n+ shell\n+ [| \"-c\" ; fln' |], Some fln in\n+ let pid =\n+ Unix.create_process_env argv.(0) argv env out_read in_write err_write in\n+ Unix.close out_read;\n+ Unix.close in_write;\n+ Unix.close err_write;\n+ (pid, inchan, outchan, errchan,tmp_file)\n+\n+let close_process_full_win (pid,inchan, outchan, errchan, tmp_file) =\n+ let delete tmp_file =\n+ match tmp_file with\n+ | None -> ()\n+ | Some x -> try Sys.remove x with Sys_error _ -> () in\n+ let tmp_file_deleted = ref false in\n+ try\n+ close_in inchan;\n+ close_out outchan;\n+ close_in errchan;\n+ let res = snd(Unix.waitpid [] pid) in\n+ tmp_file_deleted := true;\n+ delete tmp_file;\n+ res\n+ with\n+ | x when tmp_file <> None && !tmp_file_deleted = false ->\n+ delete tmp_file;\n+ raise x\n+\n (* ***)\n (*** execute *)\n (* XXX: Add test for non reentrancy *)\n@@ -130,10 +187,16 @@\n (*** add_job *)\n let add_job cmd rest result id =\n (*display begin fun oc -> fp oc \"Job %a is %s\\n%!\" print_job_id id cmd; end;*)\n- let (stdout', stdin', stderr') = open_process_full cmd env in\n+ let (pid,stdout', stdin', stderr', tmp_file) =\n+ if Sys.win32 then open_process_full_win cmd env else\n+ let a,b,c = open_process_full cmd env in\n+ -1,a,b,c,None\n+ in\n incr jobs_active;\n- set_nonblock (doi stdout');\n- set_nonblock (doi stderr');\n+ if not Sys.win32 then (\n+ set_nonblock (doi stdout');\n+ set_nonblock (doi stderr');\n+ );\n let job =\n { job_id = id;\n job_command = cmd;\n@@ -143,7 +206,9 @@\n job_stdin = stdin';\n job_stderr = stderr';\n job_buffer = Buffer.create 1024;\n- job_dying = false }\n+ job_dying = false;\n+ job_tmp_file = tmp_file;\n+ job_pid = pid }\n in\n outputs := FDM.add (doi stdout') job (FDM.add (doi stderr') job !outputs);\n jobs := JS.add job !jobs;\n@@ -199,6 +264,7 @@\n try\n read fd u 0 (Bytes.length u)\n with\n+ | Unix.Unix_error(Unix.EPIPE,_,_) when Sys.win32 -> 0\n | Unix.Unix_error(e,_,_) ->\n let msg = error_message e in\n display (fun oc -> fp oc\n@@ -241,14 +307,19 @@\n decr jobs_active;\n \n (* PR#5371: we would get EAGAIN below otherwise *)\n- clear_nonblock (doi job.job_stdout);\n- clear_nonblock (doi job.job_stderr);\n-\n+ if not Sys.win32 then (\n+ clear_nonblock (doi job.job_stdout);\n+ clear_nonblock (doi job.job_stderr);\n+ );\n do_read ~loop:true (doi job.job_stdout) job;\n do_read ~loop:true (doi job.job_stderr) job;\n outputs := FDM.remove (doi job.job_stdout) (FDM.remove (doi job.job_stderr) !outputs);\n jobs := JS.remove job !jobs;\n- let status = close_process_full (job.job_stdout, job.job_stdin, job.job_stderr) in\n+ let status =\n+ if Sys.win32 then\n+ close_process_full_win (job.job_pid, job.job_stdout, job.job_stdin, job.job_stderr, job.job_tmp_file)\n+ else\n+ close_process_full (job.job_stdout, job.job_stdin, job.job_stderr) in\n \n let shown = ref false in\n \n--- ./src/ocamlbuild_unix_plugin.ml\n+++ ./src/ocamlbuild_unix_plugin.ml\n@@ -48,12 +48,22 @@\n end\n \n let run_and_open s kont =\n+ let s_orig = s in\n+ let s =\n+ (* Be consistent! My_unix.run_and_open uses My_std.sys_command and\n+ sys_command uses bash. *)\n+ if Sys.win32 = false then s else\n+ let l = match Lazy.force My_std.windows_shell |> Array.to_list with\n+ | hd::tl -> (Filename.quote hd)::tl\n+ | _ -> assert false in\n+ \"\\\"\" ^ (String.concat \" \" l) ^ \" -ec \" ^ Filename.quote (\" \" ^ s) ^ \"\\\"\"\n+ in\n let ic = Unix.open_process_in s in\n let close () =\n match Unix.close_process_in ic with\n | Unix.WEXITED 0 -> ()\n | Unix.WEXITED _ | Unix.WSIGNALED _ | Unix.WSTOPPED _ ->\n- failwith (Printf.sprintf \"Error while running: %s\" s) in\n+ failwith (Printf.sprintf \"Error while running: %s\" s_orig) in\n let res = try\n kont ic\n with e -> (close (); raise e)\n--- ./src/options.ml\n+++ ./src/options.ml\n@@ -174,11 +174,24 @@\n build_dir := Filename.concat (Sys.getcwd ()) s\n else\n build_dir := s\n+\n+let slashify =\n+ if Sys.win32 then fun p -> String.map (function '\\\\' -> '/' | x -> x) p\n+ else fun p ->p\n+\n+let sb () =\n+ match Sys.os_type with\n+ | \"Win32\" ->\n+ (try set_binary_mode_out stdout true with _ -> ());\n+ | _ -> ()\n+\n+\n let spec = ref (\n let print_version () =\n+ sb ();\n Printf.printf \"ocamlbuild %s\\n%!\" Ocamlbuild_config.version; raise Exit_OK\n in\n- let print_vnum () = print_endline Ocamlbuild_config.version; raise Exit_OK in\n+ let print_vnum () = sb (); print_endline Ocamlbuild_config.version; raise Exit_OK in\n Arg.align\n [\n \"-version\", Unit print_version , \" Display the version\";\n@@ -257,8 +270,8 @@\n \"-build-dir\", String set_build_dir, \" Set build directory (implies no-links)\";\n \"-install-lib-dir\", Set_string Ocamlbuild_where.libdir, \" Set the install library directory\";\n \"-install-bin-dir\", Set_string Ocamlbuild_where.bindir, \" Set the install binary directory\";\n- \"-where\", Unit (fun () -> print_endline !Ocamlbuild_where.libdir; raise Exit_OK), \" Display the install library directory\";\n- \"-which\", String (fun cmd -> print_endline (find_tool cmd); raise Exit_OK), \" Display path to the tool command\";\n+ \"-where\", Unit (fun () -> sb (); print_endline (slashify !Ocamlbuild_where.libdir); raise Exit_OK), \" Display the install library directory\";\n+ \"-which\", String (fun cmd -> sb (); print_endline (slashify (find_tool cmd)); raise Exit_OK), \" Display path to the tool command\";\n \"-ocamlc\", set_cmd ocamlc, \" Set the OCaml bytecode compiler\";\n \"-plugin-ocamlc\", set_cmd plugin_ocamlc, \" Set the OCaml bytecode compiler \\\n used when building myocamlbuild.ml (only)\";\n--- ./src/pathname.ml\n+++ ./src/pathname.ml\n@@ -84,6 +84,26 @@\n | x :: xs -> x :: normalize_list xs\n \n let normalize x =\n+ let x =\n+ if Sys.win32 = false then\n+ x\n+ else\n+ let len = String.length x in\n+ let b = Bytes.create len in\n+ for i = 0 to pred len do\n+ match x.[i] with\n+ | '\\\\' -> Bytes.set b i '/'\n+ | c -> Bytes.set b i c\n+ done;\n+ if len > 1 then (\n+ let c1 = Bytes.get b 0 in\n+ let c2 = Bytes.get b 1 in\n+ if c2 = ':' && c1 >= 'a' && c1 <= 'z' &&\n+ ( len = 2 || Bytes.get b 2 = '/') then\n+ Bytes.set b 0 (Char.uppercase_ascii c1)\n+ );\n+ Bytes.unsafe_to_string b\n+ in\n if Glob.eval not_normal_form_re x then\n let root, paths = split x in\n join root (normalize_list paths)\n--- ./src/shell.ml\n+++ ./src/shell.ml\n@@ -24,12 +24,26 @@\n | 'a'..'z' | 'A'..'Z' | '0'..'9' | '.' | '-' | '/' | '_' | ':' | '@' | '+' | ',' -> loop (pos + 1)\n | _ -> false in\n loop 0\n+\n+let generic_quote quotequote s =\n+ let l = String.length s in\n+ let b = Buffer.create (l + 20) in\n+ Buffer.add_char b '\\'';\n+ for i = 0 to l - 1 do\n+ if s.[i] = '\\''\n+ then Buffer.add_string b quotequote\n+ else Buffer.add_char b s.[i]\n+ done;\n+ Buffer.add_char b '\\'';\n+ Buffer.contents b\n+let unix_quote = generic_quote \"'\\\\''\"\n+\n let quote_filename_if_needed s =\n if is_simple_filename s then s\n (* We should probably be using [Filename.unix_quote] except that function\n * isn't exported. Users on Windows will have to live with not being able to\n * install OCaml into c:\\o'caml. Too bad. *)\n- else if Sys.os_type = \"Win32\" then Printf.sprintf \"'%s'\" s\n+ else if Sys.os_type = \"Win32\" then unix_quote s\n else Filename.quote s\n let chdir dir =\n reset_filesys_cache ();\n@@ -37,7 +51,7 @@\n let run args target =\n reset_readdir_cache ();\n let cmd = String.concat \" \" (List.map quote_filename_if_needed args) in\n- if !*My_unix.is_degraded || Sys.os_type = \"Win32\" then\n+ if !*My_unix.is_degraded then\n begin\n Log.event cmd target Tags.empty;\n let st = sys_command cmd in\n" - } - ], - "opam": { - "name": "ocamlbuild", - "version": "0.12.0", - "opam": - "opam-version: \"2.0\"\nname: \"ocamlbuild\"\nversion: \"0.12.0\"\nsynopsis:\n \"OCamlbuild is a build system with builtin rules to easily build most OCaml projects.\"\nmaintainer: \"Gabriel Scherer \"\nauthors: [\"Nicolas Pouillard\" \"Berke Durak\"]\nlicense: \"LGPL-2 with OCaml linking exception\"\nhomepage: \"https://github.com/ocaml/ocamlbuild/\"\ndoc: \"https://github.com/ocaml/ocamlbuild/blob/master/manual/manual.adoc\"\nbug-reports: \"https://github.com/ocaml/ocamlbuild/issues\"\ndepends: [\n \"ocaml\" {>= \"4.03\" & < \"4.08.0\"}\n]\nconflicts: [\n \"base-ocamlbuild\"\n \"ocamlfind\" {< \"1.6.2\"}\n]\nbuild: [\n [\n make\n \"-f\"\n \"configure.make\"\n \"all\"\n \"OCAMLBUILD_PREFIX=%{prefix}%\"\n \"OCAMLBUILD_BINDIR=%{bin}%\"\n \"OCAMLBUILD_LIBDIR=%{lib}%\"\n \"OCAMLBUILD_MANDIR=%{man}%\"\n \"OCAML_NATIVE=%{ocaml:native}%\"\n \"OCAML_NATIVE_TOOLS=%{ocaml:native}%\"\n ]\n [make \"check-if-preinstalled\" \"all\" \"opam-install\"]\n]\ndev-repo: \"git+https://github.com/ocaml/ocamlbuild.git\"\nurl {\n src: \"https://github.com/ocaml/ocamlbuild/archive/0.12.0.tar.gz\"\n checksum: \"md5=442baa19470bd49150f153122e22907b\"\n}", - "override": { - "build": [ - [ - "bash", "-c", - "#{os == 'windows' ? 'patch -p1 < ocamlbuild-0.12.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'}" - ] - ] - } - } - }, - "dependencies": [ "@esy-ocaml/substs@0.0.1", "ocaml@4.7.1001" ] - }, - "@opam/ocaml-migrate-parsetree@opam:1.1.0": { - "record": { - "name": "@opam/ocaml-migrate-parsetree", - "version": "opam:1.1.0", - "source": - "archive:https://github.com/ocaml-ppx/ocaml-migrate-parsetree/releases/download/v1.1.0/ocaml-migrate-parsetree-1.1.0.tbz#md5:7dd4808e27af98065f63604c9658d311", - "files": [], - "opam": { - "name": "ocaml-migrate-parsetree", - "version": "1.1.0", - "opam": - "opam-version: \"2.0\"\nname: \"ocaml-migrate-parsetree\"\nversion: \"1.1.0\"\nsynopsis: \"\"\ndescription: \"\"\"\nConvert OCaml parsetrees between different versions \n\nThis library converts parsetrees, outcometree and ast mappers between different OCaml versions.\nHigh-level functions help making PPX rewriters independent of a compiler version.\"\"\"\nmaintainer: \"frederic.bour@lakaban.net\"\nauthors: [\n \"Frédéric Bour \"\n \"Jérémie Dimino \"\n]\nlicense: \"LGPL-2.1\"\ntags: [\"syntax\" \"org:ocamllabs\"]\nhomepage: \"https://github.com/ocaml-ppx/ocaml-migrate-parsetree\"\ndoc: \"https://ocaml-ppx.github.io/ocaml-migrate-parsetree/\"\nbug-reports: \"https://github.com/ocaml-ppx/ocaml-migrate-parsetree/issues\"\ndepends: [\n \"result\"\n \"dune\" {build}\n \"ocaml\" {>= \"4.02.0\"}\n]\nbuild: [\"jbuilder\" \"build\" \"-p\" name \"-j\" jobs]\ndev-repo: \"git+https://github.com/ocaml-ppx/ocaml-migrate-parsetree.git\"\nurl {\n src:\n \"https://github.com/ocaml-ppx/ocaml-migrate-parsetree/releases/download/v1.1.0/ocaml-migrate-parsetree-1.1.0.tbz\"\n checksum: \"md5=7dd4808e27af98065f63604c9658d311\"\n}", - "override": null - } - }, - "dependencies": [ - "@esy-ocaml/substs@0.0.1", "@opam/dune@opam:1.5.1", - "@opam/result@opam:1.3", "ocaml@4.7.1001" - ] - }, - "@opam/ocaml-compiler-libs@opam:v0.11.0": { - "record": { - "name": "@opam/ocaml-compiler-libs", - "version": "opam:v0.11.0", - "source": - "archive:https://ocaml.janestreet.com/ocaml-core/v0.11/files/ocaml-compiler-libs-v0.11.0.tar.gz#md5:e170c16186aa55b7e8b11e461418a10a", - "files": [], - "opam": { - "name": "ocaml-compiler-libs", - "version": "v0.11.0", - "opam": - "opam-version: \"2.0\"\nname: \"ocaml-compiler-libs\"\nversion: \"v0.11.0\"\nsynopsis: \"OCaml compiler libraries repackaged\"\ndescription: \"\"\"\nThis packages exposes the OCaml compiler libraries repackages under\nthe toplevel names Ocaml_common, Ocaml_bytecomp, ...\"\"\"\nmaintainer: \"opensource@janestreet.com\"\nauthors: \"Jane Street Group, LLC \"\nlicense: \"Apache-2.0\"\nhomepage: \"https://github.com/janestreet/ocaml-compiler-libs\"\nbug-reports: \"https://github.com/janestreet/ocaml-compiler-libs/issues\"\ndepends: [\n \"ocaml\" {>= \"4.04.1\"}\n \"jbuilder\" {build & >= \"1.0+beta12\"}\n]\nbuild: [\"jbuilder\" \"build\" \"-p\" name \"-j\" jobs]\ndev-repo: \"git+https://github.com/janestreet/ocaml-compiler-libs.git\"\nurl {\n src:\n \"https://ocaml.janestreet.com/ocaml-core/v0.11/files/ocaml-compiler-libs-v0.11.0.tar.gz\"\n checksum: \"md5=e170c16186aa55b7e8b11e461418a10a\"\n}", - "override": null - } - }, - "dependencies": [ - "@esy-ocaml/substs@0.0.1", "@opam/jbuilder@opam:transition", - "ocaml@4.7.1001" - ] - }, - "@opam/merlin-extend@opam:0.3": { - "record": { - "name": "@opam/merlin-extend", - "version": "opam:0.3", - "source": - "archive:https://github.com/let-def/merlin-extend/archive/v0.3.tar.gz#md5:9c6dfd4f53328f02f12fcc265f4e2dda", - "files": [ - { - "name": "merlin-extend-winfix.patch", - "content": - "--- ./extend_helper.ml\n+++ ./extend_helper.ml\n@@ -1,13 +1,6 @@\n-(*pp cppo -V OCAML:`ocamlc -version` *)\n open Parsetree\n open Extend_protocol\n \n-#if OCAML_VERSION < (4, 3, 0)\n-# define CONST_STRING Asttypes.Const_string\n-#else\n-# define CONST_STRING Parsetree.Pconst_string\n-#endif\n-\n (** Default implementation for [Reader_def.print_outcome] using\n [Oprint] from compiler-libs *)\n let print_outcome_using_oprint ppf = function\n@@ -28,7 +21,7 @@\n pstr_loc = Location.none;\n pstr_desc = Pstr_eval ({\n pexp_loc = Location.none;\n- pexp_desc = Pexp_constant (CONST_STRING (msg, None));\n+ pexp_desc = Pexp_constant (Parsetree.Pconst_string (msg, None));\n pexp_attributes = [];\n }, []);\n }]\n@@ -112,7 +105,7 @@\n let msg = match payload with\n | PStr [{\n pstr_desc = Pstr_eval ({\n- pexp_desc = Pexp_constant (CONST_STRING (msg, _));\n+ pexp_desc = Pexp_constant (Parsetree.Pconst_string (msg, _));\n }, _);\n }] -> msg\n | _ -> \"Warning: extension produced an incorrect syntax-error node\"\n" - } - ], - "opam": { - "name": "merlin-extend", - "version": "0.3", - "opam": - "opam-version: \"2.0\"\nname: \"merlin-extend\"\nversion: \"0.3\"\nsynopsis: \"A protocol to provide custom frontend to Merlin\"\ndescription: \"\"\"\nThis protocol allows to replace the OCaml frontend of Merlin.\nIt extends what used to be done with the `-pp' flag to handle a few more cases.\"\"\"\nmaintainer: \"Frederic Bour \"\nauthors: \"Frederic Bour \"\nlicense: \"MIT\"\nhomepage: \"https://github.com/let-def/merlin-extend\"\nbug-reports: \"https://github.com/let-def/merlin-extend\"\ndepends: [\n \"ocaml\" {>= \"4.02.3\"}\n \"ocamlfind\" {build}\n \"cppo\" {build}\n]\nflags: light-uninstall\nbuild: make\ninstall: [make \"install\"]\nremove: [\"ocamlfind\" \"remove\" \"merlin_extend\"]\ndev-repo: \"git+https://github.com/let-def/merlin-extend.git\"\nurl {\n src: \"https://github.com/let-def/merlin-extend/archive/v0.3.tar.gz\"\n checksum: \"md5=9c6dfd4f53328f02f12fcc265f4e2dda\"\n}", - "override": { - "build": [ - [ - "bash", "-c", - "#{os == 'windows' ? 'patch -p1 < merlin-extend-winfix.patch' : 'true'}" - ], - [ "make" ] - ] - } - } - }, - "dependencies": [ - "@esy-ocaml/substs@0.0.1", "@opam/cppo@opam:1.6.5", - "@opam/ocamlfind@opam:1.8.0", "ocaml@4.7.1001" - ] - }, - "@opam/menhir@opam:20181026": { - "record": { - "name": "@opam/menhir", - "version": "opam:20181026", - "source": - "archive:https://gitlab.inria.fr/fpottier/menhir/repository/20181026/archive.tar.gz#md5:7047bcffbdc50cffd70012f4da2210ec", - "files": [], - "opam": { - "name": "menhir", - "version": "20181026", - "opam": - "opam-version: \"2.0\"\nname: \"menhir\"\nversion: \"20181026\"\nsynopsis: \"An LR(1) parser generator\"\nmaintainer: \"francois.pottier@inria.fr\"\nauthors: [\n \"François Pottier \"\n \"Yann Régis-Gianas \"\n]\nhomepage: \"http://gitlab.inria.fr/fpottier/menhir\"\nbug-reports: \"menhir@inria.fr\"\ndepends: [\n \"ocaml\" {>= \"4.02\"}\n \"ocamlfind\" {build}\n \"ocamlbuild\" {build}\n]\nbuild: [\n make\n \"-f\"\n \"Makefile\"\n \"PREFIX=%{prefix}%\"\n \"USE_OCAMLFIND=true\"\n \"docdir=%{doc}%/menhir\"\n \"libdir=%{lib}%/menhir\"\n \"mandir=%{man}%/man1\"\n]\ninstall: [\n make\n \"-f\"\n \"Makefile\"\n \"install\"\n \"PREFIX=%{prefix}%\"\n \"docdir=%{doc}%/menhir\"\n \"libdir=%{lib}%/menhir\"\n \"mandir=%{man}%/man1\"\n]\nremove: [\n make\n \"-f\"\n \"Makefile\"\n \"uninstall\"\n \"PREFIX=%{prefix}%\"\n \"docdir=%{doc}%/menhir\"\n \"libdir=%{lib}%/menhir\"\n \"mandir=%{man}%/man1\"\n]\ndev-repo: \"git+https://gitlab.inria.fr/fpottier/menhir.git\"\nurl {\n src:\n \"https://gitlab.inria.fr/fpottier/menhir/repository/20181026/archive.tar.gz\"\n checksum: [\n \"md5=7047bcffbdc50cffd70012f4da2210ec\"\n \"sha512=1101a0e0a33625e11700a7a909334fdf4d2600acf8aa629b4de1982185a4aa8320b3eaa87db75b4c76dd4663f6e5b77740f70b92c6a109ba3496db6eeae4479b\"\n ]\n}", - "override": null - } - }, - "dependencies": [ - "@esy-ocaml/substs@0.0.1", "@opam/ocamlbuild@opam:0.12.0", - "@opam/ocamlfind@opam:1.8.0", "ocaml@4.7.1001" - ] - }, - "@opam/jbuilder@opam:transition": { - "record": { - "name": "@opam/jbuilder", - "version": "opam:transition", - "source": "no-source:", - "files": [], - "opam": { - "name": "jbuilder", - "version": "transition", - "opam": - "opam-version: \"2.0\"\nname: \"jbuilder\"\nversion: \"transition\"\nsynopsis:\n \"This is a transition package, jbuilder is now named dune. Use the dune\"\ndescription: \"package instead.\"\nmaintainer: \"opensource@janestreet.com\"\nauthors: \"Jane Street Group, LLC \"\nlicense: \"MIT\"\nhomepage: \"https://github.com/ocaml/dune\"\nbug-reports: \"https://github.com/ocaml/dune/issues\"\ndepends: [\"ocaml\" \"dune\"]\npost-messages:\n \"Jbuilder has been renamed and the jbuilder package is now a transition package. Use the dune package instead.\"\ndev-repo: \"git+https://github.com/ocaml/dune.git\"", - "override": null - } - }, - "dependencies": [ - "@esy-ocaml/substs@0.0.1", "@opam/dune@opam:1.5.1", "ocaml@4.7.1001" - ] - }, - "@opam/dune@opam:1.5.1": { - "record": { - "name": "@opam/dune", - "version": "opam:1.5.1", - "source": - "archive:https://github.com/ocaml/dune/releases/download/1.5.1/dune-1.5.1.tbz#md5:071ff387b85e08bdfd49dee728dc8358", - "files": [], - "opam": { - "name": "dune", - "version": "1.5.1", - "opam": - "opam-version: \"2.0\"\nname: \"dune\"\nversion: \"1.5.1\"\nsynopsis: \"Fast, portable and opinionated build system\"\ndescription: \"\"\"\ndune is a build system that was designed to simplify the release of\nJane Street packages. It reads metadata from \"dune\" files following a\nvery simple s-expression syntax.\n\ndune is fast, it has very low-overhead and support parallel builds on\nall platforms. It has no system dependencies, all you need to build\ndune and packages using dune is OCaml. You don't need or make or bash\nas long as the packages themselves don't use bash explicitly.\n\ndune supports multi-package development by simply dropping multiple\nrepositories into the same directory.\n\nIt also supports multi-context builds, such as building against\nseveral opam roots/switches simultaneously. This helps maintaining\npackages across several versions of OCaml and gives cross-compilation\nfor free.\"\"\"\nmaintainer: \"opensource@janestreet.com\"\nauthors: \"Jane Street Group, LLC \"\nlicense: \"MIT\"\nhomepage: \"https://github.com/ocaml/dune\"\nbug-reports: \"https://github.com/ocaml/dune/issues\"\ndepends: [\n \"ocaml\" {>= \"4.02\"}\n]\nconflicts: [\n \"jbuilder\" {!= \"transition\"}\n]\nbuild: [\n [\"ocaml\" \"configure.ml\" \"--libdir\" lib] {opam-version < \"2\"}\n [\"ocaml\" \"bootstrap.ml\"]\n [\"./boot.exe\" \"--release\" \"--subst\"] {pinned}\n [\"./boot.exe\" \"--release\" \"-j\" jobs]\n]\ndev-repo: \"git+https://github.com/ocaml/dune.git\"\nurl {\n src: \"https://github.com/ocaml/dune/releases/download/1.5.1/dune-1.5.1.tbz\"\n checksum: \"md5=071ff387b85e08bdfd49dee728dc8358\"\n}", - "override": { - "build": [ - [ "ocaml", "bootstrap.ml" ], - [ "./boot.exe", "--release", "-j", "4" ] - ] - } - } - }, - "dependencies": [ "@esy-ocaml/substs@0.0.1", "ocaml@4.7.1001" ] - }, - "@opam/cppo@opam:1.6.5": { - "record": { - "name": "@opam/cppo", - "version": "opam:1.6.5", - "source": - "archive:https://github.com/mjambon/cppo/archive/v1.6.5.tar.gz#md5:1cd25741d31417995b0973fe0b6f6c82", - "files": [], - "opam": { - "name": "cppo", - "version": "1.6.5", - "opam": - "opam-version: \"2.0\"\nname: \"cppo\"\nversion: \"1.6.5\"\nsynopsis: \"Equivalent of the C preprocessor for OCaml programs\"\nmaintainer: \"martin@mjambon.com\"\nauthors: \"Martin Jambon\"\nlicense: \"BSD-3-Clause\"\nhomepage: \"https://github.com/mjambon/cppo\"\nbug-reports: \"https://github.com/mjambon/cppo/issues\"\ndepends: [\n \"ocaml\"\n \"jbuilder\" {build & >= \"1.0+beta17\"}\n \"base-unix\"\n]\nbuild: [\n [\"jbuilder\" \"subst\" \"-p\" name] {pinned}\n [\"jbuilder\" \"build\" \"-p\" name \"-j\" jobs]\n [\"jbuilder\" \"runtest\" \"-p\" name] {with-test}\n]\ndev-repo: \"git+https://github.com/mjambon/cppo.git\"\nurl {\n src: \"https://github.com/mjambon/cppo/archive/v1.6.5.tar.gz\"\n checksum: \"md5=1cd25741d31417995b0973fe0b6f6c82\"\n}", - "override": null - } - }, - "dependencies": [ - "@esy-ocaml/substs@0.0.1", "@opam/base-unix@opam:base", - "@opam/jbuilder@opam:transition", "ocaml@4.7.1001" - ] - }, - "@opam/conf-m4@opam:1": { - "record": { - "name": "@opam/conf-m4", - "version": "opam:1", - "source": "no-source:", - "files": [], - "opam": { - "name": "conf-m4", - "version": "1", - "opam": - "opam-version: \"2.0\"\nname: \"conf-m4\"\nversion: \"1\"\nsynopsis: \"Virtual package relying on m4\"\ndescription:\n \"This package can only install if the m4 binary is installed on the system.\"\nmaintainer: \"tim@gfxmonk.net\"\nauthors: \"GNU Project\"\nlicense: \"GPL-3\"\nhomepage: \"http://www.gnu.org/software/m4/m4.html\"\nbug-reports: \"https://github.com/ocaml/opam-repository/issues\"\nflags: conf\nbuild: [\"sh\" \"-exc\" \"echo | m4\"]\ndepexts: [\n [\"m4\"] {os-distribution = \"debian\"}\n [\"m4\"] {os-distribution = \"ubuntu\"}\n [\"m4\"] {os-distribution = \"fedora\"}\n [\"m4\"] {os-distribution = \"rhel\"}\n [\"m4\"] {os-distribution = \"centos\"}\n [\"m4\"] {os-distribution = \"alpine\"}\n [\"m4\"] {os-distribution = \"nixos\"}\n [\"m4\"] {os-distribution = \"opensuse\"}\n [\"m4\"] {os-distribution = \"oraclelinux\"}\n [\"m4\"] {os-distribution = \"archlinux\"}\n]", - "override": null - } - }, - "dependencies": [ "@esy-ocaml/substs@0.0.1" ] - }, - "@opam/base-unix@opam:base": { - "record": { - "name": "@opam/base-unix", - "version": "opam:base", - "source": "no-source:", - "files": [], - "opam": { - "name": "base-unix", - "version": "base", - "opam": - "opam-version: \"2.0\"\nname: \"base-unix\"\nversion: \"base\"\nsynopsis: \"\"\ndescription: \"Unix library distributed with the OCaml compiler\"\nmaintainer: \"https://github.com/ocaml/opam-repository/issues\"", - "override": null - } - }, - "dependencies": [ "@esy-ocaml/substs@0.0.1" ] - }, - "@opam/base@opam:v0.11.1": { - "record": { - "name": "@opam/base", - "version": "opam:v0.11.1", - "source": - "archive:https://github.com/janestreet/base/releases/download/v0.11.1/base-v0.11.1.tbz#md5:e7e7dc5db3f1fea19d74a31bbd4ac621", - "files": [ - { - "name": "base-v0.11.1.patch", - "content": - "--- ./src/exn_stubs.c\n+++ ./src/exn_stubs.c\n@@ -1,8 +1,13 @@\n #include \n \n extern int caml_backtrace_pos;\n+#ifndef _MSC_VER\n+#define UNUSED __attribute__((unused))\n+#else\n+#define UNUSED\n+#endif\n \n-CAMLprim value Base_clear_caml_backtrace_pos (value __attribute__((unused)) unit) {\n+CAMLprim value Base_clear_caml_backtrace_pos (value UNUSED unit) {\n caml_backtrace_pos = 0;\n return Val_unit;\n }\n--- ./src/int_math_stubs.c\n+++ ./src/int_math_stubs.c\n@@ -5,6 +5,25 @@\n #include \n #include \n \n+#if defined(_MSC_VER)\n+#include \n+#ifdef ARCH_SIXTYFOUR\n+#define __builtin_popcountll(x) __popcnt64((uint64_t)(x))\n+static __inline uint32_t __builtin_clzll(uint64_t value) {\n+ uint32_t leading_zero = 0;\n+ _BitScanReverse64(&leading_zero, value);\n+ return (63 - leading_zero);\n+}\n+#else\n+#define __builtin_popcount(x) __popcnt((unsigned int)(x))\n+static __inline uint32_t __builtin_clz(uint32_t value) {\n+ uint32_t leading_zero = 0;\n+ _BitScanReverse(&leading_zero, value);\n+ return (31 - leading_zero);\n+}\n+#endif /* ARCH_SIXTYFOUR */\n+#endif /* defined(_MSC_VER) */\n+\n static int64_t int_pow(int64_t base, int64_t exponent) {\n int64_t ret = 1;\n int64_t mul[4];\n--- ./src/jbuild\n+++ ./src/jbuild\n@@ -65,7 +65,7 @@\n (progn\n (with-stdout-to popcnt_test.c\n (echo \"int main(int argc, char ** argv) { return __builtin_popcount(argc); }\"))\n- (system \"${CC} -mpopcnt -c popcnt_test.c 2> ${null} && \\\n+ (bash \"${CC} -mpopcnt -c popcnt_test.c 2> ${null} && \\\n echo '(-mpopcnt)' > ${@} || echo '()' > ${@}\"))))))\n \n (ocamllex (hex_lexer))\n" - } - ], - "opam": { - "name": "base", - "version": "v0.11.1", - "opam": - "opam-version: \"2.0\"\nname: \"base\"\nversion: \"v0.11.1\"\nsynopsis: \"Full standard library replacement for OCaml\"\ndescription: \"\"\"\nFull standard library replacement for OCaml\n\nBase is a complete and portable alternative to the OCaml standard\nlibrary. It provides all standard functionalities one would expect\nfrom a language standard library. It uses consistent conventions\nacross all of its module.\n\nBase aims to be usable in any context. As a result system dependent\nfeatures such as I/O are not offered by Base. They are instead\nprovided by companion libraries such as stdio:\n\n https://github.com/janestreet/stdio\"\"\"\nmaintainer: \"opensource@janestreet.com\"\nauthors: \"Jane Street Group, LLC \"\nlicense: \"Apache-2.0\"\nhomepage: \"https://github.com/janestreet/base\"\nbug-reports: \"https://github.com/janestreet/base/issues\"\ndepends: [\n \"ocaml\" {>= \"4.04.1\"}\n \"sexplib0\" {>= \"v0.11\" & < \"v0.12\"}\n \"jbuilder\" {build & >= \"1.0+beta18.1\"}\n]\ndepopts: [\"base-native-int63\"]\nbuild: [\"jbuilder\" \"build\" \"-p\" name \"-j\" jobs]\ndev-repo: \"git+https://github.com/janestreet/base.git\"\nurl {\n src:\n \"https://github.com/janestreet/base/releases/download/v0.11.1/base-v0.11.1.tbz\"\n checksum: \"md5=e7e7dc5db3f1fea19d74a31bbd4ac621\"\n}", - "override": { - "build": [ - [ - "bash", "-c", - "#{os == 'windows' ? 'patch -p1 < base-v0.11.1.patch' : 'true'}" - ], - [ "jbuilder", "build", "-p", "base", "-j", "4" ] - ] - } - } - }, - "dependencies": [ - "@esy-ocaml/substs@0.0.1", "@opam/jbuilder@opam:transition", - "@opam/sexplib0@opam:v0.11.0", "ocaml@4.7.1001" - ] - }, - "@esy-ocaml/substs@0.0.1": { - "record": { - "name": "@esy-ocaml/substs", - "version": "0.0.1", - "source": - "archive:https://registry.npmjs.org/@esy-ocaml/substs/-/substs-0.0.1.tgz#sha1:59ebdbbaedcda123fc7ed8fb2b302b7d819e9a46", - "files": [], - "opam": null - }, - "dependencies": [] - }, - "@esy-ocaml/reason@3.3.7": { - "record": { - "name": "@esy-ocaml/reason", - "version": "3.3.7", - "source": - "archive:https://registry.npmjs.org/@esy-ocaml/reason/-/reason-3.3.7.tgz#sha1:4d75b8876807c4178c6fff2359962066bb69d944", - "files": [], - "opam": null - }, - "dependencies": [ - "@opam/dune@opam:1.5.1", "@opam/menhir@opam:20181026", - "@opam/merlin-extend@opam:0.3", - "@opam/ocaml-migrate-parsetree@opam:1.1.0", - "@opam/ocamlfind@opam:1.8.0", "@opam/result@opam:1.3", - "ocaml@4.7.1001" - ] - } - } -} \ No newline at end of file diff --git a/esy.lock/.gitattributes b/esy.lock/.gitattributes deleted file mode 100644 index e0b4e26c..00000000 --- a/esy.lock/.gitattributes +++ /dev/null @@ -1,3 +0,0 @@ - -# Set eol to LF so files aren't converted to CRLF-eol on Windows. -* text eol=lf linguist-generated diff --git a/esy.lock/.gitignore b/esy.lock/.gitignore deleted file mode 100644 index a221be22..00000000 --- a/esy.lock/.gitignore +++ /dev/null @@ -1,3 +0,0 @@ - -# Reset any possible .gitignore, we want all esy.lock to be un-ignored. -!* diff --git a/esy.lock/index.json b/esy.lock/index.json deleted file mode 100644 index 8f1e508b..00000000 --- a/esy.lock/index.json +++ /dev/null @@ -1,675 +0,0 @@ -{ - "checksum": "c4fc14d92a8bc6f2eebd8ab5dfff5d8a", - "root": "reason-language-server@link-dev:./package.json", - "node": { - "reason-language-server@link-dev:./package.json": { - "id": "reason-language-server@link-dev:./package.json", - "name": "reason-language-server", - "version": "link-dev:./package.json", - "source": { - "type": "link-dev", - "path": ".", - "manifest": "package.json" - }, - "overrides": [], - "dependencies": [ - "ocaml@4.6.1003@d41d8cd9", "@opam/uri@opam:3.1.0@826aaae7", - "@opam/reason@opam:3.6.0@58adb39a", - "@opam/ppx_tools_versioned@opam:5.4.0@32d1a414", - "@opam/ocaml-migrate-parsetree@opam:1.8.0@305b6173", - "@opam/dune@opam:2.7.1@f5f493bc" - ], - "devDependencies": [] - }, - "ocaml@4.6.1003@d41d8cd9": { - "id": "ocaml@4.6.1003@d41d8cd9", - "name": "ocaml", - "version": "4.6.1003", - "source": { - "type": "install", - "source": [ - "archive:https://registry.npmjs.org/ocaml/-/ocaml-4.6.1003.tgz#sha1:6a391e80b4d1859bdb1943fd3ef6221c7f0a9a49" - ] - }, - "overrides": [], - "dependencies": [], - "devDependencies": [] - }, - "esy-m4@github:esy-packages/esy-m4#c7cf0ac9221be2b1f9d90e83559ca08397a629e7@d41d8cd9": { - "id": - "esy-m4@github:esy-packages/esy-m4#c7cf0ac9221be2b1f9d90e83559ca08397a629e7@d41d8cd9", - "name": "esy-m4", - "version": - "github:esy-packages/esy-m4#c7cf0ac9221be2b1f9d90e83559ca08397a629e7", - "source": { - "type": "install", - "source": [ - "github:esy-packages/esy-m4#c7cf0ac9221be2b1f9d90e83559ca08397a629e7" - ] - }, - "overrides": [], - "dependencies": [], - "devDependencies": [] - }, - "@opam/uri@opam:3.1.0@826aaae7": { - "id": "@opam/uri@opam:3.1.0@826aaae7", - "name": "@opam/uri", - "version": "opam:3.1.0", - "source": { - "type": "install", - "source": [ - "archive:https://opam.ocaml.org/cache/sha256/c4/c452823fd870cf7cffe51aef3e9ca646a382dc6f87282f2b16bfe30a7515ac43#sha256:c452823fd870cf7cffe51aef3e9ca646a382dc6f87282f2b16bfe30a7515ac43", - "archive:https://github.com/mirage/ocaml-uri/releases/download/v3.1.0/uri-v3.1.0.tbz#sha256:c452823fd870cf7cffe51aef3e9ca646a382dc6f87282f2b16bfe30a7515ac43" - ], - "opam": { - "name": "uri", - "version": "3.1.0", - "path": "esy.lock/opam/uri.3.1.0" - } - }, - "overrides": [], - "dependencies": [ - "ocaml@4.6.1003@d41d8cd9", "@opam/stringext@opam:1.6.0@104bc94b", - "@opam/re@opam:1.9.0@d4d5e13d", "@opam/dune@opam:2.7.1@f5f493bc", - "@esy-ocaml/substs@0.0.1@d41d8cd9" - ], - "devDependencies": [ - "ocaml@4.6.1003@d41d8cd9", "@opam/stringext@opam:1.6.0@104bc94b", - "@opam/re@opam:1.9.0@d4d5e13d", "@opam/dune@opam:2.7.1@f5f493bc" - ] - }, - "@opam/stringext@opam:1.6.0@104bc94b": { - "id": "@opam/stringext@opam:1.6.0@104bc94b", - "name": "@opam/stringext", - "version": "opam:1.6.0", - "source": { - "type": "install", - "source": [ - "archive:https://opam.ocaml.org/cache/sha256/db/db41f5d52e9eab17615f110b899dfeb27dd7e7f89cd35ae43827c5119db206ea#sha256:db41f5d52e9eab17615f110b899dfeb27dd7e7f89cd35ae43827c5119db206ea", - "archive:https://github.com/rgrinberg/stringext/releases/download/1.6.0/stringext-1.6.0.tbz#sha256:db41f5d52e9eab17615f110b899dfeb27dd7e7f89cd35ae43827c5119db206ea" - ], - "opam": { - "name": "stringext", - "version": "1.6.0", - "path": "esy.lock/opam/stringext.1.6.0" - } - }, - "overrides": [], - "dependencies": [ - "ocaml@4.6.1003@d41d8cd9", "@opam/dune@opam:2.7.1@f5f493bc", - "@opam/base-bytes@opam:base@19d0c2ff", - "@esy-ocaml/substs@0.0.1@d41d8cd9" - ], - "devDependencies": [ - "ocaml@4.6.1003@d41d8cd9", "@opam/dune@opam:2.7.1@f5f493bc", - "@opam/base-bytes@opam:base@19d0c2ff" - ] - }, - "@opam/seq@opam:0.2.2@e9144e45": { - "id": "@opam/seq@opam:0.2.2@e9144e45", - "name": "@opam/seq", - "version": "opam:0.2.2", - "source": { - "type": "install", - "source": [ - "archive:https://opam.ocaml.org/cache/md5/90/9033e02283aa3bde9f97f24e632902e3#md5:9033e02283aa3bde9f97f24e632902e3", - "archive:https://github.com/c-cube/seq/archive/0.2.2.tar.gz#md5:9033e02283aa3bde9f97f24e632902e3" - ], - "opam": { - "name": "seq", - "version": "0.2.2", - "path": "esy.lock/opam/seq.0.2.2" - } - }, - "overrides": [], - "dependencies": [ - "ocaml@4.6.1003@d41d8cd9", "@opam/dune@opam:2.7.1@f5f493bc", - "@esy-ocaml/substs@0.0.1@d41d8cd9" - ], - "devDependencies": [ - "ocaml@4.6.1003@d41d8cd9", "@opam/dune@opam:2.7.1@f5f493bc" - ] - }, - "@opam/result@opam:1.5@6b753c82": { - "id": "@opam/result@opam:1.5@6b753c82", - "name": "@opam/result", - "version": "opam:1.5", - "source": { - "type": "install", - "source": [ - "archive:https://opam.ocaml.org/cache/md5/1b/1b82dec78849680b49ae9a8a365b831b#md5:1b82dec78849680b49ae9a8a365b831b", - "archive:https://github.com/janestreet/result/releases/download/1.5/result-1.5.tbz#md5:1b82dec78849680b49ae9a8a365b831b" - ], - "opam": { - "name": "result", - "version": "1.5", - "path": "esy.lock/opam/result.1.5" - } - }, - "overrides": [], - "dependencies": [ - "ocaml@4.6.1003@d41d8cd9", "@opam/dune@opam:2.7.1@f5f493bc", - "@esy-ocaml/substs@0.0.1@d41d8cd9" - ], - "devDependencies": [ - "ocaml@4.6.1003@d41d8cd9", "@opam/dune@opam:2.7.1@f5f493bc" - ] - }, - "@opam/reason@opam:3.6.0@58adb39a": { - "id": "@opam/reason@opam:3.6.0@58adb39a", - "name": "@opam/reason", - "version": "opam:3.6.0", - "source": { - "type": "install", - "source": [ - "archive:https://opam.ocaml.org/cache/md5/d4/d4d729804bc509bca0ac6223e06f7314#md5:d4d729804bc509bca0ac6223e06f7314", - "archive:https://registry.npmjs.org/@esy-ocaml/reason/-/reason-3.6.0.tgz#md5:d4d729804bc509bca0ac6223e06f7314" - ], - "opam": { - "name": "reason", - "version": "3.6.0", - "path": "esy.lock/opam/reason.3.6.0" - } - }, - "overrides": [], - "dependencies": [ - "ocaml@4.6.1003@d41d8cd9", "@opam/result@opam:1.5@6b753c82", - "@opam/ocamlfind@opam:1.8.1@ff07b0f9", - "@opam/ocaml-migrate-parsetree@opam:1.8.0@305b6173", - "@opam/merlin-extend@opam:0.6@404f814c", - "@opam/menhir@opam:20200624@8629ff13", - "@opam/fix@opam:20200131@0ecd2f01", "@opam/dune@opam:2.7.1@f5f493bc", - "@esy-ocaml/substs@0.0.1@d41d8cd9" - ], - "devDependencies": [ - "ocaml@4.6.1003@d41d8cd9", "@opam/result@opam:1.5@6b753c82", - "@opam/ocaml-migrate-parsetree@opam:1.8.0@305b6173", - "@opam/merlin-extend@opam:0.6@404f814c", - "@opam/menhir@opam:20200624@8629ff13", - "@opam/fix@opam:20200131@0ecd2f01", "@opam/dune@opam:2.7.1@f5f493bc" - ] - }, - "@opam/re@opam:1.9.0@d4d5e13d": { - "id": "@opam/re@opam:1.9.0@d4d5e13d", - "name": "@opam/re", - "version": "opam:1.9.0", - "source": { - "type": "install", - "source": [ - "archive:https://opam.ocaml.org/cache/md5/bd/bddaed4f386a22cace7850c9c7dac296#md5:bddaed4f386a22cace7850c9c7dac296", - "archive:https://github.com/ocaml/ocaml-re/releases/download/1.9.0/re-1.9.0.tbz#md5:bddaed4f386a22cace7850c9c7dac296" - ], - "opam": { - "name": "re", - "version": "1.9.0", - "path": "esy.lock/opam/re.1.9.0" - } - }, - "overrides": [], - "dependencies": [ - "ocaml@4.6.1003@d41d8cd9", "@opam/seq@opam:0.2.2@e9144e45", - "@opam/dune@opam:2.7.1@f5f493bc", "@esy-ocaml/substs@0.0.1@d41d8cd9" - ], - "devDependencies": [ - "ocaml@4.6.1003@d41d8cd9", "@opam/seq@opam:0.2.2@e9144e45", - "@opam/dune@opam:2.7.1@f5f493bc" - ] - }, - "@opam/ppx_tools_versioned@opam:5.4.0@32d1a414": { - "id": "@opam/ppx_tools_versioned@opam:5.4.0@32d1a414", - "name": "@opam/ppx_tools_versioned", - "version": "opam:5.4.0", - "source": { - "type": "install", - "source": [ - "archive:https://opam.ocaml.org/cache/md5/3e/3e809a11cae99f57c051d3d0100311f6#md5:3e809a11cae99f57c051d3d0100311f6", - "archive:https://github.com/ocaml-ppx/ppx_tools_versioned/archive/5.4.0.tar.gz#md5:3e809a11cae99f57c051d3d0100311f6" - ], - "opam": { - "name": "ppx_tools_versioned", - "version": "5.4.0", - "path": "esy.lock/opam/ppx_tools_versioned.5.4.0" - } - }, - "overrides": [], - "dependencies": [ - "ocaml@4.6.1003@d41d8cd9", - "@opam/ocaml-migrate-parsetree@opam:1.8.0@305b6173", - "@opam/dune@opam:2.7.1@f5f493bc", "@esy-ocaml/substs@0.0.1@d41d8cd9" - ], - "devDependencies": [ - "ocaml@4.6.1003@d41d8cd9", - "@opam/ocaml-migrate-parsetree@opam:1.8.0@305b6173", - "@opam/dune@opam:2.7.1@f5f493bc" - ] - }, - "@opam/ppx_derivers@opam:1.2.1@ecf0aa45": { - "id": "@opam/ppx_derivers@opam:1.2.1@ecf0aa45", - "name": "@opam/ppx_derivers", - "version": "opam:1.2.1", - "source": { - "type": "install", - "source": [ - "archive:https://opam.ocaml.org/cache/md5/5d/5dc2bf130c1db3c731fe0fffc5648b41#md5:5dc2bf130c1db3c731fe0fffc5648b41", - "archive:https://github.com/ocaml-ppx/ppx_derivers/archive/1.2.1.tar.gz#md5:5dc2bf130c1db3c731fe0fffc5648b41" - ], - "opam": { - "name": "ppx_derivers", - "version": "1.2.1", - "path": "esy.lock/opam/ppx_derivers.1.2.1" - } - }, - "overrides": [], - "dependencies": [ - "ocaml@4.6.1003@d41d8cd9", "@opam/dune@opam:2.7.1@f5f493bc", - "@esy-ocaml/substs@0.0.1@d41d8cd9" - ], - "devDependencies": [ - "ocaml@4.6.1003@d41d8cd9", "@opam/dune@opam:2.7.1@f5f493bc" - ] - }, - "@opam/ocamlfind-secondary@opam:1.8.1@1afa38b2": { - "id": "@opam/ocamlfind-secondary@opam:1.8.1@1afa38b2", - "name": "@opam/ocamlfind-secondary", - "version": "opam:1.8.1", - "source": { - "type": "install", - "source": [ - "archive:https://opam.ocaml.org/cache/md5/18/18ca650982c15536616dea0e422cbd8c#md5:18ca650982c15536616dea0e422cbd8c", - "archive:http://download2.camlcity.org/download/findlib-1.8.1.tar.gz#md5:18ca650982c15536616dea0e422cbd8c", - "archive:http://download.camlcity.org/download/findlib-1.8.1.tar.gz#md5:18ca650982c15536616dea0e422cbd8c" - ], - "opam": { - "name": "ocamlfind-secondary", - "version": "1.8.1", - "path": "esy.lock/opam/ocamlfind-secondary.1.8.1" - } - }, - "overrides": [ - { - "opamoverride": - "esy.lock/overrides/opam__s__ocamlfind_secondary_opam__c__1.8.1_opam_override" - } - ], - "dependencies": [ - "@opam/ocamlfind@opam:1.8.1@ff07b0f9", - "@opam/ocaml-secondary-compiler@opam:4.08.1-1@85df5d8f", - "@esy-ocaml/substs@0.0.1@d41d8cd9" - ], - "devDependencies": [ - "@opam/ocamlfind@opam:1.8.1@ff07b0f9", - "@opam/ocaml-secondary-compiler@opam:4.08.1-1@85df5d8f" - ] - }, - "@opam/ocamlfind@opam:1.8.1@ff07b0f9": { - "id": "@opam/ocamlfind@opam:1.8.1@ff07b0f9", - "name": "@opam/ocamlfind", - "version": "opam:1.8.1", - "source": { - "type": "install", - "source": [ - "archive:https://opam.ocaml.org/cache/md5/18/18ca650982c15536616dea0e422cbd8c#md5:18ca650982c15536616dea0e422cbd8c", - "archive:http://download2.camlcity.org/download/findlib-1.8.1.tar.gz#md5:18ca650982c15536616dea0e422cbd8c", - "archive:http://download.camlcity.org/download/findlib-1.8.1.tar.gz#md5:18ca650982c15536616dea0e422cbd8c" - ], - "opam": { - "name": "ocamlfind", - "version": "1.8.1", - "path": "esy.lock/opam/ocamlfind.1.8.1" - } - }, - "overrides": [ - { - "opamoverride": - "esy.lock/overrides/opam__s__ocamlfind_opam__c__1.8.1_opam_override" - } - ], - "dependencies": [ - "ocaml@4.6.1003@d41d8cd9", "@opam/conf-m4@opam:1@196bf219", - "@esy-ocaml/substs@0.0.1@d41d8cd9" - ], - "devDependencies": [ "ocaml@4.6.1003@d41d8cd9" ] - }, - "@opam/ocaml-secondary-compiler@opam:4.08.1-1@85df5d8f": { - "id": "@opam/ocaml-secondary-compiler@opam:4.08.1-1@85df5d8f", - "name": "@opam/ocaml-secondary-compiler", - "version": "opam:4.08.1-1", - "source": { - "type": "install", - "source": [ - "archive:https://opam.ocaml.org/cache/md5/72/723b6bfe8cf5abcbccc6911143f71055#md5:723b6bfe8cf5abcbccc6911143f71055", - "archive:https://github.com/ocaml/ocaml/archive/4.08.1.tar.gz#md5:723b6bfe8cf5abcbccc6911143f71055" - ], - "opam": { - "name": "ocaml-secondary-compiler", - "version": "4.08.1-1", - "path": "esy.lock/opam/ocaml-secondary-compiler.4.08.1-1" - } - }, - "overrides": [ - { - "opamoverride": - "esy.lock/overrides/opam__s__ocaml_secondary_compiler_opam__c__4.08.1_1_opam_override" - } - ], - "dependencies": [ - "ocaml@4.6.1003@d41d8cd9", "@esy-ocaml/substs@0.0.1@d41d8cd9" - ], - "devDependencies": [ "ocaml@4.6.1003@d41d8cd9" ] - }, - "@opam/ocaml-migrate-parsetree@opam:1.8.0@305b6173": { - "id": "@opam/ocaml-migrate-parsetree@opam:1.8.0@305b6173", - "name": "@opam/ocaml-migrate-parsetree", - "version": "opam:1.8.0", - "source": { - "type": "install", - "source": [ - "archive:https://opam.ocaml.org/cache/sha256/b1/b1c2d176ff1444041f2775786ba605be796e46dfd2acb06c96f35d2bb88b8fb5#sha256:b1c2d176ff1444041f2775786ba605be796e46dfd2acb06c96f35d2bb88b8fb5", - "archive:https://github.com/ocaml-ppx/ocaml-migrate-parsetree/releases/download/v1.8.0/ocaml-migrate-parsetree-v1.8.0.tbz#sha256:b1c2d176ff1444041f2775786ba605be796e46dfd2acb06c96f35d2bb88b8fb5" - ], - "opam": { - "name": "ocaml-migrate-parsetree", - "version": "1.8.0", - "path": "esy.lock/opam/ocaml-migrate-parsetree.1.8.0" - } - }, - "overrides": [], - "dependencies": [ - "ocaml@4.6.1003@d41d8cd9", "@opam/result@opam:1.5@6b753c82", - "@opam/ppx_derivers@opam:1.2.1@ecf0aa45", - "@opam/dune@opam:2.7.1@f5f493bc", "@esy-ocaml/substs@0.0.1@d41d8cd9" - ], - "devDependencies": [ - "ocaml@4.6.1003@d41d8cd9", "@opam/result@opam:1.5@6b753c82", - "@opam/ppx_derivers@opam:1.2.1@ecf0aa45", - "@opam/dune@opam:2.7.1@f5f493bc" - ] - }, - "@opam/merlin-extend@opam:0.6@404f814c": { - "id": "@opam/merlin-extend@opam:0.6@404f814c", - "name": "@opam/merlin-extend", - "version": "opam:0.6", - "source": { - "type": "install", - "source": [ - "archive:https://opam.ocaml.org/cache/sha256/c2/c2f236ae97feb6ba0bc90f33beb7b7343e42f9871b66de9ba07974917e256c43#sha256:c2f236ae97feb6ba0bc90f33beb7b7343e42f9871b66de9ba07974917e256c43", - "archive:https://github.com/let-def/merlin-extend/releases/download/v0.6/merlin-extend-v0.6.tbz#sha256:c2f236ae97feb6ba0bc90f33beb7b7343e42f9871b66de9ba07974917e256c43" - ], - "opam": { - "name": "merlin-extend", - "version": "0.6", - "path": "esy.lock/opam/merlin-extend.0.6" - } - }, - "overrides": [], - "dependencies": [ - "ocaml@4.6.1003@d41d8cd9", "@opam/dune@opam:2.7.1@f5f493bc", - "@opam/cppo@opam:1.6.6@f4f83858", "@esy-ocaml/substs@0.0.1@d41d8cd9" - ], - "devDependencies": [ - "ocaml@4.6.1003@d41d8cd9", "@opam/dune@opam:2.7.1@f5f493bc" - ] - }, - "@opam/menhirSdk@opam:20200624@2a05b5a7": { - "id": "@opam/menhirSdk@opam:20200624@2a05b5a7", - "name": "@opam/menhirSdk", - "version": "opam:20200624", - "source": { - "type": "install", - "source": [ - "archive:https://opam.ocaml.org/cache/md5/c3/c37ff53a4a69059e1f8223067b91bb8b#md5:c37ff53a4a69059e1f8223067b91bb8b", - "archive:https://gitlab.inria.fr/fpottier/menhir/repository/20200624/archive.tar.gz#md5:c37ff53a4a69059e1f8223067b91bb8b" - ], - "opam": { - "name": "menhirSdk", - "version": "20200624", - "path": "esy.lock/opam/menhirSdk.20200624" - } - }, - "overrides": [], - "dependencies": [ - "ocaml@4.6.1003@d41d8cd9", "@opam/dune@opam:2.7.1@f5f493bc", - "@esy-ocaml/substs@0.0.1@d41d8cd9" - ], - "devDependencies": [ - "ocaml@4.6.1003@d41d8cd9", "@opam/dune@opam:2.7.1@f5f493bc" - ] - }, - "@opam/menhirLib@opam:20200624@8bdd2b0e": { - "id": "@opam/menhirLib@opam:20200624@8bdd2b0e", - "name": "@opam/menhirLib", - "version": "opam:20200624", - "source": { - "type": "install", - "source": [ - "archive:https://opam.ocaml.org/cache/md5/c3/c37ff53a4a69059e1f8223067b91bb8b#md5:c37ff53a4a69059e1f8223067b91bb8b", - "archive:https://gitlab.inria.fr/fpottier/menhir/repository/20200624/archive.tar.gz#md5:c37ff53a4a69059e1f8223067b91bb8b" - ], - "opam": { - "name": "menhirLib", - "version": "20200624", - "path": "esy.lock/opam/menhirLib.20200624" - } - }, - "overrides": [], - "dependencies": [ - "ocaml@4.6.1003@d41d8cd9", "@opam/dune@opam:2.7.1@f5f493bc", - "@esy-ocaml/substs@0.0.1@d41d8cd9" - ], - "devDependencies": [ - "ocaml@4.6.1003@d41d8cd9", "@opam/dune@opam:2.7.1@f5f493bc" - ] - }, - "@opam/menhir@opam:20200624@8629ff13": { - "id": "@opam/menhir@opam:20200624@8629ff13", - "name": "@opam/menhir", - "version": "opam:20200624", - "source": { - "type": "install", - "source": [ - "archive:https://opam.ocaml.org/cache/md5/c3/c37ff53a4a69059e1f8223067b91bb8b#md5:c37ff53a4a69059e1f8223067b91bb8b", - "archive:https://gitlab.inria.fr/fpottier/menhir/repository/20200624/archive.tar.gz#md5:c37ff53a4a69059e1f8223067b91bb8b" - ], - "opam": { - "name": "menhir", - "version": "20200624", - "path": "esy.lock/opam/menhir.20200624" - } - }, - "overrides": [], - "dependencies": [ - "ocaml@4.6.1003@d41d8cd9", "@opam/menhirSdk@opam:20200624@2a05b5a7", - "@opam/menhirLib@opam:20200624@8bdd2b0e", - "@opam/dune@opam:2.7.1@f5f493bc", "@esy-ocaml/substs@0.0.1@d41d8cd9" - ], - "devDependencies": [ - "ocaml@4.6.1003@d41d8cd9", "@opam/menhirSdk@opam:20200624@2a05b5a7", - "@opam/menhirLib@opam:20200624@8bdd2b0e", - "@opam/dune@opam:2.7.1@f5f493bc" - ] - }, - "@opam/fix@opam:20200131@0ecd2f01": { - "id": "@opam/fix@opam:20200131@0ecd2f01", - "name": "@opam/fix", - "version": "opam:20200131", - "source": { - "type": "install", - "source": [ - "archive:https://opam.ocaml.org/cache/md5/99/991ff031666c662eaab638d2e0f4ac1d#md5:991ff031666c662eaab638d2e0f4ac1d", - "archive:https://gitlab.inria.fr/fpottier/fix/repository/20200131/archive.tar.gz#md5:991ff031666c662eaab638d2e0f4ac1d" - ], - "opam": { - "name": "fix", - "version": "20200131", - "path": "esy.lock/opam/fix.20200131" - } - }, - "overrides": [], - "dependencies": [ - "ocaml@4.6.1003@d41d8cd9", "@opam/dune@opam:2.7.1@f5f493bc", - "@esy-ocaml/substs@0.0.1@d41d8cd9" - ], - "devDependencies": [ - "ocaml@4.6.1003@d41d8cd9", "@opam/dune@opam:2.7.1@f5f493bc" - ] - }, - "@opam/dune@opam:2.7.1@f5f493bc": { - "id": "@opam/dune@opam:2.7.1@f5f493bc", - "name": "@opam/dune", - "version": "opam:2.7.1", - "source": { - "type": "install", - "source": [ - "archive:https://opam.ocaml.org/cache/sha256/c3/c3528f2f8b3a2e3fe18e166fc823e6caeee8b7c78ade6b6fe4d2fa978070925d#sha256:c3528f2f8b3a2e3fe18e166fc823e6caeee8b7c78ade6b6fe4d2fa978070925d", - "archive:https://github.com/ocaml/dune/releases/download/2.7.1/dune-2.7.1.tbz#sha256:c3528f2f8b3a2e3fe18e166fc823e6caeee8b7c78ade6b6fe4d2fa978070925d" - ], - "opam": { - "name": "dune", - "version": "2.7.1", - "path": "esy.lock/opam/dune.2.7.1" - } - }, - "overrides": [ - { - "opamoverride": - "esy.lock/overrides/opam__s__dune_opam__c__2.7.1_opam_override" - } - ], - "dependencies": [ - "ocaml@4.6.1003@d41d8cd9", - "@opam/ocamlfind-secondary@opam:1.8.1@1afa38b2", - "@opam/base-unix@opam:base@87d0b2eb", - "@opam/base-threads@opam:base@36803084", - "@esy-ocaml/substs@0.0.1@d41d8cd9" - ], - "devDependencies": [ - "ocaml@4.6.1003@d41d8cd9", - "@opam/ocamlfind-secondary@opam:1.8.1@1afa38b2", - "@opam/base-unix@opam:base@87d0b2eb", - "@opam/base-threads@opam:base@36803084" - ] - }, - "@opam/cppo@opam:1.6.6@f4f83858": { - "id": "@opam/cppo@opam:1.6.6@f4f83858", - "name": "@opam/cppo", - "version": "opam:1.6.6", - "source": { - "type": "install", - "source": [ - "archive:https://opam.ocaml.org/cache/sha256/e7/e7272996a7789175b87bb998efd079794a8db6625aae990d73f7b4484a07b8a0#sha256:e7272996a7789175b87bb998efd079794a8db6625aae990d73f7b4484a07b8a0", - "archive:https://github.com/ocaml-community/cppo/releases/download/v1.6.6/cppo-v1.6.6.tbz#sha256:e7272996a7789175b87bb998efd079794a8db6625aae990d73f7b4484a07b8a0" - ], - "opam": { - "name": "cppo", - "version": "1.6.6", - "path": "esy.lock/opam/cppo.1.6.6" - } - }, - "overrides": [], - "dependencies": [ - "ocaml@4.6.1003@d41d8cd9", "@opam/dune@opam:2.7.1@f5f493bc", - "@opam/base-unix@opam:base@87d0b2eb", - "@esy-ocaml/substs@0.0.1@d41d8cd9" - ], - "devDependencies": [ - "ocaml@4.6.1003@d41d8cd9", "@opam/dune@opam:2.7.1@f5f493bc", - "@opam/base-unix@opam:base@87d0b2eb" - ] - }, - "@opam/conf-m4@opam:1@196bf219": { - "id": "@opam/conf-m4@opam:1@196bf219", - "name": "@opam/conf-m4", - "version": "opam:1", - "source": { - "type": "install", - "source": [ "no-source:" ], - "opam": { - "name": "conf-m4", - "version": "1", - "path": "esy.lock/opam/conf-m4.1" - } - }, - "overrides": [ - { - "opamoverride": - "esy.lock/overrides/opam__s__conf_m4_opam__c__1_opam_override" - } - ], - "dependencies": [ - "esy-m4@github:esy-packages/esy-m4#c7cf0ac9221be2b1f9d90e83559ca08397a629e7@d41d8cd9", - "@esy-ocaml/substs@0.0.1@d41d8cd9" - ], - "devDependencies": [] - }, - "@opam/base-unix@opam:base@87d0b2eb": { - "id": "@opam/base-unix@opam:base@87d0b2eb", - "name": "@opam/base-unix", - "version": "opam:base", - "source": { - "type": "install", - "source": [ "no-source:" ], - "opam": { - "name": "base-unix", - "version": "base", - "path": "esy.lock/opam/base-unix.base" - } - }, - "overrides": [], - "dependencies": [ "@esy-ocaml/substs@0.0.1@d41d8cd9" ], - "devDependencies": [] - }, - "@opam/base-threads@opam:base@36803084": { - "id": "@opam/base-threads@opam:base@36803084", - "name": "@opam/base-threads", - "version": "opam:base", - "source": { - "type": "install", - "source": [ "no-source:" ], - "opam": { - "name": "base-threads", - "version": "base", - "path": "esy.lock/opam/base-threads.base" - } - }, - "overrides": [], - "dependencies": [ "@esy-ocaml/substs@0.0.1@d41d8cd9" ], - "devDependencies": [] - }, - "@opam/base-bytes@opam:base@19d0c2ff": { - "id": "@opam/base-bytes@opam:base@19d0c2ff", - "name": "@opam/base-bytes", - "version": "opam:base", - "source": { - "type": "install", - "source": [ "no-source:" ], - "opam": { - "name": "base-bytes", - "version": "base", - "path": "esy.lock/opam/base-bytes.base" - } - }, - "overrides": [], - "dependencies": [ - "ocaml@4.6.1003@d41d8cd9", "@opam/ocamlfind@opam:1.8.1@ff07b0f9", - "@esy-ocaml/substs@0.0.1@d41d8cd9" - ], - "devDependencies": [ - "ocaml@4.6.1003@d41d8cd9", "@opam/ocamlfind@opam:1.8.1@ff07b0f9" - ] - }, - "@esy-ocaml/substs@0.0.1@d41d8cd9": { - "id": "@esy-ocaml/substs@0.0.1@d41d8cd9", - "name": "@esy-ocaml/substs", - "version": "0.0.1", - "source": { - "type": "install", - "source": [ - "archive:https://registry.npmjs.org/@esy-ocaml/substs/-/substs-0.0.1.tgz#sha1:59ebdbbaedcda123fc7ed8fb2b302b7d819e9a46" - ] - }, - "overrides": [], - "dependencies": [], - "devDependencies": [] - } - } -} \ No newline at end of file diff --git a/esy.lock/opam/base-bytes.base/opam b/esy.lock/opam/base-bytes.base/opam deleted file mode 100644 index f1cae506..00000000 --- a/esy.lock/opam/base-bytes.base/opam +++ /dev/null @@ -1,9 +0,0 @@ -opam-version: "2.0" -maintainer: " " -authors: " " -homepage: " " -depends: [ - "ocaml" {>= "4.02.0"} - "ocamlfind" {>= "1.5.3"} -] -synopsis: "Bytes library distributed with the OCaml compiler" diff --git a/esy.lock/opam/base-threads.base/opam b/esy.lock/opam/base-threads.base/opam deleted file mode 100644 index 914ff50c..00000000 --- a/esy.lock/opam/base-threads.base/opam +++ /dev/null @@ -1,6 +0,0 @@ -opam-version: "2.0" -maintainer: "https://github.com/ocaml/opam-repository/issues" -description: """ -Threads library distributed with the OCaml compiler -""" - diff --git a/esy.lock/opam/base-unix.base/opam b/esy.lock/opam/base-unix.base/opam deleted file mode 100644 index b973540b..00000000 --- a/esy.lock/opam/base-unix.base/opam +++ /dev/null @@ -1,6 +0,0 @@ -opam-version: "2.0" -maintainer: "https://github.com/ocaml/opam-repository/issues" -description: """ -Unix library distributed with the OCaml compiler -""" - diff --git a/esy.lock/opam/conf-m4.1/opam b/esy.lock/opam/conf-m4.1/opam deleted file mode 100644 index c6feb2a7..00000000 --- a/esy.lock/opam/conf-m4.1/opam +++ /dev/null @@ -1,22 +0,0 @@ -opam-version: "2.0" -maintainer: "tim@gfxmonk.net" -homepage: "http://www.gnu.org/software/m4/m4.html" -bug-reports: "https://github.com/ocaml/opam-repository/issues" -authors: "GNU Project" -license: "GPL-3.0-only" -build: [["sh" "-exc" "echo | m4"]] -depexts: [ - ["m4"] {os-family = "debian"} - ["m4"] {os-distribution = "fedora"} - ["m4"] {os-distribution = "rhel"} - ["m4"] {os-distribution = "centos"} - ["m4"] {os-distribution = "alpine"} - ["m4"] {os-distribution = "nixos"} - ["m4"] {os-family = "suse"} - ["m4"] {os-distribution = "ol"} - ["m4"] {os-distribution = "arch"} -] -synopsis: "Virtual package relying on m4" -description: - "This package can only install if the m4 binary is installed on the system." -flags: conf diff --git a/esy.lock/opam/cppo.1.6.6/opam b/esy.lock/opam/cppo.1.6.6/opam deleted file mode 100644 index f683f8b4..00000000 --- a/esy.lock/opam/cppo.1.6.6/opam +++ /dev/null @@ -1,37 +0,0 @@ -opam-version: "2.0" -maintainer: "martin@mjambon.com" -authors: "Martin Jambon" -license: "BSD-3-Clause" -homepage: "http://mjambon.com/cppo.html" -doc: "https://ocaml-community.github.io/cppo/" -bug-reports: "https://github.com/ocaml-community/cppo/issues" -depends: [ - "ocaml" {>= "4.03"} - "dune" {>= "1.0"} - "base-unix" -] -build: [ - ["dune" "subst"] {pinned} - ["dune" "build" "-p" name "-j" jobs] - ["dune" "runtest" "-p" name "-j" jobs] {with-test} -] -dev-repo: "git+https://github.com/ocaml-community/cppo.git" -synopsis: "Code preprocessor like cpp for OCaml" -description: """ -Cppo is an equivalent of the C preprocessor for OCaml programs. -It allows the definition of simple macros and file inclusion. - -Cppo is: - -* more OCaml-friendly than cpp -* easy to learn without consulting a manual -* reasonably fast -* simple to install and to maintain -""" -url { - src: "https://github.com/ocaml-community/cppo/releases/download/v1.6.6/cppo-v1.6.6.tbz" - checksum: [ - "sha256=e7272996a7789175b87bb998efd079794a8db6625aae990d73f7b4484a07b8a0" - "sha512=44ecf9d225d9e45490a2feac0bde04865ca398dba6c3579e3370fcd1ea255707b8883590852af8b2df87123801062b9f3acce2455c092deabf431f9c4fb8d8eb" - ] -} diff --git a/esy.lock/opam/dune.2.7.1/opam b/esy.lock/opam/dune.2.7.1/opam deleted file mode 100644 index aaa13e67..00000000 --- a/esy.lock/opam/dune.2.7.1/opam +++ /dev/null @@ -1,56 +0,0 @@ -opam-version: "2.0" -synopsis: "Fast, portable, and opinionated build system" -description: """ - -dune is a build system that was designed to simplify the release of -Jane Street packages. It reads metadata from "dune" files following a -very simple s-expression syntax. - -dune is fast, has very low-overhead, and supports parallel builds on -all platforms. It has no system dependencies; all you need to build -dune or packages using dune is OCaml. You don't need make or bash -as long as the packages themselves don't use bash explicitly. - -dune supports multi-package development by simply dropping multiple -repositories into the same directory. - -It also supports multi-context builds, such as building against -several opam roots/switches simultaneously. This helps maintaining -packages across several versions of OCaml and gives cross-compilation -for free. -""" -maintainer: ["Jane Street Group, LLC "] -authors: ["Jane Street Group, LLC "] -license: "MIT" -homepage: "https://github.com/ocaml/dune" -doc: "https://dune.readthedocs.io/" -bug-reports: "https://github.com/ocaml/dune/issues" -conflicts: [ - "dune-configurator" {< "2.3.0"} - "odoc" {< "1.3.0"} - "dune-release" {< "1.3.0"} - "js_of_ocaml-compiler" {< "3.6.0"} - "jbuilder" {= "transition"} -] -dev-repo: "git+https://github.com/ocaml/dune.git" -build: [ - # opam 2 sets OPAM_SWITCH_PREFIX, so we don't need a hardcoded path - ["ocaml" "configure.ml" "--libdir" lib] {opam-version < "2"} - ["ocaml" "bootstrap.ml" "-j" jobs] - ["./dune.exe" "build" "-p" name "--profile" "dune-bootstrap" "-j" jobs] -] -depends: [ - # Please keep the lower bound in sync with .github/workflows/workflow.yml, - # dune-project and min_ocaml_version in bootstrap.ml - ("ocaml" {>= "4.08"} | ("ocaml" {< "4.08~~"} & "ocamlfind-secondary")) - "base-unix" - "base-threads" -] -x-commit-hash: "5472766b2448308a7160dfd0fca1ec711e124a5c" -url { - src: "https://github.com/ocaml/dune/releases/download/2.7.1/dune-2.7.1.tbz" - checksum: [ - "sha256=c3528f2f8b3a2e3fe18e166fc823e6caeee8b7c78ade6b6fe4d2fa978070925d" - "sha512=2b4b311824471dac8196181d7c7267f96b1b73f35341b72019f169cf6d42a19254e90bdfba2d3ecb138ad318e2e2431dd0ec6c38d9efe1da382ec95f5d9e959b" - ] -} diff --git a/esy.lock/opam/fix.20200131/opam b/esy.lock/opam/fix.20200131/opam deleted file mode 100644 index 4babcba8..00000000 --- a/esy.lock/opam/fix.20200131/opam +++ /dev/null @@ -1,24 +0,0 @@ -opam-version: "2.0" -maintainer: "francois.pottier@inria.fr" -authors: [ - "François Pottier " -] -homepage: "https://gitlab.inria.fr/fpottier/fix" -dev-repo: "git+https://gitlab.inria.fr/fpottier/fix.git" -bug-reports: "francois.pottier@inria.fr" -build: [ - ["dune" "build" "-p" name "-j" jobs] -] -depends: [ - "ocaml" { >= "4.03" } - "dune" { >= "1.3" } -] -synopsis: "Facilities for memoization and fixed points" -url { - src: - "https://gitlab.inria.fr/fpottier/fix/repository/20200131/archive.tar.gz" - checksum: [ - "md5=991ff031666c662eaab638d2e0f4ac1d" - "sha512=01c45a1d90b02ec0939e968b185a6a373ac6117e2287b9a26d3db9d71e9569d086cea50da60710fcab5c2ed9d3b4c72b76839c0651e436f1fb39c77dc7c04b5e" - ] -} diff --git a/esy.lock/opam/menhir.20200624/opam b/esy.lock/opam/menhir.20200624/opam deleted file mode 100644 index 37637fcf..00000000 --- a/esy.lock/opam/menhir.20200624/opam +++ /dev/null @@ -1,27 +0,0 @@ -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: [ - ["dune" "build" "-p" name "-j" jobs] -] -depends: [ - "ocaml" {>= "4.02.3"} - "dune" { >= "2.2.0"} - "menhirLib" {= version} - "menhirSdk" {= version} -] -synopsis: "An LR(1) parser generator" -url { - src: - "https://gitlab.inria.fr/fpottier/menhir/repository/20200624/archive.tar.gz" - checksum: [ - "md5=c37ff53a4a69059e1f8223067b91bb8b" - "sha512=68cd165bd65c93fc9b14820a032b6d760674b3e811d8536c2e26e10f9fc5892720564f109484f12f8d08d849c2983c2eaf350d76ab1122a5b8a3c7674ab2bd39" - ] -} diff --git a/esy.lock/opam/menhirLib.20200624/opam b/esy.lock/opam/menhirLib.20200624/opam deleted file mode 100644 index afcbe5d5..00000000 --- a/esy.lock/opam/menhirLib.20200624/opam +++ /dev/null @@ -1,28 +0,0 @@ -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: [ - ["dune" "build" "-p" name "-j" jobs] -] -depends: [ - "ocaml" { >= "4.02.3" } - "dune" { >= "2.0.0" } -] -conflicts: [ - "menhir" { != version } -] -synopsis: "Runtime support library for parsers generated by Menhir" -url { - src: - "https://gitlab.inria.fr/fpottier/menhir/repository/20200624/archive.tar.gz" - checksum: [ - "md5=c37ff53a4a69059e1f8223067b91bb8b" - "sha512=68cd165bd65c93fc9b14820a032b6d760674b3e811d8536c2e26e10f9fc5892720564f109484f12f8d08d849c2983c2eaf350d76ab1122a5b8a3c7674ab2bd39" - ] -} diff --git a/esy.lock/opam/menhirSdk.20200624/opam b/esy.lock/opam/menhirSdk.20200624/opam deleted file mode 100644 index af122163..00000000 --- a/esy.lock/opam/menhirSdk.20200624/opam +++ /dev/null @@ -1,28 +0,0 @@ -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: [ - ["dune" "build" "-p" name "-j" jobs] -] -depends: [ - "ocaml" { >= "4.02.3" } - "dune" { >= "2.0.0" } -] -conflicts: [ - "menhir" { != version } -] -synopsis: "Compile-time library for auxiliary tools related to Menhir" -url { - src: - "https://gitlab.inria.fr/fpottier/menhir/repository/20200624/archive.tar.gz" - checksum: [ - "md5=c37ff53a4a69059e1f8223067b91bb8b" - "sha512=68cd165bd65c93fc9b14820a032b6d760674b3e811d8536c2e26e10f9fc5892720564f109484f12f8d08d849c2983c2eaf350d76ab1122a5b8a3c7674ab2bd39" - ] -} diff --git a/esy.lock/opam/merlin-extend.0.6/opam b/esy.lock/opam/merlin-extend.0.6/opam deleted file mode 100644 index 39b33757..00000000 --- a/esy.lock/opam/merlin-extend.0.6/opam +++ /dev/null @@ -1,30 +0,0 @@ -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: [ - ["dune" "subst"] {pinned} - ["dune" "build" "-p" name "-j" jobs] -] -depends: [ - "dune" {>= "1.0"} - "cppo" {build} - "ocaml" {>= "4.02.3"} -] -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.""" -doc: "https://let-def.github.io/merlin-extend" -x-commit-hash: "640620568a5f5c7798239ecf7c707c813e3df3cf" -url { - src: - "https://github.com/let-def/merlin-extend/releases/download/v0.6/merlin-extend-v0.6.tbz" - checksum: [ - "sha256=c2f236ae97feb6ba0bc90f33beb7b7343e42f9871b66de9ba07974917e256c43" - "sha512=4c64a490e2ece04fc89aef679c1d9202175df4fe045b5fdc7a37cd7cebe861226fddd9648c1bf4f06175ecfcd2ed7686c96bd6a8cae003a5096f6134c240f857" - ] -} diff --git a/esy.lock/opam/ocaml-migrate-parsetree.1.8.0/opam b/esy.lock/opam/ocaml-migrate-parsetree.1.8.0/opam deleted file mode 100644 index fbf553ae..00000000 --- a/esy.lock/opam/ocaml-migrate-parsetree.1.8.0/opam +++ /dev/null @@ -1,38 +0,0 @@ -opam-version: "2.0" -maintainer: "frederic.bour@lakaban.net" -authors: [ - "Frédéric Bour " - "Jérémie Dimino " -] -license: "LGPL-2.1 with OCaml linking exception" -homepage: "https://github.com/ocaml-ppx/ocaml-migrate-parsetree" -bug-reports: "https://github.com/ocaml-ppx/ocaml-migrate-parsetree/issues" -dev-repo: "git+https://github.com/ocaml-ppx/ocaml-migrate-parsetree.git" -doc: "https://ocaml-ppx.github.io/ocaml-migrate-parsetree/" -tags: [ "syntax" "org:ocamllabs" ] -build: [ - ["dune" "build" "-p" name "-j" jobs] -] -depends: [ - "result" - "ppx_derivers" - "dune" {>= "1.9.0"} - "ocaml" {>= "4.02.3"} -] -synopsis: "Convert OCaml parsetrees between different versions" -description: """ -Convert OCaml parsetrees between different versions - -This library converts parsetrees, outcometree and ast mappers between -different OCaml versions. High-level functions help making PPX -rewriters independent of a compiler version. -""" -x-commit-hash: "1d72648812bb235d1576f483cacdf546e25c03d8" -url { - src: - "https://github.com/ocaml-ppx/ocaml-migrate-parsetree/releases/download/v1.8.0/ocaml-migrate-parsetree-v1.8.0.tbz" - checksum: [ - "sha256=b1c2d176ff1444041f2775786ba605be796e46dfd2acb06c96f35d2bb88b8fb5" - "sha512=c14ffacbba9fda34243b3e8310ce49414415b530bbd982eaa6c1891517c5a9a6a35887afa7d6f15f7f94e225a7f15cc25417fd3337e685d4a7d6ee160e50e66e" - ] -} diff --git a/esy.lock/opam/ocaml-secondary-compiler.4.08.1-1/files/0001-Don-t-build-manpages-for-stdlib-docs.patch b/esy.lock/opam/ocaml-secondary-compiler.4.08.1-1/files/0001-Don-t-build-manpages-for-stdlib-docs.patch deleted file mode 100644 index cda19dd2..00000000 --- a/esy.lock/opam/ocaml-secondary-compiler.4.08.1-1/files/0001-Don-t-build-manpages-for-stdlib-docs.patch +++ /dev/null @@ -1,24 +0,0 @@ -From 0cf3c6ad7ce2a2b2806faceccfb0a9321da5e22a Mon Sep 17 00:00:00 2001 -From: David Allsopp -Date: Fri, 26 Jul 2019 12:12:19 +0100 -Subject: [PATCH] Don't build manpages for stdlib docs ---- - ocamldoc/Makefile | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -diff --git a/ocamldoc/Makefile b/ocamldoc/Makefile -index b109815071..e31e441f61 100644 ---- a/ocamldoc/Makefile -+++ b/ocamldoc/Makefile -@@ -170,7 +170,7 @@ LIBCMIFILES = $(LIBCMOFILES:.cmo=.cmi) - - - .PHONY: all --all: lib exe generators manpages -+all: lib exe generators - - manpages: generators - --- -2.20.1 - diff --git a/esy.lock/opam/ocaml-secondary-compiler.4.08.1-1/files/0001-Fix-failure-to-install-tools-links.patch b/esy.lock/opam/ocaml-secondary-compiler.4.08.1-1/files/0001-Fix-failure-to-install-tools-links.patch deleted file mode 100644 index 41f5f770..00000000 --- a/esy.lock/opam/ocaml-secondary-compiler.4.08.1-1/files/0001-Fix-failure-to-install-tools-links.patch +++ /dev/null @@ -1,26 +0,0 @@ -From 705739fa54260b7a0e6cbba0b5a99e52c79f9c09 Mon Sep 17 00:00:00 2001 -From: David Allsopp -Date: Tue, 6 Aug 2019 09:23:06 +0100 -Subject: [PATCH] Fix failure to install tools links - -In --disable-installing-bytecode-programs mode, the .opt version of the -tools is installed, but the symlink for the tool itself is not created. ---- - tools/Makefile | 1 + - 1 file changed, 1 insertion(+) - -diff --git a/tools/Makefile b/tools/Makefile -index 530dd37f34..1b3014a3ab 100644 ---- a/tools/Makefile -+++ b/tools/Makefile -@@ -197,6 +197,7 @@ else - do \ - if test -f "$$i".opt; then \ - $(INSTALL_PROG) "$$i.opt" "$(INSTALL_BINDIR)/$$i.opt$(EXE)"; \ -+ (cd "$(INSTALL_BINDIR)/" && $(LN) "$$i.opt$(EXE)" "$$i$(EXE)"); \ - fi; \ - done - endif --- -2.20.1 - diff --git a/esy.lock/opam/ocaml-secondary-compiler.4.08.1-1/files/fix-gcc10.patch b/esy.lock/opam/ocaml-secondary-compiler.4.08.1-1/files/fix-gcc10.patch deleted file mode 100644 index e37b5e88..00000000 --- a/esy.lock/opam/ocaml-secondary-compiler.4.08.1-1/files/fix-gcc10.patch +++ /dev/null @@ -1,34 +0,0 @@ -commit 3f10a16153308f967149917585d2bc0b9c06492c -Author: Anil Madhavapeddy -Date: Sun Jun 21 18:40:27 2020 +0100 - - Add `-fcommon` unconditionally to CFLAGS to fix gcc10 build - - Signed-off-by: Anil Madhavapeddy - -diff --git a/configure b/configure -index 9a78a4554..0c54b560b 100755 ---- a/configure -+++ b/configure -@@ -12424,7 +12424,7 @@ $as_echo "$as_me: WARNING: Consider using GCC version 4.2 or above." >&2;}; - -fno-builtin-memcmp"; - internal_cflags="$gcc_warnings" ;; #( - gcc-*) : -- common_cflags="-O2 -fno-strict-aliasing -fwrapv"; -+ common_cflags="-O2 -fno-strict-aliasing -fwrapv -fcommon"; - internal_cflags="$gcc_warnings" ;; #( - msvc-*) : - common_cflags="-nologo -O2 -Gy- -MD" -diff --git a/configure.ac b/configure.ac -index f5d8a2687..775e0e2db 100644 ---- a/configure.ac -+++ b/configure.ac -@@ -540,7 +540,7 @@ AS_CASE([$host], - -fno-builtin-memcmp"; - internal_cflags="$gcc_warnings"], - [gcc-*], -- [common_cflags="-O2 -fno-strict-aliasing -fwrapv"; -+ [common_cflags="-O2 -fno-strict-aliasing -fwrapv -fcommon"; - internal_cflags="$gcc_warnings"], - [msvc-*], - [common_cflags="-nologo -O2 -Gy- -MD" diff --git a/esy.lock/opam/ocaml-secondary-compiler.4.08.1-1/opam b/esy.lock/opam/ocaml-secondary-compiler.4.08.1-1/opam deleted file mode 100644 index 905f9b3d..00000000 --- a/esy.lock/opam/ocaml-secondary-compiler.4.08.1-1/opam +++ /dev/null @@ -1,51 +0,0 @@ -opam-version: "2.0" -synopsis: "OCaml 4.08.1 Secondary Switch Compiler" -maintainer: "platform@lists.ocaml.org" -authors: "Xavier Leroy and many contributors" -homepage: "https://ocaml.org" -bug-reports: "https://github.com/ocaml/ocaml/issues" -dev-repo: "git://github.com/ocaml/ocaml" -depends: "ocaml" {< "4.08.0" | >= "4.09~"} -build: [ - [ - "./configure" - "--prefix=%{_:share}%" - "--libdir=%{_:share}%/lib" - "--disable-debugger" - "--disable-installing-bytecode-programs" - "--disable-debug-runtime" - "--disable-instrumented-runtime" - "--disable-graph-lib" - "CC=cc" {os = "openbsd" | os = "freebsd" | os = "macos"} - "ASPP=cc -c" {os = "openbsd" | os = "freebsd" | os = "macos"} - ] - [make "-j%{jobs}%" {os != "cygwin"} "world.opt"] -] -install: [make "install"] -url { - src: "https://github.com/ocaml/ocaml/archive/4.08.1.tar.gz" - checksum: "md5=723b6bfe8cf5abcbccc6911143f71055" -} -extra-files: [ - ["0001-Don-t-build-manpages-for-stdlib-docs.patch" "md5=6caa580fe6031c109d2dc96b19bd40cd"] - ["0001-Fix-failure-to-install-tools-links.patch" "md5=e973762c0b3d62b0b25a26468086fae3"] - ["fix-gcc10.patch" "md5=17ecd696a8f5647a4c543280599f6974"] -] -patches: [ - "0001-Don-t-build-manpages-for-stdlib-docs.patch" - "0001-Fix-failure-to-install-tools-links.patch" - "fix-gcc10.patch" -] - -post-messages: [ - "A failure in the middle of the build may be caused by build parallelism - (enabled by default). - Please file a bug report at https://github.com/ocaml/ocaml/issues" - {failure & jobs > 1 & os != "cygwin"} - "You can try installing again including --jobs=1 - to force a sequential build instead." - {failure & jobs > 1 & os != "cygwin" & opam-version >= "2.0.5"} -] -description: "Installs an additional compiler to the opam switch in -%{_:share}%/ocaml-secondary-compiler which can be accessed using -`ocamlfind -toolchain secondary`." diff --git a/esy.lock/opam/ocamlfind-secondary.1.8.1/files/META.in b/esy.lock/opam/ocamlfind-secondary.1.8.1/files/META.in deleted file mode 100644 index 12e3ee66..00000000 --- a/esy.lock/opam/ocamlfind-secondary.1.8.1/files/META.in +++ /dev/null @@ -1,3 +0,0 @@ -description = "OCaml Secondary Compiler" -version = "%{ocaml-secondary-compiler:version}%" -directory = "%{ocaml-secondary-compiler:share}%/bin" diff --git a/esy.lock/opam/ocamlfind-secondary.1.8.1/files/ocaml-secondary-compiler.conf.in b/esy.lock/opam/ocamlfind-secondary.1.8.1/files/ocaml-secondary-compiler.conf.in deleted file mode 100644 index d13023c9..00000000 --- a/esy.lock/opam/ocamlfind-secondary.1.8.1/files/ocaml-secondary-compiler.conf.in +++ /dev/null @@ -1,10 +0,0 @@ -path(secondary) = "%{ocaml-secondary-compiler:share}%/lib" -destdir(secondary) = "%{ocaml-secondary-compiler:share}%/lib" -stdlib(secondary) = "%{ocaml-secondary-compiler:share}%/lib" -ocamlc(secondary) = "%{ocaml-secondary-compiler:share}%/bin/ocamlc" -ocamlopt(secondary) = "%{ocaml-secondary-compiler:share}%/bin/ocamlopt" -ocamlcp(secondary) = "%{ocaml-secondary-compiler:share}%/bin/ocamlcp" -ocamlmklib(secondary) = "%{ocaml-secondary-compiler:share}%/bin/ocamlmklib" -ocamlmktop(secondary) = "%{ocaml-secondary-compiler:share}%/bin/ocamlmktop" -ocamldoc(secondary) = "%{ocaml-secondary-compiler:share}%/bin/ocamldoc" -ocamldep(secondary) = "%{ocaml-secondary-compiler:share}%/bin/ocamldep" diff --git a/esy.lock/opam/ocamlfind-secondary.1.8.1/opam b/esy.lock/opam/ocamlfind-secondary.1.8.1/opam deleted file mode 100644 index acdb5764..00000000 --- a/esy.lock/opam/ocamlfind-secondary.1.8.1/opam +++ /dev/null @@ -1,32 +0,0 @@ -opam-version: "2.0" -maintainer: "David Allsopp " -homepage: "https://github.com/ocaml/opam-repository" -bug-reports: "https://github.com/ocaml/opam-repository/issues" -build: ["./configure" "-sitelib" "%{ocaml-secondary-compiler:share}%/lib" "-no-camlp4"] -install: [ - [make "install-meta"] - ["mkdir" "-p" "%{lib}%/findlib.conf.d/"] - ["cp" "ocaml-secondary-compiler.conf" "%{lib}%/findlib.conf.d/"] - ["mkdir" "-p" "%{ocaml-secondary-compiler:share}%/lib/ocaml"] - ["cp" "META" "%{ocaml-secondary-compiler:share}%/lib/ocaml"] -] -depends: [ - "ocaml-secondary-compiler" - "ocamlfind" {= "1.8.1"} -] -synopsis: "ocamlfind support for ocaml-secondary-compiler" -description: """ -Exposes the compiler built by the ocaml-secondary-compielr package via --toolchain secondary. A virtual package called ocaml is also installed to -locate the binary directory via `ocamlfind -toolchain secondary query ocaml`.""" -authors: ["Gerd Stolpmann " "David Allsopp "] -substs: ["META" "ocaml-secondary-compiler.conf"] -extra-files: [ - ["META.in" "md5=8c6ea8a0158a33ed87e6c38a7d686d49"] - ["ocaml-secondary-compiler.conf.in" "md5=367a7bb68e2e1e65a31356421ddc809c"] -] -url { - src: "http://download.camlcity.org/download/findlib-1.8.1.tar.gz" - checksum: "md5=18ca650982c15536616dea0e422cbd8c" - mirrors: "http://download2.camlcity.org/download/findlib-1.8.1.tar.gz" -} diff --git a/esy.lock/opam/ocamlfind.1.8.1/files/ocaml-stub b/esy.lock/opam/ocamlfind.1.8.1/files/ocaml-stub deleted file mode 100644 index e5ad9907..00000000 --- a/esy.lock/opam/ocamlfind.1.8.1/files/ocaml-stub +++ /dev/null @@ -1,4 +0,0 @@ -#!/bin/sh - -BINDIR=$(dirname "$(command -v ocamlc)") -"$BINDIR/ocaml" -I "$OCAML_TOPLEVEL_PATH" "$@" diff --git a/esy.lock/opam/ocamlfind.1.8.1/files/ocamlfind.install b/esy.lock/opam/ocamlfind.1.8.1/files/ocamlfind.install deleted file mode 100644 index 295c6254..00000000 --- a/esy.lock/opam/ocamlfind.1.8.1/files/ocamlfind.install +++ /dev/null @@ -1,6 +0,0 @@ -bin: [ - "src/findlib/ocamlfind" {"ocamlfind"} - "?src/findlib/ocamlfind_opt" {"ocamlfind"} - "?tools/safe_camlp4" -] -toplevel: ["src/findlib/topfind"] diff --git a/esy.lock/opam/ocamlfind.1.8.1/opam b/esy.lock/opam/ocamlfind.1.8.1/opam deleted file mode 100644 index d757d669..00000000 --- a/esy.lock/opam/ocamlfind.1.8.1/opam +++ /dev/null @@ -1,50 +0,0 @@ -opam-version: "2.0" -synopsis: "A library manager for OCaml" -maintainer: "Thomas Gazagnaire " -authors: "Gerd Stolpmann " -homepage: "http://projects.camlcity.org/projects/findlib.html" -bug-reports: "https://gitlab.camlcity.org/gerd/lib-findlib/issues" -dev-repo: "git+https://gitlab.camlcity.org/gerd/lib-findlib.git" -description: """ -Findlib is a library manager for OCaml. It provides a convention how -to store libraries, and a file format ("META") to describe the -properties of libraries. There is also a tool (ocamlfind) for -interpreting the META files, so that it is very easy to use libraries -in programs and scripts. -""" -build: [ - [ - "./configure" - "-bindir" - bin - "-sitelib" - lib - "-mandir" - man - "-config" - "%{lib}%/findlib.conf" - "-no-custom" - "-no-camlp4" {!ocaml:preinstalled & ocaml:version >= "4.02.0"} - "-no-topfind" {ocaml:preinstalled} - ] - [make "all"] - [make "opt"] {ocaml:native} -] -install: [ - [make "install"] - ["install" "-m" "0755" "ocaml-stub" "%{bin}%/ocaml"] {ocaml:preinstalled} -] -depends: [ - "ocaml" {>= "4.00.0"} - "conf-m4" {build} -] -extra-files: [ - ["ocamlfind.install" "md5=06f2c282ab52d93aa6adeeadd82a2543"] - ["ocaml-stub" "md5=181f259c9e0bad9ef523e7d4abfdf87a"] -] -url { - src: "http://download.camlcity.org/download/findlib-1.8.1.tar.gz" - checksum: "md5=18ca650982c15536616dea0e422cbd8c" - mirrors: "http://download2.camlcity.org/download/findlib-1.8.1.tar.gz" -} -depopts: ["graphics"] diff --git a/esy.lock/opam/ppx_derivers.1.2.1/opam b/esy.lock/opam/ppx_derivers.1.2.1/opam deleted file mode 100644 index 3d10814e..00000000 --- a/esy.lock/opam/ppx_derivers.1.2.1/opam +++ /dev/null @@ -1,23 +0,0 @@ -opam-version: "2.0" -maintainer: "jeremie@dimino.org" -authors: ["Jérémie Dimino"] -license: "BSD-3-Clause" -homepage: "https://github.com/ocaml-ppx/ppx_derivers" -bug-reports: "https://github.com/ocaml-ppx/ppx_derivers/issues" -dev-repo: "git://github.com/ocaml-ppx/ppx_derivers.git" -build: [ - ["dune" "build" "-p" name "-j" jobs] -] -depends: [ - "ocaml" - "dune" -] -synopsis: "Shared [@@deriving] plugin registry" -description: """ -Ppx_derivers is a tiny package whose sole purpose is to allow -ppx_deriving and ppx_type_conv to inter-operate gracefully when linked -as part of the same ocaml-migrate-parsetree driver.""" -url { - src: "https://github.com/ocaml-ppx/ppx_derivers/archive/1.2.1.tar.gz" - checksum: "md5=5dc2bf130c1db3c731fe0fffc5648b41" -} diff --git a/esy.lock/opam/ppx_tools_versioned.5.4.0/opam b/esy.lock/opam/ppx_tools_versioned.5.4.0/opam deleted file mode 100644 index 9305dd19..00000000 --- a/esy.lock/opam/ppx_tools_versioned.5.4.0/opam +++ /dev/null @@ -1,27 +0,0 @@ -opam-version: "2.0" -version: "5.4.0" -maintainer: "frederic.bour@lakaban.net" -authors: [ - "Frédéric Bour " - "Alain Frisch " -] -license: "MIT" -homepage: "https://github.com/ocaml-ppx/ppx_tools_versioned" -bug-reports: "https://github.com/ocaml-ppx/ppx_tools_versioned/issues" -dev-repo: "git://github.com/ocaml-ppx/ppx_tools_versioned.git" -tags: [ "syntax" ] -build: [ - ["dune" "subst"] {pinned} - ["dune" "build" "-p" name "-j" jobs] - ["dune" "runtest" "-p" name "-j" jobs] {with-test} -] -depends: [ - "ocaml" {>= "4.02.0"} - "dune" {>= "1.0"} - "ocaml-migrate-parsetree" {>= "1.7.0" & < "2.0.0"} -] -synopsis: "A variant of ppx_tools based on ocaml-migrate-parsetree" -url { - src: "https://github.com/ocaml-ppx/ppx_tools_versioned/archive/5.4.0.tar.gz" - checksum: "md5=3e809a11cae99f57c051d3d0100311f6" -} diff --git a/esy.lock/opam/re.1.9.0/opam b/esy.lock/opam/re.1.9.0/opam deleted file mode 100644 index f7987544..00000000 --- a/esy.lock/opam/re.1.9.0/opam +++ /dev/null @@ -1,42 +0,0 @@ -opam-version: "2.0" - -maintainer: "rudi.grinberg@gmail.com" -authors: [ - "Jerome Vouillon" - "Thomas Gazagnaire" - "Anil Madhavapeddy" - "Rudi Grinberg" - "Gabriel Radanne" -] -license: "LGPL-2.0-only with OCaml-LGPL-linking-exception" -homepage: "https://github.com/ocaml/ocaml-re" -bug-reports: "https://github.com/ocaml/ocaml-re/issues" -dev-repo: "git+https://github.com/ocaml/ocaml-re.git" - -build: [ - ["dune" "subst"] {pinned} - ["dune" "build" "-p" name "-j" jobs] - ["dune" "runtest" "-p" name "-j" jobs] {with-test} -] - -depends: [ - "ocaml" {>= "4.02"} - "dune" - "ounit" {with-test} - "seq" -] - -synopsis: "RE is a regular expression library for OCaml" -description: """ -Pure OCaml regular expressions with: -* Perl-style regular expressions (module Re.Perl) -* Posix extended regular expressions (module Re.Posix) -* Emacs-style regular expressions (module Re.Emacs) -* Shell-style file globbing (module Re.Glob) -* Compatibility layer for OCaml's built-in Str module (module Re.Str) -""" -url { - src: - "https://github.com/ocaml/ocaml-re/releases/download/1.9.0/re-1.9.0.tbz" - checksum: "md5=bddaed4f386a22cace7850c9c7dac296" -} diff --git a/esy.lock/opam/reason.3.6.0/opam b/esy.lock/opam/reason.3.6.0/opam deleted file mode 100644 index 3e911972..00000000 --- a/esy.lock/opam/reason.3.6.0/opam +++ /dev/null @@ -1,32 +0,0 @@ -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.03" & < "4.11"} - "dune" {>= "1.4"} - "ocamlfind" {build} - "menhir" {>= "20170418"} - "merlin-extend" {>= "0.4"} - "fix" - "result" - "ocaml-migrate-parsetree" {< "2.0.0"} -] -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.6.0.tgz" - checksum: "md5=d4d729804bc509bca0ac6223e06f7314" -} diff --git a/esy.lock/opam/result.1.5/opam b/esy.lock/opam/result.1.5/opam deleted file mode 100644 index 671af042..00000000 --- a/esy.lock/opam/result.1.5/opam +++ /dev/null @@ -1,22 +0,0 @@ -opam-version: "2.0" -maintainer: "opensource@janestreet.com" -authors: ["Jane Street Group, LLC "] -homepage: "https://github.com/janestreet/result" -dev-repo: "git+https://github.com/janestreet/result.git" -bug-reports: "https://github.com/janestreet/result/issues" -license: "BSD-3-Clause" -build: [["dune" "build" "-p" name "-j" jobs]] -depends: [ - "ocaml" - "dune" {>= "1.0"} -] -synopsis: "Compatibility Result module" -description: """ -Projects that want to use the new result type defined in OCaml >= 4.03 -while staying compatible with older version of OCaml should use the -Result module defined in this library.""" -url { - src: - "https://github.com/janestreet/result/releases/download/1.5/result-1.5.tbz" - checksum: "md5=1b82dec78849680b49ae9a8a365b831b" -} diff --git a/esy.lock/opam/seq.0.2.2/opam b/esy.lock/opam/seq.0.2.2/opam deleted file mode 100644 index 5ed51654..00000000 --- a/esy.lock/opam/seq.0.2.2/opam +++ /dev/null @@ -1,24 +0,0 @@ -opam-version: "2.0" -synopsis: - "Compatibility package for OCaml's standard iterator type starting from 4.07" -maintainer: "simon.cruanes.2007@m4x.org" -license: "LGPL2.1" -build: [ - ["dune" "build" "-p" name "-j" jobs] -] -depends: [ - "dune" {>= "1.1.0"} - "ocaml" -] -tags: [ "iterator" "seq" "pure" "list" "compatibility" "cascade" ] -homepage: "https://github.com/c-cube/seq/" -bug-reports: "https://github.com/c-cube/seq/issues" -dev-repo: "git+https://github.com/c-cube/seq.git" -authors: "Simon Cruanes" -url { - src: "https://github.com/c-cube/seq/archive/0.2.2.tar.gz" - checksum: [ - "md5=9033e02283aa3bde9f97f24e632902e3" - "sha512=cab0eb4cb6d9788b7cbd7acbefefc15689d706c97ff7f75dd97faf3c21e466af4d0ff110541a24729db587e7172b1a30a3c2967e17ec2e49cbd923360052c07c" - ] -} diff --git a/esy.lock/opam/stringext.1.6.0/opam b/esy.lock/opam/stringext.1.6.0/opam deleted file mode 100644 index 5242fe31..00000000 --- a/esy.lock/opam/stringext.1.6.0/opam +++ /dev/null @@ -1,32 +0,0 @@ -opam-version: "2.0" -maintainer: "rudi.grinberg@gmail.com" -authors: "Rudi Grinberg" -license: "MIT" -homepage: "https://github.com/rgrinberg/stringext" -bug-reports: "https://github.com/rgrinberg/stringext/issues" -depends: [ - "ocaml" {>= "4.02.3"} - "dune" {>= "1.0"} - "ounit" {with-test} - "qtest" {with-test & >= "2.2"} - "base-bytes" -] -build: [ - ["dune" "subst"] {pinned} - ["dune" "build" "-p" name "-j" jobs] - ["dune" "runtest" "-p" name "-j" jobs] {with-test} -] -dev-repo: "git+https://github.com/rgrinberg/stringext.git" -synopsis: "Extra string functions for OCaml" -description: """ -Extra string functions for OCaml. Mainly splitting. All functions are in the -Stringext module. -""" -url { - src: - "https://github.com/rgrinberg/stringext/releases/download/1.6.0/stringext-1.6.0.tbz" - checksum: [ - "sha256=db41f5d52e9eab17615f110b899dfeb27dd7e7f89cd35ae43827c5119db206ea" - "sha512=d8ebe40f42b598a9bd99f1ef4b00ba93458385a4accd121af66a0bf3b3f8d7135f576740adf1a43081dd409977c2219fd4bdbb5b3d1308890d301d553ed49900" - ] -} diff --git a/esy.lock/opam/uri.3.1.0/opam b/esy.lock/opam/uri.3.1.0/opam deleted file mode 100644 index 45406b00..00000000 --- a/esy.lock/opam/uri.3.1.0/opam +++ /dev/null @@ -1,35 +0,0 @@ -opam-version: "2.0" -maintainer: "anil@recoil.org" -authors: ["Anil Madhavapeddy" "David Sheets" "Rudi Grinberg"] -license: "ISC" -tags: ["url" "uri" "org:mirage" "org:xapi-project"] -homepage: "https://github.com/mirage/ocaml-uri" -bug-reports: "https://github.com/mirage/ocaml-uri/issues" -dev-repo: "git+https://github.com/mirage/ocaml-uri.git" -doc: "https://mirage.github.io/ocaml-uri/" -synopsis: "An RFC3986 URI/URL parsing library" -description: """ -This is an OCaml implementation of the [RFC3986](http://tools.ietf.org/html/rfc3986) specification -for parsing URI or URLs. -""" -depends: [ - "ocaml" {>= "4.04.0"} - "dune" {>= "1.2.0"} - "ounit" {with-test & >= "1.0.2"} - "ppx_sexp_conv" {with-test & >= "v0.9.0" & < "v0.15"} - "re" {>= "1.9.0"} - "stringext" {>= "1.4.0"} -] -build: [ - ["dune" "subst"] {pinned} - ["dune" "build" "-p" name "-j" jobs] - ["dune" "runtest" "-p" name "-j" jobs] {with-test} -] -url { - src: - "https://github.com/mirage/ocaml-uri/releases/download/v3.1.0/uri-v3.1.0.tbz" - checksum: [ - "sha256=c452823fd870cf7cffe51aef3e9ca646a382dc6f87282f2b16bfe30a7515ac43" - "sha512=c015576bb077fd243022bcd8804e628d23a253dcd8bbdda8dc2a57e86cfeb9fd629087ec7d7e23dc71dd7cd137450ca2c5ecf8fb7d184ec9d1d4e41f6f83ee38" - ] -} diff --git a/esy.lock/overrides/opam__s__conf_m4_opam__c__1_opam_override/package.json b/esy.lock/overrides/opam__s__conf_m4_opam__c__1_opam_override/package.json deleted file mode 100644 index ca6a373d..00000000 --- a/esy.lock/overrides/opam__s__conf_m4_opam__c__1_opam_override/package.json +++ /dev/null @@ -1,6 +0,0 @@ -{ - "build": "true", - "dependencies": { - "esy-m4": "esy-packages/esy-m4#c7cf0ac9221be2b1f9d90e83559ca08397a629e7" - } -} diff --git a/esy.lock/overrides/opam__s__dune_opam__c__2.7.1_opam_override/files/build.sh b/esy.lock/overrides/opam__s__dune_opam__c__2.7.1_opam_override/files/build.sh deleted file mode 100644 index b2a94f75..00000000 --- a/esy.lock/overrides/opam__s__dune_opam__c__2.7.1_opam_override/files/build.sh +++ /dev/null @@ -1,10 +0,0 @@ -#!/bin/bash - -SECONDARY_CONF="$OCAMLFIND_SECONDARY_PREFIX/lib/findlib.conf.d/ocaml-secondary-compiler.conf" - -if test -f $SECONDARY_CONF; then - export OCAMLFIND_CONF=$SECONDARY_CONF; -fi - -env -u OCAMLLIB ocaml bootstrap.ml -./dune.exe build -p dune --profile dune-bootstrap diff --git a/esy.lock/overrides/opam__s__dune_opam__c__2.7.1_opam_override/package.json b/esy.lock/overrides/opam__s__dune_opam__c__2.7.1_opam_override/package.json deleted file mode 100644 index c7d77ab6..00000000 --- a/esy.lock/overrides/opam__s__dune_opam__c__2.7.1_opam_override/package.json +++ /dev/null @@ -1,8 +0,0 @@ -{ - "buildsInSource": true, - "build": "bash build.sh", - "install": "esy-installer dune.install", - "buildEnv": { - "OCAMLPATH": "#{ $OCAMLFIND_SECONDARY_PREFIX / 'lib' : ocaml.lib : $OCAML_SECONDARY_COMPILER_PREFIX / 'share' / 'ocaml-secondary-compiler' / 'lib' }" - } -} diff --git a/esy.lock/overrides/opam__s__ocaml_secondary_compiler_opam__c__4.08.1_1_opam_override/files/clone-flexdll b/esy.lock/overrides/opam__s__ocaml_secondary_compiler_opam__c__4.08.1_1_opam_override/files/clone-flexdll deleted file mode 100755 index 26301ddd..00000000 --- a/esy.lock/overrides/opam__s__ocaml_secondary_compiler_opam__c__4.08.1_1_opam_override/files/clone-flexdll +++ /dev/null @@ -1,16 +0,0 @@ -#! /bin/sh - -# clone-flexdll -# -# Brings in flexdll, if necessary - -if [ -d "flexdll" ] && [ -f "flexdll/flexdll.c" ]; then - echo "[Flexdll] Already present, no need to clone." -else - echo "[Flexdll] Cloning..." - git clone https://github.com/esy-ocaml/flexdll.git - cd flexdll - git checkout f84baaeae463f96f9582883a9cfb7dd1096757ff - cd .. - echo "[Flexdll] Clone successful!" -fi \ No newline at end of file diff --git a/esy.lock/overrides/opam__s__ocaml_secondary_compiler_opam__c__4.08.1_1_opam_override/files/configure-windows b/esy.lock/overrides/opam__s__ocaml_secondary_compiler_opam__c__4.08.1_1_opam_override/files/configure-windows deleted file mode 100755 index 4040b49e..00000000 --- a/esy.lock/overrides/opam__s__ocaml_secondary_compiler_opam__c__4.08.1_1_opam_override/files/configure-windows +++ /dev/null @@ -1,22 +0,0 @@ -#! /bin/sh - -# configure-windows -# -# Creates a native Windows MingW build, based on: -# https://github.com/ocaml/ocaml/blob/trunk/README.win32.adoc - - -export prefix=C:/ocamlmgw64 -while : ; do - case "$1" in - "") break;; - -prefix|--prefix) - prefix=$2; shift;; - esac - shift -done - -echo "[configure-windows] Setting up flexdll" -./clone-flexdll -./configure --build=x86_64-unknown-cygwin --host=x86_64-w64-mingw32 --prefix=$prefix -make flexdll diff --git a/esy.lock/overrides/opam__s__ocaml_secondary_compiler_opam__c__4.08.1_1_opam_override/files/esy-build b/esy.lock/overrides/opam__s__ocaml_secondary_compiler_opam__c__4.08.1_1_opam_override/files/esy-build deleted file mode 100755 index b95356a5..00000000 --- a/esy.lock/overrides/opam__s__ocaml_secondary_compiler_opam__c__4.08.1_1_opam_override/files/esy-build +++ /dev/null @@ -1,24 +0,0 @@ -#! /usr/bin/env bash - -# esy-build -# -# Wrapper to execute appropriate build strategy, based on platform - -set -u -set -e -set -o pipefail - -case "$(uname -s)" in - CYGWIN*|MINGW32*|MSYS*) - echo "[esy-build] Detected windows environment..." - make -j4 world.opt - make flexlink.opt - ;; - *) - echo "[esy-build] Detected OSX / Linux environment" - make -j4 world.opt - ;; -esac - -# Common build steps -make install \ No newline at end of file diff --git a/esy.lock/overrides/opam__s__ocaml_secondary_compiler_opam__c__4.08.1_1_opam_override/files/esy-configure b/esy.lock/overrides/opam__s__ocaml_secondary_compiler_opam__c__4.08.1_1_opam_override/files/esy-configure deleted file mode 100755 index fd196c51..00000000 --- a/esy.lock/overrides/opam__s__ocaml_secondary_compiler_opam__c__4.08.1_1_opam_override/files/esy-configure +++ /dev/null @@ -1,29 +0,0 @@ -#! /usr/bin/env bash - -# esy-configure -# -# Wrapper to delegate to configuration to the -# appropriate `configure` strategy based on the active platform. -# -# Today, OCaml has separate build strategies: -# - Linux, OSX, Cygwin (gcc) - https://github.com/ocaml/ocaml/blob/trunk/INSTALL.adoc -# - Windows, Cygin (mingw) - https://github.com/ocaml/ocaml/blob/trunk/README.win32.adoc -# -# We want `esy` to work cross-platform, so this is a shim script that will delegate to the -# appropriate script depending on the platform. We assume that if the platform is `CYGWIN` -# that the `mingw` (native executable) strategy is desired. - -set -u -set -e -set -o pipefail - -case "$(uname -s)" in - CYGWIN*|MINGW32*|MSYS*) - echo "[esy-configure] Detected windows environment..." - ./configure-windows "$@" - ;; - *) - echo "[esy-configure] Detected OSX / Linux environment" - ./configure "$@" - ;; -esac \ No newline at end of file diff --git a/esy.lock/overrides/opam__s__ocaml_secondary_compiler_opam__c__4.08.1_1_opam_override/package.json b/esy.lock/overrides/opam__s__ocaml_secondary_compiler_opam__c__4.08.1_1_opam_override/package.json deleted file mode 100644 index 948455ca..00000000 --- a/esy.lock/overrides/opam__s__ocaml_secondary_compiler_opam__c__4.08.1_1_opam_override/package.json +++ /dev/null @@ -1,28 +0,0 @@ -{ - "buildEnv": { - "PATH": "/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin" - }, - "build": [ - [ - "env", - "-u", - "OCAMLLIB", - "bash", "./esy-configure", - "--disable-cfi", - "--prefix", "$cur__install/share/ocaml-secondary-compiler", - "--libdir", "$cur__install/share/ocaml-secondary-compiler/lib", - "--disable-debugger", - "--disable-installing-bytecode-programs", - "--disable-debug-runtime", - "--disable-instrumented-runtime", - "--disable-graph-lib" - ], - [ - "env", - "-u", - "OCAMLLIB", - "bash", "./esy-build" - ] - ], - "buildsInSource": true -} diff --git a/esy.lock/overrides/opam__s__ocamlfind_opam__c__1.8.1_opam_override/files/findlib-1.8.1.patch b/esy.lock/overrides/opam__s__ocamlfind_opam__c__1.8.1_opam_override/files/findlib-1.8.1.patch deleted file mode 100644 index 3e3ee5a2..00000000 --- a/esy.lock/overrides/opam__s__ocamlfind_opam__c__1.8.1_opam_override/files/findlib-1.8.1.patch +++ /dev/null @@ -1,471 +0,0 @@ ---- ./Makefile -+++ ./Makefile -@@ -57,16 +57,16 @@ - cat findlib.conf.in | \ - $(SH) tools/patch '@SITELIB@' '$(OCAML_SITELIB)' >findlib.conf - if ./tools/cmd_from_same_dir ocamlc; then \ -- echo 'ocamlc="ocamlc.opt"' >>findlib.conf; \ -+ echo 'ocamlc="ocamlc.opt$(EXEC_SUFFIX)"' >>findlib.conf; \ - fi - if ./tools/cmd_from_same_dir ocamlopt; then \ -- echo 'ocamlopt="ocamlopt.opt"' >>findlib.conf; \ -+ echo 'ocamlopt="ocamlopt.opt$(EXEC_SUFFIX)"' >>findlib.conf; \ - fi - if ./tools/cmd_from_same_dir ocamldep; then \ -- echo 'ocamldep="ocamldep.opt"' >>findlib.conf; \ -+ echo 'ocamldep="ocamldep.opt$(EXEC_SUFFIX)"' >>findlib.conf; \ - fi - if ./tools/cmd_from_same_dir ocamldoc; then \ -- echo 'ocamldoc="ocamldoc.opt"' >>findlib.conf; \ -+ echo 'ocamldoc="ocamldoc.opt$(EXEC_SUFFIX)"' >>findlib.conf; \ - fi - - .PHONY: install-doc ---- ./src/findlib/findlib_config.mlp -+++ ./src/findlib/findlib_config.mlp -@@ -24,3 +24,5 @@ - | "MacOS" -> "" (* don't know *) - | _ -> failwith "Unknown Sys.os_type" - ;; -+ -+let exec_suffix = "@EXEC_SUFFIX@";; ---- ./src/findlib/findlib.ml -+++ ./src/findlib/findlib.ml -@@ -28,15 +28,20 @@ - let conf_ldconf = ref "";; - let conf_ignore_dups_in = ref ([] : string list);; - --let ocamlc_default = "ocamlc";; --let ocamlopt_default = "ocamlopt";; --let ocamlcp_default = "ocamlcp";; --let ocamloptp_default = "ocamloptp";; --let ocamlmklib_default = "ocamlmklib";; --let ocamlmktop_default = "ocamlmktop";; --let ocamldep_default = "ocamldep";; --let ocamlbrowser_default = "ocamlbrowser";; --let ocamldoc_default = "ocamldoc";; -+let add_exec str = -+ match Findlib_config.exec_suffix with -+ | "" -> str -+ | a -> str ^ a ;; -+let ocamlc_default = add_exec "ocamlc";; -+let ocamlopt_default = add_exec "ocamlopt";; -+let ocamlcp_default = add_exec "ocamlcp";; -+let ocamloptp_default = add_exec "ocamloptp";; -+let ocamlmklib_default = add_exec "ocamlmklib";; -+let ocamlmktop_default = add_exec "ocamlmktop";; -+let ocamldep_default = add_exec "ocamldep";; -+let ocamlbrowser_default = add_exec "ocamlbrowser";; -+let ocamldoc_default = add_exec "ocamldoc";; -+ - - - let init_manually ---- ./src/findlib/fl_package_base.ml -+++ ./src/findlib/fl_package_base.ml -@@ -133,7 +133,15 @@ - List.find (fun def -> def.def_var = "exists_if") p.package_defs in - let files = Fl_split.in_words def.def_value in - List.exists -- (fun file -> Sys.file_exists (Filename.concat d' file)) -+ (fun file -> -+ let fln = Filename.concat d' file in -+ let e = Sys.file_exists fln in -+ (* necessary for ppx executables *) -+ if e || Sys.os_type <> "Win32" || Filename.check_suffix fln ".exe" then -+ e -+ else -+ Sys.file_exists (fln ^ ".exe") -+ ) - files - with Not_found -> true in - ---- ./src/findlib/fl_split.ml -+++ ./src/findlib/fl_split.ml -@@ -126,10 +126,17 @@ - | '/' | '\\' -> true - | _ -> false in - let norm_dir_win() = -- if l >= 1 && s.[0] = '/' then -- Buffer.add_char b '\\' else Buffer.add_char b s.[0]; -- if l >= 2 && s.[1] = '/' then -- Buffer.add_char b '\\' else Buffer.add_char b s.[1]; -+ if l >= 1 then ( -+ if s.[0] = '/' then -+ Buffer.add_char b '\\' -+ else -+ Buffer.add_char b s.[0] ; -+ if l >= 2 then -+ if s.[1] = '/' then -+ Buffer.add_char b '\\' -+ else -+ Buffer.add_char b s.[1]; -+ ); - for k = 2 to l - 1 do - let c = s.[k] in - if is_slash c then ( ---- ./src/findlib/frontend.ml -+++ ./src/findlib/frontend.ml -@@ -31,10 +31,18 @@ - else - Sys_error (arg ^ ": " ^ Unix.error_message code) - -+let is_win = Sys.os_type = "Win32" -+ -+let () = -+ match Findlib_config.system with -+ | "win32" | "win64" | "mingw" | "cygwin" | "mingw64" | "cygwin64" -> -+ (try set_binary_mode_out stdout true with _ -> ()); -+ (try set_binary_mode_out stderr true with _ -> ()); -+ | _ -> () - - let slashify s = - match Findlib_config.system with -- | "mingw" | "mingw64" | "cygwin" -> -+ | "win32" | "win64" | "mingw" | "cygwin" | "mingw64" | "cygwin64" -> - let b = Buffer.create 80 in - String.iter - (function -@@ -49,7 +57,7 @@ - - let out_path ?(prefix="") s = - match Findlib_config.system with -- | "mingw" | "mingw64" | "cygwin" -> -+ | "win32" | "win64" | "mingw" | "mingw64" | "cygwin" -> - let u = slashify s in - prefix ^ - (if String.contains u ' ' then -@@ -273,11 +281,9 @@ - - - let identify_dir d = -- match Sys.os_type with -- | "Win32" -> -- failwith "identify_dir" (* not available *) -- | _ -> -- let s = Unix.stat d in -+ if is_win then -+ failwith "identify_dir"; (* not available *) -+ let s = Unix.stat d in - (s.Unix.st_dev, s.Unix.st_ino) - ;; - -@@ -459,6 +465,96 @@ - ) - packages - -+let rewrite_cmd s = -+ if s = "" || not is_win then -+ s -+ else -+ let s = -+ let l = String.length s in -+ let b = Buffer.create l in -+ for i = 0 to pred l do -+ match s.[i] with -+ | '/' -> Buffer.add_char b '\\' -+ | x -> Buffer.add_char b x -+ done; -+ Buffer.contents b -+ in -+ if (Filename.is_implicit s && String.contains s '\\' = false) || -+ Filename.check_suffix (String.lowercase s) ".exe" then -+ s -+ else -+ let s' = s ^ ".exe" in -+ if Sys.file_exists s' then -+ s' -+ else -+ s -+ -+let rewrite_cmd s = -+ if s = "" || not is_win then s else -+ let s = -+ let l = String.length s in -+ let b = Buffer.create l in -+ for i = 0 to pred l do -+ match s.[i] with -+ | '/' -> Buffer.add_char b '\\' -+ | x -> Buffer.add_char b x -+ done; -+ Buffer.contents b -+ in -+ if (Filename.is_implicit s && String.contains s '\\' = false) || -+ Filename.check_suffix (String.lowercase s) ".exe" then -+ s -+ else -+ let s' = s ^ ".exe" in -+ if Sys.file_exists s' then -+ s' -+ else -+ s -+ -+let rewrite_pp cmd = -+ if not is_win then cmd else -+ let module T = struct exception Keep end in -+ let is_whitespace = function -+ | ' ' | '\011' | '\012' | '\n' | '\r' | '\t' -> true -+ | _ -> false in -+ (* characters that triggers special behaviour (cmd.exe, not unix shell) *) -+ let is_unsafe_char = function -+ | '(' | ')' | '%' | '!' | '^' | '<' | '>' | '&' -> true -+ | _ -> false in -+ let len = String.length cmd in -+ let buf = Buffer.create (len + 4) in -+ let buf_cmd = Buffer.create len in -+ let rec iter_ws i = -+ if i >= len then () else -+ let cur = cmd.[i] in -+ if is_whitespace cur then ( -+ Buffer.add_char buf cur; -+ iter_ws (succ i) -+ ) -+ else -+ iter_cmd i -+ and iter_cmd i = -+ if i >= len then add_buf_cmd () else -+ let cur = cmd.[i] in -+ if is_unsafe_char cur || cur = '"' || cur = '\'' then -+ raise T.Keep; -+ if is_whitespace cur then ( -+ add_buf_cmd (); -+ Buffer.add_substring buf cmd i (len - i) -+ ) -+ else ( -+ Buffer.add_char buf_cmd cur; -+ iter_cmd (succ i) -+ ) -+ and add_buf_cmd () = -+ if Buffer.length buf_cmd > 0 then -+ Buffer.add_string buf (rewrite_cmd (Buffer.contents buf_cmd)) -+ in -+ try -+ iter_ws 0; -+ Buffer.contents buf -+ with -+ | T.Keep -> cmd - - let process_pp_spec syntax_preds packages pp_opts = - (* Returns: pp_command *) -@@ -549,7 +645,7 @@ - None -> [] - | Some cmd -> - ["-pp"; -- cmd ^ " " ^ -+ (rewrite_cmd cmd) ^ " " ^ - String.concat " " (List.map Filename.quote pp_i_options) ^ " " ^ - String.concat " " (List.map Filename.quote pp_archives) ^ " " ^ - String.concat " " (List.map Filename.quote pp_opts)] -@@ -625,9 +721,11 @@ - in - try - let preprocessor = -+ rewrite_cmd ( - resolve_path - ~base ~explicit:true -- (package_property predicates pname "ppx") in -+ (package_property predicates pname "ppx") ) -+ in - ["-ppx"; String.concat " " (preprocessor :: options)] - with Not_found -> [] - ) -@@ -895,6 +993,14 @@ - switch (e.g. -L instead of -L ) - *) - -+(* We may need to remove files on which we do not have complete control. -+ On Windows, removing a read-only file fails so try to change the -+ mode of the file first. *) -+let remove_file fname = -+ try Sys.remove fname -+ with Sys_error _ when is_win -> -+ (try Unix.chmod fname 0o666 with Unix.Unix_error _ -> ()); -+ Sys.remove fname - - let ocamlc which () = - -@@ -1022,9 +1128,12 @@ - - "-intf", - Arg.String (fun s -> pass_files := !pass_files @ [ Intf(slashify s) ]); -- -+ - "-pp", -- Arg.String (fun s -> pp_specified := true; add_spec_fn "-pp" s); -+ Arg.String (fun s -> pp_specified := true; add_spec_fn "-pp" (rewrite_pp s)); -+ -+ "-ppx", -+ Arg.String (fun s -> add_spec_fn "-ppx" (rewrite_pp s)); - - "-thread", - Arg.Unit (fun _ -> threads := threads_default); -@@ -1237,7 +1346,7 @@ - with - any -> - close_out initl; -- Sys.remove initl_file_name; -+ remove_file initl_file_name; - raise any - end; - -@@ -1245,9 +1354,9 @@ - at_exit - (fun () -> - let tr f x = try f x with _ -> () in -- tr Sys.remove initl_file_name; -- tr Sys.remove (Filename.chop_extension initl_file_name ^ ".cmi"); -- tr Sys.remove (Filename.chop_extension initl_file_name ^ ".cmo"); -+ tr remove_file initl_file_name; -+ tr remove_file (Filename.chop_extension initl_file_name ^ ".cmi"); -+ tr remove_file (Filename.chop_extension initl_file_name ^ ".cmo"); - ); - - let exclude_list = [ stdlibdir; threads_dir; vmthreads_dir ] in -@@ -1493,7 +1602,9 @@ - [ "-v", Arg.Unit (fun () -> verbose := Verbose); - "-pp", Arg.String (fun s -> - pp_specified := true; -- options := !options @ ["-pp"; s]); -+ options := !options @ ["-pp"; rewrite_pp s]); -+ "-ppx", Arg.String (fun s -> -+ options := !options @ ["-ppx"; rewrite_pp s]); - ] - ) - ) -@@ -1672,7 +1783,9 @@ - Arg.String (fun s -> add_spec_fn "-I" (slashify (resolve_path s))); - - "-pp", Arg.String (fun s -> pp_specified := true; -- add_spec_fn "-pp" s); -+ add_spec_fn "-pp" (rewrite_pp s)); -+ "-ppx", Arg.String (fun s -> add_spec_fn "-ppx" (rewrite_pp s)); -+ - ] - ) - ) -@@ -1830,7 +1943,10 @@ - output_string ch_out append; - close_out ch_out; - close_in ch_in; -- Unix.utimes outpath s.Unix.st_mtime s.Unix.st_mtime; -+ (try Unix.utimes outpath s.Unix.st_mtime s.Unix.st_mtime -+ with Unix.Unix_error(e,_,_) -> -+ prerr_endline("Warning: setting utimes for " ^ outpath -+ ^ ": " ^ Unix.error_message e)); - - prerr_endline("Installed " ^ outpath); - with -@@ -1882,6 +1998,8 @@ - Unix.openfile (Filename.concat dir owner_file) [Unix.O_RDONLY] 0 in - let f = - Unix.in_channel_of_descr fd in -+ if is_win then -+ set_binary_mode_in f false; - try - let line = input_line f in - let is_my_file = (line = pkg) in -@@ -2208,7 +2326,7 @@ - let lines = read_ldconf !ldconf in - let dlldir_norm = Fl_split.norm_dir dlldir in - let dlldir_norm_lc = string_lowercase_ascii dlldir_norm in -- let ci_filesys = (Sys.os_type = "Win32") in -+ let ci_filesys = is_win in - let check_dir d = - let d' = Fl_split.norm_dir d in - (d' = dlldir_norm) || -@@ -2356,7 +2474,7 @@ - List.iter - (fun file -> - let absfile = Filename.concat dlldir file in -- Sys.remove absfile; -+ remove_file absfile; - prerr_endline ("Removed " ^ absfile) - ) - dll_files -@@ -2365,7 +2483,7 @@ - (* Remove the files from the package directory: *) - if Sys.file_exists pkgdir then begin - let files = Sys.readdir pkgdir in -- Array.iter (fun f -> Sys.remove (Filename.concat pkgdir f)) files; -+ Array.iter (fun f -> remove_file (Filename.concat pkgdir f)) files; - Unix.rmdir pkgdir; - prerr_endline ("Removed " ^ pkgdir) - end -@@ -2415,7 +2533,9 @@ - - - let print_configuration() = -+ let sl = slashify in - let dir s = -+ let s = sl s in - if Sys.file_exists s then - s - else -@@ -2453,27 +2573,27 @@ - if md = "" then "the corresponding package directories" else dir md - ); - Printf.printf "The standard library is assumed to reside in:\n %s\n" -- (Findlib.ocaml_stdlib()); -+ (sl (Findlib.ocaml_stdlib())); - Printf.printf "The ld.conf file can be found here:\n %s\n" -- (Findlib.ocaml_ldconf()); -+ (sl (Findlib.ocaml_ldconf())); - flush stdout - | Some "conf" -> -- print_endline (Findlib.config_file()) -+ print_endline (sl (Findlib.config_file())) - | Some "path" -> -- List.iter print_endline (Findlib.search_path()) -+ List.iter ( fun x -> print_endline (sl x)) (Findlib.search_path()) - | Some "destdir" -> -- print_endline (Findlib.default_location()) -+ print_endline ( sl (Findlib.default_location())) - | Some "metadir" -> -- print_endline (Findlib.meta_directory()) -+ print_endline ( sl (Findlib.meta_directory())) - | Some "metapath" -> - let mdir = Findlib.meta_directory() in - let ddir = Findlib.default_location() in -- print_endline -- (if mdir <> "" then mdir ^ "/META.%s" else ddir ^ "/%s/META") -+ print_endline ( sl -+ (if mdir <> "" then mdir ^ "/META.%s" else ddir ^ "/%s/META")) - | Some "stdlib" -> -- print_endline (Findlib.ocaml_stdlib()) -+ print_endline ( sl (Findlib.ocaml_stdlib())) - | Some "ldconf" -> -- print_endline (Findlib.ocaml_ldconf()) -+ print_endline ( sl (Findlib.ocaml_ldconf())) - | _ -> - assert false - ;; -@@ -2481,7 +2601,7 @@ - - let ocamlcall pkg cmd = - let dir = package_directory pkg in -- let path = Filename.concat dir cmd in -+ let path = rewrite_cmd (Filename.concat dir cmd) in - begin - try Unix.access path [ Unix.X_OK ] - with -@@ -2647,6 +2767,10 @@ - | Sys_error f -> - prerr_endline ("ocamlfind: " ^ f); - exit 2 -+ | Unix.Unix_error (e, fn, f) -> -+ prerr_endline ("ocamlfind: " ^ fn ^ " " ^ f -+ ^ ": " ^ Unix.error_message e); -+ exit 2 - | Findlib.No_such_package(pkg,info) -> - prerr_endline ("ocamlfind: Package `" ^ pkg ^ "' not found" ^ - (if info <> "" then " - " ^ info else "")); ---- ./src/findlib/Makefile -+++ ./src/findlib/Makefile -@@ -90,6 +90,7 @@ - cat findlib_config.mlp | \ - $(SH) $(TOP)/tools/patch '@CONFIGFILE@' '$(OCAMLFIND_CONF)' | \ - $(SH) $(TOP)/tools/patch '@STDLIB@' '$(OCAML_CORE_STDLIB)' | \ -+ $(SH) $(TOP)/tools/patch '@EXEC_SUFFIX@' '$(EXEC_SUFFIX)' | \ - sed -e 's;@AUTOLINK@;$(OCAML_AUTOLINK);g' \ - -e 's;@SYSTEM@;$(SYSTEM);g' \ - >findlib_config.ml diff --git a/esy.lock/overrides/opam__s__ocamlfind_opam__c__1.8.1_opam_override/package.json b/esy.lock/overrides/opam__s__ocamlfind_opam__c__1.8.1_opam_override/package.json deleted file mode 100644 index 9314f870..00000000 --- a/esy.lock/overrides/opam__s__ocamlfind_opam__c__1.8.1_opam_override/package.json +++ /dev/null @@ -1,61 +0,0 @@ -{ - "build": [ - [ - "bash", - "-c", - "#{os == 'windows' ? 'patch -p1 < findlib-1.8.1.patch' : 'true'}" - ], - [ - "./configure", - "-bindir", - "#{self.bin}", - "-sitelib", - "#{self.lib}", - "-mandir", - "#{self.man}", - "-config", - "#{self.lib}/findlib.conf", - "-no-custom", - "-no-topfind" - ], - [ - "make", - "all" - ], - [ - "make", - "opt" - ] - ], - "install": [ - [ - "make", - "install" - ], - [ - "install", - "-m", - "0755", - "ocaml-stub", - "#{self.bin}/ocaml" - ], - [ - "mkdir", - "-p", - "#{self.toplevel}" - ], - [ - "install", - "-m", - "0644", - "src/findlib/topfind", - "#{self.toplevel}/topfind" - ] - ], - "exportedEnv": { - "OCAML_TOPLEVEL_PATH": { - "val": "#{self.toplevel}", - "scope": "global" - } - } -} diff --git a/esy.lock/overrides/opam__s__ocamlfind_secondary_opam__c__1.8.1_opam_override/files/findlib-1.8.1.patch b/esy.lock/overrides/opam__s__ocamlfind_secondary_opam__c__1.8.1_opam_override/files/findlib-1.8.1.patch deleted file mode 100644 index 3e3ee5a2..00000000 --- a/esy.lock/overrides/opam__s__ocamlfind_secondary_opam__c__1.8.1_opam_override/files/findlib-1.8.1.patch +++ /dev/null @@ -1,471 +0,0 @@ ---- ./Makefile -+++ ./Makefile -@@ -57,16 +57,16 @@ - cat findlib.conf.in | \ - $(SH) tools/patch '@SITELIB@' '$(OCAML_SITELIB)' >findlib.conf - if ./tools/cmd_from_same_dir ocamlc; then \ -- echo 'ocamlc="ocamlc.opt"' >>findlib.conf; \ -+ echo 'ocamlc="ocamlc.opt$(EXEC_SUFFIX)"' >>findlib.conf; \ - fi - if ./tools/cmd_from_same_dir ocamlopt; then \ -- echo 'ocamlopt="ocamlopt.opt"' >>findlib.conf; \ -+ echo 'ocamlopt="ocamlopt.opt$(EXEC_SUFFIX)"' >>findlib.conf; \ - fi - if ./tools/cmd_from_same_dir ocamldep; then \ -- echo 'ocamldep="ocamldep.opt"' >>findlib.conf; \ -+ echo 'ocamldep="ocamldep.opt$(EXEC_SUFFIX)"' >>findlib.conf; \ - fi - if ./tools/cmd_from_same_dir ocamldoc; then \ -- echo 'ocamldoc="ocamldoc.opt"' >>findlib.conf; \ -+ echo 'ocamldoc="ocamldoc.opt$(EXEC_SUFFIX)"' >>findlib.conf; \ - fi - - .PHONY: install-doc ---- ./src/findlib/findlib_config.mlp -+++ ./src/findlib/findlib_config.mlp -@@ -24,3 +24,5 @@ - | "MacOS" -> "" (* don't know *) - | _ -> failwith "Unknown Sys.os_type" - ;; -+ -+let exec_suffix = "@EXEC_SUFFIX@";; ---- ./src/findlib/findlib.ml -+++ ./src/findlib/findlib.ml -@@ -28,15 +28,20 @@ - let conf_ldconf = ref "";; - let conf_ignore_dups_in = ref ([] : string list);; - --let ocamlc_default = "ocamlc";; --let ocamlopt_default = "ocamlopt";; --let ocamlcp_default = "ocamlcp";; --let ocamloptp_default = "ocamloptp";; --let ocamlmklib_default = "ocamlmklib";; --let ocamlmktop_default = "ocamlmktop";; --let ocamldep_default = "ocamldep";; --let ocamlbrowser_default = "ocamlbrowser";; --let ocamldoc_default = "ocamldoc";; -+let add_exec str = -+ match Findlib_config.exec_suffix with -+ | "" -> str -+ | a -> str ^ a ;; -+let ocamlc_default = add_exec "ocamlc";; -+let ocamlopt_default = add_exec "ocamlopt";; -+let ocamlcp_default = add_exec "ocamlcp";; -+let ocamloptp_default = add_exec "ocamloptp";; -+let ocamlmklib_default = add_exec "ocamlmklib";; -+let ocamlmktop_default = add_exec "ocamlmktop";; -+let ocamldep_default = add_exec "ocamldep";; -+let ocamlbrowser_default = add_exec "ocamlbrowser";; -+let ocamldoc_default = add_exec "ocamldoc";; -+ - - - let init_manually ---- ./src/findlib/fl_package_base.ml -+++ ./src/findlib/fl_package_base.ml -@@ -133,7 +133,15 @@ - List.find (fun def -> def.def_var = "exists_if") p.package_defs in - let files = Fl_split.in_words def.def_value in - List.exists -- (fun file -> Sys.file_exists (Filename.concat d' file)) -+ (fun file -> -+ let fln = Filename.concat d' file in -+ let e = Sys.file_exists fln in -+ (* necessary for ppx executables *) -+ if e || Sys.os_type <> "Win32" || Filename.check_suffix fln ".exe" then -+ e -+ else -+ Sys.file_exists (fln ^ ".exe") -+ ) - files - with Not_found -> true in - ---- ./src/findlib/fl_split.ml -+++ ./src/findlib/fl_split.ml -@@ -126,10 +126,17 @@ - | '/' | '\\' -> true - | _ -> false in - let norm_dir_win() = -- if l >= 1 && s.[0] = '/' then -- Buffer.add_char b '\\' else Buffer.add_char b s.[0]; -- if l >= 2 && s.[1] = '/' then -- Buffer.add_char b '\\' else Buffer.add_char b s.[1]; -+ if l >= 1 then ( -+ if s.[0] = '/' then -+ Buffer.add_char b '\\' -+ else -+ Buffer.add_char b s.[0] ; -+ if l >= 2 then -+ if s.[1] = '/' then -+ Buffer.add_char b '\\' -+ else -+ Buffer.add_char b s.[1]; -+ ); - for k = 2 to l - 1 do - let c = s.[k] in - if is_slash c then ( ---- ./src/findlib/frontend.ml -+++ ./src/findlib/frontend.ml -@@ -31,10 +31,18 @@ - else - Sys_error (arg ^ ": " ^ Unix.error_message code) - -+let is_win = Sys.os_type = "Win32" -+ -+let () = -+ match Findlib_config.system with -+ | "win32" | "win64" | "mingw" | "cygwin" | "mingw64" | "cygwin64" -> -+ (try set_binary_mode_out stdout true with _ -> ()); -+ (try set_binary_mode_out stderr true with _ -> ()); -+ | _ -> () - - let slashify s = - match Findlib_config.system with -- | "mingw" | "mingw64" | "cygwin" -> -+ | "win32" | "win64" | "mingw" | "cygwin" | "mingw64" | "cygwin64" -> - let b = Buffer.create 80 in - String.iter - (function -@@ -49,7 +57,7 @@ - - let out_path ?(prefix="") s = - match Findlib_config.system with -- | "mingw" | "mingw64" | "cygwin" -> -+ | "win32" | "win64" | "mingw" | "mingw64" | "cygwin" -> - let u = slashify s in - prefix ^ - (if String.contains u ' ' then -@@ -273,11 +281,9 @@ - - - let identify_dir d = -- match Sys.os_type with -- | "Win32" -> -- failwith "identify_dir" (* not available *) -- | _ -> -- let s = Unix.stat d in -+ if is_win then -+ failwith "identify_dir"; (* not available *) -+ let s = Unix.stat d in - (s.Unix.st_dev, s.Unix.st_ino) - ;; - -@@ -459,6 +465,96 @@ - ) - packages - -+let rewrite_cmd s = -+ if s = "" || not is_win then -+ s -+ else -+ let s = -+ let l = String.length s in -+ let b = Buffer.create l in -+ for i = 0 to pred l do -+ match s.[i] with -+ | '/' -> Buffer.add_char b '\\' -+ | x -> Buffer.add_char b x -+ done; -+ Buffer.contents b -+ in -+ if (Filename.is_implicit s && String.contains s '\\' = false) || -+ Filename.check_suffix (String.lowercase s) ".exe" then -+ s -+ else -+ let s' = s ^ ".exe" in -+ if Sys.file_exists s' then -+ s' -+ else -+ s -+ -+let rewrite_cmd s = -+ if s = "" || not is_win then s else -+ let s = -+ let l = String.length s in -+ let b = Buffer.create l in -+ for i = 0 to pred l do -+ match s.[i] with -+ | '/' -> Buffer.add_char b '\\' -+ | x -> Buffer.add_char b x -+ done; -+ Buffer.contents b -+ in -+ if (Filename.is_implicit s && String.contains s '\\' = false) || -+ Filename.check_suffix (String.lowercase s) ".exe" then -+ s -+ else -+ let s' = s ^ ".exe" in -+ if Sys.file_exists s' then -+ s' -+ else -+ s -+ -+let rewrite_pp cmd = -+ if not is_win then cmd else -+ let module T = struct exception Keep end in -+ let is_whitespace = function -+ | ' ' | '\011' | '\012' | '\n' | '\r' | '\t' -> true -+ | _ -> false in -+ (* characters that triggers special behaviour (cmd.exe, not unix shell) *) -+ let is_unsafe_char = function -+ | '(' | ')' | '%' | '!' | '^' | '<' | '>' | '&' -> true -+ | _ -> false in -+ let len = String.length cmd in -+ let buf = Buffer.create (len + 4) in -+ let buf_cmd = Buffer.create len in -+ let rec iter_ws i = -+ if i >= len then () else -+ let cur = cmd.[i] in -+ if is_whitespace cur then ( -+ Buffer.add_char buf cur; -+ iter_ws (succ i) -+ ) -+ else -+ iter_cmd i -+ and iter_cmd i = -+ if i >= len then add_buf_cmd () else -+ let cur = cmd.[i] in -+ if is_unsafe_char cur || cur = '"' || cur = '\'' then -+ raise T.Keep; -+ if is_whitespace cur then ( -+ add_buf_cmd (); -+ Buffer.add_substring buf cmd i (len - i) -+ ) -+ else ( -+ Buffer.add_char buf_cmd cur; -+ iter_cmd (succ i) -+ ) -+ and add_buf_cmd () = -+ if Buffer.length buf_cmd > 0 then -+ Buffer.add_string buf (rewrite_cmd (Buffer.contents buf_cmd)) -+ in -+ try -+ iter_ws 0; -+ Buffer.contents buf -+ with -+ | T.Keep -> cmd - - let process_pp_spec syntax_preds packages pp_opts = - (* Returns: pp_command *) -@@ -549,7 +645,7 @@ - None -> [] - | Some cmd -> - ["-pp"; -- cmd ^ " " ^ -+ (rewrite_cmd cmd) ^ " " ^ - String.concat " " (List.map Filename.quote pp_i_options) ^ " " ^ - String.concat " " (List.map Filename.quote pp_archives) ^ " " ^ - String.concat " " (List.map Filename.quote pp_opts)] -@@ -625,9 +721,11 @@ - in - try - let preprocessor = -+ rewrite_cmd ( - resolve_path - ~base ~explicit:true -- (package_property predicates pname "ppx") in -+ (package_property predicates pname "ppx") ) -+ in - ["-ppx"; String.concat " " (preprocessor :: options)] - with Not_found -> [] - ) -@@ -895,6 +993,14 @@ - switch (e.g. -L instead of -L ) - *) - -+(* We may need to remove files on which we do not have complete control. -+ On Windows, removing a read-only file fails so try to change the -+ mode of the file first. *) -+let remove_file fname = -+ try Sys.remove fname -+ with Sys_error _ when is_win -> -+ (try Unix.chmod fname 0o666 with Unix.Unix_error _ -> ()); -+ Sys.remove fname - - let ocamlc which () = - -@@ -1022,9 +1128,12 @@ - - "-intf", - Arg.String (fun s -> pass_files := !pass_files @ [ Intf(slashify s) ]); -- -+ - "-pp", -- Arg.String (fun s -> pp_specified := true; add_spec_fn "-pp" s); -+ Arg.String (fun s -> pp_specified := true; add_spec_fn "-pp" (rewrite_pp s)); -+ -+ "-ppx", -+ Arg.String (fun s -> add_spec_fn "-ppx" (rewrite_pp s)); - - "-thread", - Arg.Unit (fun _ -> threads := threads_default); -@@ -1237,7 +1346,7 @@ - with - any -> - close_out initl; -- Sys.remove initl_file_name; -+ remove_file initl_file_name; - raise any - end; - -@@ -1245,9 +1354,9 @@ - at_exit - (fun () -> - let tr f x = try f x with _ -> () in -- tr Sys.remove initl_file_name; -- tr Sys.remove (Filename.chop_extension initl_file_name ^ ".cmi"); -- tr Sys.remove (Filename.chop_extension initl_file_name ^ ".cmo"); -+ tr remove_file initl_file_name; -+ tr remove_file (Filename.chop_extension initl_file_name ^ ".cmi"); -+ tr remove_file (Filename.chop_extension initl_file_name ^ ".cmo"); - ); - - let exclude_list = [ stdlibdir; threads_dir; vmthreads_dir ] in -@@ -1493,7 +1602,9 @@ - [ "-v", Arg.Unit (fun () -> verbose := Verbose); - "-pp", Arg.String (fun s -> - pp_specified := true; -- options := !options @ ["-pp"; s]); -+ options := !options @ ["-pp"; rewrite_pp s]); -+ "-ppx", Arg.String (fun s -> -+ options := !options @ ["-ppx"; rewrite_pp s]); - ] - ) - ) -@@ -1672,7 +1783,9 @@ - Arg.String (fun s -> add_spec_fn "-I" (slashify (resolve_path s))); - - "-pp", Arg.String (fun s -> pp_specified := true; -- add_spec_fn "-pp" s); -+ add_spec_fn "-pp" (rewrite_pp s)); -+ "-ppx", Arg.String (fun s -> add_spec_fn "-ppx" (rewrite_pp s)); -+ - ] - ) - ) -@@ -1830,7 +1943,10 @@ - output_string ch_out append; - close_out ch_out; - close_in ch_in; -- Unix.utimes outpath s.Unix.st_mtime s.Unix.st_mtime; -+ (try Unix.utimes outpath s.Unix.st_mtime s.Unix.st_mtime -+ with Unix.Unix_error(e,_,_) -> -+ prerr_endline("Warning: setting utimes for " ^ outpath -+ ^ ": " ^ Unix.error_message e)); - - prerr_endline("Installed " ^ outpath); - with -@@ -1882,6 +1998,8 @@ - Unix.openfile (Filename.concat dir owner_file) [Unix.O_RDONLY] 0 in - let f = - Unix.in_channel_of_descr fd in -+ if is_win then -+ set_binary_mode_in f false; - try - let line = input_line f in - let is_my_file = (line = pkg) in -@@ -2208,7 +2326,7 @@ - let lines = read_ldconf !ldconf in - let dlldir_norm = Fl_split.norm_dir dlldir in - let dlldir_norm_lc = string_lowercase_ascii dlldir_norm in -- let ci_filesys = (Sys.os_type = "Win32") in -+ let ci_filesys = is_win in - let check_dir d = - let d' = Fl_split.norm_dir d in - (d' = dlldir_norm) || -@@ -2356,7 +2474,7 @@ - List.iter - (fun file -> - let absfile = Filename.concat dlldir file in -- Sys.remove absfile; -+ remove_file absfile; - prerr_endline ("Removed " ^ absfile) - ) - dll_files -@@ -2365,7 +2483,7 @@ - (* Remove the files from the package directory: *) - if Sys.file_exists pkgdir then begin - let files = Sys.readdir pkgdir in -- Array.iter (fun f -> Sys.remove (Filename.concat pkgdir f)) files; -+ Array.iter (fun f -> remove_file (Filename.concat pkgdir f)) files; - Unix.rmdir pkgdir; - prerr_endline ("Removed " ^ pkgdir) - end -@@ -2415,7 +2533,9 @@ - - - let print_configuration() = -+ let sl = slashify in - let dir s = -+ let s = sl s in - if Sys.file_exists s then - s - else -@@ -2453,27 +2573,27 @@ - if md = "" then "the corresponding package directories" else dir md - ); - Printf.printf "The standard library is assumed to reside in:\n %s\n" -- (Findlib.ocaml_stdlib()); -+ (sl (Findlib.ocaml_stdlib())); - Printf.printf "The ld.conf file can be found here:\n %s\n" -- (Findlib.ocaml_ldconf()); -+ (sl (Findlib.ocaml_ldconf())); - flush stdout - | Some "conf" -> -- print_endline (Findlib.config_file()) -+ print_endline (sl (Findlib.config_file())) - | Some "path" -> -- List.iter print_endline (Findlib.search_path()) -+ List.iter ( fun x -> print_endline (sl x)) (Findlib.search_path()) - | Some "destdir" -> -- print_endline (Findlib.default_location()) -+ print_endline ( sl (Findlib.default_location())) - | Some "metadir" -> -- print_endline (Findlib.meta_directory()) -+ print_endline ( sl (Findlib.meta_directory())) - | Some "metapath" -> - let mdir = Findlib.meta_directory() in - let ddir = Findlib.default_location() in -- print_endline -- (if mdir <> "" then mdir ^ "/META.%s" else ddir ^ "/%s/META") -+ print_endline ( sl -+ (if mdir <> "" then mdir ^ "/META.%s" else ddir ^ "/%s/META")) - | Some "stdlib" -> -- print_endline (Findlib.ocaml_stdlib()) -+ print_endline ( sl (Findlib.ocaml_stdlib())) - | Some "ldconf" -> -- print_endline (Findlib.ocaml_ldconf()) -+ print_endline ( sl (Findlib.ocaml_ldconf())) - | _ -> - assert false - ;; -@@ -2481,7 +2601,7 @@ - - let ocamlcall pkg cmd = - let dir = package_directory pkg in -- let path = Filename.concat dir cmd in -+ let path = rewrite_cmd (Filename.concat dir cmd) in - begin - try Unix.access path [ Unix.X_OK ] - with -@@ -2647,6 +2767,10 @@ - | Sys_error f -> - prerr_endline ("ocamlfind: " ^ f); - exit 2 -+ | Unix.Unix_error (e, fn, f) -> -+ prerr_endline ("ocamlfind: " ^ fn ^ " " ^ f -+ ^ ": " ^ Unix.error_message e); -+ exit 2 - | Findlib.No_such_package(pkg,info) -> - prerr_endline ("ocamlfind: Package `" ^ pkg ^ "' not found" ^ - (if info <> "" then " - " ^ info else "")); ---- ./src/findlib/Makefile -+++ ./src/findlib/Makefile -@@ -90,6 +90,7 @@ - cat findlib_config.mlp | \ - $(SH) $(TOP)/tools/patch '@CONFIGFILE@' '$(OCAMLFIND_CONF)' | \ - $(SH) $(TOP)/tools/patch '@STDLIB@' '$(OCAML_CORE_STDLIB)' | \ -+ $(SH) $(TOP)/tools/patch '@EXEC_SUFFIX@' '$(EXEC_SUFFIX)' | \ - sed -e 's;@AUTOLINK@;$(OCAML_AUTOLINK);g' \ - -e 's;@SYSTEM@;$(SYSTEM);g' \ - >findlib_config.ml diff --git a/esy.lock/overrides/opam__s__ocamlfind_secondary_opam__c__1.8.1_opam_override/files/gen-findlib-conf.sh b/esy.lock/overrides/opam__s__ocamlfind_secondary_opam__c__1.8.1_opam_override/files/gen-findlib-conf.sh deleted file mode 100644 index c923ef49..00000000 --- a/esy.lock/overrides/opam__s__ocamlfind_secondary_opam__c__1.8.1_opam_override/files/gen-findlib-conf.sh +++ /dev/null @@ -1,14 +0,0 @@ -OCAML_SECONDARY_COMPILER=$1 - -cat >ocaml-secondary-compiler.conf <META < - - - - - image/svg+xml - - - - - - - - - - - - - - - - - - - diff --git a/package.json b/package.json index 18177225..56559943 100644 --- a/package.json +++ b/package.json @@ -2,32 +2,12 @@ "name": "rescript-editor-support", "version": "1.0.0", "scripts": { - "cp-test": - "cp #{self.target_dir}/install/default/bin/RunTests.exe RunTests.exe", - "package": - "esy build && esy cp \"#{self.target_dir}/default/bin/Bin.exe\" editor-extensions/vscode/bin.native", - "zip": "./release.sh", - "check-self-definitions": - "fd -E examples '.*\\.re$' | xargs ./bin.exe check -q -d .", - "vsce": "cd editor-extensions/vscode && vsce package", - "reprocess-ocaml": "(cd process_ocaml; ./build.sh); esy", - "symlink": - "esy ln -s '#{self.target_dir}/install/default/bin/Bin' bin.exe", - "cp-bin": "cp #{self.target_dir}/install/default/bin/Bin bin.exe", "dce": "dune build @check @all && reanalyze.exe -dce-cmt _build -suppress src/rescript-editor-support/vendor" }, - "keywords": [ "Reason", "lsp", "IDE" ], - "repository": { "url": "jaredly/reason-language-server", "type": "git" }, + "keywords": [ "rescript", "lsp", "ide" ], + "private": true, + "repository": { "url": "https://github.com/rescript-lang/rescript-editor-support", "type": "git" }, "description": "A pure-reason implementation of a language server", - "author": "Jared Forsyth", - "license": "ISC", - "esy": { "build": "dune build" }, - "dependencies": { - "@opam/dune": "*", - "@opam/ocaml-migrate-parsetree": ">= 1.3.1", - "@opam/ppx_tools_versioned": "*", - "@opam/reason": "3.6.0", - "@opam/uri": "3.1.0", - "ocaml": "~4.6.1003" - } + "author": "Cristiano Calcagno", + "license": "ISC" } \ No newline at end of file diff --git a/release.sh b/release.sh deleted file mode 100755 index 250fa4bb..00000000 --- a/release.sh +++ /dev/null @@ -1,25 +0,0 @@ - -# (cp lib/bs/native/bin.native client; cd client; vsce package); - -rm -rf _zip -mkdir -p _zip/reason-language-server -cd _zip - -chmod +x ../editor-extensions/vscode/bin.native -chmod +x ../editor-extensions/vscode/bin.native.exe -chmod +x ../editor-extensions/vscode/bin.native.linux - -cp ../editor-extensions/vscode/bin.native reason-language-server/reason-language-server.exe -chmod +x reason-language-server/reason-language-server.exe -zip -r ../editor-extensions/vscode/macos.zip reason-language-server - -cp ../editor-extensions/vscode/bin.native.linux reason-language-server/reason-language-server.exe -chmod +x reason-language-server/reason-language-server.exe -zip -r ../editor-extensions/vscode/linux.zip reason-language-server - -cp ../editor-extensions/vscode/bin.native.exe reason-language-server/reason-language-server.exe -chmod +x reason-language-server/reason-language-server.exe -zip -r ../editor-extensions/vscode/windows.zip reason-language-server - -cd .. -rm -rf _zip \ No newline at end of file diff --git a/runtests.sh b/runtests.sh deleted file mode 100755 index 38be8694..00000000 --- a/runtests.sh +++ /dev/null @@ -1,6 +0,0 @@ -#!/bin/bash -set -ex -esy -# We need to run the binary outside of the esy env. -cp $(esy x which RunTests.exe) RunTests.exe -./RunTests.exe \ No newline at end of file