diff --git a/.drom b/.drom index d5bb24fa8..4f3cf1917 100644 --- a/.drom +++ b/.drom @@ -5,7 +5,7 @@ version:0.9.0 # hash of toml configuration files # used for generation of all files -d369e2949d85dee79233d322ce6f7587:. +1bebcb610f386901c07c8def471aced1:. # end context for . # begin context for .github/workflows/workflow.yml @@ -25,7 +25,7 @@ d369e2949d85dee79233d322ce6f7587:. # begin context for Makefile # file Makefile -47a1f06175119e41d07c168651c1a645:Makefile +53e82ff2391c1529bd29cb25dec75aac:Makefile # end context for Makefile # begin context for README.md @@ -75,7 +75,7 @@ c8281f46ba9a11d0b61bc8ef67eaa357:docs/style.css # begin context for dune-project # file dune-project -456fa426d82598ce9843614e380d00d7:dune-project +b31bfdac90731aba7623d6bace37737f:dune-project # end context for dune-project # begin context for opam/cobol_cfg.opam @@ -95,7 +95,7 @@ c8281f46ba9a11d0b61bc8ef67eaa357:docs/style.css # begin context for opam/cobol_data.opam # file opam/cobol_data.opam -02198635cb5365931deb20b655889630:opam/cobol_data.opam +4d79b472ecc1854518e933df4c865a88:opam/cobol_data.opam # end context for opam/cobol_data.opam # begin context for opam/cobol_indent.opam @@ -295,7 +295,7 @@ c6c7cd50f0ebff63bab991bf9a1633e6:src/lsp/cobol_cfg/dune # begin context for src/lsp/cobol_cfg/version.mlt # file src/lsp/cobol_cfg/version.mlt -3b5d23165644aee0c651353e188a647f:src/lsp/cobol_cfg/version.mlt +2209e9f7d474e5ee3c3408010170c572:src/lsp/cobol_cfg/version.mlt # end context for src/lsp/cobol_cfg/version.mlt # begin context for src/lsp/cobol_common/dune @@ -305,7 +305,7 @@ c6c7cd50f0ebff63bab991bf9a1633e6:src/lsp/cobol_cfg/dune # begin context for src/lsp/cobol_common/version.mlt # file src/lsp/cobol_common/version.mlt -3b5d23165644aee0c651353e188a647f:src/lsp/cobol_common/version.mlt +2209e9f7d474e5ee3c3408010170c572:src/lsp/cobol_common/version.mlt # end context for src/lsp/cobol_common/version.mlt # begin context for src/lsp/cobol_config/dune @@ -315,17 +315,17 @@ c6c7cd50f0ebff63bab991bf9a1633e6:src/lsp/cobol_cfg/dune # begin context for src/lsp/cobol_config/version.mlt # file src/lsp/cobol_config/version.mlt -3b5d23165644aee0c651353e188a647f:src/lsp/cobol_config/version.mlt +2209e9f7d474e5ee3c3408010170c572:src/lsp/cobol_config/version.mlt # end context for src/lsp/cobol_config/version.mlt # begin context for src/lsp/cobol_data/dune # file src/lsp/cobol_data/dune -4c5f42c322869bf815a6afc8a9ebea98:src/lsp/cobol_data/dune +805bc16e08adbaf3eb464cf85f49c6fb:src/lsp/cobol_data/dune # end context for src/lsp/cobol_data/dune # begin context for src/lsp/cobol_data/version.mlt # file src/lsp/cobol_data/version.mlt -3b5d23165644aee0c651353e188a647f:src/lsp/cobol_data/version.mlt +2209e9f7d474e5ee3c3408010170c572:src/lsp/cobol_data/version.mlt # end context for src/lsp/cobol_data/version.mlt # begin context for src/lsp/cobol_indent/dune @@ -335,7 +335,7 @@ c6c7cd50f0ebff63bab991bf9a1633e6:src/lsp/cobol_cfg/dune # begin context for src/lsp/cobol_indent/version.mlt # file src/lsp/cobol_indent/version.mlt -3b5d23165644aee0c651353e188a647f:src/lsp/cobol_indent/version.mlt +2209e9f7d474e5ee3c3408010170c572:src/lsp/cobol_indent/version.mlt # end context for src/lsp/cobol_indent/version.mlt # begin context for src/lsp/cobol_indent_old/dune @@ -345,7 +345,7 @@ a98a08d36a2f65127f60832515b6ab47:src/lsp/cobol_indent_old/dune # begin context for src/lsp/cobol_indent_old/version.mlt # file src/lsp/cobol_indent_old/version.mlt -3b5d23165644aee0c651353e188a647f:src/lsp/cobol_indent_old/version.mlt +2209e9f7d474e5ee3c3408010170c572:src/lsp/cobol_indent_old/version.mlt # end context for src/lsp/cobol_indent_old/version.mlt # begin context for src/lsp/cobol_lsp/dune @@ -355,7 +355,7 @@ a98a08d36a2f65127f60832515b6ab47:src/lsp/cobol_indent_old/dune # begin context for src/lsp/cobol_lsp/version.mlt # file src/lsp/cobol_lsp/version.mlt -3b5d23165644aee0c651353e188a647f:src/lsp/cobol_lsp/version.mlt +2209e9f7d474e5ee3c3408010170c572:src/lsp/cobol_lsp/version.mlt # end context for src/lsp/cobol_lsp/version.mlt # begin context for src/lsp/cobol_parser/dune @@ -365,7 +365,7 @@ a98a08d36a2f65127f60832515b6ab47:src/lsp/cobol_indent_old/dune # begin context for src/lsp/cobol_parser/version.mlt # file src/lsp/cobol_parser/version.mlt -3b5d23165644aee0c651353e188a647f:src/lsp/cobol_parser/version.mlt +2209e9f7d474e5ee3c3408010170c572:src/lsp/cobol_parser/version.mlt # end context for src/lsp/cobol_parser/version.mlt # begin context for src/lsp/cobol_preproc/dune @@ -375,7 +375,7 @@ e31b22f1d241d75db90f170f9c6fd95d:src/lsp/cobol_preproc/dune # begin context for src/lsp/cobol_preproc/version.mlt # file src/lsp/cobol_preproc/version.mlt -3b5d23165644aee0c651353e188a647f:src/lsp/cobol_preproc/version.mlt +2209e9f7d474e5ee3c3408010170c572:src/lsp/cobol_preproc/version.mlt # end context for src/lsp/cobol_preproc/version.mlt # begin context for src/lsp/cobol_ptree/dune @@ -385,7 +385,7 @@ e31b22f1d241d75db90f170f9c6fd95d:src/lsp/cobol_preproc/dune # begin context for src/lsp/cobol_ptree/version.mlt # file src/lsp/cobol_ptree/version.mlt -3b5d23165644aee0c651353e188a647f:src/lsp/cobol_ptree/version.mlt +2209e9f7d474e5ee3c3408010170c572:src/lsp/cobol_ptree/version.mlt # end context for src/lsp/cobol_ptree/version.mlt # begin context for src/lsp/cobol_typeck/dune @@ -395,7 +395,7 @@ ef30db283bff57bd7bfea9b29e9178fd:src/lsp/cobol_typeck/dune # begin context for src/lsp/cobol_typeck/version.mlt # file src/lsp/cobol_typeck/version.mlt -3b5d23165644aee0c651353e188a647f:src/lsp/cobol_typeck/version.mlt +2209e9f7d474e5ee3c3408010170c572:src/lsp/cobol_typeck/version.mlt # end context for src/lsp/cobol_typeck/version.mlt # begin context for src/lsp/cobol_unit/dune @@ -405,7 +405,7 @@ d2c167a61ac9aa89964577228ccb49fa:src/lsp/cobol_unit/dune # begin context for src/lsp/cobol_unit/version.mlt # file src/lsp/cobol_unit/version.mlt -3b5d23165644aee0c651353e188a647f:src/lsp/cobol_unit/version.mlt +2209e9f7d474e5ee3c3408010170c572:src/lsp/cobol_unit/version.mlt # end context for src/lsp/cobol_unit/version.mlt # begin context for src/lsp/ebcdic_lib/dune @@ -415,7 +415,7 @@ d2c167a61ac9aa89964577228ccb49fa:src/lsp/cobol_unit/dune # begin context for src/lsp/ebcdic_lib/ebcdic_version.mlt # file src/lsp/ebcdic_lib/ebcdic_version.mlt -3b5d23165644aee0c651353e188a647f:src/lsp/ebcdic_lib/ebcdic_version.mlt +2209e9f7d474e5ee3c3408010170c572:src/lsp/ebcdic_lib/ebcdic_version.mlt # end context for src/lsp/ebcdic_lib/ebcdic_version.mlt # begin context for src/lsp/ezr_toml/dune @@ -425,7 +425,7 @@ eab335ce600887c59f1baf9b0983d0ac:src/lsp/ezr_toml/dune # begin context for src/lsp/ezr_toml/version.mlt # file src/lsp/ezr_toml/version.mlt -3b5d23165644aee0c651353e188a647f:src/lsp/ezr_toml/version.mlt +2209e9f7d474e5ee3c3408010170c572:src/lsp/ezr_toml/version.mlt # end context for src/lsp/ezr_toml/version.mlt # begin context for src/lsp/ppx_cobcflags/dune @@ -435,7 +435,7 @@ eab335ce600887c59f1baf9b0983d0ac:src/lsp/ezr_toml/dune # begin context for src/lsp/ppx_cobcflags/version.mlt # file src/lsp/ppx_cobcflags/version.mlt -3b5d23165644aee0c651353e188a647f:src/lsp/ppx_cobcflags/version.mlt +2209e9f7d474e5ee3c3408010170c572:src/lsp/ppx_cobcflags/version.mlt # end context for src/lsp/ppx_cobcflags/version.mlt # begin context for src/lsp/pretty/dune @@ -445,7 +445,7 @@ eab335ce600887c59f1baf9b0983d0ac:src/lsp/ezr_toml/dune # begin context for src/lsp/pretty/version.mlt # file src/lsp/pretty/version.mlt -3b5d23165644aee0c651353e188a647f:src/lsp/pretty/version.mlt +2209e9f7d474e5ee3c3408010170c572:src/lsp/pretty/version.mlt # end context for src/lsp/pretty/version.mlt # begin context for src/lsp/sql_ast/dune @@ -455,7 +455,7 @@ e0c73ea039315b0cfa5b4a7ac54a1484:src/lsp/sql_ast/dune # begin context for src/lsp/sql_ast/version.mlt # file src/lsp/sql_ast/version.mlt -3b5d23165644aee0c651353e188a647f:src/lsp/sql_ast/version.mlt +2209e9f7d474e5ee3c3408010170c572:src/lsp/sql_ast/version.mlt # end context for src/lsp/sql_ast/version.mlt # begin context for src/lsp/sql_parser/dune @@ -465,12 +465,12 @@ c222bcf238c7b0cd7c910fc5ec8e2dcd:src/lsp/sql_parser/dune # begin context for src/lsp/sql_parser/version.mlt # file src/lsp/sql_parser/version.mlt -3b5d23165644aee0c651353e188a647f:src/lsp/sql_parser/version.mlt +2209e9f7d474e5ee3c3408010170c572:src/lsp/sql_parser/version.mlt # end context for src/lsp/sql_parser/version.mlt # begin context for src/lsp/superbol-free/dune # file src/lsp/superbol-free/dune -095155be06e2840753e52b3d03d541b9:src/lsp/superbol-free/dune +4783fc059cd720e7b501e24e65b52688:src/lsp/superbol-free/dune # end context for src/lsp/superbol-free/dune # begin context for src/lsp/superbol-free/linking_flags.sh @@ -485,7 +485,7 @@ a8a051709a43fba5b6ab54b66b77cbcf:src/lsp/superbol_free_lib/dune # begin context for src/lsp/superbol_free_lib/version.mlt # file src/lsp/superbol_free_lib/version.mlt -3b5d23165644aee0c651353e188a647f:src/lsp/superbol_free_lib/version.mlt +2209e9f7d474e5ee3c3408010170c572:src/lsp/superbol_free_lib/version.mlt # end context for src/lsp/superbol_free_lib/version.mlt # begin context for src/lsp/superbol_preprocs/dune @@ -495,7 +495,7 @@ a8a051709a43fba5b6ab54b66b77cbcf:src/lsp/superbol_free_lib/dune # begin context for src/lsp/superbol_preprocs/version.mlt # file src/lsp/superbol_preprocs/version.mlt -3b5d23165644aee0c651353e188a647f:src/lsp/superbol_preprocs/version.mlt +2209e9f7d474e5ee3c3408010170c572:src/lsp/superbol_preprocs/version.mlt # end context for src/lsp/superbol_preprocs/version.mlt # begin context for src/lsp/superbol_project/dune @@ -505,7 +505,7 @@ a7e1e69bff3d4c180af5f42cce7f6764:src/lsp/superbol_project/dune # begin context for src/lsp/superbol_project/version.mlt # file src/lsp/superbol_project/version.mlt -3b5d23165644aee0c651353e188a647f:src/lsp/superbol_project/version.mlt +2209e9f7d474e5ee3c3408010170c572:src/lsp/superbol_project/version.mlt # end context for src/lsp/superbol_project/version.mlt # begin context for src/superbol-studio-oss/dune @@ -520,7 +520,7 @@ b3a1a4662424391d83d94daf0c79756b:src/superbol-studio-oss/dune # begin context for src/vendor/ez_toml/dune # file src/vendor/ez_toml/dune -87fe96c228b8cb51be7268c7e3cdd5b5:src/vendor/ez_toml/dune +aad8ac8a26ae15e3501dd5ea3b49ec9a:src/vendor/ez_toml/dune # end context for src/vendor/ez_toml/dune # begin context for src/vendor/ez_toml/index.mld @@ -530,7 +530,7 @@ c5cd7b2d0a3de0d33ec14e3d433c1cae:src/vendor/ez_toml/index.mld # begin context for src/vendor/ez_toml/version.mlt # file src/vendor/ez_toml/version.mlt -3b5d23165644aee0c651353e188a647f:src/vendor/ez_toml/version.mlt +2209e9f7d474e5ee3c3408010170c572:src/vendor/ez_toml/version.mlt # end context for src/vendor/ez_toml/version.mlt # begin context for src/vendor/vscode-ocaml-platform/src-bindings/interop/dune @@ -540,7 +540,7 @@ c5cd7b2d0a3de0d33ec14e3d433c1cae:src/vendor/ez_toml/index.mld # begin context for src/vendor/vscode-ocaml-platform/src-bindings/interop/version.mlt # file src/vendor/vscode-ocaml-platform/src-bindings/interop/version.mlt -3b5d23165644aee0c651353e188a647f:src/vendor/vscode-ocaml-platform/src-bindings/interop/version.mlt +2209e9f7d474e5ee3c3408010170c572:src/vendor/vscode-ocaml-platform/src-bindings/interop/version.mlt # end context for src/vendor/vscode-ocaml-platform/src-bindings/interop/version.mlt # begin context for src/vendor/vscode-ocaml-platform/src-bindings/node/dune @@ -550,7 +550,7 @@ c5cd7b2d0a3de0d33ec14e3d433c1cae:src/vendor/ez_toml/index.mld # begin context for src/vendor/vscode-ocaml-platform/src-bindings/node/version.mlt # file src/vendor/vscode-ocaml-platform/src-bindings/node/version.mlt -3b5d23165644aee0c651353e188a647f:src/vendor/vscode-ocaml-platform/src-bindings/node/version.mlt +2209e9f7d474e5ee3c3408010170c572:src/vendor/vscode-ocaml-platform/src-bindings/node/version.mlt # end context for src/vendor/vscode-ocaml-platform/src-bindings/node/version.mlt # begin context for src/vendor/vscode-ocaml-platform/src-bindings/polka/dune @@ -560,7 +560,7 @@ c5cd7b2d0a3de0d33ec14e3d433c1cae:src/vendor/ez_toml/index.mld # begin context for src/vendor/vscode-ocaml-platform/src-bindings/polka/version.mlt # file src/vendor/vscode-ocaml-platform/src-bindings/polka/version.mlt -3b5d23165644aee0c651353e188a647f:src/vendor/vscode-ocaml-platform/src-bindings/polka/version.mlt +2209e9f7d474e5ee3c3408010170c572:src/vendor/vscode-ocaml-platform/src-bindings/polka/version.mlt # end context for src/vendor/vscode-ocaml-platform/src-bindings/polka/version.mlt # begin context for src/vendor/vscode-ocaml-platform/src-bindings/vscode/dune @@ -570,7 +570,7 @@ c5cd7b2d0a3de0d33ec14e3d433c1cae:src/vendor/ez_toml/index.mld # begin context for src/vendor/vscode-ocaml-platform/src-bindings/vscode/version.mlt # file src/vendor/vscode-ocaml-platform/src-bindings/vscode/version.mlt -3b5d23165644aee0c651353e188a647f:src/vendor/vscode-ocaml-platform/src-bindings/vscode/version.mlt +2209e9f7d474e5ee3c3408010170c572:src/vendor/vscode-ocaml-platform/src-bindings/vscode/version.mlt # end context for src/vendor/vscode-ocaml-platform/src-bindings/vscode/version.mlt # begin context for src/vendor/vscode-ocaml-platform/src-bindings/vscode_languageclient/dune @@ -580,7 +580,7 @@ c5cd7b2d0a3de0d33ec14e3d433c1cae:src/vendor/ez_toml/index.mld # begin context for src/vendor/vscode-ocaml-platform/src-bindings/vscode_languageclient/version.mlt # file src/vendor/vscode-ocaml-platform/src-bindings/vscode_languageclient/version.mlt -3b5d23165644aee0c651353e188a647f:src/vendor/vscode-ocaml-platform/src-bindings/vscode_languageclient/version.mlt +2209e9f7d474e5ee3c3408010170c572:src/vendor/vscode-ocaml-platform/src-bindings/vscode_languageclient/version.mlt # end context for src/vendor/vscode-ocaml-platform/src-bindings/vscode_languageclient/version.mlt # begin context for src/vscode/superbol-vscode-platform/dune @@ -590,7 +590,7 @@ c5cd7b2d0a3de0d33ec14e3d433c1cae:src/vendor/ez_toml/index.mld # begin context for src/vscode/superbol-vscode-platform/version.mlt # file src/vscode/superbol-vscode-platform/version.mlt -3b5d23165644aee0c651353e188a647f:src/vscode/superbol-vscode-platform/version.mlt +2209e9f7d474e5ee3c3408010170c572:src/vscode/superbol-vscode-platform/version.mlt # end context for src/vscode/superbol-vscode-platform/version.mlt # begin context for src/vscode/vscode-debugadapter/dune @@ -600,7 +600,7 @@ c5cd7b2d0a3de0d33ec14e3d433c1cae:src/vendor/ez_toml/index.mld # begin context for src/vscode/vscode-debugadapter/version.mlt # file src/vscode/vscode-debugadapter/version.mlt -3b5d23165644aee0c651353e188a647f:src/vscode/vscode-debugadapter/version.mlt +2209e9f7d474e5ee3c3408010170c572:src/vscode/vscode-debugadapter/version.mlt # end context for src/vscode/vscode-debugadapter/version.mlt # begin context for src/vscode/vscode-debugprotocol/dune @@ -610,7 +610,7 @@ c5cd7b2d0a3de0d33ec14e3d433c1cae:src/vendor/ez_toml/index.mld # begin context for src/vscode/vscode-debugprotocol/version.mlt # file src/vscode/vscode-debugprotocol/version.mlt -3b5d23165644aee0c651353e188a647f:src/vscode/vscode-debugprotocol/version.mlt +2209e9f7d474e5ee3c3408010170c572:src/vscode/vscode-debugprotocol/version.mlt # end context for src/vscode/vscode-debugprotocol/version.mlt # begin context for src/vscode/vscode-json/dune @@ -625,5 +625,5 @@ c57e4311cc67d76a32541e4dc3132913:src/vscode/vscode-json/dune # begin context for src/vscode/vscode-json/version.mlt # file src/vscode/vscode-json/version.mlt -3b5d23165644aee0c651353e188a647f:src/vscode/vscode-json/version.mlt +2209e9f7d474e5ee3c3408010170c572:src/vscode/vscode-json/version.mlt # end context for src/vscode/vscode-json/version.mlt diff --git a/Makefile b/Makefile index ed2894e68..7482c7c31 100644 --- a/Makefile +++ b/Makefile @@ -32,8 +32,12 @@ build: ./scripts/before.sh build ifeq ($(TARGET_PLAT)_$(BUILD_STATIC_EXECS),linux_true) ./scripts/static-build.sh +else +ifeq ($(TARGET_PLAT),web) + ${DUNE} build ${DUNE_ARGS} ${DUNE_CROSS_ARGS} else ${DUNE} build ${DUNE_ARGS} ${DUNE_CROSS_ARGS} @install +endif ./scripts/copy-bin.sh superbol-studio-oss superbol-vscode-platform polka-js-stubs interop-js-stubs node-js-stubs vscode-js-stubs vscode-languageclient-js-stubs vscode-json vscode-debugadapter vscode-debugprotocol superbol-free superbol_free_lib superbol_preprocs superbol_project cobol_common cobol_parser cobol_ptree ebcdic_lib cobol_lsp ppx_cobcflags pretty cobol_config cobol_indent cobol_indent_old cobol_preproc cobol_data cobol_typeck cobol_unit ez_toml ezr_toml sql_ast sql_parser cobol_cfg endif ./scripts/after.sh build diff --git a/Makefile.drom-tpl b/Makefile.drom-tpl index a0a34fe68..6faf7bafc 100644 --- a/Makefile.drom-tpl +++ b/Makefile.drom-tpl @@ -32,8 +32,12 @@ build: ./scripts/before.sh build ifeq ($(TARGET_PLAT)_$(BUILD_STATIC_EXECS),linux_true) ./scripts/static-build.sh +else +ifeq ($(TARGET_PLAT),web) + ${DUNE} build!{build-profile} ${DUNE_ARGS} ${DUNE_CROSS_ARGS} else ${DUNE} build!{build-profile} ${DUNE_ARGS} ${DUNE_CROSS_ARGS} @install +endif ./scripts/copy-bin.sh !{packages} endif ./scripts/after.sh build diff --git a/Makefile.header b/Makefile.header index 172f78eb1..501048691 100644 --- a/Makefile.header +++ b/Makefile.header @@ -19,17 +19,27 @@ DUNE_BUILD_SRCDIR = \ # TARGET_PLAT is defined in Makefile TARGET_ARCH ?= x64 -TARGET_SPEC = $(TARGET_PLAT)-$(TARGET_ARCH) +ifeq ($(TARGET_PLAT),web) + TARGET_SPEC = $(TARGET_PLAT) +else + TARGET_SPEC = $(TARGET_PLAT)-$(TARGET_ARCH) +endif + TARGET_PROFILE ?= release TARGET_VSIX = $(TARGET_NAME)-$(VERSION)-$(TARGET_SPEC)-$(TARGET_PROFILE).vsix DOT_EXE = $(if $(filter win32,$(TARGET_PLAT)),.exe) -SUPERBOL_LSP = superbol-free-$(TARGET_SPEC)$(DOT_EXE) SUPERBOL_LSPs = $(wildcard superbol-free-*-*) -ifeq ($(TARGET_PLAT)_$(BUILD_STATIC_EXECS),linux_true) - SUPERBOL_LSP_BUILT = superbol-free +ifeq ($(TARGET_PLAT),web) + SUPERBOL_LSP_BUILT = ${DUNE_BUILD_SRCDIR}/lsp/superbol-free/main.bc.js + SUPERBOL_LSP = superbol-free.js else - SUPERBOL_LSP_BUILT = ${DUNE_BUILD_SRCDIR}/lsp/superbol-free/main.exe + SUPERBOL_LSP = superbol-free-$(TARGET_SPEC)$(DOT_EXE) + ifeq ($(TARGET_PLAT)_$(BUILD_STATIC_EXECS),linux_true) + SUPERBOL_LSP_BUILT = superbol-free + else + SUPERBOL_LSP_BUILT = ${DUNE_BUILD_SRCDIR}/lsp/superbol-free/main.exe + endif endif # Setting `GENERATE_PACKAGE_DOT_JSON` to `no` skips generation of diff --git a/dune-project b/dune-project index 37efcf90f..48d84214a 100644 --- a/dune-project +++ b/dune-project @@ -393,6 +393,7 @@ (description "SuperBOL Studio OSS is a new platform for COBOL") (depends (ocaml (>= 4.14.0)) + (zarith_stubs_js ( >= 0.17 )) (zarith ( >= 1 )) (cobol_ptree (= version)) (cobol_config (= version)) diff --git a/opam/cobol_data.opam b/opam/cobol_data.opam index 8e971125d..a9e1f3ab9 100644 --- a/opam/cobol_data.opam +++ b/opam/cobol_data.opam @@ -47,6 +47,7 @@ install: [ depends: [ "ocaml" {>= "4.14.0"} "dune" {>= "2.8.0"} + "zarith_stubs_js" {>= "0.17"} "zarith" {>= "1"} "cobol_ptree" {= version} "cobol_config" {= version} diff --git a/src/lsp/cobol_data/dune b/src/lsp/cobol_data/dune index 511aff742..32e1cbf4e 100644 --- a/src/lsp/cobol_data/dune +++ b/src/lsp/cobol_data/dune @@ -5,7 +5,7 @@ (public_name cobol_data) (wrapped true) ; use field 'dune-libraries' to add libraries without opam deps - (libraries zarith cobol_ptree cobol_config cobol_common ) + (libraries zarith_stubs_js zarith cobol_ptree cobol_config cobol_common ) ; use field 'dune-flags' to set this value (flags (:standard)) ; use field 'dune-stanzas' to add more stanzas here diff --git a/src/lsp/cobol_data/package.toml b/src/lsp/cobol_data/package.toml index 79d6cb2dc..f8120665e 100644 --- a/src/lsp/cobol_data/package.toml +++ b/src/lsp/cobol_data/package.toml @@ -57,6 +57,7 @@ cobol_common = "version" cobol_config = "version" cobol_ptree = "version" zarith = ">=1" +zarith_stubs_js = ">=0.17" # package tools dependencies [tools] diff --git a/src/lsp/superbol-free/dune b/src/lsp/superbol-free/dune index 1e0b7391a..0042ea0a7 100644 --- a/src/lsp/superbol-free/dune +++ b/src/lsp/superbol-free/dune @@ -8,7 +8,7 @@ (flags ((:standard (:include linking.sexp)))) ; use field 'dune-stanzas' to add more stanzas here - + (modes exe js) ) ; Use `static-clibs` to specify static C libs (without lib prefix) diff --git a/src/lsp/superbol-free/package.toml b/src/lsp/superbol-free/package.toml index 54b17406c..46b7a5eab 100644 --- a/src/lsp/superbol-free/package.toml +++ b/src/lsp/superbol-free/package.toml @@ -72,5 +72,6 @@ superbol_free_lib = "version" # static-clibs = "unix" [fields] dune-flags = "(:standard (:include linking.sexp))" +dune-stanzas = "(modes exe js)" static-macos-clibs = "zarith ${MACPORTS:-/usr/local/osxcross/macports/pkgs/opt/local}/lib/libgmp.a camlstr bigstringaf_stubs cstruct_stubs" static-alpine-clibs = "zarith gmp bigstringaf_stubs cstruct_stubs" diff --git a/src/vendor/ez_toml/dune b/src/vendor/ez_toml/dune index d5ace455e..ae93cc418 100644 --- a/src/vendor/ez_toml/dune +++ b/src/vendor/ez_toml/dune @@ -13,8 +13,8 @@ ) -(menhir (modules internal_parser)) (ocamllex internal_lexer) +(menhir (modules internal_parser)) (rule (targets version.ml) diff --git a/src/vscode/superbol-vscode-platform/superbol_languageclient.ml b/src/vscode/superbol-vscode-platform/superbol_languageclient.ml index f9c4f64a8..3a2822a51 100644 --- a/src/vscode/superbol-vscode-platform/superbol_languageclient.ml +++ b/src/vscode/superbol-vscode-platform/superbol_languageclient.ml @@ -48,11 +48,12 @@ let find_superbol root = Vscode.Uri.joinPath root ~pathSegments:[name]) @@ [ Format.asprintf "%s-%s-%s%s" prefix platform arch suffix; Format.asprintf "%s-%s%s" prefix platform suffix; - Format.asprintf "%s%s" prefix suffix + Format.asprintf "%s%s" prefix suffix; ] @ if platform = "darwin" && arch = "arm64" then - [ Format.sprintf "%s-%s-%s%s" prefix platform "x64" suffix] + [ Format.sprintf "%s-%s-%s%s" prefix platform "x64" suffix; + "main.bc.js" ] else - [] + [ "main.bc.js" ] let scan_host_and_port url = let fail () = Format.ksprintf failwith "Invalid %S" url in