Skip to content

Fix windows #52

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 6 commits into from
May 8, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
40 changes: 20 additions & 20 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ jobs:
os: [
ubuntu-latest,
macos-latest,
# windows-latest https://github.com/ocaml/dune/issues/11645
windows-latest
]
ocaml-compiler:
- 5.2.1
Expand Down Expand Up @@ -112,11 +112,11 @@ jobs:
name: macos-latest-artifact
path: _release/platform-darwin-x64

# - name: Download windows artifacts
# uses: actions/download-artifact@v4
# with:
# name: windows-latest-artifact
# path: _release/platform-windows-x64
- name: Download windows artifacts
uses: actions/download-artifact@v4
with:
name: windows-latest-artifact
path: _release/platform-windows-x64

- name: Debug downloaded artifacts
run: ls -R _release
Expand Down Expand Up @@ -145,10 +145,10 @@ jobs:
zip -r ../../query-json-linux-x64.zip .
cd ../..

# cd _release/platform-windows-x64
# mv bin.exe query-json
# zip -r ../../query-json-windows-x64.zip .
# cd ../..
cd _release/platform-windows-x64
mv bin.exe query-json
zip -r ../../query-json-windows-x64.zip .
cd ../..

- name: Check if should be published
if: ${{ github.event_name == 'push' && github.ref == 'refs/heads/main' }}
Expand Down Expand Up @@ -215,13 +215,13 @@ jobs:
asset_name: query-json-linux-x64.zip
asset_content_type: application/zip

# - name: Upload query-json-windows-x64.zip to Github release
# if: ${{ steps.newVersion.outputs.shouldPublish == 'true' }}
# uses: actions/upload-release-asset@v1
# env:
# GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
# with:
# upload_url: ${{ steps.create_release.outputs.upload_url }}
# asset_path: ./query-json-windows-x64.zip
# asset_name: query-json-windows-x64.zip
# asset_content_type: application/zip
- name: Upload query-json-windows-x64.zip to Github release
if: ${{ steps.newVersion.outputs.shouldPublish == 'true' }}
uses: actions/upload-release-asset@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
upload_url: ${{ steps.create_release.outputs.upload_url }}
asset_path: ./query-json-windows-x64.zip
asset_name: query-json-windows-x64.zip
asset_content_type: application/zip
17 changes: 4 additions & 13 deletions source/Compiler.ml
Original file line number Diff line number Diff line change
Expand Up @@ -14,27 +14,18 @@ let append_article (noun : string) =
| false -> "a " ^ noun

let make_error_wrong_operation op member_kind (value : Json.t) =
let open Console in
"Trying to "
^ Formatting.single_quotes (Chalk.bold op)
^ Console.Formatting.single_quotes (Chalk.bold op)
^ " on "
^ (append_article member_kind |> Chalk.bold)
^ ":" ^ Formatting.enter 1
^ Chalk.bold (append_article member_kind)
^ ":" ^ Console.Formatting.enter 1
^ Chalk.gray (Json.to_string value ~colorize:false ~summarize:true)

let make_empty_list_error op =
let open Console in
"Trying to "
^ Formatting.single_quotes (Chalk.bold op)
^ Console.Formatting.single_quotes (Chalk.bold op)
^ " on an empty array."

let make_acessing_to_missing_item access_index length =
let open Console in
"Trying to read "
^ Formatting.single_quotes
("[" ^ Chalk.bold (Int.to_string access_index) ^ "]")
^ " from an array with " ^ Int.to_string length ^ " elements only."

let get_field_name json =
match json with
| `List _ -> "list"
Expand Down
8 changes: 8 additions & 0 deletions website/dune
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
(library
(name app)
(modes melange)
(enabled_if
(<> %{os_type} "Win32"))
(modules :standard \ Website)
(libraries reason-react melange.dom melange.js melange-json melange-webapi)
(preprocess
Expand All @@ -9,6 +11,8 @@
(melange.emit
(target website)
(modules Website)
(enabled_if
(<> %{os_type} "Win32"))
(module_systems
(es6 re.js))
(libraries reason-react app)
Expand All @@ -17,12 +21,16 @@

(install
(section bin)
(enabled_if
(<> %{os_type} "Win32"))
(package query-json-playground)
(files
("../node_modules/@tailwindcss/cli/dist/index.mjs" as tailwind)))

(rule
(target output.css)
(enabled_if
(<> %{os_type} "Win32"))
(deps
(source_tree .)
(:config ./tailwind.config.js)
Expand Down