├── hello-ocaml.opam ├── dune-project ├── bin ├── hello.ml └── dune ├── esy.lock ├── .gitignore ├── .gitattributes ├── opam │ ├── ocamlfind.1.8.1 │ │ ├── files │ │ │ ├── ocaml-stub │ │ │ └── ocamlfind.install │ │ └── opam │ ├── base-unix.base │ │ └── opam │ ├── base-threads.base │ │ └── opam │ ├── base-bytes.base │ │ └── opam │ ├── jbuilder.transition │ │ └── opam │ ├── seq.0.1 │ │ └── opam │ ├── conf-m4.1 │ │ └── opam │ ├── lwt_log.1.1.1 │ │ └── opam │ ├── mmap.1.1.0 │ │ └── opam │ ├── lwt_react.1.1.2 │ │ └── opam │ ├── result.1.4 │ │ └── opam │ ├── charInfo_width.1.1.0 │ │ └── opam │ ├── camomile.1.0.1 │ │ └── opam │ ├── ocamlbuild.0.14.0 │ │ └── opam │ ├── react.1.2.1 │ │ └── opam │ ├── cppo.1.6.6 │ │ └── opam │ ├── zed.2.0.2 │ │ └── opam │ ├── yojson.1.7.0 │ │ └── opam │ ├── lambda-term.2.0.1 │ │ └── opam │ ├── lwt.4.2.1 │ │ └── opam │ ├── easy-format.1.3.2 │ │ └── opam │ ├── biniou.1.2.1 │ │ └── opam │ ├── topkg.1.0.1 │ │ └── opam │ ├── dune.1.11.0 │ │ └── opam │ └── merlin.3.3.2 │ │ └── opam ├── overrides │ ├── opam__s__dune_opam__c__1.11.0_opam_override │ │ └── package.json │ ├── opam__s__ocamlbuild_opam__c__0.14.0_opam_override │ │ ├── package.json │ │ └── files │ │ │ └── ocamlbuild-0.14.0.patch │ └── opam__s__ocamlfind_opam__c__1.8.1_opam_override │ │ ├── package.json │ │ └── files │ │ └── findlib-1.8.1.patch └── index.json ├── lib ├── dune └── Util.ml ├── .gitignore ├── .ci ├── utils │ ├── use-esy.yml │ ├── use-node.yml │ ├── publish-build-cache.yml │ └── restore-build-cache.yml ├── release-platform-setup.yml ├── cross-release.yml ├── build-platform.yml ├── pipelines-release.js └── release-postinstall.js ├── package.json ├── README.md └── azure-pipelines.yml /hello-ocaml.opam: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /dune-project: -------------------------------------------------------------------------------- 1 | (lang dune 1.0) 2 | -------------------------------------------------------------------------------- /bin/hello.ml: -------------------------------------------------------------------------------- 1 | let () = 2 | Lwt_main.run (Lib.Util.hello ()) 3 | -------------------------------------------------------------------------------- /bin/dune: -------------------------------------------------------------------------------- 1 | (executable 2 | (name hello) 3 | (public_name hello) 4 | (libraries lib)) 5 | -------------------------------------------------------------------------------- /esy.lock/.gitignore: -------------------------------------------------------------------------------- 1 | 2 | # Reset any possible .gitignore, we want all esy.lock to be un-ignored. 3 | !* 4 | -------------------------------------------------------------------------------- /lib/dune: -------------------------------------------------------------------------------- 1 | (library 2 | (name lib) 3 | (public_name hello-ocaml) 4 | (libraries lambda-term lwt)) 5 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | .merlin 2 | node_modules/ 3 | _build 4 | _esy 5 | _release 6 | *.byte 7 | *.native 8 | *.install 9 | -------------------------------------------------------------------------------- /esy.lock/.gitattributes: -------------------------------------------------------------------------------- 1 | 2 | # Set eol to LF so files aren't converted to CRLF-eol on Windows. 3 | * text eol=lf 4 | -------------------------------------------------------------------------------- /.ci/utils/use-esy.yml: -------------------------------------------------------------------------------- 1 | # steps to install esy globally 2 | 3 | steps: 4 | - script: "npm install -g esy@0.4.7" 5 | displayName: "install esy" 6 | -------------------------------------------------------------------------------- /esy.lock/opam/ocamlfind.1.8.1/files/ocaml-stub: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | BINDIR=$(dirname "$(command -v ocamlc)") 4 | "$BINDIR/ocaml" -I "$OCAML_TOPLEVEL_PATH" "$@" 5 | -------------------------------------------------------------------------------- /lib/Util.ml: -------------------------------------------------------------------------------- 1 | open LTerm_style 2 | open LTerm_text 3 | 4 | let hello () = 5 | LTerm.printls (eval [B_fg(red); S"Hello,"; E_fg; S" "; B_fg(green); S"World!"; E_fg]) 6 | -------------------------------------------------------------------------------- /.ci/utils/use-node.yml: -------------------------------------------------------------------------------- 1 | # steps to use node on agent 2 | 3 | steps: 4 | - task: NodeTool@0 5 | displayName: "Use Node 8.x" 6 | inputs: 7 | versionSpec: 8.x 8 | -------------------------------------------------------------------------------- /esy.lock/opam/base-unix.base/opam: -------------------------------------------------------------------------------- 1 | opam-version: "2.0" 2 | maintainer: "https://github.com/ocaml/opam-repository/issues" 3 | description: """ 4 | Unix library distributed with the OCaml compiler 5 | """ 6 | 7 | -------------------------------------------------------------------------------- /esy.lock/opam/base-threads.base/opam: -------------------------------------------------------------------------------- 1 | opam-version: "2.0" 2 | maintainer: "https://github.com/ocaml/opam-repository/issues" 3 | description: """ 4 | Threads library distributed with the OCaml compiler 5 | """ 6 | 7 | -------------------------------------------------------------------------------- /esy.lock/opam/ocamlfind.1.8.1/files/ocamlfind.install: -------------------------------------------------------------------------------- 1 | bin: [ 2 | "src/findlib/ocamlfind" {"ocamlfind"} 3 | "?src/findlib/ocamlfind_opt" {"ocamlfind"} 4 | "?tools/safe_camlp4" 5 | ] 6 | toplevel: ["src/findlib/topfind"] 7 | -------------------------------------------------------------------------------- /esy.lock/opam/base-bytes.base/opam: -------------------------------------------------------------------------------- 1 | opam-version: "2.0" 2 | maintainer: " " 3 | authors: " " 4 | homepage: " " 5 | depends: [ 6 | "ocaml" {>= "4.02.0"} 7 | "ocamlfind" {>= "1.5.3"} 8 | ] 9 | synopsis: "Bytes library distributed with the OCaml compiler" 10 | -------------------------------------------------------------------------------- /esy.lock/overrides/opam__s__dune_opam__c__1.11.0_opam_override/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "build": [ 3 | [ 4 | "ocaml", 5 | "bootstrap.ml" 6 | ], 7 | [ 8 | "./boot.exe", 9 | "--release", 10 | "-j", 11 | "4" 12 | ] 13 | ] 14 | } 15 | -------------------------------------------------------------------------------- /.ci/release-platform-setup.yml: -------------------------------------------------------------------------------- 1 | parameters: 2 | platform: "macOS" 3 | folder: "platform-darwin" 4 | 5 | steps: 6 | - task: DownloadBuildArtifacts@0 7 | displayName: "Download ${{ parameters.platform }} Artifacts" 8 | inputs: 9 | artifactName: ${{ parameters.platform }} 10 | downloadPath: "_release" 11 | 12 | - script: "mkdir _release/${{ parameters.folder }}" 13 | displayName: "Create _release/${{ parameters.folder }}" 14 | 15 | - script: "cp -r _release/${{ parameters.platform }}/ _release/${{ parameters.folder }}" 16 | displayName: "cp ${{ parameters.platform }}" 17 | -------------------------------------------------------------------------------- /esy.lock/opam/jbuilder.transition/opam: -------------------------------------------------------------------------------- 1 | opam-version: "2.0" 2 | maintainer: "opensource@janestreet.com" 3 | authors: ["Jane Street Group, LLC "] 4 | homepage: "https://github.com/ocaml/dune" 5 | bug-reports: "https://github.com/ocaml/dune/issues" 6 | dev-repo: "git+https://github.com/ocaml/dune.git" 7 | license: "MIT" 8 | depends: ["ocaml" "dune"] 9 | post-messages: [ 10 | "Jbuilder has been renamed and the jbuilder package is now a transition \ 11 | package. Use the dune package instead." 12 | ] 13 | synopsis: 14 | "This is a transition package, jbuilder is now named dune. Use the dune" 15 | description: "package instead." 16 | -------------------------------------------------------------------------------- /package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "hello-ocaml", 3 | "version": "0.1.0", 4 | "description": "OCaml workflow with Esy", 5 | "license": "MIT", 6 | "esy": { 7 | "build": "dune build -p #{self.name}", 8 | "release": { 9 | "bin": "hello", 10 | "includePackages": [ 11 | "root", 12 | "@opam/camomile" 13 | ] 14 | } 15 | }, 16 | "scripts": { 17 | "test": "esy x hello" 18 | }, 19 | "dependencies": { 20 | "@opam/dune": "*", 21 | "@opam/lambda-term": "*", 22 | "@opam/lwt": "^4.0.0", 23 | "ocaml": "~4.6.0" 24 | }, 25 | "devDependencies": { 26 | "@opam/merlin": "^3.0.3", 27 | "ocaml": "~4.6.0" 28 | } 29 | } 30 | -------------------------------------------------------------------------------- /esy.lock/overrides/opam__s__ocamlbuild_opam__c__0.14.0_opam_override/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "build": [ 3 | [ 4 | "bash", 5 | "-c", 6 | "#{os == 'windows' ? 'patch -p1 < ocamlbuild-0.14.0.patch' : 'true'}" 7 | ], 8 | [ 9 | "make", 10 | "-f", 11 | "configure.make", 12 | "all", 13 | "OCAMLBUILD_PREFIX=#{self.install}", 14 | "OCAMLBUILD_BINDIR=#{self.bin}", 15 | "OCAMLBUILD_LIBDIR=#{self.lib}", 16 | "OCAMLBUILD_MANDIR=#{self.man}", 17 | "OCAMLBUILD_NATIVE=true", 18 | "OCAMLBUILD_NATIVE_TOOLS=true" 19 | ], 20 | [ 21 | "make", 22 | "check-if-preinstalled", 23 | "all", 24 | "#{os == 'windows' ? 'install' : 'opam-install'}" 25 | ] 26 | ] 27 | } 28 | -------------------------------------------------------------------------------- /esy.lock/opam/seq.0.1/opam: -------------------------------------------------------------------------------- 1 | opam-version: "2.0" 2 | maintainer: "simon.cruanes.2007@m4x.org" 3 | authors: "Simon Cruanes" 4 | homepage: "https://github.com/c-cube/seq/" 5 | bug-reports: "https://github.com/c-cube/seq/issues" 6 | license: "GPL" 7 | tags: ["iterator" "seq" "pure" "list" "compatibility" "cascade"] 8 | dev-repo: "git+https://github.com/c-cube/seq.git" 9 | build: [make "build"] 10 | install: [make "install"] 11 | remove: [ "ocamlfind" "remove" "seq" ] 12 | depends: [ 13 | "ocaml" {< "4.07.0"} 14 | "ocamlfind" {build} 15 | "ocamlbuild" {build} 16 | ] 17 | synopsis: 18 | "Compatibility package for OCaml's standard iterator type starting from 4.07." 19 | flags: light-uninstall 20 | url { 21 | src: "https://github.com/c-cube/seq/archive/0.1.tar.gz" 22 | checksum: "md5=0e87f9709541ed46ecb6f414bc31458c" 23 | } 24 | -------------------------------------------------------------------------------- /esy.lock/opam/conf-m4.1/opam: -------------------------------------------------------------------------------- 1 | opam-version: "2.0" 2 | maintainer: "tim@gfxmonk.net" 3 | homepage: "http://www.gnu.org/software/m4/m4.html" 4 | bug-reports: "https://github.com/ocaml/opam-repository/issues" 5 | authors: "GNU Project" 6 | license: "GPL-3" 7 | build: [["sh" "-exc" "echo | m4"]] 8 | depexts: [ 9 | ["m4"] {os-family = "debian"} 10 | ["m4"] {os-distribution = "fedora"} 11 | ["m4"] {os-distribution = "rhel"} 12 | ["m4"] {os-distribution = "centos"} 13 | ["m4"] {os-distribution = "alpine"} 14 | ["m4"] {os-distribution = "nixos"} 15 | ["m4"] {os-family = "suse"} 16 | ["m4"] {os-distribution = "ol"} 17 | ["m4"] {os-distribution = "arch"} 18 | ] 19 | synopsis: "Virtual package relying on m4" 20 | description: 21 | "This package can only install if the m4 binary is installed on the system." 22 | flags: conf 23 | -------------------------------------------------------------------------------- /esy.lock/opam/lwt_log.1.1.1/opam: -------------------------------------------------------------------------------- 1 | opam-version: "2.0" 2 | 3 | synopsis: "Lwt logging library (deprecated)" 4 | 5 | version: "1.1.1" 6 | license: "LGPL" 7 | homepage: "https://github.com/ocsigen/lwt_log" 8 | doc: "https://github.com/ocsigen/lwt_log/blob/master/src/core/lwt_log_core.mli" 9 | bug-reports: "https://github.com/ocsigen/lwt_log/issues" 10 | 11 | authors: [ 12 | "Shawn Wagner" 13 | "Jérémie Dimino" 14 | ] 15 | maintainer: "Anton Bachin " 16 | dev-repo: "git+https://github.com/ocsigen/lwt_log.git" 17 | 18 | depends: [ 19 | "dune" {>= "1.0"} 20 | "lwt" {>= "4.0.0"} 21 | ] 22 | 23 | build: [ 24 | ["dune" "build" "-p" name "-j" jobs] 25 | ] 26 | 27 | url { 28 | src: "https://github.com/aantron/lwt_log/archive/1.1.1.tar.gz" 29 | checksum: "md5=02e93be62288037870ae5b1ce099fe59" 30 | } 31 | -------------------------------------------------------------------------------- /esy.lock/opam/mmap.1.1.0/opam: -------------------------------------------------------------------------------- 1 | opam-version: "2.0" 2 | maintainer: "jeremie@dimino.org" 3 | authors: ["Jérémie Dimino " "Anton Bachin" ] 4 | homepage: "https://github.com/mirage/mmap" 5 | bug-reports: "https://github.com/mirage/mmap/issues" 6 | doc: "https://mirage.github.io/mmap/" 7 | dev-repo: "git+https://github.com/mirage/mmap.git" 8 | license: "LGPL 2.1 with linking exception" 9 | build: [ 10 | ["dune" "build" "-p" name "-j" jobs] 11 | ] 12 | depends: [ 13 | "ocaml" {>= "4.02.3"} 14 | "dune" {>= "1.6"} 15 | ] 16 | synopsis: "File mapping functionality" 17 | description: """ 18 | This project provides a Mmap.map_file functions for mapping files in memory. 19 | """ 20 | url { 21 | src: 22 | "https://github.com/mirage/mmap/releases/download/v1.1.0/mmap-v1.1.0.tbz" 23 | checksum: "md5=8c5d5fbc537296dc525867535fb878ba" 24 | } 25 | -------------------------------------------------------------------------------- /esy.lock/opam/lwt_react.1.1.2/opam: -------------------------------------------------------------------------------- 1 | opam-version: "2.0" 2 | 3 | synopsis: "Helpers for using React with Lwt" 4 | 5 | license: "MIT" 6 | homepage: "https://github.com/ocsigen/lwt" 7 | doc: "https://ocsigen.org/lwt/api/Lwt_react" 8 | bug-reports: "https://github.com/ocsigen/lwt/issues" 9 | 10 | authors: [ 11 | "Jérémie Dimino" 12 | ] 13 | maintainer: [ 14 | "Anton Bachin " 15 | "Mauricio Fernandez " 16 | "Simon Cruanes " 17 | ] 18 | dev-repo: "git+https://github.com/ocsigen/lwt.git" 19 | 20 | depends: [ 21 | "dune" 22 | "lwt" {>= "3.0.0"} 23 | "ocaml" 24 | "react" {>= "1.0.0"} 25 | ] 26 | 27 | build: [ 28 | ["dune" "build" "-p" name "-j" jobs] 29 | ] 30 | 31 | url { 32 | src: "https://github.com/ocsigen/lwt/archive/4.2.0.tar.gz" 33 | checksum: "md5=2ce7827948adc611319f9449e4519070" 34 | } 35 | -------------------------------------------------------------------------------- /esy.lock/opam/result.1.4/opam: -------------------------------------------------------------------------------- 1 | opam-version: "2.0" 2 | maintainer: "opensource@janestreet.com" 3 | authors: ["Jane Street Group, LLC "] 4 | homepage: "https://github.com/janestreet/result" 5 | dev-repo: "git+https://github.com/janestreet/result.git" 6 | bug-reports: "https://github.com/janestreet/result/issues" 7 | license: "BSD3" 8 | build: [["dune" "build" "-p" name "-j" jobs]] 9 | depends: [ 10 | "ocaml" 11 | "dune" {>= "1.0"} 12 | ] 13 | synopsis: "Compatibility Result module" 14 | description: """ 15 | Projects that want to use the new result type defined in OCaml >= 4.03 16 | while staying compatible with older version of OCaml should use the 17 | Result module defined in this library.""" 18 | url { 19 | src: 20 | "https://github.com/janestreet/result/archive/1.4.tar.gz" 21 | checksum: "md5=d3162dbc501a2af65c8c71e0866541da" 22 | } 23 | -------------------------------------------------------------------------------- /.ci/cross-release.yml: -------------------------------------------------------------------------------- 1 | steps: 2 | - template: utils/use-node.yml 3 | 4 | - template: release-platform-setup.yml 5 | parameters: 6 | platform: "Linux" 7 | folder: "platform-linux" 8 | 9 | - template: release-platform-setup.yml 10 | parameters: 11 | platform: "macOS" 12 | folder: "platform-darwin" 13 | 14 | - template: release-platform-setup.yml 15 | parameters: 16 | platform: "Windows" 17 | folder: "platform-windows-x64" 18 | 19 | - script: "node .ci/pipelines-release.js" 20 | displayName: "node .ci/pipelines-release.js" 21 | continueOnError: true 22 | 23 | - script: "npm pack" 24 | displayName: "npm pack" 25 | workingDirectory: "_release" 26 | 27 | - task: PublishBuildArtifacts@1 28 | displayName: "Publish Artifact: Release" 29 | inputs: 30 | PathtoPublish: "_release" 31 | ArtifactName: Release 32 | -------------------------------------------------------------------------------- /esy.lock/opam/charInfo_width.1.1.0/opam: -------------------------------------------------------------------------------- 1 | opam-version: "2.0" 2 | maintainer: "zandoye@gmail.com" 3 | authors: [ "ZAN DoYe" ] 4 | homepage: "https://bitbucket.org/zandoye/charinfo_width/" 5 | bug-reports: "https://bitbucket.org/zandoye/charinfo_width/issues" 6 | license: "MIT" 7 | dev-repo: "hg+https://bitbucket.org/zandoye/charinfo_width" 8 | build: [ 9 | ["dune" "build" "-p" name "-j" jobs] 10 | ["dune" "runtest" "-p" name "-j" jobs] {with-test & (ocaml:version >= "4.04.0")} 11 | ] 12 | depends: [ 13 | "ocaml" {>= "4.02.3"} 14 | "result" 15 | "camomile" {>= "1.0.0" & < "2.0~"} 16 | "dune" 17 | "ppx_expect" {with-test & < "v0.13"} 18 | ] 19 | 20 | synopsis: "Determine column width for a character" 21 | description: """ 22 | This module is implemented purely in OCaml and the width function follows the prototype of POSIX's wcwidth.""" 23 | 24 | url { 25 | src:"https://bitbucket.org/zandoye/charinfo_width/get/1.1.0.tar.gz" 26 | checksum: "md5=c4ab038e06f06a29692c05fdd7c268c5" 27 | } 28 | -------------------------------------------------------------------------------- /esy.lock/opam/camomile.1.0.1/opam: -------------------------------------------------------------------------------- 1 | opam-version: "2.0" 2 | maintainer: "yoriyuki.y@gmail.com" 3 | authors: ["Yoriyuki Yamagata"] 4 | homepage: "https://github.com/yoriyuki/Camomile/wiki" 5 | bug-reports: "https://github.com/yoriyuki/Camomile/issues" 6 | license: "LGPL-2+ with OCaml linking exception" 7 | dev-repo: "git+https://github.com/yoriyuki/Camomile.git" 8 | build: [ 9 | ["ocaml" "configure.ml" "--share" "%{share}%/camomile"] 10 | ["jbuilder" "subst" "-p" name] {pinned} 11 | ["jbuilder" "build" "-p" name "-j" "1"] 12 | ] 13 | depends: [ 14 | "ocaml" {>= "4.02.3"} 15 | "jbuilder" {build & >= "1.0+beta17"} 16 | ] 17 | synopsis: "A Unicode library" 18 | description: """ 19 | Camomile is a Unicode library for OCaml. Camomile provides Unicode character 20 | type, UTF-8, UTF-16, UTF-32 strings, conversion to/from about 200 encodings, 21 | collation and locale-sensitive case mappings, and more. The library is currently 22 | designed for Unicode Standard 3.2.""" 23 | url { 24 | src: 25 | "https://github.com/yoriyuki/Camomile/releases/download/1.0.1/camomile-1.0.1.tbz" 26 | checksum: "md5=82e016653431353a07f22c259adc6e05" 27 | } 28 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # hello-ocaml 2 | 3 | [![Build status](https://ci.appveyor.com/api/projects/status/owyhaxk3ebeb6yq8/branch/master?svg=true)](https://ci.appveyor.com/project/esy/hello-ocaml/branch/master) 4 | [![Build Status](https://travis-ci.org/esy-ocaml/hello-ocaml.svg?branch=master)](https://travis-ci.org/esy-ocaml/hello-ocaml) 5 | 6 | A project which demonstrates an OCaml workflow with [Esy][]. 7 | 8 | [Esy]: https://github.com/esy-ocaml/esy 9 | [npm]: https://www.npmjs.com 10 | 11 | ## Usage 12 | 13 | You need Esy, you can install the beta using [npm][]: 14 | 15 | % npm install -g esy 16 | 17 | Then you can install the project dependencies using: 18 | 19 | % esy install 20 | 21 | Then build the project dependencies along with the project itself: 22 | 23 | % esy build 24 | 25 | Now you can run your editor within the environment (which also includes merlin): 26 | 27 | % esy $EDITOR 28 | % esy vim 29 | 30 | After you make some changes to source code, you can re-run project's build 31 | using: 32 | 33 | % esy build 34 | 35 | And test compiled executable: 36 | 37 | % esy ./_build/default/bin/hello.exe 38 | 39 | Shell into environment: 40 | 41 | % esy shell 42 | -------------------------------------------------------------------------------- /.ci/utils/publish-build-cache.yml: -------------------------------------------------------------------------------- 1 | # Steps for publishing project cache 2 | 3 | steps: 4 | - bash: 'mkdir -p $(STAGING_DIRECTORY_UNIX)' 5 | condition: and(succeeded(), eq(variables['Build.SourceBranch'], 'refs/heads/master')) 6 | displayName: '[Cache][Publish] Create cache directory' 7 | 8 | - bash: 'cd $(ESY__CACHE_INSTALL_PATH) && tar -czf $(STAGING_DIRECTORY_UNIX)/esy-cache.tar .' 9 | workingDirectory: '' 10 | condition: and(succeeded(), eq(variables['Build.SourceBranch'], 'refs/heads/master')) 11 | displayName: '[Cache][Publish] Tar esy cache directory' 12 | 13 | # - bash: 'cd $(ESY__NPM_ROOT) && tar -czf $(STAGING_DIRECTORY_UNIX)/npm-cache.tar .' 14 | # condition: and(succeeded(), eq(variables['Build.SourceBranch'], 'refs/heads/master')) 15 | # displayName: '[Cache][Publish] Tar npm cache directory' 16 | 17 | - task: PublishBuildArtifacts@1 18 | displayName: '[Cache][Publish] Upload tarball' 19 | condition: and(succeeded(), eq(variables['Build.SourceBranch'], 'refs/heads/master')) 20 | inputs: 21 | pathToPublish: '$(STAGING_DIRECTORY)' 22 | artifactName: 'cache-$(Agent.OS)-install' 23 | parallel: true 24 | parallelCount: 8 25 | -------------------------------------------------------------------------------- /esy.lock/overrides/opam__s__ocamlfind_opam__c__1.8.1_opam_override/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "build": [ 3 | [ 4 | "bash", 5 | "-c", 6 | "#{os == 'windows' ? 'patch -p1 < findlib-1.8.1.patch' : 'true'}" 7 | ], 8 | [ 9 | "./configure", 10 | "-bindir", 11 | "#{self.bin}", 12 | "-sitelib", 13 | "#{self.lib}", 14 | "-mandir", 15 | "#{self.man}", 16 | "-config", 17 | "#{self.lib}/findlib.conf", 18 | "-no-custom", 19 | "-no-topfind" 20 | ], 21 | [ 22 | "make", 23 | "all" 24 | ], 25 | [ 26 | "make", 27 | "opt" 28 | ] 29 | ], 30 | "install": [ 31 | [ 32 | "make", 33 | "install" 34 | ], 35 | [ 36 | "install", 37 | "-m", 38 | "0755", 39 | "ocaml-stub", 40 | "#{self.bin}/ocaml" 41 | ], 42 | [ 43 | "mkdir", 44 | "-p", 45 | "#{self.toplevel}" 46 | ], 47 | [ 48 | "install", 49 | "-m", 50 | "0644", 51 | "src/findlib/topfind", 52 | "#{self.toplevel}/topfind" 53 | ] 54 | ], 55 | "exportedEnv": { 56 | "OCAML_TOPLEVEL_PATH": { 57 | "val": "#{self.toplevel}", 58 | "scope": "global" 59 | } 60 | } 61 | } 62 | -------------------------------------------------------------------------------- /esy.lock/opam/ocamlbuild.0.14.0/opam: -------------------------------------------------------------------------------- 1 | opam-version: "2.0" 2 | maintainer: "Gabriel Scherer " 3 | authors: ["Nicolas Pouillard" "Berke Durak"] 4 | homepage: "https://github.com/ocaml/ocamlbuild/" 5 | bug-reports: "https://github.com/ocaml/ocamlbuild/issues" 6 | license: "LGPL-2 with OCaml linking exception" 7 | doc: "https://github.com/ocaml/ocamlbuild/blob/master/manual/manual.adoc" 8 | dev-repo: "git+https://github.com/ocaml/ocamlbuild.git" 9 | build: [ 10 | [ 11 | make 12 | "-f" 13 | "configure.make" 14 | "all" 15 | "OCAMLBUILD_PREFIX=%{prefix}%" 16 | "OCAMLBUILD_BINDIR=%{bin}%" 17 | "OCAMLBUILD_LIBDIR=%{lib}%" 18 | "OCAMLBUILD_MANDIR=%{man}%" 19 | "OCAML_NATIVE=%{ocaml:native}%" 20 | "OCAML_NATIVE_TOOLS=%{ocaml:native}%" 21 | ] 22 | [make "check-if-preinstalled" "all" "opam-install"] 23 | ] 24 | conflicts: [ 25 | "base-ocamlbuild" 26 | "ocamlfind" {< "1.6.2"} 27 | ] 28 | synopsis: 29 | "OCamlbuild is a build system with builtin rules to easily build most OCaml projects." 30 | depends: [ 31 | "ocaml" {>= "4.03"} 32 | ] 33 | url { 34 | src: "https://github.com/ocaml/ocamlbuild/archive/0.14.0.tar.gz" 35 | checksum: "sha256=87b29ce96958096c0a1a8eeafeb6268077b2d11e1bf2b3de0f5ebc9cf8d42e78" 36 | } 37 | -------------------------------------------------------------------------------- /esy.lock/opam/react.1.2.1/opam: -------------------------------------------------------------------------------- 1 | opam-version: "2.0" 2 | maintainer: "Daniel Bünzli " 3 | homepage: "http://erratique.ch/software/react" 4 | authors: ["Daniel Bünzli "] 5 | doc: "http://erratique.ch/software/react/doc/React" 6 | dev-repo: "git+http://erratique.ch/repos/react.git" 7 | bug-reports: "https://github.com/dbuenzli/react/issues" 8 | tags: [ "reactive" "declarative" "signal" "event" "frp" "org:erratique" ] 9 | license: "ISC" 10 | depends: [ 11 | "ocaml" {>= "4.01.0"} 12 | "ocamlfind" {build} 13 | "ocamlbuild" {build} 14 | "topkg" {build & >= "0.9.0"} 15 | ] 16 | build: 17 | [[ "ocaml" "pkg/pkg.ml" "build" 18 | "--dev-pkg" "%{pinned}%" ]] 19 | synopsis: "Declarative events and signals for OCaml" 20 | description: """ 21 | Release %%VERSION%% 22 | 23 | React is an OCaml module for functional reactive programming (FRP). It 24 | provides support to program with time varying values : declarative 25 | events and signals. React doesn't define any primitive event or 26 | signal, it lets the client chooses the concrete timeline. 27 | 28 | React is made of a single, independent, module and distributed under 29 | the ISC license.""" 30 | url { 31 | src: "http://erratique.ch/software/react/releases/react-1.2.1.tbz" 32 | checksum: "md5=ce1454438ce4e9d2931248d3abba1fcc" 33 | } 34 | -------------------------------------------------------------------------------- /esy.lock/opam/cppo.1.6.6/opam: -------------------------------------------------------------------------------- 1 | opam-version: "2.0" 2 | maintainer: "martin@mjambon.com" 3 | authors: "Martin Jambon" 4 | license: "BSD-3-Clause" 5 | homepage: "http://mjambon.com/cppo.html" 6 | doc: "https://ocaml-community.github.io/cppo/" 7 | bug-reports: "https://github.com/ocaml-community/cppo/issues" 8 | depends: [ 9 | "ocaml" {>= "4.03"} 10 | "dune" {>= "1.0"} 11 | "base-unix" 12 | ] 13 | build: [ 14 | ["dune" "subst"] {pinned} 15 | ["dune" "build" "-p" name "-j" jobs] 16 | ["dune" "runtest" "-p" name "-j" jobs] {with-test} 17 | ] 18 | dev-repo: "git+https://github.com/ocaml-community/cppo.git" 19 | synopsis: "Code preprocessor like cpp for OCaml" 20 | description: """ 21 | Cppo is an equivalent of the C preprocessor for OCaml programs. 22 | It allows the definition of simple macros and file inclusion. 23 | 24 | Cppo is: 25 | 26 | * more OCaml-friendly than cpp 27 | * easy to learn without consulting a manual 28 | * reasonably fast 29 | * simple to install and to maintain 30 | """ 31 | url { 32 | src: "https://github.com/ocaml-community/cppo/releases/download/v1.6.6/cppo-v1.6.6.tbz" 33 | checksum: [ 34 | "sha256=e7272996a7789175b87bb998efd079794a8db6625aae990d73f7b4484a07b8a0" 35 | "sha512=44ecf9d225d9e45490a2feac0bde04865ca398dba6c3579e3370fcd1ea255707b8883590852af8b2df87123801062b9f3acce2455c092deabf431f9c4fb8d8eb" 36 | ] 37 | } 38 | -------------------------------------------------------------------------------- /esy.lock/opam/zed.2.0.2/opam: -------------------------------------------------------------------------------- 1 | opam-version: "2.0" 2 | maintainer: "opam-devel@lists.ocaml.org" 3 | authors: ["Jérémie Dimino"] 4 | homepage: "https://github.com/ocaml-community/zed" 5 | bug-reports: "https://github.com/ocaml-community/zed/issues" 6 | dev-repo: "git://github.com/ocaml-community/zed.git" 7 | license: "BSD3" 8 | depends: [ 9 | "ocaml" {>= "4.02.3"} 10 | "dune" {>= "1.1.0"} 11 | "base-bytes" 12 | "camomile" {>= "1.0.1"} 13 | "react" 14 | "charInfo_width" {>= "1.1.0" & < "2.0~"} 15 | ] 16 | build: [ 17 | ["dune" "build" "-p" name "-j" jobs] 18 | ["dune" "runtest" "-p" name "-j" jobs] {with-test} 19 | ] 20 | synopsis: "Abstract engine for text edition in OCaml" 21 | description: """ 22 | Zed is an abstract engine for text edition. It can be used to write text 23 | editors, edition widgets, readlines, ... Zed uses Camomile to fully support the 24 | Unicode specification, and implements an UTF-8 encoded string type with 25 | validation, and a rope datastructure to achieve efficient operations on large 26 | Unicode buffers. Zed also features a regular expression search on ropes. To 27 | support efficient text edition capabilities, Zed provides macro recording and 28 | cursor management facilities.""" 29 | url { 30 | src: "https://github.com/ocaml-community/zed/releases/download/2.0.2/zed-2.0.2.tbz" 31 | checksum: "md5=5c0cb1ee87147514adfd23966d58440e" 32 | } 33 | -------------------------------------------------------------------------------- /esy.lock/opam/yojson.1.7.0/opam: -------------------------------------------------------------------------------- 1 | opam-version: "2.0" 2 | maintainer: "martin@mjambon.com" 3 | authors: ["Martin Jambon"] 4 | homepage: "https://github.com/ocaml-community/yojson" 5 | bug-reports: "https://github.com/ocaml-community/yojson/issues" 6 | dev-repo: "git+https://github.com/ocaml-community/yojson.git" 7 | doc: "https://ocaml-community.github.io/yojson/" 8 | build: [ 9 | ["dune" "subst"] {pinned} 10 | ["dune" "build" "-p" name "-j" jobs] 11 | ] 12 | run-test: [["dune" "runtest" "-p" name "-j" jobs]] 13 | depends: [ 14 | "ocaml" {>= "4.02.3"} 15 | "dune" 16 | "cppo" {build} 17 | "easy-format" 18 | "biniou" {>= "1.2.0"} 19 | "alcotest" {with-test & >= "0.8.5"} 20 | ] 21 | synopsis: 22 | "Yojson is an optimized parsing and printing library for the JSON format" 23 | description: """ 24 | Yojson is an optimized parsing and printing library for the JSON format. 25 | 26 | It addresses a few shortcomings of json-wheel including 2x speedup, 27 | polymorphic variants and optional syntax for tuples and variants. 28 | 29 | ydump is a pretty-printing command-line program provided with the 30 | yojson package. 31 | 32 | The program atdgen can be used to derive OCaml-JSON serializers and 33 | deserializers from type definitions.""" 34 | url { 35 | src: 36 | "https://github.com/ocaml-community/yojson/releases/download/1.7.0/yojson-1.7.0.tbz" 37 | checksum: "md5=b89d39ca3f8c532abe5f547ad3b8f84d" 38 | } 39 | -------------------------------------------------------------------------------- /esy.lock/opam/lambda-term.2.0.1/opam: -------------------------------------------------------------------------------- 1 | opam-version: "2.0" 2 | maintainer: "jeremie@dimino.org" 3 | authors: ["Jérémie Dimino"] 4 | homepage: "https://github.com/ocaml-community/lambda-term" 5 | bug-reports: "https://github.com/ocaml-community/lambda-term/issues" 6 | dev-repo: "git://github.com/ocaml-community/lambda-term.git" 7 | license: "BSD3" 8 | build: [ 9 | ["dune" "subst"] {pinned} 10 | ["dune" "build" "-p" name "-j" jobs] 11 | ["dune" "runtest" "-p" name "-j" jobs] {with-test} 12 | ] 13 | depends: [ 14 | "ocaml" {>= "4.02.3"} 15 | "lwt" {>= "4.0.0"} 16 | "lwt_log" 17 | "react" 18 | "zed" {>= "2.0" & < "3.0"} 19 | "camomile" {>= "0.8.6"} 20 | "lwt_react" 21 | "dune" {>= "1.0.0"} 22 | ] 23 | synopsis: "Terminal manipulation library for OCaml" 24 | description: """ 25 | Lambda-term is a cross-platform library for manipulating the terminal. It 26 | provides an abstraction for keys, mouse events, colors, as well as a set of 27 | widgets to write curses-like applications. The main objective of lambda-term is 28 | to provide a higher level functional interface to terminal manipulation than, 29 | for example, ncurses, by providing a native OCaml interface instead of bindings 30 | to a C library. Lambda-term integrates with zed to provide text edition 31 | facilities in console applications.""" 32 | url { 33 | src: 34 | "https://github.com/ocaml-community/lambda-term/releases/download/2.0.1/lambda-term-2.0.1.tbz" 35 | checksum: "md5=4b4b8480fe1280e1ed2a34ed93d16675" 36 | } 37 | -------------------------------------------------------------------------------- /.ci/build-platform.yml: -------------------------------------------------------------------------------- 1 | parameters: 2 | platform: "macOS" 3 | vmImage: "macOS-10.13" 4 | STAGING_DIRECTORY: /Users/vsts/STAGING 5 | STAGING_DIRECTORY_UNIX: /Users/vsts/STAGING 6 | ESY__CACHE_INSTALL_PATH: /Users/vsts/.esy/3____________________________________________________________________/i 7 | ESY__CACHE_SOURCE_TARBALL_PATH: /Users/vsts/.esy/source/i 8 | 9 | jobs: 10 | - job: ${{ parameters.platform }} 11 | pool: 12 | vmImage: ${{ parameters.vmImage }} 13 | demands: node.js 14 | timeoutInMinutes: 120 # This is mostly for Windows 15 | variables: 16 | 17 | STAGING_DIRECTORY: ${{ parameters.STAGING_DIRECTORY }} 18 | STAGING_DIRECTORY_UNIX: ${{ parameters.STAGING_DIRECTORY_UNIX }} 19 | ESY__CACHE_INSTALL_PATH: ${{ parameters.ESY__CACHE_INSTALL_PATH }} 20 | ESY__CACHE_SOURCE_TARBALL_PATH: ${{ parameters.ESY__CACHE_SOURCE_TARBALL_PATH }} 21 | 22 | steps: 23 | - template: utils/use-node.yml 24 | - template: utils/use-esy.yml 25 | - template: utils/restore-build-cache.yml 26 | - script: "esy install" 27 | displayName: "esy install" 28 | - script: "esy build" 29 | displayName: "esy build" 30 | - script: "esy test" 31 | displayName: "Test command" 32 | - script: "esy release" 33 | displayName: "esy release" 34 | - template: utils/publish-build-cache.yml 35 | - task: PublishBuildArtifacts@1 36 | displayName: "Publish Artifact: ${{ parameters.platform }}" 37 | inputs: 38 | PathtoPublish: "_release" 39 | ArtifactName: ${{ parameters.platform }} 40 | -------------------------------------------------------------------------------- /esy.lock/opam/ocamlfind.1.8.1/opam: -------------------------------------------------------------------------------- 1 | opam-version: "2.0" 2 | synopsis: "A library manager for OCaml" 3 | maintainer: "Thomas Gazagnaire " 4 | authors: "Gerd Stolpmann " 5 | homepage: "http://projects.camlcity.org/projects/findlib.html" 6 | bug-reports: "https://gitlab.camlcity.org/gerd/lib-findlib/issues" 7 | dev-repo: "git+https://gitlab.camlcity.org/gerd/lib-findlib.git" 8 | description: """ 9 | Findlib is a library manager for OCaml. It provides a convention how 10 | to store libraries, and a file format ("META") to describe the 11 | properties of libraries. There is also a tool (ocamlfind) for 12 | interpreting the META files, so that it is very easy to use libraries 13 | in programs and scripts. 14 | """ 15 | build: [ 16 | [ 17 | "./configure" 18 | "-bindir" 19 | bin 20 | "-sitelib" 21 | lib 22 | "-mandir" 23 | man 24 | "-config" 25 | "%{lib}%/findlib.conf" 26 | "-no-custom" 27 | "-no-camlp4" {!ocaml:preinstalled & ocaml:version >= "4.02.0"} 28 | "-no-topfind" {ocaml:preinstalled} 29 | ] 30 | [make "all"] 31 | [make "opt"] {ocaml:native} 32 | ] 33 | install: [ 34 | [make "install"] 35 | ["install" "-m" "0755" "ocaml-stub" "%{bin}%/ocaml"] {ocaml:preinstalled} 36 | ] 37 | depends: [ 38 | "ocaml" {>= "4.00.0"} 39 | "conf-m4" {build} 40 | ] 41 | extra-files: [ 42 | ["ocamlfind.install" "md5=06f2c282ab52d93aa6adeeadd82a2543"] 43 | ["ocaml-stub" "md5=181f259c9e0bad9ef523e7d4abfdf87a"] 44 | ] 45 | url { 46 | src: "http://download.camlcity.org/download/findlib-1.8.1.tar.gz" 47 | checksum: "md5=18ca650982c15536616dea0e422cbd8c" 48 | mirrors: "http://download2.camlcity.org/download/findlib-1.8.1.tar.gz" 49 | } 50 | -------------------------------------------------------------------------------- /esy.lock/opam/lwt.4.2.1/opam: -------------------------------------------------------------------------------- 1 | opam-version: "2.0" 2 | 3 | synopsis: "Promises and event-driven I/O" 4 | 5 | license: "MIT" 6 | homepage: "https://github.com/ocsigen/lwt" 7 | doc: "https://ocsigen.org/lwt/manual/" 8 | bug-reports: "https://github.com/ocsigen/lwt/issues" 9 | 10 | authors: [ 11 | "Jérôme Vouillon" 12 | "Jérémie Dimino" 13 | ] 14 | maintainer: [ 15 | "Anton Bachin " 16 | "Mauricio Fernandez " 17 | "Simon Cruanes " 18 | ] 19 | dev-repo: "git+https://github.com/ocsigen/lwt.git" 20 | 21 | depends: [ 22 | "cppo" {build & >= "1.1.0"} 23 | "dune" 24 | "mmap" # mmap is needed as long as Lwt supports OCaml < 4.06.0. 25 | "ocaml" {>= "4.02.0"} 26 | "result" # result is needed as long as Lwt supports OCaml 4.02. 27 | "seq" # seq is needed as long as Lwt supports OCaml < 4.07.0. 28 | 29 | "bisect_ppx" {dev & >= "1.3.0"} 30 | "ocamlfind" {dev & >= "1.7.3-1"} 31 | ] 32 | depopts: [ 33 | "base-threads" 34 | "base-unix" 35 | "conf-libev" 36 | ] 37 | 38 | conflicts: [ 39 | "ocaml-variants" {= "4.02.1+BER"} 40 | ] 41 | 42 | build: [ 43 | ["dune" "build" "-p" name "-j" jobs] 44 | ] 45 | 46 | description: "A promise is a value that may become determined in the future. 47 | 48 | Lwt provides typed, composable promises. Promises that are resolved by I/O are 49 | resolved by Lwt in parallel. 50 | 51 | Meanwhile, OCaml code, including code creating and waiting on promises, runs in 52 | a single thread by default. This reduces the need for locks or other 53 | synchronization primitives. Code can be run in parallel on an opt-in basis." 54 | 55 | url { 56 | src: "https://github.com/ocsigen/lwt/archive/4.2.1.tar.gz" 57 | checksum: "md5=9d648386ca0a9978eb9487de36b781cc" 58 | } 59 | -------------------------------------------------------------------------------- /.ci/utils/restore-build-cache.yml: -------------------------------------------------------------------------------- 1 | # Steps for restoring project cache 2 | 3 | steps: 4 | - task: DownloadBuildArtifacts@0 5 | condition: and(succeeded(), ne(variables['Build.SourceBranch'], 'refs/heads/master')) 6 | displayName: '[Cache][Restore] Restore install' 7 | inputs: 8 | buildType: 'specific' 9 | project: '$(System.TeamProject)' 10 | pipeline: '$(Build.DefinitionName)' 11 | branchName: 'refs/heads/master' 12 | buildVersionToDownload: 'latestFromBranch' 13 | downloadType: 'single' 14 | artifactName: 'cache-$(Agent.OS)-install' 15 | downloadPath: '$(STAGING_DIRECTORY)' 16 | continueOnError: true 17 | 18 | - bash: 'mkdir -p $(ESY__CACHE_INSTALL_PATH)' 19 | condition: and(succeeded(), ne(variables['Build.SourceBranch'], 'refs/heads/master')) 20 | displayName: '[Cache][Restore] Create cache directory' 21 | 22 | # - bash: 'cd $(ESY__NPM_ROOT) && tar -xf $(STAGING_DIRECTORY_UNIX)/cache-$(Agent.OS)-install/npm-cache.tar -C .' 23 | # continueOnError: true 24 | # condition: and(succeeded(), ne(variables['Build.SourceBranch'], 'refs/heads/master')) 25 | # displayName: '[Cache][Restore] Untar npm cache directory' 26 | 27 | - bash: 'cd $(ESY__CACHE_INSTALL_PATH) && tar -xf $(STAGING_DIRECTORY_UNIX)/cache-$(Agent.OS)-install/esy-cache.tar -C .' 28 | continueOnError: true 29 | condition: and(succeeded(), ne(variables['Build.SourceBranch'], 'refs/heads/master')) 30 | displayName: '[Cache][Restore] Untar esy cache directory' 31 | 32 | - bash: 'rm -rf *' 33 | continueOnError: true 34 | workingDirectory: '$(STAGING_DIRECTORY)' 35 | condition: and(succeeded(), ne(variables['Build.SourceBranch'], 'refs/heads/master')) 36 | displayName: '[Cache][Restore] Clean up' 37 | -------------------------------------------------------------------------------- /azure-pipelines.yml: -------------------------------------------------------------------------------- 1 | name: Build esy project 2 | 3 | trigger: 4 | batch: true 5 | branches: 6 | include: 7 | - '*' 8 | 9 | pr: 10 | branches: 11 | include: 12 | - '*' 13 | 14 | jobs: 15 | - template: .ci/build-platform.yml 16 | parameters: 17 | platform: Linux 18 | vmImage: ubuntu-16.04 19 | STAGING_DIRECTORY: /home/vsts/STAGING 20 | STAGING_DIRECTORY_UNIX: /home/vsts/STAGING 21 | ESY__CACHE_INSTALL_PATH: /home/vsts/.esy/3_____________________________________________________________________/i 22 | ESY__CACHE_SOURCE_TARBALL_PATH: /home/vsts/.esy/source/i 23 | 24 | - template: .ci/build-platform.yml 25 | parameters: 26 | platform: macOS 27 | vmImage: macOS-10.13 28 | STAGING_DIRECTORY: /Users/vsts/STAGING 29 | STAGING_DIRECTORY_UNIX: /Users/vsts/STAGING 30 | ESY__CACHE_INSTALL_PATH: /Users/vsts/.esy/3____________________________________________________________________/i 31 | ESY__CACHE_SOURCE_TARBALL_PATH: /Users/vsts/.esy/source/i 32 | 33 | - template: .ci/build-platform.yml 34 | parameters: 35 | platform: Windows 36 | vmImage: vs2017-win2016 37 | STAGING_DIRECTORY: C:\Users\VssAdministrator\STAGING 38 | STAGING_DIRECTORY_UNIX: /C/Users/VssAdministrator/STAGING 39 | ESY__CACHE_INSTALL_PATH: /C/Users/VssAdministrator/.esy/3_/i 40 | ESY__CACHE_SOURCE_TARBALL_PATH: /C/Users/VssAdministrator/.esy/source/i 41 | 42 | # This job is kept here as we want to have the platform names in the same file 43 | - job: Release 44 | displayName: Release 45 | dependsOn: 46 | - Linux 47 | - macOS 48 | - Windows 49 | pool: 50 | vmImage: macOS-10.13 51 | demands: node.js 52 | steps: 53 | - template: .ci/cross-release.yml 54 | -------------------------------------------------------------------------------- /esy.lock/opam/easy-format.1.3.2/opam: -------------------------------------------------------------------------------- 1 | opam-version: "2.0" 2 | build: [ 3 | ["dune" "subst"] {pinned} 4 | ["dune" "build" "-p" name "-j" jobs] 5 | ["dune" "runtest" "-p" name "-j" jobs] {with-test} 6 | ["dune" "build" "-p" name "@doc"] {with-doc} 7 | ] 8 | maintainer: ["martin@mjambon.com" "rudi.grinberg@gmail.com"] 9 | authors: ["Martin Jambon"] 10 | bug-reports: "https://github.com/mjambon/easy-format/issues" 11 | homepage: "https://github.com/mjambon/easy-format" 12 | doc: "https://mjambon.github.io/easy-format/" 13 | license: "BSD-3-Clause" 14 | dev-repo: "git+https://github.com/mjambon/easy-format.git" 15 | synopsis: 16 | "High-level and functional interface to the Format module of the OCaml standard library" 17 | description: """ 18 | 19 | This module offers a high-level and functional interface to the Format module of 20 | the OCaml standard library. It is a pretty-printing facility, i.e. it takes as 21 | input some code represented as a tree and formats this code into the most 22 | visually satisfying result, breaking and indenting lines of code where 23 | appropriate. 24 | 25 | Input data must be first modelled and converted into a tree using 3 kinds of 26 | nodes: 27 | 28 | * atoms 29 | * lists 30 | * labelled nodes 31 | 32 | Atoms represent any text that is guaranteed to be printed as-is. Lists can model 33 | any sequence of items such as arrays of data or lists of definitions that are 34 | labelled with something like "int main", "let x =" or "x:".""" 35 | depends: [ 36 | "dune" {>= "1.10"} 37 | "ocaml" {>= "4.02.3"} 38 | ] 39 | url { 40 | src: 41 | "https://github.com/mjambon/easy-format/releases/download/1.3.2/easy-format-1.3.2.tbz" 42 | checksum: [ 43 | "sha256=3440c2b882d537ae5e9011eb06abb53f5667e651ea4bb3b460ea8230fa8c1926" 44 | "sha512=e39377a2ff020ceb9ac29e8515a89d9bdbc91dfcfa871c4e3baafa56753fac2896768e5d9822a050dc1e2ade43c8967afb69391a386c0a8ecd4e1f774e236135" 45 | ] 46 | } 47 | -------------------------------------------------------------------------------- /esy.lock/opam/biniou.1.2.1/opam: -------------------------------------------------------------------------------- 1 | opam-version: "2.0" 2 | build: [ 3 | ["dune" "subst"] {pinned} 4 | ["dune" "build" "-p" name "-j" jobs] 5 | ["dune" "runtest" "-p" name "-j" jobs] {with-test} 6 | ["dune" "build" "-p" name "@doc"] {with-doc} 7 | ] 8 | maintainer: ["martin@mjambon.com"] 9 | authors: ["Martin Jambon"] 10 | bug-reports: "https://github.com/mjambon/biniou/issues" 11 | homepage: "https://github.com/mjambon/biniou" 12 | doc: "https://mjambon.github.io/biniou/" 13 | license: "BSD-3-Clause" 14 | dev-repo: "git+https://github.com/mjambon/biniou.git" 15 | synopsis: 16 | "Binary data format designed for speed, safety, ease of use and backward compatibility as protocols evolve" 17 | description: """ 18 | 19 | Biniou (pronounced "be new") is a binary data format designed for speed, safety, 20 | ease of use and backward compatibility as protocols evolve. Biniou is vastly 21 | equivalent to JSON in terms of functionality but allows implementations several 22 | times faster (4 times faster than yojson), with 25-35% space savings. 23 | 24 | Biniou data can be decoded into human-readable form without knowledge of type 25 | definitions except for field and variant names which are represented by 31-bit 26 | hashes. A program named bdump is provided for routine visualization of biniou 27 | data files. 28 | 29 | The program atdgen is used to derive OCaml-Biniou serializers and deserializers 30 | from type definitions. 31 | 32 | Biniou format specification: mjambon.github.io/atdgen-doc/biniou-format.txt""" 33 | depends: [ 34 | "easy-format" 35 | "dune" {>= "1.10"} 36 | "ocaml" {>= "4.02.3"} 37 | ] 38 | url { 39 | src: 40 | "https://github.com/mjambon/biniou/releases/download/1.2.1/biniou-1.2.1.tbz" 41 | checksum: [ 42 | "sha256=35546c68b1929a8e6d27a3b39ecd17b38303a0d47e65eb9d1480c2061ea84335" 43 | "sha512=82670cc77bf3e869ee26e5fbe5a5affa45a22bc8b6c4bd7e85473912780e0111baca59b34a2c14feae3543ce6e239d7fddaeab24b686a65bfe642cdb91d27ebf" 44 | ] 45 | } 46 | -------------------------------------------------------------------------------- /esy.lock/opam/topkg.1.0.1/opam: -------------------------------------------------------------------------------- 1 | opam-version: "2.0" 2 | maintainer: "Daniel Bünzli " 3 | authors: ["Daniel Bünzli "] 4 | homepage: "http://erratique.ch/software/topkg" 5 | doc: "http://erratique.ch/software/topkg/doc" 6 | license: "ISC" 7 | dev-repo: "git+http://erratique.ch/repos/topkg.git" 8 | bug-reports: "https://github.com/dbuenzli/topkg/issues" 9 | tags: ["packaging" "ocamlbuild" "org:erratique"] 10 | depends: [ 11 | "ocaml" {>= "4.03.0"} 12 | "ocamlfind" {build & >= "1.6.1"} 13 | "ocamlbuild" ] 14 | build: [[ 15 | "ocaml" "pkg/pkg.ml" "build" 16 | "--pkg-name" name 17 | "--dev-pkg" "%{pinned}%" ]] 18 | synopsis: """The transitory OCaml software packager""" 19 | description: """\ 20 | 21 | Topkg is a packager for distributing OCaml software. It provides an 22 | API to describe the files a package installs in a given build 23 | configuration and to specify information about the package's 24 | distribution, creation and publication procedures. 25 | 26 | The optional topkg-care package provides the `topkg` command line tool 27 | which helps with various aspects of a package's life cycle: creating 28 | and linting a distribution, releasing it on the WWW, publish its 29 | documentation, add it to the OCaml opam repository, etc. 30 | 31 | Topkg is distributed under the ISC license and has **no** 32 | dependencies. This is what your packages will need as a *build* 33 | dependency. 34 | 35 | Topkg-care is distributed under the ISC license it depends on 36 | [fmt][fmt], [logs][logs], [bos][bos], [cmdliner][cmdliner], 37 | [webbrowser][webbrowser] and `opam-format`. 38 | 39 | [fmt]: http://erratique.ch/software/fmt 40 | [logs]: http://erratique.ch/software/logs 41 | [bos]: http://erratique.ch/software/bos 42 | [cmdliner]: http://erratique.ch/software/cmdliner 43 | [webbrowser]: http://erratique.ch/software/webbrowser 44 | """ 45 | url { 46 | archive: "http://erratique.ch/software/topkg/releases/topkg-1.0.1.tbz" 47 | checksum: "16b90e066d8972a5ef59655e7c28b3e9" 48 | } 49 | -------------------------------------------------------------------------------- /.ci/pipelines-release.js: -------------------------------------------------------------------------------- 1 | const fs = require("fs"); 2 | const path = require("path"); 3 | 4 | console.log("Creating package.json"); 5 | const mainPackageJson = require("../package.json"); 6 | const packageJson = JSON.stringify( 7 | { 8 | name: mainPackageJson.name, 9 | version: mainPackageJson.version, 10 | license: mainPackageJson.license, 11 | description: mainPackageJson.description, 12 | repository: mainPackageJson.repository, 13 | scripts: { 14 | postinstall: "node ./postinstall.js" 15 | }, 16 | bin: mainPackageJson.esy.release.releasedBinaries.reduce((acc, curr) => { 17 | return Object.assign({ [curr]: "bin/" + curr }, acc); 18 | }, {}), 19 | files: [ 20 | "_export/", 21 | "bin/", 22 | "postinstall.js", 23 | "esyInstallRelease.js", 24 | "platform-linux/", 25 | "platform-darwin/", 26 | "platform-windows-x64/" 27 | ] 28 | }, 29 | null, 30 | 2 31 | ); 32 | 33 | fs.writeFileSync( 34 | path.join(__dirname, "..", "_release", "package.json"), 35 | packageJson, 36 | { 37 | encoding: "utf8" 38 | } 39 | ); 40 | 41 | console.log("Copying LICENSE"); 42 | fs.copyFileSync( 43 | path.join(__dirname, "..", "MIT-LICENSE"), 44 | path.join(__dirname, "..", "_release", "LICENSE") 45 | ); 46 | 47 | console.log("Copying README.md"); 48 | fs.copyFileSync( 49 | path.join(__dirname, "..", "README.md"), 50 | path.join(__dirname, "..", "_release", "README.md") 51 | ); 52 | 53 | console.log("Copying postinstall.js"); 54 | fs.copyFileSync( 55 | path.join(__dirname, "release-postinstall.js"), 56 | path.join(__dirname, "..", "_release", "postinstall.js") 57 | ); 58 | 59 | console.log("Creating placeholder files"); 60 | const placeholderFile = `#!/usr/bin/env node 61 | 62 | console.log("You need to have postinstall enabled")`; 63 | fs.mkdirSync(path.join(__dirname, "..", "_release", "bin")); 64 | const binPath = path.join( 65 | __dirname, 66 | "..", 67 | "_release", 68 | "bin", 69 | mainPackageJson.esy.release.releasedBinaries[0] 70 | ); 71 | 72 | fs.writeFileSync(binPath, placeholderFile); 73 | fs.chmodSync(binPath, 0777); 74 | -------------------------------------------------------------------------------- /esy.lock/opam/dune.1.11.0/opam: -------------------------------------------------------------------------------- 1 | opam-version: "2.0" 2 | synopsis: "Fast, portable and opinionated build system" 3 | description: """ 4 | 5 | dune is a build system that was designed to simplify the release of 6 | Jane Street packages. It reads metadata from "dune" files following a 7 | very simple s-expression syntax. 8 | 9 | dune is fast, it has very low-overhead and support parallel builds on 10 | all platforms. It has no system dependencies, all you need to build 11 | dune and packages using dune is OCaml. You don't need or make or bash 12 | as long as the packages themselves don't use bash explicitly. 13 | 14 | dune supports multi-package development by simply dropping multiple 15 | repositories into the same directory. 16 | 17 | It also supports multi-context builds, such as building against 18 | several opam roots/switches simultaneously. This helps maintaining 19 | packages across several versions of OCaml and gives cross-compilation 20 | for free. 21 | """ 22 | maintainer: ["Jane Street Group, LLC "] 23 | authors: ["Jane Street Group, LLC "] 24 | license: "MIT" 25 | homepage: "https://github.com/ocaml/dune" 26 | doc: "https://dune.readthedocs.io/" 27 | bug-reports: "https://github.com/ocaml/dune/issues" 28 | depends: [ 29 | "ocaml" {>= "4.02"} 30 | "base-unix" 31 | "base-threads" 32 | ] 33 | conflicts: [ 34 | "jbuilder" {!= "transition"} 35 | "odoc" {< "1.3.0"} 36 | "dune-release" {< "1.3.0"} 37 | ] 38 | dev-repo: "git+https://github.com/ocaml/dune.git" 39 | build: [ 40 | # opam 2 sets OPAM_SWITCH_PREFIX, so we don't need a hardcoded path 41 | ["ocaml" "configure.ml" "--libdir" lib] {opam-version < "2"} 42 | ["ocaml" "bootstrap.ml"] 43 | ["./boot.exe" "--release" "--subst"] {pinned} 44 | ["./boot.exe" "--release" "-j" jobs] 45 | ] 46 | url { 47 | src: 48 | "https://github.com/ocaml/dune/releases/download/1.11.0/dune-build-info-1.11.0.tbz" 49 | checksum: [ 50 | "sha256=bcfdf55d981d7e621a696cac34a3af26340d41c045404617df6f5dbfd5165486" 51 | "sha512=3be3b6f1a3d18c50c864322288242c4dd526ea80d0847781bd98075c548731373211fcf3c953a4d7863d663e65a33242384b79bad938078e6c70fa715090e6a9" 52 | ] 53 | } 54 | -------------------------------------------------------------------------------- /esy.lock/opam/merlin.3.3.2/opam: -------------------------------------------------------------------------------- 1 | opam-version: "2.0" 2 | name: "merlin" 3 | maintainer: "defree@gmail.com" 4 | authors: "The Merlin team" 5 | homepage: "https://github.com/ocaml/merlin" 6 | bug-reports: "https://github.com/ocaml/merlin/issues" 7 | dev-repo: "git+https://github.com/ocaml/merlin.git" 8 | build: [ 9 | ["dune" "subst"] {pinned} 10 | ["dune" "build" "-p" name "-j" jobs] 11 | ] 12 | depends: [ 13 | "ocaml" {>= "4.02.1" & < "4.09"} 14 | "dune" {>= "1.8.0"} 15 | "ocamlfind" {>= "1.5.2"} 16 | "yojson" 17 | "mdx" {with-test & >= "1.3.0"} 18 | ] 19 | synopsis: 20 | "Editor helper, provides completion, typing and source browsing in Vim and Emacs" 21 | description: 22 | "Merlin is an assistant for editing OCaml code. It aims to provide the features available in modern IDEs: error reporting, auto completion, source browsing and much more." 23 | post-messages: [ 24 | "merlin installed. 25 | 26 | Quick setup for VIM 27 | ------------------- 28 | Append this to your .vimrc to add merlin to vim's runtime-path: 29 | let g:opamshare = substitute(system('opam config var share'),'\\n$','','''') 30 | execute \"set rtp+=\" . g:opamshare . \"/merlin/vim\" 31 | 32 | Also run the following line in vim to index the documentation: 33 | :execute \"helptags \" . g:opamshare . \"/merlin/vim/doc\" 34 | 35 | Quick setup for EMACS 36 | ------------------- 37 | Add opam emacs directory to your load-path by appending this to your .emacs: 38 | (let ((opam-share (ignore-errors (car (process-lines \"opam\" \"config\" \"var\" \"share\"))))) 39 | (when (and opam-share (file-directory-p opam-share)) 40 | ;; Register Merlin 41 | (add-to-list 'load-path (expand-file-name \"emacs/site-lisp\" opam-share)) 42 | (autoload 'merlin-mode \"merlin\" nil t nil) 43 | ;; Automatically start it in OCaml buffers 44 | (add-hook 'tuareg-mode-hook 'merlin-mode t) 45 | (add-hook 'caml-mode-hook 'merlin-mode t) 46 | ;; Use opam switch to lookup ocamlmerlin binary 47 | (setq merlin-command 'opam))) 48 | 49 | Take a look at https://github.com/ocaml/merlin for more information 50 | 51 | Quick setup with opam-user-setup 52 | -------------------------------- 53 | 54 | Opam-user-setup support Merlin. 55 | 56 | $ opam user-setup install 57 | 58 | should take care of basic setup. 59 | See https://github.com/OCamlPro/opam-user-setup 60 | " 61 | {success & !user-setup:installed} 62 | ] 63 | url { 64 | src: 65 | "https://github.com/ocaml/merlin/releases/download/v3.3.2/merlin-v3.3.2.tbz" 66 | checksum: [ 67 | "sha256=1d1c71e663b1e58acf19069cebd1e8d18f7dbe513c6065347d162cdd2c2de801" 68 | "sha512=3ae021669808a40b4449f1cbdaca40b605ea5779a6204addd8b0ee4af9f14f528d55ca43a8dd3c7d547fb8e4cb256c09a9151d5559ef24dad83b5ab05aa146a2" 69 | ] 70 | } 71 | -------------------------------------------------------------------------------- /.ci/release-postinstall.js: -------------------------------------------------------------------------------- 1 | /** 2 | * release-postinstall.js 3 | * 4 | * XXX: We want to keep this script installable at least with node 4.x. 5 | * 6 | * This script is bundled with the `npm` package and executed on release. 7 | * Since we have a 'fat' NPM package (with all platform binaries bundled), 8 | * this postinstall script extracts them and puts the current platform's 9 | * bits in the right place. 10 | */ 11 | 12 | var path = require("path"); 13 | var cp = require("child_process"); 14 | var fs = require("fs"); 15 | var os = require("os"); 16 | var platform = process.platform; 17 | 18 | var packageJson = require('./package.json'); 19 | var binariesToCopy = Object.keys(packageJson.bin).map(function(name) { 20 | return packageJson.bin[name] 21 | }).concat([ 22 | "esyInstallRelease.js" 23 | ]); 24 | var foldersToCopy = ["bin", "_export"]; 25 | 26 | function copyRecursive(srcDir, dstDir) { 27 | var results = []; 28 | var list = fs.readdirSync(srcDir); 29 | var src, dst; 30 | list.forEach(function(file) { 31 | src = path.join(srcDir, file); 32 | dst = path.join(dstDir, file); 33 | 34 | var stat = fs.statSync(src); 35 | if (stat && stat.isDirectory()) { 36 | try { 37 | fs.mkdirSync(dst); 38 | } catch (e) { 39 | console.log("directory already exists: " + dst); 40 | console.error(e); 41 | } 42 | results = results.concat(copyRecursive(src, dst)); 43 | } else { 44 | try { 45 | fs.writeFileSync(dst, fs.readFileSync(src)); 46 | } catch (e) { 47 | console.log("could't copy file: " + dst); 48 | console.error(e); 49 | } 50 | results.push(src); 51 | } 52 | }); 53 | return results; 54 | } 55 | 56 | /** 57 | * Since os.arch returns node binary's target arch, not 58 | * the system arch. 59 | * Credits: https://github.com/feross/arch/blob/af080ff61346315559451715c5393d8e86a6d33c/index.js#L10-L58 60 | */ 61 | 62 | function arch() { 63 | /** 64 | * The running binary is 64-bit, so the OS is clearly 64-bit. 65 | */ 66 | if (process.arch === "x64") { 67 | return "x64"; 68 | } 69 | 70 | /** 71 | * All recent versions of Mac OS are 64-bit. 72 | */ 73 | if (process.platform === "darwin") { 74 | return "x64"; 75 | } 76 | 77 | /** 78 | * On Windows, the most reliable way to detect a 64-bit OS from within a 32-bit 79 | * app is based on the presence of a WOW64 file: %SystemRoot%\SysNative. 80 | * See: https://twitter.com/feross/status/776949077208510464 81 | */ 82 | if (process.platform === "win32") { 83 | var useEnv = false; 84 | try { 85 | useEnv = !!( 86 | process.env.SYSTEMROOT && fs.statSync(process.env.SYSTEMROOT) 87 | ); 88 | } catch (err) {} 89 | 90 | var sysRoot = useEnv ? process.env.SYSTEMROOT : "C:\\Windows"; 91 | 92 | // If %SystemRoot%\SysNative exists, we are in a WOW64 FS Redirected application. 93 | var isWOW64 = false; 94 | try { 95 | isWOW64 = !!fs.statSync(path.join(sysRoot, "sysnative")); 96 | } catch (err) {} 97 | 98 | return isWOW64 ? "x64" : "x86"; 99 | } 100 | 101 | /** 102 | * On Linux, use the `getconf` command to get the architecture. 103 | */ 104 | if (process.platform === "linux") { 105 | var output = cp.execSync("getconf LONG_BIT", { encoding: "utf8" }); 106 | return output === "64\n" ? "x64" : "x86"; 107 | } 108 | 109 | /** 110 | * If none of the above, assume the architecture is 32-bit. 111 | */ 112 | return "x86"; 113 | } 114 | 115 | // implementing it b/c we don't want to depend on fs.copyFileSync which appears 116 | // only in node@8.x 117 | function copyFileSync(sourcePath, destPath) { 118 | var data = fs.readFileSync(sourcePath); 119 | var stat = fs.statSync(sourcePath); 120 | fs.writeFileSync(destPath, data); 121 | fs.chmodSync(destPath, stat.mode); 122 | } 123 | 124 | var copyPlatformBinaries = platformPath => { 125 | var platformBuildPath = path.join(__dirname, "platform-" + platformPath); 126 | 127 | foldersToCopy.forEach(folderPath => { 128 | var sourcePath = path.join(platformBuildPath, folderPath); 129 | var destPath = path.join(__dirname, folderPath); 130 | 131 | copyRecursive(sourcePath, destPath); 132 | }); 133 | 134 | binariesToCopy.forEach(binaryPath => { 135 | var sourcePath = path.join(platformBuildPath, binaryPath); 136 | var destPath = path.join(__dirname, binaryPath); 137 | if (fs.existsSync(destPath)) { 138 | fs.unlinkSync(destPath); 139 | } 140 | copyFileSync(sourcePath, destPath); 141 | fs.chmodSync(destPath, 0777); 142 | }); 143 | }; 144 | 145 | try { 146 | fs.mkdirSync("_export"); 147 | } catch (e) { 148 | console.log("Could not create _export folder"); 149 | } 150 | 151 | switch (platform) { 152 | case "win32": 153 | if (arch() !== "x64") { 154 | console.warn("error: x86 is currently not supported on Windows"); 155 | process.exit(1); 156 | } 157 | 158 | copyPlatformBinaries("windows-x64"); 159 | break; 160 | case "linux": 161 | case "darwin": 162 | copyPlatformBinaries(platform); 163 | break; 164 | default: 165 | console.warn("error: no release built for the " + platform + " platform"); 166 | process.exit(1); 167 | } 168 | 169 | require("./esyInstallRelease"); 170 | -------------------------------------------------------------------------------- /esy.lock/overrides/opam__s__ocamlfind_opam__c__1.8.1_opam_override/files/findlib-1.8.1.patch: -------------------------------------------------------------------------------- 1 | --- ./Makefile 2 | +++ ./Makefile 3 | @@ -57,16 +57,16 @@ 4 | cat findlib.conf.in | \ 5 | $(SH) tools/patch '@SITELIB@' '$(OCAML_SITELIB)' >findlib.conf 6 | if ./tools/cmd_from_same_dir ocamlc; then \ 7 | - echo 'ocamlc="ocamlc.opt"' >>findlib.conf; \ 8 | + echo 'ocamlc="ocamlc.opt$(EXEC_SUFFIX)"' >>findlib.conf; \ 9 | fi 10 | if ./tools/cmd_from_same_dir ocamlopt; then \ 11 | - echo 'ocamlopt="ocamlopt.opt"' >>findlib.conf; \ 12 | + echo 'ocamlopt="ocamlopt.opt$(EXEC_SUFFIX)"' >>findlib.conf; \ 13 | fi 14 | if ./tools/cmd_from_same_dir ocamldep; then \ 15 | - echo 'ocamldep="ocamldep.opt"' >>findlib.conf; \ 16 | + echo 'ocamldep="ocamldep.opt$(EXEC_SUFFIX)"' >>findlib.conf; \ 17 | fi 18 | if ./tools/cmd_from_same_dir ocamldoc; then \ 19 | - echo 'ocamldoc="ocamldoc.opt"' >>findlib.conf; \ 20 | + echo 'ocamldoc="ocamldoc.opt$(EXEC_SUFFIX)"' >>findlib.conf; \ 21 | fi 22 | 23 | .PHONY: install-doc 24 | --- ./src/findlib/findlib_config.mlp 25 | +++ ./src/findlib/findlib_config.mlp 26 | @@ -24,3 +24,5 @@ 27 | | "MacOS" -> "" (* don't know *) 28 | | _ -> failwith "Unknown Sys.os_type" 29 | ;; 30 | + 31 | +let exec_suffix = "@EXEC_SUFFIX@";; 32 | --- ./src/findlib/findlib.ml 33 | +++ ./src/findlib/findlib.ml 34 | @@ -28,15 +28,20 @@ 35 | let conf_ldconf = ref "";; 36 | let conf_ignore_dups_in = ref ([] : string list);; 37 | 38 | -let ocamlc_default = "ocamlc";; 39 | -let ocamlopt_default = "ocamlopt";; 40 | -let ocamlcp_default = "ocamlcp";; 41 | -let ocamloptp_default = "ocamloptp";; 42 | -let ocamlmklib_default = "ocamlmklib";; 43 | -let ocamlmktop_default = "ocamlmktop";; 44 | -let ocamldep_default = "ocamldep";; 45 | -let ocamlbrowser_default = "ocamlbrowser";; 46 | -let ocamldoc_default = "ocamldoc";; 47 | +let add_exec str = 48 | + match Findlib_config.exec_suffix with 49 | + | "" -> str 50 | + | a -> str ^ a ;; 51 | +let ocamlc_default = add_exec "ocamlc";; 52 | +let ocamlopt_default = add_exec "ocamlopt";; 53 | +let ocamlcp_default = add_exec "ocamlcp";; 54 | +let ocamloptp_default = add_exec "ocamloptp";; 55 | +let ocamlmklib_default = add_exec "ocamlmklib";; 56 | +let ocamlmktop_default = add_exec "ocamlmktop";; 57 | +let ocamldep_default = add_exec "ocamldep";; 58 | +let ocamlbrowser_default = add_exec "ocamlbrowser";; 59 | +let ocamldoc_default = add_exec "ocamldoc";; 60 | + 61 | 62 | 63 | let init_manually 64 | --- ./src/findlib/fl_package_base.ml 65 | +++ ./src/findlib/fl_package_base.ml 66 | @@ -133,7 +133,15 @@ 67 | List.find (fun def -> def.def_var = "exists_if") p.package_defs in 68 | let files = Fl_split.in_words def.def_value in 69 | List.exists 70 | - (fun file -> Sys.file_exists (Filename.concat d' file)) 71 | + (fun file -> 72 | + let fln = Filename.concat d' file in 73 | + let e = Sys.file_exists fln in 74 | + (* necessary for ppx executables *) 75 | + if e || Sys.os_type <> "Win32" || Filename.check_suffix fln ".exe" then 76 | + e 77 | + else 78 | + Sys.file_exists (fln ^ ".exe") 79 | + ) 80 | files 81 | with Not_found -> true in 82 | 83 | --- ./src/findlib/fl_split.ml 84 | +++ ./src/findlib/fl_split.ml 85 | @@ -126,10 +126,17 @@ 86 | | '/' | '\\' -> true 87 | | _ -> false in 88 | let norm_dir_win() = 89 | - if l >= 1 && s.[0] = '/' then 90 | - Buffer.add_char b '\\' else Buffer.add_char b s.[0]; 91 | - if l >= 2 && s.[1] = '/' then 92 | - Buffer.add_char b '\\' else Buffer.add_char b s.[1]; 93 | + if l >= 1 then ( 94 | + if s.[0] = '/' then 95 | + Buffer.add_char b '\\' 96 | + else 97 | + Buffer.add_char b s.[0] ; 98 | + if l >= 2 then 99 | + if s.[1] = '/' then 100 | + Buffer.add_char b '\\' 101 | + else 102 | + Buffer.add_char b s.[1]; 103 | + ); 104 | for k = 2 to l - 1 do 105 | let c = s.[k] in 106 | if is_slash c then ( 107 | --- ./src/findlib/frontend.ml 108 | +++ ./src/findlib/frontend.ml 109 | @@ -31,10 +31,18 @@ 110 | else 111 | Sys_error (arg ^ ": " ^ Unix.error_message code) 112 | 113 | +let is_win = Sys.os_type = "Win32" 114 | + 115 | +let () = 116 | + match Findlib_config.system with 117 | + | "win32" | "win64" | "mingw" | "cygwin" | "mingw64" | "cygwin64" -> 118 | + (try set_binary_mode_out stdout true with _ -> ()); 119 | + (try set_binary_mode_out stderr true with _ -> ()); 120 | + | _ -> () 121 | 122 | let slashify s = 123 | match Findlib_config.system with 124 | - | "mingw" | "mingw64" | "cygwin" -> 125 | + | "win32" | "win64" | "mingw" | "cygwin" | "mingw64" | "cygwin64" -> 126 | let b = Buffer.create 80 in 127 | String.iter 128 | (function 129 | @@ -49,7 +57,7 @@ 130 | 131 | let out_path ?(prefix="") s = 132 | match Findlib_config.system with 133 | - | "mingw" | "mingw64" | "cygwin" -> 134 | + | "win32" | "win64" | "mingw" | "mingw64" | "cygwin" -> 135 | let u = slashify s in 136 | prefix ^ 137 | (if String.contains u ' ' then 138 | @@ -273,11 +281,9 @@ 139 | 140 | 141 | let identify_dir d = 142 | - match Sys.os_type with 143 | - | "Win32" -> 144 | - failwith "identify_dir" (* not available *) 145 | - | _ -> 146 | - let s = Unix.stat d in 147 | + if is_win then 148 | + failwith "identify_dir"; (* not available *) 149 | + let s = Unix.stat d in 150 | (s.Unix.st_dev, s.Unix.st_ino) 151 | ;; 152 | 153 | @@ -459,6 +465,96 @@ 154 | ) 155 | packages 156 | 157 | +let rewrite_cmd s = 158 | + if s = "" || not is_win then 159 | + s 160 | + else 161 | + let s = 162 | + let l = String.length s in 163 | + let b = Buffer.create l in 164 | + for i = 0 to pred l do 165 | + match s.[i] with 166 | + | '/' -> Buffer.add_char b '\\' 167 | + | x -> Buffer.add_char b x 168 | + done; 169 | + Buffer.contents b 170 | + in 171 | + if (Filename.is_implicit s && String.contains s '\\' = false) || 172 | + Filename.check_suffix (String.lowercase s) ".exe" then 173 | + s 174 | + else 175 | + let s' = s ^ ".exe" in 176 | + if Sys.file_exists s' then 177 | + s' 178 | + else 179 | + s 180 | + 181 | +let rewrite_cmd s = 182 | + if s = "" || not is_win then s else 183 | + let s = 184 | + let l = String.length s in 185 | + let b = Buffer.create l in 186 | + for i = 0 to pred l do 187 | + match s.[i] with 188 | + | '/' -> Buffer.add_char b '\\' 189 | + | x -> Buffer.add_char b x 190 | + done; 191 | + Buffer.contents b 192 | + in 193 | + if (Filename.is_implicit s && String.contains s '\\' = false) || 194 | + Filename.check_suffix (String.lowercase s) ".exe" then 195 | + s 196 | + else 197 | + let s' = s ^ ".exe" in 198 | + if Sys.file_exists s' then 199 | + s' 200 | + else 201 | + s 202 | + 203 | +let rewrite_pp cmd = 204 | + if not is_win then cmd else 205 | + let module T = struct exception Keep end in 206 | + let is_whitespace = function 207 | + | ' ' | '\011' | '\012' | '\n' | '\r' | '\t' -> true 208 | + | _ -> false in 209 | + (* characters that triggers special behaviour (cmd.exe, not unix shell) *) 210 | + let is_unsafe_char = function 211 | + | '(' | ')' | '%' | '!' | '^' | '<' | '>' | '&' -> true 212 | + | _ -> false in 213 | + let len = String.length cmd in 214 | + let buf = Buffer.create (len + 4) in 215 | + let buf_cmd = Buffer.create len in 216 | + let rec iter_ws i = 217 | + if i >= len then () else 218 | + let cur = cmd.[i] in 219 | + if is_whitespace cur then ( 220 | + Buffer.add_char buf cur; 221 | + iter_ws (succ i) 222 | + ) 223 | + else 224 | + iter_cmd i 225 | + and iter_cmd i = 226 | + if i >= len then add_buf_cmd () else 227 | + let cur = cmd.[i] in 228 | + if is_unsafe_char cur || cur = '"' || cur = '\'' then 229 | + raise T.Keep; 230 | + if is_whitespace cur then ( 231 | + add_buf_cmd (); 232 | + Buffer.add_substring buf cmd i (len - i) 233 | + ) 234 | + else ( 235 | + Buffer.add_char buf_cmd cur; 236 | + iter_cmd (succ i) 237 | + ) 238 | + and add_buf_cmd () = 239 | + if Buffer.length buf_cmd > 0 then 240 | + Buffer.add_string buf (rewrite_cmd (Buffer.contents buf_cmd)) 241 | + in 242 | + try 243 | + iter_ws 0; 244 | + Buffer.contents buf 245 | + with 246 | + | T.Keep -> cmd 247 | 248 | let process_pp_spec syntax_preds packages pp_opts = 249 | (* Returns: pp_command *) 250 | @@ -549,7 +645,7 @@ 251 | None -> [] 252 | | Some cmd -> 253 | ["-pp"; 254 | - cmd ^ " " ^ 255 | + (rewrite_cmd cmd) ^ " " ^ 256 | String.concat " " (List.map Filename.quote pp_i_options) ^ " " ^ 257 | String.concat " " (List.map Filename.quote pp_archives) ^ " " ^ 258 | String.concat " " (List.map Filename.quote pp_opts)] 259 | @@ -625,9 +721,11 @@ 260 | in 261 | try 262 | let preprocessor = 263 | + rewrite_cmd ( 264 | resolve_path 265 | ~base ~explicit:true 266 | - (package_property predicates pname "ppx") in 267 | + (package_property predicates pname "ppx") ) 268 | + in 269 | ["-ppx"; String.concat " " (preprocessor :: options)] 270 | with Not_found -> [] 271 | ) 272 | @@ -895,6 +993,14 @@ 273 | switch (e.g. -L instead of -L ) 274 | *) 275 | 276 | +(* We may need to remove files on which we do not have complete control. 277 | + On Windows, removing a read-only file fails so try to change the 278 | + mode of the file first. *) 279 | +let remove_file fname = 280 | + try Sys.remove fname 281 | + with Sys_error _ when is_win -> 282 | + (try Unix.chmod fname 0o666 with Unix.Unix_error _ -> ()); 283 | + Sys.remove fname 284 | 285 | let ocamlc which () = 286 | 287 | @@ -1022,9 +1128,12 @@ 288 | 289 | "-intf", 290 | Arg.String (fun s -> pass_files := !pass_files @ [ Intf(slashify s) ]); 291 | - 292 | + 293 | "-pp", 294 | - Arg.String (fun s -> pp_specified := true; add_spec_fn "-pp" s); 295 | + Arg.String (fun s -> pp_specified := true; add_spec_fn "-pp" (rewrite_pp s)); 296 | + 297 | + "-ppx", 298 | + Arg.String (fun s -> add_spec_fn "-ppx" (rewrite_pp s)); 299 | 300 | "-thread", 301 | Arg.Unit (fun _ -> threads := threads_default); 302 | @@ -1237,7 +1346,7 @@ 303 | with 304 | any -> 305 | close_out initl; 306 | - Sys.remove initl_file_name; 307 | + remove_file initl_file_name; 308 | raise any 309 | end; 310 | 311 | @@ -1245,9 +1354,9 @@ 312 | at_exit 313 | (fun () -> 314 | let tr f x = try f x with _ -> () in 315 | - tr Sys.remove initl_file_name; 316 | - tr Sys.remove (Filename.chop_extension initl_file_name ^ ".cmi"); 317 | - tr Sys.remove (Filename.chop_extension initl_file_name ^ ".cmo"); 318 | + tr remove_file initl_file_name; 319 | + tr remove_file (Filename.chop_extension initl_file_name ^ ".cmi"); 320 | + tr remove_file (Filename.chop_extension initl_file_name ^ ".cmo"); 321 | ); 322 | 323 | let exclude_list = [ stdlibdir; threads_dir; vmthreads_dir ] in 324 | @@ -1493,7 +1602,9 @@ 325 | [ "-v", Arg.Unit (fun () -> verbose := Verbose); 326 | "-pp", Arg.String (fun s -> 327 | pp_specified := true; 328 | - options := !options @ ["-pp"; s]); 329 | + options := !options @ ["-pp"; rewrite_pp s]); 330 | + "-ppx", Arg.String (fun s -> 331 | + options := !options @ ["-ppx"; rewrite_pp s]); 332 | ] 333 | ) 334 | ) 335 | @@ -1672,7 +1783,9 @@ 336 | Arg.String (fun s -> add_spec_fn "-I" (slashify (resolve_path s))); 337 | 338 | "-pp", Arg.String (fun s -> pp_specified := true; 339 | - add_spec_fn "-pp" s); 340 | + add_spec_fn "-pp" (rewrite_pp s)); 341 | + "-ppx", Arg.String (fun s -> add_spec_fn "-ppx" (rewrite_pp s)); 342 | + 343 | ] 344 | ) 345 | ) 346 | @@ -1830,7 +1943,10 @@ 347 | output_string ch_out append; 348 | close_out ch_out; 349 | close_in ch_in; 350 | - Unix.utimes outpath s.Unix.st_mtime s.Unix.st_mtime; 351 | + (try Unix.utimes outpath s.Unix.st_mtime s.Unix.st_mtime 352 | + with Unix.Unix_error(e,_,_) -> 353 | + prerr_endline("Warning: setting utimes for " ^ outpath 354 | + ^ ": " ^ Unix.error_message e)); 355 | 356 | prerr_endline("Installed " ^ outpath); 357 | with 358 | @@ -1882,6 +1998,8 @@ 359 | Unix.openfile (Filename.concat dir owner_file) [Unix.O_RDONLY] 0 in 360 | let f = 361 | Unix.in_channel_of_descr fd in 362 | + if is_win then 363 | + set_binary_mode_in f false; 364 | try 365 | let line = input_line f in 366 | let is_my_file = (line = pkg) in 367 | @@ -2208,7 +2326,7 @@ 368 | let lines = read_ldconf !ldconf in 369 | let dlldir_norm = Fl_split.norm_dir dlldir in 370 | let dlldir_norm_lc = string_lowercase_ascii dlldir_norm in 371 | - let ci_filesys = (Sys.os_type = "Win32") in 372 | + let ci_filesys = is_win in 373 | let check_dir d = 374 | let d' = Fl_split.norm_dir d in 375 | (d' = dlldir_norm) || 376 | @@ -2356,7 +2474,7 @@ 377 | List.iter 378 | (fun file -> 379 | let absfile = Filename.concat dlldir file in 380 | - Sys.remove absfile; 381 | + remove_file absfile; 382 | prerr_endline ("Removed " ^ absfile) 383 | ) 384 | dll_files 385 | @@ -2365,7 +2483,7 @@ 386 | (* Remove the files from the package directory: *) 387 | if Sys.file_exists pkgdir then begin 388 | let files = Sys.readdir pkgdir in 389 | - Array.iter (fun f -> Sys.remove (Filename.concat pkgdir f)) files; 390 | + Array.iter (fun f -> remove_file (Filename.concat pkgdir f)) files; 391 | Unix.rmdir pkgdir; 392 | prerr_endline ("Removed " ^ pkgdir) 393 | end 394 | @@ -2415,7 +2533,9 @@ 395 | 396 | 397 | let print_configuration() = 398 | + let sl = slashify in 399 | let dir s = 400 | + let s = sl s in 401 | if Sys.file_exists s then 402 | s 403 | else 404 | @@ -2453,27 +2573,27 @@ 405 | if md = "" then "the corresponding package directories" else dir md 406 | ); 407 | Printf.printf "The standard library is assumed to reside in:\n %s\n" 408 | - (Findlib.ocaml_stdlib()); 409 | + (sl (Findlib.ocaml_stdlib())); 410 | Printf.printf "The ld.conf file can be found here:\n %s\n" 411 | - (Findlib.ocaml_ldconf()); 412 | + (sl (Findlib.ocaml_ldconf())); 413 | flush stdout 414 | | Some "conf" -> 415 | - print_endline (Findlib.config_file()) 416 | + print_endline (sl (Findlib.config_file())) 417 | | Some "path" -> 418 | - List.iter print_endline (Findlib.search_path()) 419 | + List.iter ( fun x -> print_endline (sl x)) (Findlib.search_path()) 420 | | Some "destdir" -> 421 | - print_endline (Findlib.default_location()) 422 | + print_endline ( sl (Findlib.default_location())) 423 | | Some "metadir" -> 424 | - print_endline (Findlib.meta_directory()) 425 | + print_endline ( sl (Findlib.meta_directory())) 426 | | Some "metapath" -> 427 | let mdir = Findlib.meta_directory() in 428 | let ddir = Findlib.default_location() in 429 | - print_endline 430 | - (if mdir <> "" then mdir ^ "/META.%s" else ddir ^ "/%s/META") 431 | + print_endline ( sl 432 | + (if mdir <> "" then mdir ^ "/META.%s" else ddir ^ "/%s/META")) 433 | | Some "stdlib" -> 434 | - print_endline (Findlib.ocaml_stdlib()) 435 | + print_endline ( sl (Findlib.ocaml_stdlib())) 436 | | Some "ldconf" -> 437 | - print_endline (Findlib.ocaml_ldconf()) 438 | + print_endline ( sl (Findlib.ocaml_ldconf())) 439 | | _ -> 440 | assert false 441 | ;; 442 | @@ -2481,7 +2601,7 @@ 443 | 444 | let ocamlcall pkg cmd = 445 | let dir = package_directory pkg in 446 | - let path = Filename.concat dir cmd in 447 | + let path = rewrite_cmd (Filename.concat dir cmd) in 448 | begin 449 | try Unix.access path [ Unix.X_OK ] 450 | with 451 | @@ -2647,6 +2767,10 @@ 452 | | Sys_error f -> 453 | prerr_endline ("ocamlfind: " ^ f); 454 | exit 2 455 | + | Unix.Unix_error (e, fn, f) -> 456 | + prerr_endline ("ocamlfind: " ^ fn ^ " " ^ f 457 | + ^ ": " ^ Unix.error_message e); 458 | + exit 2 459 | | Findlib.No_such_package(pkg,info) -> 460 | prerr_endline ("ocamlfind: Package `" ^ pkg ^ "' not found" ^ 461 | (if info <> "" then " - " ^ info else "")); 462 | --- ./src/findlib/Makefile 463 | +++ ./src/findlib/Makefile 464 | @@ -90,6 +90,7 @@ 465 | cat findlib_config.mlp | \ 466 | $(SH) $(TOP)/tools/patch '@CONFIGFILE@' '$(OCAMLFIND_CONF)' | \ 467 | $(SH) $(TOP)/tools/patch '@STDLIB@' '$(OCAML_CORE_STDLIB)' | \ 468 | + $(SH) $(TOP)/tools/patch '@EXEC_SUFFIX@' '$(EXEC_SUFFIX)' | \ 469 | sed -e 's;@AUTOLINK@;$(OCAML_AUTOLINK);g' \ 470 | -e 's;@SYSTEM@;$(SYSTEM);g' \ 471 | >findlib_config.ml 472 | -------------------------------------------------------------------------------- /esy.lock/overrides/opam__s__ocamlbuild_opam__c__0.14.0_opam_override/files/ocamlbuild-0.14.0.patch: -------------------------------------------------------------------------------- 1 | --- ./Makefile 2 | +++ ./Makefile 3 | @@ -213,7 +213,7 @@ 4 | rm -f man/ocamlbuild.1 5 | 6 | man/options_man.byte: src/ocamlbuild_pack.cmo 7 | - $(OCAMLC) $^ -I src man/options_man.ml -o man/options_man.byte 8 | + $(OCAMLC) -I +unix unix.cma $^ -I src man/options_man.ml -o man/options_man.byte 9 | 10 | clean:: 11 | rm -f man/options_man.cm* 12 | --- ./src/command.ml 13 | +++ ./src/command.ml 14 | @@ -148,9 +148,10 @@ 15 | let self = string_of_command_spec_with_calls call_with_tags call_with_target resolve_virtuals in 16 | let b = Buffer.create 256 in 17 | (* The best way to prevent bash from switching to its windows-style 18 | - * quote-handling is to prepend an empty string before the command name. *) 19 | + * quote-handling is to prepend an empty string before the command name. 20 | + * space seems to work, too - and the ouput is nicer *) 21 | if Sys.os_type = "Win32" then 22 | - Buffer.add_string b "''"; 23 | + Buffer.add_char b ' '; 24 | let first = ref true in 25 | let put_space () = 26 | if !first then 27 | @@ -260,7 +261,7 @@ 28 | 29 | let execute_many ?(quiet=false) ?(pretend=false) cmds = 30 | add_parallel_stat (List.length cmds); 31 | - let degraded = !*My_unix.is_degraded || Sys.os_type = "Win32" in 32 | + let degraded = !*My_unix.is_degraded in 33 | let jobs = !jobs in 34 | if jobs < 0 then invalid_arg "jobs < 0"; 35 | let max_jobs = if jobs = 0 then None else Some jobs in 36 | --- ./src/findlib.ml 37 | +++ ./src/findlib.ml 38 | @@ -66,9 +66,6 @@ 39 | (fun command -> lexer & Lexing.from_string & run_and_read command) 40 | command 41 | 42 | -let run_and_read command = 43 | - Printf.ksprintf run_and_read command 44 | - 45 | let rec query name = 46 | try 47 | Hashtbl.find packages name 48 | @@ -135,7 +132,8 @@ 49 | with Not_found -> s 50 | 51 | let list () = 52 | - List.map before_space (split_nl & run_and_read "%s list" ocamlfind) 53 | + let cmd = Shell.quote_filename_if_needed ocamlfind ^ " list" in 54 | + List.map before_space (split_nl & run_and_read cmd) 55 | 56 | (* The closure algorithm is easy because the dependencies are already closed 57 | and sorted for each package. We only have to make the union. We could also 58 | --- ./src/main.ml 59 | +++ ./src/main.ml 60 | @@ -162,6 +162,9 @@ 61 | Tags.mem "traverse" tags 62 | || List.exists (Pathname.is_prefix path_name) !Options.include_dirs 63 | || List.exists (Pathname.is_prefix path_name) target_dirs) 64 | + && ((* beware: !Options.build_dir is an absolute directory *) 65 | + Pathname.normalize !Options.build_dir 66 | + <> Pathname.normalize (Pathname.pwd/path_name)) 67 | end 68 | end 69 | end 70 | --- ./src/my_std.ml 71 | +++ ./src/my_std.ml 72 | @@ -271,13 +271,107 @@ 73 | try Array.iter (fun x -> if x = basename then raise Exit) a; false 74 | with Exit -> true 75 | 76 | +let command_plain = function 77 | +| [| |] -> 0 78 | +| margv -> 79 | + let rec waitpid a b = 80 | + match Unix.waitpid a b with 81 | + | exception (Unix.Unix_error(Unix.EINTR,_,_)) -> waitpid a b 82 | + | x -> x 83 | + in 84 | + let pid = Unix.(create_process margv.(0) margv stdin stdout stderr) in 85 | + let pid', process_status = waitpid [] pid in 86 | + assert (pid = pid'); 87 | + match process_status with 88 | + | Unix.WEXITED n -> n 89 | + | Unix.WSIGNALED _ -> 2 (* like OCaml's uncaught exceptions *) 90 | + | Unix.WSTOPPED _ -> 127 91 | + 92 | +(* can't use Lexers because of circular dependency *) 93 | +let split_path_win str = 94 | + let rec aux pos = 95 | + try 96 | + let i = String.index_from str pos ';' in 97 | + let len = i - pos in 98 | + if len = 0 then 99 | + aux (succ i) 100 | + else 101 | + String.sub str pos (i - pos) :: aux (succ i) 102 | + with Not_found | Invalid_argument _ -> 103 | + let len = String.length str - pos in 104 | + if len = 0 then [] else [String.sub str pos len] 105 | + in 106 | + aux 0 107 | + 108 | +let windows_shell = lazy begin 109 | + let rec iter = function 110 | + | [] -> [| "bash.exe" ; "--norc" ; "--noprofile" |] 111 | + | hd::tl -> 112 | + let dash = Filename.concat hd "dash.exe" in 113 | + if Sys.file_exists dash then [|dash|] else 114 | + let bash = Filename.concat hd "bash.exe" in 115 | + if Sys.file_exists bash = false then iter tl else 116 | + (* if sh.exe and bash.exe exist in the same dir, choose sh.exe *) 117 | + let sh = Filename.concat hd "sh.exe" in 118 | + if Sys.file_exists sh then [|sh|] else [|bash ; "--norc" ; "--noprofile"|] 119 | + in 120 | + split_path_win (try Sys.getenv "PATH" with Not_found -> "") |> iter 121 | +end 122 | + 123 | +let prep_windows_cmd cmd = 124 | + (* workaround known ocaml bug, remove later *) 125 | + if String.contains cmd '\t' && String.contains cmd ' ' = false then 126 | + " " ^ cmd 127 | + else 128 | + cmd 129 | + 130 | +let run_with_shell = function 131 | +| "" -> 0 132 | +| cmd -> 133 | + let cmd = prep_windows_cmd cmd in 134 | + let shell = Lazy.force windows_shell in 135 | + let qlen = Filename.quote cmd |> String.length in 136 | + (* old versions of dash had problems with bs *) 137 | + try 138 | + if qlen < 7_900 then 139 | + command_plain (Array.append shell [| "-ec" ; cmd |]) 140 | + else begin 141 | + (* it can still work, if the called command is a cygwin tool *) 142 | + let ch_closed = ref false in 143 | + let file_deleted = ref false in 144 | + let fln,ch = 145 | + Filename.open_temp_file 146 | + ~mode:[Open_binary] 147 | + "ocamlbuildtmp" 148 | + ".sh" 149 | + in 150 | + try 151 | + let f_slash = String.map ( fun x -> if x = '\\' then '/' else x ) fln in 152 | + output_string ch cmd; 153 | + ch_closed:= true; 154 | + close_out ch; 155 | + let ret = command_plain (Array.append shell [| "-e" ; f_slash |]) in 156 | + file_deleted:= true; 157 | + Sys.remove fln; 158 | + ret 159 | + with 160 | + | x -> 161 | + if !ch_closed = false then 162 | + close_out_noerr ch; 163 | + if !file_deleted = false then 164 | + (try Sys.remove fln with _ -> ()); 165 | + raise x 166 | + end 167 | + with 168 | + | (Unix.Unix_error _) as x -> 169 | + (* Sys.command doesn't raise an exception, so run_with_shell also won't 170 | + raise *) 171 | + Printexc.to_string x ^ ":" ^ cmd |> prerr_endline; 172 | + 1 173 | + 174 | let sys_command = 175 | - match Sys.os_type with 176 | - | "Win32" -> fun cmd -> 177 | - if cmd = "" then 0 else 178 | - let cmd = "bash --norc -c " ^ Filename.quote cmd in 179 | - Sys.command cmd 180 | - | _ -> fun cmd -> if cmd = "" then 0 else Sys.command cmd 181 | + if Sys.win32 then run_with_shell 182 | + else fun cmd -> if cmd = "" then 0 else Sys.command cmd 183 | 184 | (* FIXME warning fix and use Filename.concat *) 185 | let filename_concat x y = 186 | --- ./src/my_std.mli 187 | +++ ./src/my_std.mli 188 | @@ -69,3 +69,6 @@ 189 | 190 | val split_ocaml_version : (int * int * int * string) option 191 | (** (major, minor, patchlevel, rest) *) 192 | + 193 | +val windows_shell : string array Lazy.t 194 | +val prep_windows_cmd : string -> string 195 | --- ./src/ocamlbuild_executor.ml 196 | +++ ./src/ocamlbuild_executor.ml 197 | @@ -34,6 +34,8 @@ 198 | job_stdin : out_channel; 199 | job_stderr : in_channel; 200 | job_buffer : Buffer.t; 201 | + job_pid : int; 202 | + job_tmp_file: string option; 203 | mutable job_dying : bool; 204 | };; 205 | 206 | @@ -76,6 +78,61 @@ 207 | in 208 | loop 0 209 | ;; 210 | + 211 | +let open_process_full_win cmd env = 212 | + let (in_read, in_write) = Unix.pipe () in 213 | + let (out_read, out_write) = Unix.pipe () in 214 | + let (err_read, err_write) = Unix.pipe () in 215 | + Unix.set_close_on_exec in_read; 216 | + Unix.set_close_on_exec out_write; 217 | + Unix.set_close_on_exec err_read; 218 | + let inchan = Unix.in_channel_of_descr in_read in 219 | + let outchan = Unix.out_channel_of_descr out_write in 220 | + let errchan = Unix.in_channel_of_descr err_read in 221 | + let shell = Lazy.force Ocamlbuild_pack.My_std.windows_shell in 222 | + let test_cmd = 223 | + String.concat " " (List.map Filename.quote (Array.to_list shell)) ^ 224 | + "-ec " ^ 225 | + Filename.quote (Ocamlbuild_pack.My_std.prep_windows_cmd cmd) in 226 | + let argv,tmp_file = 227 | + if String.length test_cmd < 7_900 then 228 | + Array.append 229 | + shell 230 | + [| "-ec" ; Ocamlbuild_pack.My_std.prep_windows_cmd cmd |],None 231 | + else 232 | + let fln,ch = Filename.open_temp_file ~mode:[Open_binary] "ocamlbuild" ".sh" in 233 | + output_string ch (Ocamlbuild_pack.My_std.prep_windows_cmd cmd); 234 | + close_out ch; 235 | + let fln' = String.map (function '\\' -> '/' | c -> c) fln in 236 | + Array.append 237 | + shell 238 | + [| "-c" ; fln' |], Some fln in 239 | + let pid = 240 | + Unix.create_process_env argv.(0) argv env out_read in_write err_write in 241 | + Unix.close out_read; 242 | + Unix.close in_write; 243 | + Unix.close err_write; 244 | + (pid, inchan, outchan, errchan,tmp_file) 245 | + 246 | +let close_process_full_win (pid,inchan, outchan, errchan, tmp_file) = 247 | + let delete tmp_file = 248 | + match tmp_file with 249 | + | None -> () 250 | + | Some x -> try Sys.remove x with Sys_error _ -> () in 251 | + let tmp_file_deleted = ref false in 252 | + try 253 | + close_in inchan; 254 | + close_out outchan; 255 | + close_in errchan; 256 | + let res = snd(Unix.waitpid [] pid) in 257 | + tmp_file_deleted := true; 258 | + delete tmp_file; 259 | + res 260 | + with 261 | + | x when tmp_file <> None && !tmp_file_deleted = false -> 262 | + delete tmp_file; 263 | + raise x 264 | + 265 | (* ***) 266 | (*** execute *) 267 | (* XXX: Add test for non reentrancy *) 268 | @@ -130,10 +187,16 @@ 269 | (*** add_job *) 270 | let add_job cmd rest result id = 271 | (*display begin fun oc -> fp oc "Job %a is %s\n%!" print_job_id id cmd; end;*) 272 | - let (stdout', stdin', stderr') = open_process_full cmd env in 273 | + let (pid,stdout', stdin', stderr', tmp_file) = 274 | + if Sys.win32 then open_process_full_win cmd env else 275 | + let a,b,c = open_process_full cmd env in 276 | + -1,a,b,c,None 277 | + in 278 | incr jobs_active; 279 | - set_nonblock (doi stdout'); 280 | - set_nonblock (doi stderr'); 281 | + if not Sys.win32 then ( 282 | + set_nonblock (doi stdout'); 283 | + set_nonblock (doi stderr'); 284 | + ); 285 | let job = 286 | { job_id = id; 287 | job_command = cmd; 288 | @@ -143,7 +206,9 @@ 289 | job_stdin = stdin'; 290 | job_stderr = stderr'; 291 | job_buffer = Buffer.create 1024; 292 | - job_dying = false } 293 | + job_dying = false; 294 | + job_tmp_file = tmp_file; 295 | + job_pid = pid } 296 | in 297 | outputs := FDM.add (doi stdout') job (FDM.add (doi stderr') job !outputs); 298 | jobs := JS.add job !jobs; 299 | @@ -199,6 +264,7 @@ 300 | try 301 | read fd u 0 (Bytes.length u) 302 | with 303 | + | Unix.Unix_error(Unix.EPIPE,_,_) when Sys.win32 -> 0 304 | | Unix.Unix_error(e,_,_) -> 305 | let msg = error_message e in 306 | display (fun oc -> fp oc 307 | @@ -241,14 +307,19 @@ 308 | decr jobs_active; 309 | 310 | (* PR#5371: we would get EAGAIN below otherwise *) 311 | - clear_nonblock (doi job.job_stdout); 312 | - clear_nonblock (doi job.job_stderr); 313 | - 314 | + if not Sys.win32 then ( 315 | + clear_nonblock (doi job.job_stdout); 316 | + clear_nonblock (doi job.job_stderr); 317 | + ); 318 | do_read ~loop:true (doi job.job_stdout) job; 319 | do_read ~loop:true (doi job.job_stderr) job; 320 | outputs := FDM.remove (doi job.job_stdout) (FDM.remove (doi job.job_stderr) !outputs); 321 | jobs := JS.remove job !jobs; 322 | - let status = close_process_full (job.job_stdout, job.job_stdin, job.job_stderr) in 323 | + let status = 324 | + if Sys.win32 then 325 | + close_process_full_win (job.job_pid, job.job_stdout, job.job_stdin, job.job_stderr, job.job_tmp_file) 326 | + else 327 | + close_process_full (job.job_stdout, job.job_stdin, job.job_stderr) in 328 | 329 | let shown = ref false in 330 | 331 | --- ./src/ocamlbuild_unix_plugin.ml 332 | +++ ./src/ocamlbuild_unix_plugin.ml 333 | @@ -48,12 +48,22 @@ 334 | end 335 | 336 | let run_and_open s kont = 337 | + let s_orig = s in 338 | + let s = 339 | + (* Be consistent! My_unix.run_and_open uses My_std.sys_command and 340 | + sys_command uses bash. *) 341 | + if Sys.win32 = false then s else 342 | + let l = match Lazy.force My_std.windows_shell |> Array.to_list with 343 | + | hd::tl -> (Filename.quote hd)::tl 344 | + | _ -> assert false in 345 | + "\"" ^ (String.concat " " l) ^ " -ec " ^ Filename.quote (" " ^ s) ^ "\"" 346 | + in 347 | let ic = Unix.open_process_in s in 348 | let close () = 349 | match Unix.close_process_in ic with 350 | | Unix.WEXITED 0 -> () 351 | | Unix.WEXITED _ | Unix.WSIGNALED _ | Unix.WSTOPPED _ -> 352 | - failwith (Printf.sprintf "Error while running: %s" s) in 353 | + failwith (Printf.sprintf "Error while running: %s" s_orig) in 354 | let res = try 355 | kont ic 356 | with e -> (close (); raise e) 357 | --- ./src/options.ml 358 | +++ ./src/options.ml 359 | @@ -174,11 +174,24 @@ 360 | build_dir := Filename.concat (Sys.getcwd ()) s 361 | else 362 | build_dir := s 363 | + 364 | +let slashify = 365 | + if Sys.win32 then fun p -> String.map (function '\\' -> '/' | x -> x) p 366 | + else fun p ->p 367 | + 368 | +let sb () = 369 | + match Sys.os_type with 370 | + | "Win32" -> 371 | + (try set_binary_mode_out stdout true with _ -> ()); 372 | + | _ -> () 373 | + 374 | + 375 | let spec = ref ( 376 | let print_version () = 377 | + sb (); 378 | Printf.printf "ocamlbuild %s\n%!" Ocamlbuild_config.version; raise Exit_OK 379 | in 380 | - let print_vnum () = print_endline Ocamlbuild_config.version; raise Exit_OK in 381 | + let print_vnum () = sb (); print_endline Ocamlbuild_config.version; raise Exit_OK in 382 | Arg.align 383 | [ 384 | "-version", Unit print_version , " Display the version"; 385 | @@ -257,8 +270,8 @@ 386 | "-build-dir", String set_build_dir, " Set build directory (implies no-links)"; 387 | "-install-lib-dir", Set_string Ocamlbuild_where.libdir, " Set the install library directory"; 388 | "-install-bin-dir", Set_string Ocamlbuild_where.bindir, " Set the install binary directory"; 389 | - "-where", Unit (fun () -> print_endline !Ocamlbuild_where.libdir; raise Exit_OK), " Display the install library directory"; 390 | - "-which", String (fun cmd -> print_endline (find_tool cmd); raise Exit_OK), " Display path to the tool command"; 391 | + "-where", Unit (fun () -> sb (); print_endline (slashify !Ocamlbuild_where.libdir); raise Exit_OK), " Display the install library directory"; 392 | + "-which", String (fun cmd -> sb (); print_endline (slashify (find_tool cmd)); raise Exit_OK), " Display path to the tool command"; 393 | "-ocamlc", set_cmd ocamlc, " Set the OCaml bytecode compiler"; 394 | "-plugin-ocamlc", set_cmd plugin_ocamlc, " Set the OCaml bytecode compiler \ 395 | used when building myocamlbuild.ml (only)"; 396 | --- ./src/pathname.ml 397 | +++ ./src/pathname.ml 398 | @@ -84,6 +84,26 @@ 399 | | x :: xs -> x :: normalize_list xs 400 | 401 | let normalize x = 402 | + let x = 403 | + if Sys.win32 = false then 404 | + x 405 | + else 406 | + let len = String.length x in 407 | + let b = Bytes.create len in 408 | + for i = 0 to pred len do 409 | + match x.[i] with 410 | + | '\\' -> Bytes.set b i '/' 411 | + | c -> Bytes.set b i c 412 | + done; 413 | + if len > 1 then ( 414 | + let c1 = Bytes.get b 0 in 415 | + let c2 = Bytes.get b 1 in 416 | + if c2 = ':' && c1 >= 'a' && c1 <= 'z' && 417 | + ( len = 2 || Bytes.get b 2 = '/') then 418 | + Bytes.set b 0 (Char.uppercase_ascii c1) 419 | + ); 420 | + Bytes.unsafe_to_string b 421 | + in 422 | if Glob.eval not_normal_form_re x then 423 | let root, paths = split x in 424 | join root (normalize_list paths) 425 | --- ./src/shell.ml 426 | +++ ./src/shell.ml 427 | @@ -24,12 +24,26 @@ 428 | | 'a'..'z' | 'A'..'Z' | '0'..'9' | '.' | '-' | '/' | '_' | ':' | '@' | '+' | ',' -> loop (pos + 1) 429 | | _ -> false in 430 | loop 0 431 | + 432 | +let generic_quote quotequote s = 433 | + let l = String.length s in 434 | + let b = Buffer.create (l + 20) in 435 | + Buffer.add_char b '\''; 436 | + for i = 0 to l - 1 do 437 | + if s.[i] = '\'' 438 | + then Buffer.add_string b quotequote 439 | + else Buffer.add_char b s.[i] 440 | + done; 441 | + Buffer.add_char b '\''; 442 | + Buffer.contents b 443 | +let unix_quote = generic_quote "'\\''" 444 | + 445 | let quote_filename_if_needed s = 446 | if is_simple_filename s then s 447 | (* We should probably be using [Filename.unix_quote] except that function 448 | * isn't exported. Users on Windows will have to live with not being able to 449 | * install OCaml into c:\o'caml. Too bad. *) 450 | - else if Sys.os_type = "Win32" then Printf.sprintf "'%s'" s 451 | + else if Sys.os_type = "Win32" then unix_quote s 452 | else Filename.quote s 453 | let chdir dir = 454 | reset_filesys_cache (); 455 | @@ -37,7 +51,7 @@ 456 | let run args target = 457 | reset_readdir_cache (); 458 | let cmd = String.concat " " (List.map quote_filename_if_needed args) in 459 | - if !*My_unix.is_degraded || Sys.os_type = "Win32" then 460 | + if !*My_unix.is_degraded then 461 | begin 462 | Log.event cmd target Tags.empty; 463 | let st = sys_command cmd in 464 | -------------------------------------------------------------------------------- /esy.lock/index.json: -------------------------------------------------------------------------------- 1 | { 2 | "checksum": "ea42720a60ed2f31954da536954a13c1", 3 | "root": "hello-ocaml@link-dev:./package.json", 4 | "node": { 5 | "ocaml@4.6.10@d41d8cd9": { 6 | "id": "ocaml@4.6.10@d41d8cd9", 7 | "name": "ocaml", 8 | "version": "4.6.10", 9 | "source": { 10 | "type": "install", 11 | "source": [ 12 | "archive:https://registry.npmjs.org/ocaml/-/ocaml-4.6.10.tgz#sha1:33c67d0275dc1aeba25b11557192aefcd3cf0a6a" 13 | ] 14 | }, 15 | "overrides": [], 16 | "dependencies": [], 17 | "devDependencies": [] 18 | }, 19 | "hello-ocaml@link-dev:./package.json": { 20 | "id": "hello-ocaml@link-dev:./package.json", 21 | "name": "hello-ocaml", 22 | "version": "link-dev:./package.json", 23 | "source": { 24 | "type": "link-dev", 25 | "path": ".", 26 | "manifest": "package.json" 27 | }, 28 | "overrides": [], 29 | "dependencies": [ 30 | "ocaml@4.6.10@d41d8cd9", "@opam/lwt@opam:4.2.1@08ba7e51", 31 | "@opam/lambda-term@opam:2.0.1@6ce56e6e", 32 | "@opam/dune@opam:1.11.0@9ec4211e" 33 | ], 34 | "devDependencies": [ 35 | "ocaml@4.6.10@d41d8cd9", "@opam/merlin@opam:3.3.2@7a364181" 36 | ] 37 | }, 38 | "@opam/zed@opam:2.0.2@42c1a642": { 39 | "id": "@opam/zed@opam:2.0.2@42c1a642", 40 | "name": "@opam/zed", 41 | "version": "opam:2.0.2", 42 | "source": { 43 | "type": "install", 44 | "source": [ 45 | "archive:https://opam.ocaml.org/cache/md5/5c/5c0cb1ee87147514adfd23966d58440e#md5:5c0cb1ee87147514adfd23966d58440e", 46 | "archive:https://github.com/ocaml-community/zed/releases/download/2.0.2/zed-2.0.2.tbz#md5:5c0cb1ee87147514adfd23966d58440e" 47 | ], 48 | "opam": { 49 | "name": "zed", 50 | "version": "2.0.2", 51 | "path": "esy.lock/opam/zed.2.0.2" 52 | } 53 | }, 54 | "overrides": [], 55 | "dependencies": [ 56 | "ocaml@4.6.10@d41d8cd9", "@opam/react@opam:1.2.1@0e11855f", 57 | "@opam/dune@opam:1.11.0@9ec4211e", 58 | "@opam/charInfo_width@opam:1.1.0@a2633e77", 59 | "@opam/camomile@opam:1.0.1@ab4729e2", 60 | "@opam/base-bytes@opam:base@19d0c2ff", 61 | "@esy-ocaml/substs@0.0.1@d41d8cd9" 62 | ], 63 | "devDependencies": [ 64 | "ocaml@4.6.10@d41d8cd9", "@opam/react@opam:1.2.1@0e11855f", 65 | "@opam/dune@opam:1.11.0@9ec4211e", 66 | "@opam/charInfo_width@opam:1.1.0@a2633e77", 67 | "@opam/camomile@opam:1.0.1@ab4729e2", 68 | "@opam/base-bytes@opam:base@19d0c2ff" 69 | ] 70 | }, 71 | "@opam/yojson@opam:1.7.0@7056d985": { 72 | "id": "@opam/yojson@opam:1.7.0@7056d985", 73 | "name": "@opam/yojson", 74 | "version": "opam:1.7.0", 75 | "source": { 76 | "type": "install", 77 | "source": [ 78 | "archive:https://opam.ocaml.org/cache/md5/b8/b89d39ca3f8c532abe5f547ad3b8f84d#md5:b89d39ca3f8c532abe5f547ad3b8f84d", 79 | "archive:https://github.com/ocaml-community/yojson/releases/download/1.7.0/yojson-1.7.0.tbz#md5:b89d39ca3f8c532abe5f547ad3b8f84d" 80 | ], 81 | "opam": { 82 | "name": "yojson", 83 | "version": "1.7.0", 84 | "path": "esy.lock/opam/yojson.1.7.0" 85 | } 86 | }, 87 | "overrides": [], 88 | "dependencies": [ 89 | "ocaml@4.6.10@d41d8cd9", "@opam/easy-format@opam:1.3.2@0484b3c4", 90 | "@opam/dune@opam:1.11.0@9ec4211e", "@opam/cppo@opam:1.6.6@f4f83858", 91 | "@opam/biniou@opam:1.2.1@d7570399", 92 | "@esy-ocaml/substs@0.0.1@d41d8cd9" 93 | ], 94 | "devDependencies": [ 95 | "ocaml@4.6.10@d41d8cd9", "@opam/easy-format@opam:1.3.2@0484b3c4", 96 | "@opam/dune@opam:1.11.0@9ec4211e", "@opam/biniou@opam:1.2.1@d7570399" 97 | ] 98 | }, 99 | "@opam/topkg@opam:1.0.1@a42c631e": { 100 | "id": "@opam/topkg@opam:1.0.1@a42c631e", 101 | "name": "@opam/topkg", 102 | "version": "opam:1.0.1", 103 | "source": { 104 | "type": "install", 105 | "source": [ 106 | "archive:https://opam.ocaml.org/cache/md5/16/16b90e066d8972a5ef59655e7c28b3e9#md5:16b90e066d8972a5ef59655e7c28b3e9", 107 | "archive:http://erratique.ch/software/topkg/releases/topkg-1.0.1.tbz#md5:16b90e066d8972a5ef59655e7c28b3e9" 108 | ], 109 | "opam": { 110 | "name": "topkg", 111 | "version": "1.0.1", 112 | "path": "esy.lock/opam/topkg.1.0.1" 113 | } 114 | }, 115 | "overrides": [], 116 | "dependencies": [ 117 | "ocaml@4.6.10@d41d8cd9", "@opam/ocamlfind@opam:1.8.1@c65fe06a", 118 | "@opam/ocamlbuild@opam:0.14.0@427a2331", 119 | "@esy-ocaml/substs@0.0.1@d41d8cd9" 120 | ], 121 | "devDependencies": [ 122 | "ocaml@4.6.10@d41d8cd9", "@opam/ocamlbuild@opam:0.14.0@427a2331" 123 | ] 124 | }, 125 | "@opam/seq@opam:0.1@93954fa7": { 126 | "id": "@opam/seq@opam:0.1@93954fa7", 127 | "name": "@opam/seq", 128 | "version": "opam:0.1", 129 | "source": { 130 | "type": "install", 131 | "source": [ 132 | "archive:https://opam.ocaml.org/cache/md5/0e/0e87f9709541ed46ecb6f414bc31458c#md5:0e87f9709541ed46ecb6f414bc31458c", 133 | "archive:https://github.com/c-cube/seq/archive/0.1.tar.gz#md5:0e87f9709541ed46ecb6f414bc31458c" 134 | ], 135 | "opam": { 136 | "name": "seq", 137 | "version": "0.1", 138 | "path": "esy.lock/opam/seq.0.1" 139 | } 140 | }, 141 | "overrides": [], 142 | "dependencies": [ 143 | "ocaml@4.6.10@d41d8cd9", "@opam/ocamlfind@opam:1.8.1@c65fe06a", 144 | "@opam/ocamlbuild@opam:0.14.0@427a2331", 145 | "@esy-ocaml/substs@0.0.1@d41d8cd9" 146 | ], 147 | "devDependencies": [ "ocaml@4.6.10@d41d8cd9" ] 148 | }, 149 | "@opam/result@opam:1.4@6fb665c3": { 150 | "id": "@opam/result@opam:1.4@6fb665c3", 151 | "name": "@opam/result", 152 | "version": "opam:1.4", 153 | "source": { 154 | "type": "install", 155 | "source": [ 156 | "archive:https://opam.ocaml.org/cache/md5/d3/d3162dbc501a2af65c8c71e0866541da#md5:d3162dbc501a2af65c8c71e0866541da", 157 | "archive:https://github.com/janestreet/result/archive/1.4.tar.gz#md5:d3162dbc501a2af65c8c71e0866541da" 158 | ], 159 | "opam": { 160 | "name": "result", 161 | "version": "1.4", 162 | "path": "esy.lock/opam/result.1.4" 163 | } 164 | }, 165 | "overrides": [], 166 | "dependencies": [ 167 | "ocaml@4.6.10@d41d8cd9", "@opam/dune@opam:1.11.0@9ec4211e", 168 | "@esy-ocaml/substs@0.0.1@d41d8cd9" 169 | ], 170 | "devDependencies": [ 171 | "ocaml@4.6.10@d41d8cd9", "@opam/dune@opam:1.11.0@9ec4211e" 172 | ] 173 | }, 174 | "@opam/react@opam:1.2.1@0e11855f": { 175 | "id": "@opam/react@opam:1.2.1@0e11855f", 176 | "name": "@opam/react", 177 | "version": "opam:1.2.1", 178 | "source": { 179 | "type": "install", 180 | "source": [ 181 | "archive:https://opam.ocaml.org/cache/md5/ce/ce1454438ce4e9d2931248d3abba1fcc#md5:ce1454438ce4e9d2931248d3abba1fcc", 182 | "archive:http://erratique.ch/software/react/releases/react-1.2.1.tbz#md5:ce1454438ce4e9d2931248d3abba1fcc" 183 | ], 184 | "opam": { 185 | "name": "react", 186 | "version": "1.2.1", 187 | "path": "esy.lock/opam/react.1.2.1" 188 | } 189 | }, 190 | "overrides": [], 191 | "dependencies": [ 192 | "ocaml@4.6.10@d41d8cd9", "@opam/topkg@opam:1.0.1@a42c631e", 193 | "@opam/ocamlfind@opam:1.8.1@c65fe06a", 194 | "@opam/ocamlbuild@opam:0.14.0@427a2331", 195 | "@esy-ocaml/substs@0.0.1@d41d8cd9" 196 | ], 197 | "devDependencies": [ "ocaml@4.6.10@d41d8cd9" ] 198 | }, 199 | "@opam/ocamlfind@opam:1.8.1@c65fe06a": { 200 | "id": "@opam/ocamlfind@opam:1.8.1@c65fe06a", 201 | "name": "@opam/ocamlfind", 202 | "version": "opam:1.8.1", 203 | "source": { 204 | "type": "install", 205 | "source": [ 206 | "archive:https://opam.ocaml.org/cache/md5/18/18ca650982c15536616dea0e422cbd8c#md5:18ca650982c15536616dea0e422cbd8c", 207 | "archive:http://download2.camlcity.org/download/findlib-1.8.1.tar.gz#md5:18ca650982c15536616dea0e422cbd8c", 208 | "archive:http://download.camlcity.org/download/findlib-1.8.1.tar.gz#md5:18ca650982c15536616dea0e422cbd8c" 209 | ], 210 | "opam": { 211 | "name": "ocamlfind", 212 | "version": "1.8.1", 213 | "path": "esy.lock/opam/ocamlfind.1.8.1" 214 | } 215 | }, 216 | "overrides": [ 217 | { 218 | "opamoverride": 219 | "esy.lock/overrides/opam__s__ocamlfind_opam__c__1.8.1_opam_override" 220 | } 221 | ], 222 | "dependencies": [ 223 | "ocaml@4.6.10@d41d8cd9", "@opam/conf-m4@opam:1@da6f4f44", 224 | "@esy-ocaml/substs@0.0.1@d41d8cd9" 225 | ], 226 | "devDependencies": [ "ocaml@4.6.10@d41d8cd9" ] 227 | }, 228 | "@opam/ocamlbuild@opam:0.14.0@427a2331": { 229 | "id": "@opam/ocamlbuild@opam:0.14.0@427a2331", 230 | "name": "@opam/ocamlbuild", 231 | "version": "opam:0.14.0", 232 | "source": { 233 | "type": "install", 234 | "source": [ 235 | "archive:https://opam.ocaml.org/cache/sha256/87/87b29ce96958096c0a1a8eeafeb6268077b2d11e1bf2b3de0f5ebc9cf8d42e78#sha256:87b29ce96958096c0a1a8eeafeb6268077b2d11e1bf2b3de0f5ebc9cf8d42e78", 236 | "archive:https://github.com/ocaml/ocamlbuild/archive/0.14.0.tar.gz#sha256:87b29ce96958096c0a1a8eeafeb6268077b2d11e1bf2b3de0f5ebc9cf8d42e78" 237 | ], 238 | "opam": { 239 | "name": "ocamlbuild", 240 | "version": "0.14.0", 241 | "path": "esy.lock/opam/ocamlbuild.0.14.0" 242 | } 243 | }, 244 | "overrides": [ 245 | { 246 | "opamoverride": 247 | "esy.lock/overrides/opam__s__ocamlbuild_opam__c__0.14.0_opam_override" 248 | } 249 | ], 250 | "dependencies": [ 251 | "ocaml@4.6.10@d41d8cd9", "@esy-ocaml/substs@0.0.1@d41d8cd9" 252 | ], 253 | "devDependencies": [ "ocaml@4.6.10@d41d8cd9" ] 254 | }, 255 | "@opam/mmap@opam:1.1.0@fdc850b3": { 256 | "id": "@opam/mmap@opam:1.1.0@fdc850b3", 257 | "name": "@opam/mmap", 258 | "version": "opam:1.1.0", 259 | "source": { 260 | "type": "install", 261 | "source": [ 262 | "archive:https://opam.ocaml.org/cache/md5/8c/8c5d5fbc537296dc525867535fb878ba#md5:8c5d5fbc537296dc525867535fb878ba", 263 | "archive:https://github.com/mirage/mmap/releases/download/v1.1.0/mmap-v1.1.0.tbz#md5:8c5d5fbc537296dc525867535fb878ba" 264 | ], 265 | "opam": { 266 | "name": "mmap", 267 | "version": "1.1.0", 268 | "path": "esy.lock/opam/mmap.1.1.0" 269 | } 270 | }, 271 | "overrides": [], 272 | "dependencies": [ 273 | "ocaml@4.6.10@d41d8cd9", "@opam/dune@opam:1.11.0@9ec4211e", 274 | "@esy-ocaml/substs@0.0.1@d41d8cd9" 275 | ], 276 | "devDependencies": [ 277 | "ocaml@4.6.10@d41d8cd9", "@opam/dune@opam:1.11.0@9ec4211e" 278 | ] 279 | }, 280 | "@opam/merlin@opam:3.3.2@7a364181": { 281 | "id": "@opam/merlin@opam:3.3.2@7a364181", 282 | "name": "@opam/merlin", 283 | "version": "opam:3.3.2", 284 | "source": { 285 | "type": "install", 286 | "source": [ 287 | "archive:https://opam.ocaml.org/cache/sha256/1d/1d1c71e663b1e58acf19069cebd1e8d18f7dbe513c6065347d162cdd2c2de801#sha256:1d1c71e663b1e58acf19069cebd1e8d18f7dbe513c6065347d162cdd2c2de801", 288 | "archive:https://github.com/ocaml/merlin/releases/download/v3.3.2/merlin-v3.3.2.tbz#sha256:1d1c71e663b1e58acf19069cebd1e8d18f7dbe513c6065347d162cdd2c2de801" 289 | ], 290 | "opam": { 291 | "name": "merlin", 292 | "version": "3.3.2", 293 | "path": "esy.lock/opam/merlin.3.3.2" 294 | } 295 | }, 296 | "overrides": [], 297 | "dependencies": [ 298 | "ocaml@4.6.10@d41d8cd9", "@opam/yojson@opam:1.7.0@7056d985", 299 | "@opam/ocamlfind@opam:1.8.1@c65fe06a", 300 | "@opam/dune@opam:1.11.0@9ec4211e", "@esy-ocaml/substs@0.0.1@d41d8cd9" 301 | ], 302 | "devDependencies": [ 303 | "ocaml@4.6.10@d41d8cd9", "@opam/yojson@opam:1.7.0@7056d985", 304 | "@opam/ocamlfind@opam:1.8.1@c65fe06a", 305 | "@opam/dune@opam:1.11.0@9ec4211e" 306 | ] 307 | }, 308 | "@opam/lwt_react@opam:1.1.2@fb068e52": { 309 | "id": "@opam/lwt_react@opam:1.1.2@fb068e52", 310 | "name": "@opam/lwt_react", 311 | "version": "opam:1.1.2", 312 | "source": { 313 | "type": "install", 314 | "source": [ 315 | "archive:https://opam.ocaml.org/cache/md5/2c/2ce7827948adc611319f9449e4519070#md5:2ce7827948adc611319f9449e4519070", 316 | "archive:https://github.com/ocsigen/lwt/archive/4.2.0.tar.gz#md5:2ce7827948adc611319f9449e4519070" 317 | ], 318 | "opam": { 319 | "name": "lwt_react", 320 | "version": "1.1.2", 321 | "path": "esy.lock/opam/lwt_react.1.1.2" 322 | } 323 | }, 324 | "overrides": [], 325 | "dependencies": [ 326 | "ocaml@4.6.10@d41d8cd9", "@opam/react@opam:1.2.1@0e11855f", 327 | "@opam/lwt@opam:4.2.1@08ba7e51", "@opam/dune@opam:1.11.0@9ec4211e", 328 | "@esy-ocaml/substs@0.0.1@d41d8cd9" 329 | ], 330 | "devDependencies": [ 331 | "ocaml@4.6.10@d41d8cd9", "@opam/react@opam:1.2.1@0e11855f", 332 | "@opam/lwt@opam:4.2.1@08ba7e51", "@opam/dune@opam:1.11.0@9ec4211e" 333 | ] 334 | }, 335 | "@opam/lwt_log@opam:1.1.1@91643f38": { 336 | "id": "@opam/lwt_log@opam:1.1.1@91643f38", 337 | "name": "@opam/lwt_log", 338 | "version": "opam:1.1.1", 339 | "source": { 340 | "type": "install", 341 | "source": [ 342 | "archive:https://opam.ocaml.org/cache/md5/02/02e93be62288037870ae5b1ce099fe59#md5:02e93be62288037870ae5b1ce099fe59", 343 | "archive:https://github.com/aantron/lwt_log/archive/1.1.1.tar.gz#md5:02e93be62288037870ae5b1ce099fe59" 344 | ], 345 | "opam": { 346 | "name": "lwt_log", 347 | "version": "1.1.1", 348 | "path": "esy.lock/opam/lwt_log.1.1.1" 349 | } 350 | }, 351 | "overrides": [], 352 | "dependencies": [ 353 | "@opam/lwt@opam:4.2.1@08ba7e51", "@opam/dune@opam:1.11.0@9ec4211e", 354 | "@esy-ocaml/substs@0.0.1@d41d8cd9" 355 | ], 356 | "devDependencies": [ 357 | "@opam/lwt@opam:4.2.1@08ba7e51", "@opam/dune@opam:1.11.0@9ec4211e" 358 | ] 359 | }, 360 | "@opam/lwt@opam:4.2.1@08ba7e51": { 361 | "id": "@opam/lwt@opam:4.2.1@08ba7e51", 362 | "name": "@opam/lwt", 363 | "version": "opam:4.2.1", 364 | "source": { 365 | "type": "install", 366 | "source": [ 367 | "archive:https://opam.ocaml.org/cache/md5/9d/9d648386ca0a9978eb9487de36b781cc#md5:9d648386ca0a9978eb9487de36b781cc", 368 | "archive:https://github.com/ocsigen/lwt/archive/4.2.1.tar.gz#md5:9d648386ca0a9978eb9487de36b781cc" 369 | ], 370 | "opam": { 371 | "name": "lwt", 372 | "version": "4.2.1", 373 | "path": "esy.lock/opam/lwt.4.2.1" 374 | } 375 | }, 376 | "overrides": [], 377 | "dependencies": [ 378 | "ocaml@4.6.10@d41d8cd9", "@opam/seq@opam:0.1@93954fa7", 379 | "@opam/result@opam:1.4@6fb665c3", "@opam/mmap@opam:1.1.0@fdc850b3", 380 | "@opam/dune@opam:1.11.0@9ec4211e", "@opam/cppo@opam:1.6.6@f4f83858", 381 | "@opam/base-unix@opam:base@87d0b2eb", 382 | "@opam/base-threads@opam:base@36803084", 383 | "@esy-ocaml/substs@0.0.1@d41d8cd9" 384 | ], 385 | "devDependencies": [ 386 | "ocaml@4.6.10@d41d8cd9", "@opam/seq@opam:0.1@93954fa7", 387 | "@opam/result@opam:1.4@6fb665c3", "@opam/mmap@opam:1.1.0@fdc850b3", 388 | "@opam/dune@opam:1.11.0@9ec4211e" 389 | ] 390 | }, 391 | "@opam/lambda-term@opam:2.0.1@6ce56e6e": { 392 | "id": "@opam/lambda-term@opam:2.0.1@6ce56e6e", 393 | "name": "@opam/lambda-term", 394 | "version": "opam:2.0.1", 395 | "source": { 396 | "type": "install", 397 | "source": [ 398 | "archive:https://opam.ocaml.org/cache/md5/4b/4b4b8480fe1280e1ed2a34ed93d16675#md5:4b4b8480fe1280e1ed2a34ed93d16675", 399 | "archive:https://github.com/ocaml-community/lambda-term/releases/download/2.0.1/lambda-term-2.0.1.tbz#md5:4b4b8480fe1280e1ed2a34ed93d16675" 400 | ], 401 | "opam": { 402 | "name": "lambda-term", 403 | "version": "2.0.1", 404 | "path": "esy.lock/opam/lambda-term.2.0.1" 405 | } 406 | }, 407 | "overrides": [], 408 | "dependencies": [ 409 | "ocaml@4.6.10@d41d8cd9", "@opam/zed@opam:2.0.2@42c1a642", 410 | "@opam/react@opam:1.2.1@0e11855f", 411 | "@opam/lwt_react@opam:1.1.2@fb068e52", 412 | "@opam/lwt_log@opam:1.1.1@91643f38", "@opam/lwt@opam:4.2.1@08ba7e51", 413 | "@opam/dune@opam:1.11.0@9ec4211e", 414 | "@opam/camomile@opam:1.0.1@ab4729e2", 415 | "@esy-ocaml/substs@0.0.1@d41d8cd9" 416 | ], 417 | "devDependencies": [ 418 | "ocaml@4.6.10@d41d8cd9", "@opam/zed@opam:2.0.2@42c1a642", 419 | "@opam/react@opam:1.2.1@0e11855f", 420 | "@opam/lwt_react@opam:1.1.2@fb068e52", 421 | "@opam/lwt_log@opam:1.1.1@91643f38", "@opam/lwt@opam:4.2.1@08ba7e51", 422 | "@opam/dune@opam:1.11.0@9ec4211e", 423 | "@opam/camomile@opam:1.0.1@ab4729e2" 424 | ] 425 | }, 426 | "@opam/jbuilder@opam:transition@58bdfe0a": { 427 | "id": "@opam/jbuilder@opam:transition@58bdfe0a", 428 | "name": "@opam/jbuilder", 429 | "version": "opam:transition", 430 | "source": { 431 | "type": "install", 432 | "source": [ "no-source:" ], 433 | "opam": { 434 | "name": "jbuilder", 435 | "version": "transition", 436 | "path": "esy.lock/opam/jbuilder.transition" 437 | } 438 | }, 439 | "overrides": [], 440 | "dependencies": [ 441 | "ocaml@4.6.10@d41d8cd9", "@opam/dune@opam:1.11.0@9ec4211e", 442 | "@esy-ocaml/substs@0.0.1@d41d8cd9" 443 | ], 444 | "devDependencies": [ 445 | "ocaml@4.6.10@d41d8cd9", "@opam/dune@opam:1.11.0@9ec4211e" 446 | ] 447 | }, 448 | "@opam/easy-format@opam:1.3.2@0484b3c4": { 449 | "id": "@opam/easy-format@opam:1.3.2@0484b3c4", 450 | "name": "@opam/easy-format", 451 | "version": "opam:1.3.2", 452 | "source": { 453 | "type": "install", 454 | "source": [ 455 | "archive:https://opam.ocaml.org/cache/sha256/34/3440c2b882d537ae5e9011eb06abb53f5667e651ea4bb3b460ea8230fa8c1926#sha256:3440c2b882d537ae5e9011eb06abb53f5667e651ea4bb3b460ea8230fa8c1926", 456 | "archive:https://github.com/mjambon/easy-format/releases/download/1.3.2/easy-format-1.3.2.tbz#sha256:3440c2b882d537ae5e9011eb06abb53f5667e651ea4bb3b460ea8230fa8c1926" 457 | ], 458 | "opam": { 459 | "name": "easy-format", 460 | "version": "1.3.2", 461 | "path": "esy.lock/opam/easy-format.1.3.2" 462 | } 463 | }, 464 | "overrides": [], 465 | "dependencies": [ 466 | "ocaml@4.6.10@d41d8cd9", "@opam/dune@opam:1.11.0@9ec4211e", 467 | "@esy-ocaml/substs@0.0.1@d41d8cd9" 468 | ], 469 | "devDependencies": [ 470 | "ocaml@4.6.10@d41d8cd9", "@opam/dune@opam:1.11.0@9ec4211e" 471 | ] 472 | }, 473 | "@opam/dune@opam:1.11.0@9ec4211e": { 474 | "id": "@opam/dune@opam:1.11.0@9ec4211e", 475 | "name": "@opam/dune", 476 | "version": "opam:1.11.0", 477 | "source": { 478 | "type": "install", 479 | "source": [ 480 | "archive:https://opam.ocaml.org/cache/sha256/bc/bcfdf55d981d7e621a696cac34a3af26340d41c045404617df6f5dbfd5165486#sha256:bcfdf55d981d7e621a696cac34a3af26340d41c045404617df6f5dbfd5165486", 481 | "archive:https://github.com/ocaml/dune/releases/download/1.11.0/dune-build-info-1.11.0.tbz#sha256:bcfdf55d981d7e621a696cac34a3af26340d41c045404617df6f5dbfd5165486" 482 | ], 483 | "opam": { 484 | "name": "dune", 485 | "version": "1.11.0", 486 | "path": "esy.lock/opam/dune.1.11.0" 487 | } 488 | }, 489 | "overrides": [ 490 | { 491 | "opamoverride": 492 | "esy.lock/overrides/opam__s__dune_opam__c__1.11.0_opam_override" 493 | } 494 | ], 495 | "dependencies": [ 496 | "ocaml@4.6.10@d41d8cd9", "@opam/base-unix@opam:base@87d0b2eb", 497 | "@opam/base-threads@opam:base@36803084", 498 | "@esy-ocaml/substs@0.0.1@d41d8cd9" 499 | ], 500 | "devDependencies": [ 501 | "ocaml@4.6.10@d41d8cd9", "@opam/base-unix@opam:base@87d0b2eb", 502 | "@opam/base-threads@opam:base@36803084" 503 | ] 504 | }, 505 | "@opam/cppo@opam:1.6.6@f4f83858": { 506 | "id": "@opam/cppo@opam:1.6.6@f4f83858", 507 | "name": "@opam/cppo", 508 | "version": "opam:1.6.6", 509 | "source": { 510 | "type": "install", 511 | "source": [ 512 | "archive:https://opam.ocaml.org/cache/sha256/e7/e7272996a7789175b87bb998efd079794a8db6625aae990d73f7b4484a07b8a0#sha256:e7272996a7789175b87bb998efd079794a8db6625aae990d73f7b4484a07b8a0", 513 | "archive:https://github.com/ocaml-community/cppo/releases/download/v1.6.6/cppo-v1.6.6.tbz#sha256:e7272996a7789175b87bb998efd079794a8db6625aae990d73f7b4484a07b8a0" 514 | ], 515 | "opam": { 516 | "name": "cppo", 517 | "version": "1.6.6", 518 | "path": "esy.lock/opam/cppo.1.6.6" 519 | } 520 | }, 521 | "overrides": [], 522 | "dependencies": [ 523 | "ocaml@4.6.10@d41d8cd9", "@opam/dune@opam:1.11.0@9ec4211e", 524 | "@opam/base-unix@opam:base@87d0b2eb", 525 | "@esy-ocaml/substs@0.0.1@d41d8cd9" 526 | ], 527 | "devDependencies": [ 528 | "ocaml@4.6.10@d41d8cd9", "@opam/dune@opam:1.11.0@9ec4211e", 529 | "@opam/base-unix@opam:base@87d0b2eb" 530 | ] 531 | }, 532 | "@opam/conf-m4@opam:1@da6f4f44": { 533 | "id": "@opam/conf-m4@opam:1@da6f4f44", 534 | "name": "@opam/conf-m4", 535 | "version": "opam:1", 536 | "source": { 537 | "type": "install", 538 | "source": [ "no-source:" ], 539 | "opam": { 540 | "name": "conf-m4", 541 | "version": "1", 542 | "path": "esy.lock/opam/conf-m4.1" 543 | } 544 | }, 545 | "overrides": [], 546 | "dependencies": [ "@esy-ocaml/substs@0.0.1@d41d8cd9" ], 547 | "devDependencies": [] 548 | }, 549 | "@opam/charInfo_width@opam:1.1.0@a2633e77": { 550 | "id": "@opam/charInfo_width@opam:1.1.0@a2633e77", 551 | "name": "@opam/charInfo_width", 552 | "version": "opam:1.1.0", 553 | "source": { 554 | "type": "install", 555 | "source": [ 556 | "archive:https://opam.ocaml.org/cache/md5/c4/c4ab038e06f06a29692c05fdd7c268c5#md5:c4ab038e06f06a29692c05fdd7c268c5", 557 | "archive:https://bitbucket.org/zandoye/charinfo_width/get/1.1.0.tar.gz#md5:c4ab038e06f06a29692c05fdd7c268c5" 558 | ], 559 | "opam": { 560 | "name": "charInfo_width", 561 | "version": "1.1.0", 562 | "path": "esy.lock/opam/charInfo_width.1.1.0" 563 | } 564 | }, 565 | "overrides": [], 566 | "dependencies": [ 567 | "ocaml@4.6.10@d41d8cd9", "@opam/result@opam:1.4@6fb665c3", 568 | "@opam/dune@opam:1.11.0@9ec4211e", 569 | "@opam/camomile@opam:1.0.1@ab4729e2", 570 | "@esy-ocaml/substs@0.0.1@d41d8cd9" 571 | ], 572 | "devDependencies": [ 573 | "ocaml@4.6.10@d41d8cd9", "@opam/result@opam:1.4@6fb665c3", 574 | "@opam/dune@opam:1.11.0@9ec4211e", 575 | "@opam/camomile@opam:1.0.1@ab4729e2" 576 | ] 577 | }, 578 | "@opam/camomile@opam:1.0.1@ab4729e2": { 579 | "id": "@opam/camomile@opam:1.0.1@ab4729e2", 580 | "name": "@opam/camomile", 581 | "version": "opam:1.0.1", 582 | "source": { 583 | "type": "install", 584 | "source": [ 585 | "archive:https://opam.ocaml.org/cache/md5/82/82e016653431353a07f22c259adc6e05#md5:82e016653431353a07f22c259adc6e05", 586 | "archive:https://github.com/yoriyuki/Camomile/releases/download/1.0.1/camomile-1.0.1.tbz#md5:82e016653431353a07f22c259adc6e05" 587 | ], 588 | "opam": { 589 | "name": "camomile", 590 | "version": "1.0.1", 591 | "path": "esy.lock/opam/camomile.1.0.1" 592 | } 593 | }, 594 | "overrides": [], 595 | "dependencies": [ 596 | "ocaml@4.6.10@d41d8cd9", "@opam/jbuilder@opam:transition@58bdfe0a", 597 | "@esy-ocaml/substs@0.0.1@d41d8cd9" 598 | ], 599 | "devDependencies": [ "ocaml@4.6.10@d41d8cd9" ] 600 | }, 601 | "@opam/biniou@opam:1.2.1@d7570399": { 602 | "id": "@opam/biniou@opam:1.2.1@d7570399", 603 | "name": "@opam/biniou", 604 | "version": "opam:1.2.1", 605 | "source": { 606 | "type": "install", 607 | "source": [ 608 | "archive:https://opam.ocaml.org/cache/sha256/35/35546c68b1929a8e6d27a3b39ecd17b38303a0d47e65eb9d1480c2061ea84335#sha256:35546c68b1929a8e6d27a3b39ecd17b38303a0d47e65eb9d1480c2061ea84335", 609 | "archive:https://github.com/mjambon/biniou/releases/download/1.2.1/biniou-1.2.1.tbz#sha256:35546c68b1929a8e6d27a3b39ecd17b38303a0d47e65eb9d1480c2061ea84335" 610 | ], 611 | "opam": { 612 | "name": "biniou", 613 | "version": "1.2.1", 614 | "path": "esy.lock/opam/biniou.1.2.1" 615 | } 616 | }, 617 | "overrides": [], 618 | "dependencies": [ 619 | "ocaml@4.6.10@d41d8cd9", "@opam/easy-format@opam:1.3.2@0484b3c4", 620 | "@opam/dune@opam:1.11.0@9ec4211e", "@esy-ocaml/substs@0.0.1@d41d8cd9" 621 | ], 622 | "devDependencies": [ 623 | "ocaml@4.6.10@d41d8cd9", "@opam/easy-format@opam:1.3.2@0484b3c4", 624 | "@opam/dune@opam:1.11.0@9ec4211e" 625 | ] 626 | }, 627 | "@opam/base-unix@opam:base@87d0b2eb": { 628 | "id": "@opam/base-unix@opam:base@87d0b2eb", 629 | "name": "@opam/base-unix", 630 | "version": "opam:base", 631 | "source": { 632 | "type": "install", 633 | "source": [ "no-source:" ], 634 | "opam": { 635 | "name": "base-unix", 636 | "version": "base", 637 | "path": "esy.lock/opam/base-unix.base" 638 | } 639 | }, 640 | "overrides": [], 641 | "dependencies": [ "@esy-ocaml/substs@0.0.1@d41d8cd9" ], 642 | "devDependencies": [] 643 | }, 644 | "@opam/base-threads@opam:base@36803084": { 645 | "id": "@opam/base-threads@opam:base@36803084", 646 | "name": "@opam/base-threads", 647 | "version": "opam:base", 648 | "source": { 649 | "type": "install", 650 | "source": [ "no-source:" ], 651 | "opam": { 652 | "name": "base-threads", 653 | "version": "base", 654 | "path": "esy.lock/opam/base-threads.base" 655 | } 656 | }, 657 | "overrides": [], 658 | "dependencies": [ "@esy-ocaml/substs@0.0.1@d41d8cd9" ], 659 | "devDependencies": [] 660 | }, 661 | "@opam/base-bytes@opam:base@19d0c2ff": { 662 | "id": "@opam/base-bytes@opam:base@19d0c2ff", 663 | "name": "@opam/base-bytes", 664 | "version": "opam:base", 665 | "source": { 666 | "type": "install", 667 | "source": [ "no-source:" ], 668 | "opam": { 669 | "name": "base-bytes", 670 | "version": "base", 671 | "path": "esy.lock/opam/base-bytes.base" 672 | } 673 | }, 674 | "overrides": [], 675 | "dependencies": [ 676 | "ocaml@4.6.10@d41d8cd9", "@opam/ocamlfind@opam:1.8.1@c65fe06a", 677 | "@esy-ocaml/substs@0.0.1@d41d8cd9" 678 | ], 679 | "devDependencies": [ 680 | "ocaml@4.6.10@d41d8cd9", "@opam/ocamlfind@opam:1.8.1@c65fe06a" 681 | ] 682 | }, 683 | "@esy-ocaml/substs@0.0.1@d41d8cd9": { 684 | "id": "@esy-ocaml/substs@0.0.1@d41d8cd9", 685 | "name": "@esy-ocaml/substs", 686 | "version": "0.0.1", 687 | "source": { 688 | "type": "install", 689 | "source": [ 690 | "archive:https://registry.npmjs.org/@esy-ocaml/substs/-/substs-0.0.1.tgz#sha1:59ebdbbaedcda123fc7ed8fb2b302b7d819e9a46" 691 | ] 692 | }, 693 | "overrides": [], 694 | "dependencies": [], 695 | "devDependencies": [] 696 | } 697 | } 698 | } --------------------------------------------------------------------------------