Skip to content

Commit 35c9778

Browse files
committed
attempt to make Playground build with Dune Developer Preview (fails)
1 parent 8e6e832 commit 35c9778

File tree

5 files changed

+54
-75
lines changed

5 files changed

+54
-75
lines changed

playground/Makefile

Lines changed: 5 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1,20 +1,12 @@
11
COMPILER=5.0.0
22

3-
.PHONY: create_switch
4-
create_switch: ## Create switch
5-
opam switch create . $(COMPILER) --no-install
6-
7-
.PHONY: deps
8-
deps: create_switch ## Install development dependencies
9-
opam install . --deps-only -y
10-
11-
.PHONY: switch
12-
switch: deps ## Create an opam switch and install development dependencies
3+
dune.lock: ## Generate dune.lock directory
4+
dune pkg lock --workspace dune-workspace --root .
135

146
.PHONY: build
15-
build:
16-
opam exec -- dune build --root .
7+
build: dune.lock
8+
dune build --root .
179

1810
.PHONY: fmt
1911
fmt: ## Format the codebase with ocamlformat
20-
opam exec -- dune build --root . --auto-promote @fmt
12+
dune build --root . --auto-promote @fmt

playground/dune-project

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
(lang dune 3.0)
1+
(lang dune 3.19)
22

33
(using directory-targets 0.1)
44

@@ -22,8 +22,6 @@
2222

2323
(maintainers "Thibaut Mattio" "Patrick Ferris")
2424

25-
(generate_opam_files true)
26-
2725
(using mdx 0.1)
2826

2927
(package

playground/dune-workspace

Lines changed: 48 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,48 @@
1+
(lang dune 3.19)
2+
3+
(repository
4+
(name pinned_opam_repository)
5+
(url git+https://github.com/ocaml/opam-repository#584630e7a7e27e3cf56158696a3fe94623a0cf4f))
6+
7+
(pin
8+
(name esbuild)
9+
(url "git+https://github.com/tmattio/opam-esbuild#7738af5912cc9f554d31da81d2334e88052102fb")
10+
(package
11+
(name esbuild)))
12+
13+
(pin
14+
(name code-mirror)
15+
(url "git+https://github.com/patricoferris/jsoo-code-mirror#8fe48910e265ff87f9fc94ceb7b3d19fac102a96")
16+
(package
17+
(name code-mirror)))
18+
19+
(pin
20+
(name merlin-js)
21+
(url "git+https://github.com/voodoos/merlin-js#3a8c83e03d629228b8a8394ecafc04523b0ab93f")
22+
(package
23+
(name merlin-js)))
24+
25+
(pin
26+
(name js-top-worker)
27+
(url "git+https://github.com/tmattio/js_top_worker#6110d50db0ce8577e6d662fa06d5ae9cc0c95ea1")
28+
(package
29+
(name js-top-worker)))
30+
31+
; workaround: temporary pin for ocamlbuild, to be removed when ocamlbuild works with dune pkg
32+
(pin
33+
(name ocamlbuild)
34+
(url "https://github.com/gridbugs/ocamlbuild/archive/refs/tags/0.16.1+dune.tar.gz")
35+
(package
36+
(name ocamlbuild)))
37+
38+
; workaround: temporary pin as for ocamlfind, to be removed when ocamlfind works with dune pkg
39+
(pin
40+
(name ocamlfind)
41+
(url "https://github.com/Leonidas-from-XIV/ocamlfind/releases/download/findlib-1.9.6%2Bdune/findlib-1.9.6+dune.tar.gz")
42+
(package
43+
(name ocamlfind)))
44+
45+
(lock_dir
46+
(repositories pinned_opam_repository)
47+
(pins esbuild code-mirror merlin-js js-top-worker ocamlbuild ocamlfind)
48+
(version_preference newest))

playground/ocamlorg-playground.opam

Lines changed: 0 additions & 53 deletions
This file was deleted.

playground/ocamlorg-playground.opam.template

Lines changed: 0 additions & 6 deletions
This file was deleted.

0 commit comments

Comments
 (0)