Skip to content

Commit 3fc75b4

Browse files
authored
Merge pull request #52 from davesnx/fix-windows
Fix windows
2 parents 8f3b264 + bc36d97 commit 3fc75b4

File tree

3 files changed

+32
-33
lines changed

3 files changed

+32
-33
lines changed

.github/workflows/ci.yml

Lines changed: 20 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ jobs:
1111
os: [
1212
ubuntu-latest,
1313
macos-latest,
14-
# windows-latest https://github.com/ocaml/dune/issues/11645
14+
windows-latest
1515
]
1616
ocaml-compiler:
1717
- 5.2.1
@@ -112,11 +112,11 @@ jobs:
112112
name: macos-latest-artifact
113113
path: _release/platform-darwin-x64
114114

115-
# - name: Download windows artifacts
116-
# uses: actions/download-artifact@v4
117-
# with:
118-
# name: windows-latest-artifact
119-
# path: _release/platform-windows-x64
115+
- name: Download windows artifacts
116+
uses: actions/download-artifact@v4
117+
with:
118+
name: windows-latest-artifact
119+
path: _release/platform-windows-x64
120120

121121
- name: Debug downloaded artifacts
122122
run: ls -R _release
@@ -145,10 +145,10 @@ jobs:
145145
zip -r ../../query-json-linux-x64.zip .
146146
cd ../..
147147
148-
# cd _release/platform-windows-x64
149-
# mv bin.exe query-json
150-
# zip -r ../../query-json-windows-x64.zip .
151-
# cd ../..
148+
cd _release/platform-windows-x64
149+
mv bin.exe query-json
150+
zip -r ../../query-json-windows-x64.zip .
151+
cd ../..
152152
153153
- name: Check if should be published
154154
if: ${{ github.event_name == 'push' && github.ref == 'refs/heads/main' }}
@@ -215,13 +215,13 @@ jobs:
215215
asset_name: query-json-linux-x64.zip
216216
asset_content_type: application/zip
217217

218-
# - name: Upload query-json-windows-x64.zip to Github release
219-
# if: ${{ steps.newVersion.outputs.shouldPublish == 'true' }}
220-
# uses: actions/upload-release-asset@v1
221-
# env:
222-
# GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
223-
# with:
224-
# upload_url: ${{ steps.create_release.outputs.upload_url }}
225-
# asset_path: ./query-json-windows-x64.zip
226-
# asset_name: query-json-windows-x64.zip
227-
# asset_content_type: application/zip
218+
- name: Upload query-json-windows-x64.zip to Github release
219+
if: ${{ steps.newVersion.outputs.shouldPublish == 'true' }}
220+
uses: actions/upload-release-asset@v1
221+
env:
222+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
223+
with:
224+
upload_url: ${{ steps.create_release.outputs.upload_url }}
225+
asset_path: ./query-json-windows-x64.zip
226+
asset_name: query-json-windows-x64.zip
227+
asset_content_type: application/zip

source/Compiler.ml

Lines changed: 4 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -14,27 +14,18 @@ let append_article (noun : string) =
1414
| false -> "a " ^ noun
1515

1616
let make_error_wrong_operation op member_kind (value : Json.t) =
17-
let open Console in
1817
"Trying to "
19-
^ Formatting.single_quotes (Chalk.bold op)
18+
^ Console.Formatting.single_quotes (Chalk.bold op)
2019
^ " on "
21-
^ (append_article member_kind |> Chalk.bold)
22-
^ ":" ^ Formatting.enter 1
20+
^ Chalk.bold (append_article member_kind)
21+
^ ":" ^ Console.Formatting.enter 1
2322
^ Chalk.gray (Json.to_string value ~colorize:false ~summarize:true)
2423

2524
let make_empty_list_error op =
26-
let open Console in
2725
"Trying to "
28-
^ Formatting.single_quotes (Chalk.bold op)
26+
^ Console.Formatting.single_quotes (Chalk.bold op)
2927
^ " on an empty array."
3028

31-
let make_acessing_to_missing_item access_index length =
32-
let open Console in
33-
"Trying to read "
34-
^ Formatting.single_quotes
35-
("[" ^ Chalk.bold (Int.to_string access_index) ^ "]")
36-
^ " from an array with " ^ Int.to_string length ^ " elements only."
37-
3829
let get_field_name json =
3930
match json with
4031
| `List _ -> "list"

website/dune

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,8 @@
11
(library
22
(name app)
33
(modes melange)
4+
(enabled_if
5+
(<> %{os_type} "Win32"))
46
(modules :standard \ Website)
57
(libraries reason-react melange.dom melange.js melange-json melange-webapi)
68
(preprocess
@@ -9,6 +11,8 @@
911
(melange.emit
1012
(target website)
1113
(modules Website)
14+
(enabled_if
15+
(<> %{os_type} "Win32"))
1216
(module_systems
1317
(es6 re.js))
1418
(libraries reason-react app)
@@ -17,12 +21,16 @@
1721

1822
(install
1923
(section bin)
24+
(enabled_if
25+
(<> %{os_type} "Win32"))
2026
(package query-json-playground)
2127
(files
2228
("../node_modules/@tailwindcss/cli/dist/index.mjs" as tailwind)))
2329

2430
(rule
2531
(target output.css)
32+
(enabled_if
33+
(<> %{os_type} "Win32"))
2634
(deps
2735
(source_tree .)
2836
(:config ./tailwind.config.js)

0 commit comments

Comments
 (0)