Skip to content

Commit

Permalink
Merge pull request #7 from minima-app/win-fix
Browse files Browse the repository at this point in the history
Fix windows build
  • Loading branch information
Alex Fedoseev authored Apr 11, 2019
2 parents b46e702 + 2c06409 commit 1b634ee
Show file tree
Hide file tree
Showing 8 changed files with 78 additions and 41 deletions.
12 changes: 6 additions & 6 deletions .ci/azure-pipelines.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,18 +16,18 @@ jobs:
vmImage: "ubuntu-16.04"
platform: "Linux"

# - template: release/pipeline.yml
# parameters:
# name: "bs_log_Windows"
# vmImage: "vs2017-win2016"
# platform: "Windows"
- template: release/pipeline.yml
parameters:
name: "bs_log_Windows"
vmImage: "vs2017-win2016"
platform: "Windows"

- job: bs_log_bundle
pool:
vmImage: ubuntu-16.04
dependsOn:
- bs_log_Linux
- bs_log_macOS
# - bs_log_Windows
- bs_log_Windows
steps:
- template: release/bundle.yml
22 changes: 11 additions & 11 deletions .ci/release/bundle.yml
Original file line number Diff line number Diff line change
Expand Up @@ -28,17 +28,17 @@ steps:
- script: "mv _release/macOS/bin.exe _release/bin/platform-darwin/bin.exe"
displayName: "mv macOS"

# - task: DownloadBuildArtifacts@0
# displayName: "Download Windows Artifacts"
# inputs:
# artifactName: Windows
# downloadPath: "_release"
#
# - script: "mkdir -p _release/bin/platform-windows-x64"
# displayName: "Create _release/bin/platform-windows-x64"
#
# - script: "mv _release/Windows/bin.exe _release/bin/platform-windows-x64/bin.exe"
# displayName: "mv Windows"
- task: DownloadBuildArtifacts@0
displayName: "Download Windows Artifacts"
inputs:
artifactName: Windows
downloadPath: "_release"

- script: "mkdir -p _release/bin/platform-windows-x64"
displayName: "Create _release/bin/platform-windows-x64"

- script: "mv _release/Windows/bin.exe _release/bin/platform-windows-x64/bin.exe"
displayName: "mv Windows"

- script: |
mkdir -p _release/src
Expand Down
40 changes: 20 additions & 20 deletions ppx.esy.lock/index.json
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
"overrides": [],
"dependencies": [
"[email protected]@d41d8cd9", "@opam/re@opam:1.8.0@7baac1a7",
"@opam/dune@opam:1.8.2@511996a8", "@esy-ocaml/[email protected]@d41d8cd9"
"@opam/dune@opam:1.9.0@a7408d38", "@esy-ocaml/[email protected]@d41d8cd9"
],
"devDependencies": []
},
Expand Down Expand Up @@ -56,7 +56,7 @@
"dependencies": [
"[email protected]@d41d8cd9", "[email protected]@d41d8cd9",
"@opam/ocaml-migrate-parsetree@opam:1.2.0@23e55f71",
"@opam/dune@opam:1.8.2@511996a8", "@esy-ocaml/[email protected]@d41d8cd9",
"@opam/dune@opam:1.9.0@a7408d38", "@esy-ocaml/[email protected]@d41d8cd9",
"@esy-ocaml/[email protected]@d41d8cd9"
],
"devDependencies": [ "@opam/merlin@opam:3.2.2@829ee6dd" ]
Expand All @@ -80,7 +80,7 @@
"overrides": [],
"dependencies": [
"[email protected]@d41d8cd9", "@opam/easy-format@opam:1.3.1@9abfd4ed",
"@opam/dune@opam:1.8.2@511996a8", "@opam/cppo@opam:1.6.5@bec3dbd9",
"@opam/dune@opam:1.9.0@a7408d38", "@opam/cppo@opam:1.6.5@bec3dbd9",
"@opam/biniou@opam:1.2.0@c8516f18",
"@esy-ocaml/[email protected]@d41d8cd9"
],
Expand Down Expand Up @@ -180,7 +180,7 @@
},
"overrides": [],
"dependencies": [
"[email protected]@d41d8cd9", "@opam/dune@opam:1.8.2@511996a8",
"[email protected]@d41d8cd9", "@opam/dune@opam:1.9.0@a7408d38",
"@esy-ocaml/[email protected]@d41d8cd9"
],
"devDependencies": [ "[email protected]@d41d8cd9" ]
Expand Down Expand Up @@ -257,15 +257,15 @@
"dependencies": [
"[email protected]@d41d8cd9", "@opam/result@opam:1.3@bee8bf2e",
"@opam/ppx_derivers@opam:1.2.1@0b458500",
"@opam/dune@opam:1.8.2@511996a8", "@esy-ocaml/[email protected]@d41d8cd9"
"@opam/dune@opam:1.9.0@a7408d38", "@esy-ocaml/[email protected]@d41d8cd9"
],
"devDependencies": [
"[email protected]@d41d8cd9", "@opam/result@opam:1.3@bee8bf2e",
"@opam/ppx_derivers@opam:1.2.1@0b458500"
]
},
"@opam/merlin-extend@opam:0.3@e1fc0d08": {
"id": "@opam/merlin-extend@opam:0.3@e1fc0d08",
"@opam/merlin-extend@opam:0.3@0af73a50": {
"id": "@opam/merlin-extend@opam:0.3@0af73a50",
"name": "@opam/merlin-extend",
"version": "opam:0.3",
"source": {
Expand Down Expand Up @@ -312,7 +312,7 @@
"dependencies": [
"[email protected]@d41d8cd9", "@opam/yojson@opam:1.7.0@2d92307e",
"@opam/ocamlfind@opam:1.8.0@f744a0c5",
"@opam/dune@opam:1.8.2@511996a8", "@esy-ocaml/[email protected]@d41d8cd9"
"@opam/dune@opam:1.9.0@a7408d38", "@esy-ocaml/[email protected]@d41d8cd9"
],
"devDependencies": [
"[email protected]@d41d8cd9", "@opam/yojson@opam:1.7.0@2d92307e",
Expand Down Expand Up @@ -365,11 +365,11 @@
},
"overrides": [],
"dependencies": [
"[email protected]@d41d8cd9", "@opam/dune@opam:1.8.2@511996a8",
"[email protected]@d41d8cd9", "@opam/dune@opam:1.9.0@a7408d38",
"@esy-ocaml/[email protected]@d41d8cd9"
],
"devDependencies": [
"[email protected]@d41d8cd9", "@opam/dune@opam:1.8.2@511996a8"
"[email protected]@d41d8cd9", "@opam/dune@opam:1.9.0@a7408d38"
]
},
"@opam/easy-format@opam:1.3.1@9abfd4ed": {
Expand All @@ -395,26 +395,26 @@
],
"devDependencies": [ "[email protected]@d41d8cd9" ]
},
"@opam/dune@opam:1.8.2@511996a8": {
"id": "@opam/dune@opam:1.8.2@511996a8",
"@opam/dune@opam:1.9.0@a7408d38": {
"id": "@opam/dune@opam:1.9.0@a7408d38",
"name": "@opam/dune",
"version": "opam:1.8.2",
"version": "opam:1.9.0",
"source": {
"type": "install",
"source": [
"archive:https://opam.ocaml.org/cache/md5/2b/2b7f45a6e14865f2318d34f12221ec1e#md5:2b7f45a6e14865f2318d34f12221ec1e",
"archive:https://github.com/ocaml/dune/releases/download/1.8.2/dune-1.8.2.tbz#md5:2b7f45a6e14865f2318d34f12221ec1e"
"archive:https://opam.ocaml.org/cache/md5/73/732b2d9d273b3e3d8472a8094ec2e1ad#md5:732b2d9d273b3e3d8472a8094ec2e1ad",
"archive:https://github.com/ocaml/dune/releases/download/1.9.0/dune-1.9.0.tbz#md5:732b2d9d273b3e3d8472a8094ec2e1ad"
],
"opam": {
"name": "dune",
"version": "1.8.2",
"path": "ppx.esy.lock/opam/dune.1.8.2"
"version": "1.9.0",
"path": "ppx.esy.lock/opam/dune.1.9.0"
}
},
"overrides": [
{
"opamoverride":
"ppx.esy.lock/overrides/opam__s__dune_opam__c__1.8.2_opam_override"
"ppx.esy.lock/overrides/opam__s__dune_opam__c__1.9.0_opam_override"
}
],
"dependencies": [
Expand Down Expand Up @@ -596,9 +596,9 @@
"[email protected]@d41d8cd9", "@opam/result@opam:1.3@bee8bf2e",
"@opam/ocamlfind@opam:1.8.0@f744a0c5",
"@opam/ocaml-migrate-parsetree@opam:1.2.0@23e55f71",
"@opam/merlin-extend@opam:0.3@e1fc0d08",
"@opam/merlin-extend@opam:0.3@0af73a50",
"@opam/menhir@opam:20171013@e2d3ef03",
"@opam/dune@opam:1.8.2@511996a8"
"@opam/dune@opam:1.9.0@a7408d38"
],
"devDependencies": []
},
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,6 @@ packages across several versions of OCaml and gives cross-compilation
for free.
"""
url {
src: "https://github.com/ocaml/dune/releases/download/1.8.2/dune-1.8.2.tbz"
checksum: "md5=2b7f45a6e14865f2318d34f12221ec1e"
src: "https://github.com/ocaml/dune/releases/download/1.9.0/dune-1.9.0.tbz"
checksum: "md5=732b2d9d273b3e3d8472a8094ec2e1ad"
}
2 changes: 1 addition & 1 deletion ppx.esy.lock/opam/merlin-extend.0.3/opam
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ build: [make]
install: [make "install"]
remove: ["ocamlfind" "remove" "merlin_extend"]
depends: [
"ocaml" {>= "4.02.3"}
"ocaml" {>= "4.02.3" & < "4.08.0"}
"ocamlfind" {build}
"cppo" {build}
]
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
--- ./extend_helper.ml
+++ ./extend_helper.ml
@@ -1,13 +1,6 @@
-(*pp cppo -V OCAML:`ocamlc -version` *)
open Parsetree
open Extend_protocol

-#if OCAML_VERSION < (4, 3, 0)
-# define CONST_STRING Asttypes.Const_string
-#else
-# define CONST_STRING Parsetree.Pconst_string
-#endif
-
(** Default implementation for [Reader_def.print_outcome] using
[Oprint] from compiler-libs *)
let print_outcome_using_oprint ppf = function
@@ -28,7 +21,7 @@
pstr_loc = Location.none;
pstr_desc = Pstr_eval ({
pexp_loc = Location.none;
- pexp_desc = Pexp_constant (CONST_STRING (msg, None));
+ pexp_desc = Pexp_constant (Asttypes.Const_string (msg, None));
pexp_attributes = [];
}, []);
}]
@@ -112,7 +105,7 @@
let msg = match payload with
| PStr [{
pstr_desc = Pstr_eval ({
- pexp_desc = Pexp_constant (CONST_STRING (msg, _));
+ pexp_desc = Pexp_constant (Asttypes.Const_string (msg, _));
}, _);
}] -> msg
| _ -> "Warning: extension produced an incorrect syntax-error node"
Original file line number Diff line number Diff line change
@@ -1,9 +1,12 @@
{
"buildEnv": {
"PATCH_CMD": "#{ocaml.version == '4.2.3007' ? 'patch -p1 < merlin-extend-winfix-4.2.3007.patch' : 'patch -p1 < merlin-extend-winfix.patch'}"
},
"build": [
[
"bash",
"-c",
"#{os == 'windows' ? 'patch -p1 < merlin-extend-winfix.patch' : 'true'}"
"#{os == 'windows' ? $PATCH_CMD : 'true'}"
],
[
"make"
Expand Down

0 comments on commit 1b634ee

Please sign in to comment.