Skip to content
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

Included a js_of_ocaml version of superbol in the .vsix #93

Draft
wants to merge 5 commits into
base: master
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from 1 commit
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
12 changes: 6 additions & 6 deletions .drom

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 4 additions & 0 deletions Makefile
nberth marked this conversation as resolved.
Show resolved Hide resolved

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 4 additions & 0 deletions Makefile.drom-tpl
Original file line number Diff line number Diff line change
Expand Up @@ -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)
emilienlemaire marked this conversation as resolved.
Show resolved Hide resolved
${DUNE} build
emilienlemaire marked this conversation as resolved.
Show resolved Hide resolved
else
${DUNE} build!{build-profile} ${DUNE_ARGS} ${DUNE_CROSS_ARGS} @install
endif
./scripts/copy-bin.sh !{packages}
endif
./scripts/after.sh build
Expand Down
18 changes: 14 additions & 4 deletions Makefile.header
Original file line number Diff line number Diff line change
Expand Up @@ -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)
emilienlemaire marked this conversation as resolved.
Show resolved Hide resolved
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
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
Expand Down
1 change: 1 addition & 0 deletions dune-project

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions opam/cobol_data.opam
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,7 @@ install: [
depends: [
"ocaml" {>= "4.14.0"}
"dune" {>= "2.8.0"}
"zarith_stubs_js" {>= "0.17"}
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hum… we need to investigate what impact that has. Ideally we'd find a way to avoid this dependency in the opam file (or have a flag that says the dependency is only valid for js target — not sure this is doable)?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

None I think, it only contains a .js file, so it won't be used unless compiled in JS mode

"zarith" {>= "1"}
"cobol_ptree" {= version}
"cobol_config" {= version}
Expand Down
2 changes: 1 addition & 1 deletion src/lsp/cobol_data/dune

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions src/lsp/cobol_data/package.toml
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,7 @@ cobol_common = "version"
cobol_config = "version"
cobol_ptree = "version"
zarith = ">=1"
zarith_stubs_js = ">=0.17"

# package tools dependencies
[tools]
Expand Down
2 changes: 1 addition & 1 deletion src/lsp/superbol-free/dune
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please investigate whether that can be achieved via fields of the corresponding package.toml. Same for superbol_free_lib/dune.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I have changed the drom files. Running drom build generates a bunch of main.ml files everywhere tho, not sure what's up about that. Not included in this commit, in spite of drom "helpfully" (not at all) deciding to add its changes to the index.

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Might depend on drom's version. I typically use opam exec -- drom project to generated the files instead.

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I, too, hate the way drom interacts with git. (Fabrice mentioned he welcomed PRs on drom, notably to disable auto-indexing).

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,8 @@ 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;
Format.asprintf "main.bc.js"
emilienlemaire marked this conversation as resolved.
Show resolved Hide resolved
] @ if platform = "darwin" && arch = "arm64" then
[ Format.sprintf "%s-%s-%s%s" prefix platform "x64" suffix]
else
Expand Down
Loading