Skip to content

Bump jsoo #2255

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

Open
wants to merge 6 commits into
base: main
Choose a base branch
from
Open
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
30 changes: 26 additions & 4 deletions compiler/dune
Original file line number Diff line number Diff line change
@@ -1,9 +1,31 @@
(alias
(name native)
(deps grainc/grainc.exe graindoc/graindoc.exe grainformat/grainformat.exe
grainlsp/grainlsp.exe test/test.exe))
(deps
grainc/grainc.exe
graindoc/graindoc.exe
grainformat/grainformat.exe
grainlsp/grainlsp.exe
test/test.exe))

(alias
(name js)
(deps grainc/grainc.bc.js graindoc/graindoc.bc.js
grainformat/grainformat.bc.js grainlsp/grainlsp.bc.js test/test.bc.js))
(deps
grainc/grainc.bc.js
graindoc/graindoc.bc.js
grainformat/grainformat.bc.js
grainlsp/grainlsp.bc.js
test/test.bc.js))

(env
(_
(js_of_ocaml
(flags (:standard) --quiet --no-extern-fs --disable use-js-string)
(link_flags (:standard) --quiet --disable use-js-string)
(build_runtime_flags
(:standard)
--quiet
--no-extern-fs
--disable
use-js-string))))

(data_only_dirs node_modules)
2 changes: 1 addition & 1 deletion compiler/dune-project
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
(lang dune 2.3)
(lang dune 3.0)
(name grain)
(version 0.6.6)
(using menhir 2.0)
6 changes: 3 additions & 3 deletions compiler/esy.json
Original file line number Diff line number Diff line change
@@ -22,8 +22,8 @@
}
},
"scripts": {
"copy:exe": "cp #{$GRAINC_BIN_PATH} #{$GRAINDOC_BIN_PATH} #{$GRAINFORMAT_BIN_PATH} #{$GRAINLSP_BIN_PATH} #{$CLI_BIN_DIR}",
"copy:js": "cp #{$GRAINC_JS_PATH} #{$GRAINDOC_JS_PATH} #{$GRAINFORMAT_JS_PATH} #{$GRAINLSP_JS_PATH} #{$CLI_BIN_DIR}",
"copy:exe": "cp -f #{$GRAINC_BIN_PATH} #{$GRAINDOC_BIN_PATH} #{$GRAINFORMAT_BIN_PATH} #{$GRAINLSP_BIN_PATH} #{$CLI_BIN_DIR}",
"copy:js": "cp -f #{$GRAINC_JS_PATH} #{$GRAINDOC_JS_PATH} #{$GRAINFORMAT_JS_PATH} #{$GRAINLSP_JS_PATH} #{$CLI_BIN_DIR}",
"clean": "rm -rf #{self.root}/_esy",
"build:js": "esy b dune build @js --no-buffer #{os == 'windows' ? '-j 2' : ''}",
"test": "#{$TEST_EXEC_PATH}",
@@ -54,7 +54,7 @@
"ocaml": "4.14.1000"
},
"devDependencies": {
"@opam/js_of_ocaml-compiler": "5.0.1",
"@opam/js_of_ocaml-compiler": "6.0.1",
"@opam/ocaml-lsp-server": "1.14.1",
"@opam/rely": "^4.0.0"
},
1,324 changes: 686 additions & 638 deletions compiler/esy.lock/index.json

Large diffs are not rendered by default.

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

1 change: 1 addition & 0 deletions compiler/esy.lock/opam/base-bytes.base/opam

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

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

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

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

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

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

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

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

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

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

2 changes: 1 addition & 1 deletion compiler/esy.lock/opam/fiber.3.7.0/opam

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

2 changes: 1 addition & 1 deletion compiler/esy.lock/opam/gen.1.1/opam

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

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

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

34 changes: 0 additions & 34 deletions compiler/esy.lock/opam/num.1.4/opam

This file was deleted.

36 changes: 36 additions & 0 deletions compiler/esy.lock/opam/num.1.5-1/opam

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

2 changes: 1 addition & 1 deletion compiler/esy.lock/opam/ocaml-compiler-libs.v0.12.4/opam

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

38 changes: 0 additions & 38 deletions compiler/esy.lock/opam/ocamlbuild.0.14.2+win/opam

This file was deleted.

44 changes: 44 additions & 0 deletions compiler/esy.lock/opam/ocamlbuild.0.16.1/opam

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

This file was deleted.

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

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

5 changes: 4 additions & 1 deletion compiler/esy.lock/opam/octavius.1.2.2/opam

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

2 changes: 1 addition & 1 deletion compiler/esy.lock/opam/omd.1.3.2/opam

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

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

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

5 changes: 4 additions & 1 deletion compiler/esy.lock/opam/ppx_derivers.1.2.1/opam

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

4 changes: 2 additions & 2 deletions compiler/esy.lock/opam/ppx_deriving.5.2.1/opam

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

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

2 changes: 1 addition & 1 deletion compiler/esy.lock/opam/ppx_sexp_conv.v0.15.1/opam

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

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

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

2 changes: 1 addition & 1 deletion compiler/esy.lock/opam/reason.3.9.0/opam

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

5 changes: 4 additions & 1 deletion compiler/esy.lock/opam/result.1.5/opam

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

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

4 changes: 0 additions & 4 deletions compiler/esy.lock/opam/seq.base/files/META.seq

This file was deleted.

3 changes: 0 additions & 3 deletions compiler/esy.lock/opam/seq.base/files/seq.install

This file was deleted.

20 changes: 16 additions & 4 deletions compiler/esy.lock/opam/seq.base/opam

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

8 changes: 6 additions & 2 deletions compiler/esy.lock/opam/sexplib0.v0.15.1/opam

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

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

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

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

36 changes: 0 additions & 36 deletions compiler/esy.lock/opam/uutf.1.0.3/opam

This file was deleted.

42 changes: 42 additions & 0 deletions compiler/esy.lock/opam/uutf.1.0.4/opam

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

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

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

This file was deleted.

This file was deleted.

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

This file was deleted.

This file was deleted.

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

4 changes: 1 addition & 3 deletions compiler/grainc/dune
Original file line number Diff line number Diff line change
@@ -7,6 +7,4 @@
(flags
(:standard
(:include ./config/flags.sexp)))
(libraries grain grain_diagnostics binaryen dune-build-info)
(js_of_ocaml
(flags --no-sourcemap --no-extern-fs --quiet)))
(libraries grain grain_diagnostics binaryen dune-build-info))
14 changes: 9 additions & 5 deletions compiler/graindoc/dune
Original file line number Diff line number Diff line change
@@ -13,9 +13,13 @@
(flags
(:standard
(:include ./config/flags.sexp)))
(libraries cmdliner grain grain_diagnostics grain_utils graindoc.docblock
binaryen dune-build-info)
(libraries
cmdliner
grain
grain_diagnostics
grain_utils
graindoc.docblock
binaryen
dune-build-info)
(preprocess
(pps ppx_deriving_cmdliner))
(js_of_ocaml
(flags --no-sourcemap --no-extern-fs --quiet)))
(pps ppx_deriving_cmdliner)))
14 changes: 9 additions & 5 deletions compiler/grainformat/dune
Original file line number Diff line number Diff line change
@@ -7,9 +7,13 @@
(flags
(:standard
(:include ./config/flags.sexp)))
(libraries cmdliner grain grain_utils grain_parsing grain_formatting
binaryen dune-build-info)
(libraries
cmdliner
grain
grain_utils
grain_parsing
grain_formatting
binaryen
dune-build-info)
(preprocess
(pps ppx_deriving_cmdliner))
(js_of_ocaml
(flags --no-sourcemap --no-extern-fs --quiet)))
(pps ppx_deriving_cmdliner)))
11 changes: 6 additions & 5 deletions compiler/grainlsp/dune
Original file line number Diff line number Diff line change
@@ -7,8 +7,9 @@
(flags
(:standard
(:include ./config/flags.sexp)))
(libraries cmdliner grain_utils grain_language_server grain_formatting
dune-build-info)
(js_of_ocaml
(flags --no-sourcemap --no-extern-fs --quiet)
(javascript_files hacks.js)))
(libraries
cmdliner
grain_utils
grain_language_server
grain_formatting
dune-build-info))
2 changes: 1 addition & 1 deletion compiler/package.json
Original file line number Diff line number Diff line change
@@ -9,7 +9,7 @@
"node": ">=18.15"
},
"devDependencies": {
"esy": "0.6.12",
"esy": "0.8.0",
"shx": "^0.3.4"
},
"scripts": {
11 changes: 9 additions & 2 deletions compiler/src/codegen/dune
Original file line number Diff line number Diff line change
@@ -2,7 +2,14 @@
(name grain_codegen)
(public_name grain_codegen)
(synopsis "Grain compiler code generation")
(libraries compiler-libs.common grain_middle_end grain_parsing grain_typed
grain_utils ppx_sexp_conv.runtime-lib sexplib binaryen)
(libraries
compiler-libs.common
grain_middle_end
grain_parsing
grain_typed
grain_utils
ppx_sexp_conv.runtime-lib
sexplib
binaryen)
(preprocess
(pps ppx_sexp_conv)))
19 changes: 15 additions & 4 deletions compiler/src/diagnostics/dune
Original file line number Diff line number Diff line change
@@ -6,14 +6,25 @@
(action
(with-stdout-to
graindoc_parser_messages.ml
(run menhir %{dep:graindoc_parser.mly} --compile-errors
%{dep:graindoc_parser.messages} --unused-tokens))))
(run
menhir
%{dep:graindoc_parser.mly}
--compile-errors
%{dep:graindoc_parser.messages}
--unused-tokens))))

(library
(name grain_diagnostics)
(public_name grain_diagnostics)
(synopsis "Diagnostic modules for Grain compiler")
(libraries compiler-libs.common grain_utils grain_typed str
ppx_deriving_yojson.runtime yojson menhirLib sexplib)
(libraries
compiler-libs.common
grain_utils
grain_typed
str
ppx_deriving_yojson.runtime
yojson
menhirLib
sexplib)
(preprocess
(pps ppx_deriving_yojson sedlex.ppx)))
14 changes: 11 additions & 3 deletions compiler/src/dune
Original file line number Diff line number Diff line change
@@ -1,9 +1,17 @@
(library
(name grain)
(public_name grain)
(libraries cmdliner compiler-libs.common grain_codegen grain_middle_end
grain_parsing grain_typed grain_utils grain_diagnostics
ppx_sexp_conv.runtime-lib sexplib)
(libraries
cmdliner
compiler-libs.common
grain_codegen
grain_middle_end
grain_parsing
grain_typed
grain_utils
grain_diagnostics
ppx_sexp_conv.runtime-lib
sexplib)
(preprocess
(pps ppx_sexp_conv)))

11 changes: 9 additions & 2 deletions compiler/src/language_server/dune
Original file line number Diff line number Diff line change
@@ -1,6 +1,13 @@
(library
(name grain_language_server)
(libraries grain grain_diagnostics grain_parsing grain_utils uri
grain_formatting ppx_deriving_yojson.runtime yojson)
(libraries
grain
grain_diagnostics
grain_parsing
grain_utils
uri
grain_formatting
ppx_deriving_yojson.runtime
yojson)
(preprocess
(pps ppx_deriving.enum ppx_deriving_yojson)))
9 changes: 7 additions & 2 deletions compiler/src/middle_end/dune
Original file line number Diff line number Diff line change
@@ -2,7 +2,12 @@
(name grain_middle_end)
(public_name grain_middle_end)
(synopsis "Grain compiler middle end")
(libraries compiler-libs.common grain_parsing grain_typed grain_utils
ppx_sexp_conv.runtime-lib sexplib)
(libraries
compiler-libs.common
grain_parsing
grain_typed
grain_utils
ppx_sexp_conv.runtime-lib
sexplib)
(preprocess
(pps ppx_sexp_conv)))
28 changes: 22 additions & 6 deletions compiler/src/parsing/dune
Original file line number Diff line number Diff line change
@@ -19,23 +19,39 @@

(menhir
(modules unitActionsParser)
(flags --table --external-tokens Parser --unused-tokens
--unused-precedence-levels))
(flags
--table
--external-tokens
Parser
--unused-tokens
--unused-precedence-levels))

;; This rule compiles the parser.messages file into OCaml code.

(rule
(action
(with-stdout-to
parser_messages.ml
(run menhir %{dep:parser.mly} --compile-errors %{dep:parser.messages}
--unused-tokens))))
(run
menhir
%{dep:parser.mly}
--compile-errors
%{dep:parser.messages}
--unused-tokens))))

(library
(name grain_parsing)
(public_name grain_parsing)
(synopsis "Frontend modules for Grain compiler")
(libraries menhirLib compiler-libs.common grain_utils utf8.lib str
ppx_deriving_yojson.runtime ppx_sexp_conv.runtime-lib sexplib yojson)
(libraries
menhirLib
compiler-libs.common
grain_utils
utf8.lib
str
ppx_deriving_yojson.runtime
ppx_sexp_conv.runtime-lib
sexplib
yojson)
(preprocess
(pps ppx_sexp_conv ppx_deriving_yojson sedlex.ppx)))
12 changes: 9 additions & 3 deletions compiler/src/typed/dune
Original file line number Diff line number Diff line change
@@ -2,8 +2,14 @@
(name grain_typed)
(public_name grain_typed)
(synopsis "Grain compiler type utilities")
(libraries compiler-libs.common grain_parsing grain_utils
ppx_deriving_yojson.runtime ppx_sexp_conv.runtime-lib sexplib yojson
ocamlgraph)
(libraries
compiler-libs.common
grain_parsing
grain_utils
ppx_deriving_yojson.runtime
ppx_sexp_conv.runtime-lib
sexplib
yojson
ocamlgraph)
(preprocess
(pps ppx_sexp_conv ppx_deriving_yojson)))
15 changes: 10 additions & 5 deletions compiler/src/utils/dune
Original file line number Diff line number Diff line change
@@ -2,9 +2,14 @@
(name grain_utils)
(public_name grain_utils)
(synopsis "Utilities for the Grain compiler")
(libraries fp fs.lib cmdliner compiler-libs.common ppx_sexp_conv.runtime-lib
sexplib str dune-build-info)
(libraries
fp
fs.lib
cmdliner
compiler-libs.common
ppx_sexp_conv.runtime-lib
sexplib
str
dune-build-info)
(preprocess
(pps ppx_sexp_conv sedlex.ppx))
(js_of_ocaml
(javascript_files hacks.js)))
(pps ppx_sexp_conv sedlex.ppx)))
12 changes: 7 additions & 5 deletions compiler/test/dune
Original file line number Diff line number Diff line change
@@ -4,8 +4,12 @@
(name Grain_tests)
(public_name grain-tests.framework)
(libraries grain rely.lib)
(modules TestFramework WarningExtensions BinaryFileExtensions test_utils
runner))
(modules
TestFramework
WarningExtensions
BinaryFileExtensions
test_utils
runner))

(executable
(name test)
@@ -20,6 +24,4 @@
-40
(:include ./config/flags.sexp)))
(libraries grain grain-tests.framework grain-tests.suites grain-tests.utils)
(modules test)
(js_of_ocaml
(flags --no-sourcemap --quiet)))
(modules test))
7 changes: 4 additions & 3 deletions package-lock.json