From e58a5ff844b80b5b5a71cca2232fd3faf1c3d68f Mon Sep 17 00:00:00 2001 From: Emilien Lemaire Date: Fri, 20 Dec 2024 16:39:15 +0100 Subject: [PATCH] Fixes and revert version.mlt update --- .drom | 2 +- .gitattributes | 1 - Makefile | 4 ++-- Makefile.drom-tpl | 4 ++-- Makefile.header | 9 ++++----- src/lsp/cobol_cfg/version.mlt | 9 +++++++-- src/lsp/cobol_common/version.mlt | 9 +++++++-- src/lsp/cobol_config/version.mlt | 9 +++++++-- src/lsp/cobol_data/version.mlt | 9 +++++++-- src/lsp/cobol_indent/version.mlt | 9 +++++++-- src/lsp/cobol_indent_old/version.mlt | 9 +++++++-- src/lsp/cobol_lsp/version.mlt | 9 +++++++-- src/lsp/cobol_parser/version.mlt | 9 +++++++-- src/lsp/cobol_preproc/version.mlt | 9 +++++++-- src/lsp/cobol_ptree/version.mlt | 9 +++++++-- src/lsp/cobol_typeck/version.mlt | 9 +++++++-- src/lsp/cobol_unit/version.mlt | 9 +++++++-- src/lsp/ebcdic_lib/ebcdic_version.mlt | 9 +++++++-- src/lsp/ezr_toml/version.mlt | 9 +++++++-- src/lsp/ppx_cobcflags/version.mlt | 9 +++++++-- src/lsp/pretty/version.mlt | 9 +++++++-- src/lsp/sql_ast/version.mlt | 9 +++++++-- src/lsp/sql_parser/version.mlt | 9 +++++++-- src/lsp/superbol_free_lib/version.mlt | 9 +++++++-- src/lsp/superbol_preprocs/version.mlt | 9 +++++++-- src/lsp/superbol_project/version.mlt | 9 +++++++-- src/vendor/ez_toml/version.mlt | 9 +++++++-- .../src-bindings/interop/version.mlt | 9 +++++++-- .../vscode-ocaml-platform/src-bindings/node/version.mlt | 9 +++++++-- .../vscode-ocaml-platform/src-bindings/polka/version.mlt | 9 +++++++-- .../src-bindings/vscode/version.mlt | 9 +++++++-- .../src-bindings/vscode_languageclient/version.mlt | 9 +++++++-- .../superbol-vscode-platform/superbol_languageclient.ml | 6 +++--- src/vscode/superbol-vscode-platform/version.mlt | 9 +++++++-- src/vscode/vscode-debugadapter/version.mlt | 9 +++++++-- src/vscode/vscode-debugprotocol/version.mlt | 9 +++++++-- src/vscode/vscode-json/version.mlt | 9 +++++++-- 37 files changed, 229 insertions(+), 76 deletions(-) diff --git a/.drom b/.drom index bf8a2af53..4f3cf1917 100644 --- a/.drom +++ b/.drom @@ -25,7 +25,7 @@ version:0.9.0 # begin context for Makefile # file Makefile -8a54c5db91ea9eff48ead8dc49f5d05e:Makefile +53e82ff2391c1529bd29cb25dec75aac:Makefile # end context for Makefile # begin context for README.md diff --git a/.gitattributes b/.gitattributes index d83915f8b..cc6474953 100644 --- a/.gitattributes +++ b/.gitattributes @@ -5,4 +5,3 @@ linking_flags.sh linguist-generated /dune-project linguist-generated /sphinx/conf.py linguist-generated /package.json linguist-generated -/**/version.mlt linguist-generated diff --git a/Makefile b/Makefile index 4e2177b3c..7482c7c31 100644 --- a/Makefile +++ b/Makefile @@ -33,8 +33,8 @@ build: ifeq ($(TARGET_PLAT)_$(BUILD_STATIC_EXECS),linux_true) ./scripts/static-build.sh else -ifeq ($(TARGET_PLAT), web) - ${DUNE} build +ifeq ($(TARGET_PLAT),web) + ${DUNE} build ${DUNE_ARGS} ${DUNE_CROSS_ARGS} else ${DUNE} build ${DUNE_ARGS} ${DUNE_CROSS_ARGS} @install endif diff --git a/Makefile.drom-tpl b/Makefile.drom-tpl index 35f971361..6faf7bafc 100644 --- a/Makefile.drom-tpl +++ b/Makefile.drom-tpl @@ -33,8 +33,8 @@ build: ifeq ($(TARGET_PLAT)_$(BUILD_STATIC_EXECS),linux_true) ./scripts/static-build.sh else -ifeq ($(TARGET_PLAT), web) - ${DUNE} build +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 diff --git a/Makefile.header b/Makefile.header index 2f578fb9d..3a5ce9fb7 100644 --- a/Makefile.header +++ b/Makefile.header @@ -19,22 +19,21 @@ DUNE_BUILD_SRCDIR = \ # TARGET_PLAT is defined in Makefile TARGET_ARCH ?= x64 -ifeq ($(TARGET_PLAT), web) +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), web) +ifeq ($(TARGET_PLAT),web) SUPERBOL_LSP_BUILT = ${DUNE_BUILD_SRCDIR}/lsp/superbol-free/main.bc.js SUPERBOL_LSP = superbol-free.js else + SUPERBOL_LSP = superbol-free-$(TARGET_SPEC)$(DOT_EXE) ifeq ($(TARGET_PLAT)_$(BUILD_STATIC_EXECS),linux_true) SUPERBOL_LSP_BUILT = superbol-free else diff --git a/src/lsp/cobol_cfg/version.mlt b/src/lsp/cobol_cfg/version.mlt index c608b449d..b6d1db7ca 100644 --- a/src/lsp/cobol_cfg/version.mlt +++ b/src/lsp/cobol_cfg/version.mlt @@ -11,8 +11,13 @@ let query cmd = else None with End_of_file -> None -let commit_hash = query "git show -s --pretty=format:%H" -let commit_date = query "git show -s --pretty=format:%ci" +let gitdir = + try Sys.getenv "DUNE_SOURCEROOT" with Not_found -> "" + +let commit_hash = + query ("git -C \""^gitdir^"\" show -s --pretty=format:%H") +let commit_date = + query ("git -C \""^gitdir^"\" show -s --pretty=format:%ci") let version = "0.1.5" let string_option = function diff --git a/src/lsp/cobol_common/version.mlt b/src/lsp/cobol_common/version.mlt index c608b449d..b6d1db7ca 100644 --- a/src/lsp/cobol_common/version.mlt +++ b/src/lsp/cobol_common/version.mlt @@ -11,8 +11,13 @@ let query cmd = else None with End_of_file -> None -let commit_hash = query "git show -s --pretty=format:%H" -let commit_date = query "git show -s --pretty=format:%ci" +let gitdir = + try Sys.getenv "DUNE_SOURCEROOT" with Not_found -> "" + +let commit_hash = + query ("git -C \""^gitdir^"\" show -s --pretty=format:%H") +let commit_date = + query ("git -C \""^gitdir^"\" show -s --pretty=format:%ci") let version = "0.1.5" let string_option = function diff --git a/src/lsp/cobol_config/version.mlt b/src/lsp/cobol_config/version.mlt index c608b449d..b6d1db7ca 100644 --- a/src/lsp/cobol_config/version.mlt +++ b/src/lsp/cobol_config/version.mlt @@ -11,8 +11,13 @@ let query cmd = else None with End_of_file -> None -let commit_hash = query "git show -s --pretty=format:%H" -let commit_date = query "git show -s --pretty=format:%ci" +let gitdir = + try Sys.getenv "DUNE_SOURCEROOT" with Not_found -> "" + +let commit_hash = + query ("git -C \""^gitdir^"\" show -s --pretty=format:%H") +let commit_date = + query ("git -C \""^gitdir^"\" show -s --pretty=format:%ci") let version = "0.1.5" let string_option = function diff --git a/src/lsp/cobol_data/version.mlt b/src/lsp/cobol_data/version.mlt index c608b449d..b6d1db7ca 100644 --- a/src/lsp/cobol_data/version.mlt +++ b/src/lsp/cobol_data/version.mlt @@ -11,8 +11,13 @@ let query cmd = else None with End_of_file -> None -let commit_hash = query "git show -s --pretty=format:%H" -let commit_date = query "git show -s --pretty=format:%ci" +let gitdir = + try Sys.getenv "DUNE_SOURCEROOT" with Not_found -> "" + +let commit_hash = + query ("git -C \""^gitdir^"\" show -s --pretty=format:%H") +let commit_date = + query ("git -C \""^gitdir^"\" show -s --pretty=format:%ci") let version = "0.1.5" let string_option = function diff --git a/src/lsp/cobol_indent/version.mlt b/src/lsp/cobol_indent/version.mlt index c608b449d..b6d1db7ca 100644 --- a/src/lsp/cobol_indent/version.mlt +++ b/src/lsp/cobol_indent/version.mlt @@ -11,8 +11,13 @@ let query cmd = else None with End_of_file -> None -let commit_hash = query "git show -s --pretty=format:%H" -let commit_date = query "git show -s --pretty=format:%ci" +let gitdir = + try Sys.getenv "DUNE_SOURCEROOT" with Not_found -> "" + +let commit_hash = + query ("git -C \""^gitdir^"\" show -s --pretty=format:%H") +let commit_date = + query ("git -C \""^gitdir^"\" show -s --pretty=format:%ci") let version = "0.1.5" let string_option = function diff --git a/src/lsp/cobol_indent_old/version.mlt b/src/lsp/cobol_indent_old/version.mlt index c608b449d..b6d1db7ca 100644 --- a/src/lsp/cobol_indent_old/version.mlt +++ b/src/lsp/cobol_indent_old/version.mlt @@ -11,8 +11,13 @@ let query cmd = else None with End_of_file -> None -let commit_hash = query "git show -s --pretty=format:%H" -let commit_date = query "git show -s --pretty=format:%ci" +let gitdir = + try Sys.getenv "DUNE_SOURCEROOT" with Not_found -> "" + +let commit_hash = + query ("git -C \""^gitdir^"\" show -s --pretty=format:%H") +let commit_date = + query ("git -C \""^gitdir^"\" show -s --pretty=format:%ci") let version = "0.1.5" let string_option = function diff --git a/src/lsp/cobol_lsp/version.mlt b/src/lsp/cobol_lsp/version.mlt index c608b449d..b6d1db7ca 100644 --- a/src/lsp/cobol_lsp/version.mlt +++ b/src/lsp/cobol_lsp/version.mlt @@ -11,8 +11,13 @@ let query cmd = else None with End_of_file -> None -let commit_hash = query "git show -s --pretty=format:%H" -let commit_date = query "git show -s --pretty=format:%ci" +let gitdir = + try Sys.getenv "DUNE_SOURCEROOT" with Not_found -> "" + +let commit_hash = + query ("git -C \""^gitdir^"\" show -s --pretty=format:%H") +let commit_date = + query ("git -C \""^gitdir^"\" show -s --pretty=format:%ci") let version = "0.1.5" let string_option = function diff --git a/src/lsp/cobol_parser/version.mlt b/src/lsp/cobol_parser/version.mlt index c608b449d..b6d1db7ca 100644 --- a/src/lsp/cobol_parser/version.mlt +++ b/src/lsp/cobol_parser/version.mlt @@ -11,8 +11,13 @@ let query cmd = else None with End_of_file -> None -let commit_hash = query "git show -s --pretty=format:%H" -let commit_date = query "git show -s --pretty=format:%ci" +let gitdir = + try Sys.getenv "DUNE_SOURCEROOT" with Not_found -> "" + +let commit_hash = + query ("git -C \""^gitdir^"\" show -s --pretty=format:%H") +let commit_date = + query ("git -C \""^gitdir^"\" show -s --pretty=format:%ci") let version = "0.1.5" let string_option = function diff --git a/src/lsp/cobol_preproc/version.mlt b/src/lsp/cobol_preproc/version.mlt index c608b449d..b6d1db7ca 100644 --- a/src/lsp/cobol_preproc/version.mlt +++ b/src/lsp/cobol_preproc/version.mlt @@ -11,8 +11,13 @@ let query cmd = else None with End_of_file -> None -let commit_hash = query "git show -s --pretty=format:%H" -let commit_date = query "git show -s --pretty=format:%ci" +let gitdir = + try Sys.getenv "DUNE_SOURCEROOT" with Not_found -> "" + +let commit_hash = + query ("git -C \""^gitdir^"\" show -s --pretty=format:%H") +let commit_date = + query ("git -C \""^gitdir^"\" show -s --pretty=format:%ci") let version = "0.1.5" let string_option = function diff --git a/src/lsp/cobol_ptree/version.mlt b/src/lsp/cobol_ptree/version.mlt index c608b449d..b6d1db7ca 100644 --- a/src/lsp/cobol_ptree/version.mlt +++ b/src/lsp/cobol_ptree/version.mlt @@ -11,8 +11,13 @@ let query cmd = else None with End_of_file -> None -let commit_hash = query "git show -s --pretty=format:%H" -let commit_date = query "git show -s --pretty=format:%ci" +let gitdir = + try Sys.getenv "DUNE_SOURCEROOT" with Not_found -> "" + +let commit_hash = + query ("git -C \""^gitdir^"\" show -s --pretty=format:%H") +let commit_date = + query ("git -C \""^gitdir^"\" show -s --pretty=format:%ci") let version = "0.1.5" let string_option = function diff --git a/src/lsp/cobol_typeck/version.mlt b/src/lsp/cobol_typeck/version.mlt index c608b449d..b6d1db7ca 100644 --- a/src/lsp/cobol_typeck/version.mlt +++ b/src/lsp/cobol_typeck/version.mlt @@ -11,8 +11,13 @@ let query cmd = else None with End_of_file -> None -let commit_hash = query "git show -s --pretty=format:%H" -let commit_date = query "git show -s --pretty=format:%ci" +let gitdir = + try Sys.getenv "DUNE_SOURCEROOT" with Not_found -> "" + +let commit_hash = + query ("git -C \""^gitdir^"\" show -s --pretty=format:%H") +let commit_date = + query ("git -C \""^gitdir^"\" show -s --pretty=format:%ci") let version = "0.1.5" let string_option = function diff --git a/src/lsp/cobol_unit/version.mlt b/src/lsp/cobol_unit/version.mlt index c608b449d..b6d1db7ca 100644 --- a/src/lsp/cobol_unit/version.mlt +++ b/src/lsp/cobol_unit/version.mlt @@ -11,8 +11,13 @@ let query cmd = else None with End_of_file -> None -let commit_hash = query "git show -s --pretty=format:%H" -let commit_date = query "git show -s --pretty=format:%ci" +let gitdir = + try Sys.getenv "DUNE_SOURCEROOT" with Not_found -> "" + +let commit_hash = + query ("git -C \""^gitdir^"\" show -s --pretty=format:%H") +let commit_date = + query ("git -C \""^gitdir^"\" show -s --pretty=format:%ci") let version = "0.1.5" let string_option = function diff --git a/src/lsp/ebcdic_lib/ebcdic_version.mlt b/src/lsp/ebcdic_lib/ebcdic_version.mlt index c608b449d..b6d1db7ca 100644 --- a/src/lsp/ebcdic_lib/ebcdic_version.mlt +++ b/src/lsp/ebcdic_lib/ebcdic_version.mlt @@ -11,8 +11,13 @@ let query cmd = else None with End_of_file -> None -let commit_hash = query "git show -s --pretty=format:%H" -let commit_date = query "git show -s --pretty=format:%ci" +let gitdir = + try Sys.getenv "DUNE_SOURCEROOT" with Not_found -> "" + +let commit_hash = + query ("git -C \""^gitdir^"\" show -s --pretty=format:%H") +let commit_date = + query ("git -C \""^gitdir^"\" show -s --pretty=format:%ci") let version = "0.1.5" let string_option = function diff --git a/src/lsp/ezr_toml/version.mlt b/src/lsp/ezr_toml/version.mlt index c608b449d..b6d1db7ca 100644 --- a/src/lsp/ezr_toml/version.mlt +++ b/src/lsp/ezr_toml/version.mlt @@ -11,8 +11,13 @@ let query cmd = else None with End_of_file -> None -let commit_hash = query "git show -s --pretty=format:%H" -let commit_date = query "git show -s --pretty=format:%ci" +let gitdir = + try Sys.getenv "DUNE_SOURCEROOT" with Not_found -> "" + +let commit_hash = + query ("git -C \""^gitdir^"\" show -s --pretty=format:%H") +let commit_date = + query ("git -C \""^gitdir^"\" show -s --pretty=format:%ci") let version = "0.1.5" let string_option = function diff --git a/src/lsp/ppx_cobcflags/version.mlt b/src/lsp/ppx_cobcflags/version.mlt index c608b449d..b6d1db7ca 100644 --- a/src/lsp/ppx_cobcflags/version.mlt +++ b/src/lsp/ppx_cobcflags/version.mlt @@ -11,8 +11,13 @@ let query cmd = else None with End_of_file -> None -let commit_hash = query "git show -s --pretty=format:%H" -let commit_date = query "git show -s --pretty=format:%ci" +let gitdir = + try Sys.getenv "DUNE_SOURCEROOT" with Not_found -> "" + +let commit_hash = + query ("git -C \""^gitdir^"\" show -s --pretty=format:%H") +let commit_date = + query ("git -C \""^gitdir^"\" show -s --pretty=format:%ci") let version = "0.1.5" let string_option = function diff --git a/src/lsp/pretty/version.mlt b/src/lsp/pretty/version.mlt index c608b449d..b6d1db7ca 100644 --- a/src/lsp/pretty/version.mlt +++ b/src/lsp/pretty/version.mlt @@ -11,8 +11,13 @@ let query cmd = else None with End_of_file -> None -let commit_hash = query "git show -s --pretty=format:%H" -let commit_date = query "git show -s --pretty=format:%ci" +let gitdir = + try Sys.getenv "DUNE_SOURCEROOT" with Not_found -> "" + +let commit_hash = + query ("git -C \""^gitdir^"\" show -s --pretty=format:%H") +let commit_date = + query ("git -C \""^gitdir^"\" show -s --pretty=format:%ci") let version = "0.1.5" let string_option = function diff --git a/src/lsp/sql_ast/version.mlt b/src/lsp/sql_ast/version.mlt index c608b449d..b6d1db7ca 100644 --- a/src/lsp/sql_ast/version.mlt +++ b/src/lsp/sql_ast/version.mlt @@ -11,8 +11,13 @@ let query cmd = else None with End_of_file -> None -let commit_hash = query "git show -s --pretty=format:%H" -let commit_date = query "git show -s --pretty=format:%ci" +let gitdir = + try Sys.getenv "DUNE_SOURCEROOT" with Not_found -> "" + +let commit_hash = + query ("git -C \""^gitdir^"\" show -s --pretty=format:%H") +let commit_date = + query ("git -C \""^gitdir^"\" show -s --pretty=format:%ci") let version = "0.1.5" let string_option = function diff --git a/src/lsp/sql_parser/version.mlt b/src/lsp/sql_parser/version.mlt index c608b449d..b6d1db7ca 100644 --- a/src/lsp/sql_parser/version.mlt +++ b/src/lsp/sql_parser/version.mlt @@ -11,8 +11,13 @@ let query cmd = else None with End_of_file -> None -let commit_hash = query "git show -s --pretty=format:%H" -let commit_date = query "git show -s --pretty=format:%ci" +let gitdir = + try Sys.getenv "DUNE_SOURCEROOT" with Not_found -> "" + +let commit_hash = + query ("git -C \""^gitdir^"\" show -s --pretty=format:%H") +let commit_date = + query ("git -C \""^gitdir^"\" show -s --pretty=format:%ci") let version = "0.1.5" let string_option = function diff --git a/src/lsp/superbol_free_lib/version.mlt b/src/lsp/superbol_free_lib/version.mlt index c608b449d..b6d1db7ca 100644 --- a/src/lsp/superbol_free_lib/version.mlt +++ b/src/lsp/superbol_free_lib/version.mlt @@ -11,8 +11,13 @@ let query cmd = else None with End_of_file -> None -let commit_hash = query "git show -s --pretty=format:%H" -let commit_date = query "git show -s --pretty=format:%ci" +let gitdir = + try Sys.getenv "DUNE_SOURCEROOT" with Not_found -> "" + +let commit_hash = + query ("git -C \""^gitdir^"\" show -s --pretty=format:%H") +let commit_date = + query ("git -C \""^gitdir^"\" show -s --pretty=format:%ci") let version = "0.1.5" let string_option = function diff --git a/src/lsp/superbol_preprocs/version.mlt b/src/lsp/superbol_preprocs/version.mlt index c608b449d..b6d1db7ca 100644 --- a/src/lsp/superbol_preprocs/version.mlt +++ b/src/lsp/superbol_preprocs/version.mlt @@ -11,8 +11,13 @@ let query cmd = else None with End_of_file -> None -let commit_hash = query "git show -s --pretty=format:%H" -let commit_date = query "git show -s --pretty=format:%ci" +let gitdir = + try Sys.getenv "DUNE_SOURCEROOT" with Not_found -> "" + +let commit_hash = + query ("git -C \""^gitdir^"\" show -s --pretty=format:%H") +let commit_date = + query ("git -C \""^gitdir^"\" show -s --pretty=format:%ci") let version = "0.1.5" let string_option = function diff --git a/src/lsp/superbol_project/version.mlt b/src/lsp/superbol_project/version.mlt index c608b449d..b6d1db7ca 100644 --- a/src/lsp/superbol_project/version.mlt +++ b/src/lsp/superbol_project/version.mlt @@ -11,8 +11,13 @@ let query cmd = else None with End_of_file -> None -let commit_hash = query "git show -s --pretty=format:%H" -let commit_date = query "git show -s --pretty=format:%ci" +let gitdir = + try Sys.getenv "DUNE_SOURCEROOT" with Not_found -> "" + +let commit_hash = + query ("git -C \""^gitdir^"\" show -s --pretty=format:%H") +let commit_date = + query ("git -C \""^gitdir^"\" show -s --pretty=format:%ci") let version = "0.1.5" let string_option = function diff --git a/src/vendor/ez_toml/version.mlt b/src/vendor/ez_toml/version.mlt index c608b449d..b6d1db7ca 100644 --- a/src/vendor/ez_toml/version.mlt +++ b/src/vendor/ez_toml/version.mlt @@ -11,8 +11,13 @@ let query cmd = else None with End_of_file -> None -let commit_hash = query "git show -s --pretty=format:%H" -let commit_date = query "git show -s --pretty=format:%ci" +let gitdir = + try Sys.getenv "DUNE_SOURCEROOT" with Not_found -> "" + +let commit_hash = + query ("git -C \""^gitdir^"\" show -s --pretty=format:%H") +let commit_date = + query ("git -C \""^gitdir^"\" show -s --pretty=format:%ci") let version = "0.1.5" let string_option = function diff --git a/src/vendor/vscode-ocaml-platform/src-bindings/interop/version.mlt b/src/vendor/vscode-ocaml-platform/src-bindings/interop/version.mlt index c608b449d..b6d1db7ca 100644 --- a/src/vendor/vscode-ocaml-platform/src-bindings/interop/version.mlt +++ b/src/vendor/vscode-ocaml-platform/src-bindings/interop/version.mlt @@ -11,8 +11,13 @@ let query cmd = else None with End_of_file -> None -let commit_hash = query "git show -s --pretty=format:%H" -let commit_date = query "git show -s --pretty=format:%ci" +let gitdir = + try Sys.getenv "DUNE_SOURCEROOT" with Not_found -> "" + +let commit_hash = + query ("git -C \""^gitdir^"\" show -s --pretty=format:%H") +let commit_date = + query ("git -C \""^gitdir^"\" show -s --pretty=format:%ci") let version = "0.1.5" let string_option = function diff --git a/src/vendor/vscode-ocaml-platform/src-bindings/node/version.mlt b/src/vendor/vscode-ocaml-platform/src-bindings/node/version.mlt index c608b449d..b6d1db7ca 100644 --- a/src/vendor/vscode-ocaml-platform/src-bindings/node/version.mlt +++ b/src/vendor/vscode-ocaml-platform/src-bindings/node/version.mlt @@ -11,8 +11,13 @@ let query cmd = else None with End_of_file -> None -let commit_hash = query "git show -s --pretty=format:%H" -let commit_date = query "git show -s --pretty=format:%ci" +let gitdir = + try Sys.getenv "DUNE_SOURCEROOT" with Not_found -> "" + +let commit_hash = + query ("git -C \""^gitdir^"\" show -s --pretty=format:%H") +let commit_date = + query ("git -C \""^gitdir^"\" show -s --pretty=format:%ci") let version = "0.1.5" let string_option = function diff --git a/src/vendor/vscode-ocaml-platform/src-bindings/polka/version.mlt b/src/vendor/vscode-ocaml-platform/src-bindings/polka/version.mlt index c608b449d..b6d1db7ca 100644 --- a/src/vendor/vscode-ocaml-platform/src-bindings/polka/version.mlt +++ b/src/vendor/vscode-ocaml-platform/src-bindings/polka/version.mlt @@ -11,8 +11,13 @@ let query cmd = else None with End_of_file -> None -let commit_hash = query "git show -s --pretty=format:%H" -let commit_date = query "git show -s --pretty=format:%ci" +let gitdir = + try Sys.getenv "DUNE_SOURCEROOT" with Not_found -> "" + +let commit_hash = + query ("git -C \""^gitdir^"\" show -s --pretty=format:%H") +let commit_date = + query ("git -C \""^gitdir^"\" show -s --pretty=format:%ci") let version = "0.1.5" let string_option = function diff --git a/src/vendor/vscode-ocaml-platform/src-bindings/vscode/version.mlt b/src/vendor/vscode-ocaml-platform/src-bindings/vscode/version.mlt index c608b449d..b6d1db7ca 100644 --- a/src/vendor/vscode-ocaml-platform/src-bindings/vscode/version.mlt +++ b/src/vendor/vscode-ocaml-platform/src-bindings/vscode/version.mlt @@ -11,8 +11,13 @@ let query cmd = else None with End_of_file -> None -let commit_hash = query "git show -s --pretty=format:%H" -let commit_date = query "git show -s --pretty=format:%ci" +let gitdir = + try Sys.getenv "DUNE_SOURCEROOT" with Not_found -> "" + +let commit_hash = + query ("git -C \""^gitdir^"\" show -s --pretty=format:%H") +let commit_date = + query ("git -C \""^gitdir^"\" show -s --pretty=format:%ci") let version = "0.1.5" let string_option = function diff --git a/src/vendor/vscode-ocaml-platform/src-bindings/vscode_languageclient/version.mlt b/src/vendor/vscode-ocaml-platform/src-bindings/vscode_languageclient/version.mlt index c608b449d..b6d1db7ca 100644 --- a/src/vendor/vscode-ocaml-platform/src-bindings/vscode_languageclient/version.mlt +++ b/src/vendor/vscode-ocaml-platform/src-bindings/vscode_languageclient/version.mlt @@ -11,8 +11,13 @@ let query cmd = else None with End_of_file -> None -let commit_hash = query "git show -s --pretty=format:%H" -let commit_date = query "git show -s --pretty=format:%ci" +let gitdir = + try Sys.getenv "DUNE_SOURCEROOT" with Not_found -> "" + +let commit_hash = + query ("git -C \""^gitdir^"\" show -s --pretty=format:%H") +let commit_date = + query ("git -C \""^gitdir^"\" show -s --pretty=format:%ci") let version = "0.1.5" let string_option = function diff --git a/src/vscode/superbol-vscode-platform/superbol_languageclient.ml b/src/vscode/superbol-vscode-platform/superbol_languageclient.ml index 41652948f..3a2822a51 100644 --- a/src/vscode/superbol-vscode-platform/superbol_languageclient.ml +++ b/src/vscode/superbol-vscode-platform/superbol_languageclient.ml @@ -49,11 +49,11 @@ let find_superbol root = 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 "main.bc.js" ] @ 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 diff --git a/src/vscode/superbol-vscode-platform/version.mlt b/src/vscode/superbol-vscode-platform/version.mlt index c608b449d..b6d1db7ca 100644 --- a/src/vscode/superbol-vscode-platform/version.mlt +++ b/src/vscode/superbol-vscode-platform/version.mlt @@ -11,8 +11,13 @@ let query cmd = else None with End_of_file -> None -let commit_hash = query "git show -s --pretty=format:%H" -let commit_date = query "git show -s --pretty=format:%ci" +let gitdir = + try Sys.getenv "DUNE_SOURCEROOT" with Not_found -> "" + +let commit_hash = + query ("git -C \""^gitdir^"\" show -s --pretty=format:%H") +let commit_date = + query ("git -C \""^gitdir^"\" show -s --pretty=format:%ci") let version = "0.1.5" let string_option = function diff --git a/src/vscode/vscode-debugadapter/version.mlt b/src/vscode/vscode-debugadapter/version.mlt index c608b449d..b6d1db7ca 100644 --- a/src/vscode/vscode-debugadapter/version.mlt +++ b/src/vscode/vscode-debugadapter/version.mlt @@ -11,8 +11,13 @@ let query cmd = else None with End_of_file -> None -let commit_hash = query "git show -s --pretty=format:%H" -let commit_date = query "git show -s --pretty=format:%ci" +let gitdir = + try Sys.getenv "DUNE_SOURCEROOT" with Not_found -> "" + +let commit_hash = + query ("git -C \""^gitdir^"\" show -s --pretty=format:%H") +let commit_date = + query ("git -C \""^gitdir^"\" show -s --pretty=format:%ci") let version = "0.1.5" let string_option = function diff --git a/src/vscode/vscode-debugprotocol/version.mlt b/src/vscode/vscode-debugprotocol/version.mlt index c608b449d..b6d1db7ca 100644 --- a/src/vscode/vscode-debugprotocol/version.mlt +++ b/src/vscode/vscode-debugprotocol/version.mlt @@ -11,8 +11,13 @@ let query cmd = else None with End_of_file -> None -let commit_hash = query "git show -s --pretty=format:%H" -let commit_date = query "git show -s --pretty=format:%ci" +let gitdir = + try Sys.getenv "DUNE_SOURCEROOT" with Not_found -> "" + +let commit_hash = + query ("git -C \""^gitdir^"\" show -s --pretty=format:%H") +let commit_date = + query ("git -C \""^gitdir^"\" show -s --pretty=format:%ci") let version = "0.1.5" let string_option = function diff --git a/src/vscode/vscode-json/version.mlt b/src/vscode/vscode-json/version.mlt index c608b449d..b6d1db7ca 100644 --- a/src/vscode/vscode-json/version.mlt +++ b/src/vscode/vscode-json/version.mlt @@ -11,8 +11,13 @@ let query cmd = else None with End_of_file -> None -let commit_hash = query "git show -s --pretty=format:%H" -let commit_date = query "git show -s --pretty=format:%ci" +let gitdir = + try Sys.getenv "DUNE_SOURCEROOT" with Not_found -> "" + +let commit_hash = + query ("git -C \""^gitdir^"\" show -s --pretty=format:%H") +let commit_date = + query ("git -C \""^gitdir^"\" show -s --pretty=format:%ci") let version = "0.1.5" let string_option = function