Skip to content

Commit b72bc1d

Browse files
authored
Merge pull request #12647 from Alizter/push-vzzvqnstwxzp
chore: add dir field to dune-project
2 parents 4421b9d + 50ad67a commit b72bc1d

File tree

15 files changed

+50
-41
lines changed

15 files changed

+50
-41
lines changed

.github/workflows/workflow.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -298,7 +298,7 @@ jobs:
298298
run: opam install --fake binaryen-bin
299299

300300
- name: Install Wasm_of_ocaml
301-
run: opam install "wasm_of_ocaml-compiler>=6.1" re spawn uutf
301+
run: opam install "wasm_of_ocaml-compiler>=6.1" csexp pp re spawn uutf
302302

303303
- name: Set Git User
304304
run: |

bench.Dockerfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
FROM ocaml/opam:debian-12-ocaml-4.14
22
RUN opam depext -u patdiff.v0.15.0
3-
RUN opam install re spawn uutf
3+
RUN opam install csexp pp re spawn uutf
44
COPY --chown=opam:opam . bench-dir
55
WORKDIR bench-dir

boot/duneboot.ml

Lines changed: 14 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1024,7 +1024,19 @@ module Libs = struct
10241024
;;
10251025

10261026
let local_libraries =
1027-
[ { path = "vendor/re/src"
1027+
[ { path = "vendor/csexp/src"
1028+
; main_module_name = Some "Csexp"
1029+
; include_subdirs = No
1030+
; special_builtin_support = None
1031+
; root_module = None
1032+
}
1033+
; { path = "vendor/pp/src"
1034+
; main_module_name = Some "Pp"
1035+
; include_subdirs = No
1036+
; special_builtin_support = None
1037+
; root_module = None
1038+
}
1039+
; { path = "vendor/re/src"
10281040
; main_module_name = Some "Re"
10291041
; include_subdirs = No
10301042
; special_builtin_support = None
@@ -2017,7 +2029,7 @@ let resolve_externals external_libraries =
20172029
let convert = function
20182030
| "threads" -> Some ("threads" ^ Config.ocaml_archive_ext, [ "-I"; "+threads" ])
20192031
| "unix" -> Some ("unix" ^ Config.ocaml_archive_ext, Config.unix_library_flags)
2020-
| "seq" | "re" | "spawn" | "uutf" -> None
2032+
| "csexp" | "pp" | "re" | "seq" | "spawn" | "uutf" -> None
20212033
| s -> fatal "unhandled external library %s" s
20222034
in
20232035
List.filter_map ~f:convert external_libraries |> List.split

boot/libs.ml

Lines changed: 1 addition & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
open Types
2-
let external_libraries = [ "unix"; "threads" ]
2+
let external_libraries = [ "pp"; "unix"; "csexp"; "threads" ]
33

44
let local_libraries =
55
[ { path = "otherlibs/top-closure"
@@ -14,24 +14,12 @@ let local_libraries =
1414
; special_builtin_support = None
1515
; root_module = None
1616
}
17-
; { path = "vendor/pp/src"
18-
; main_module_name = Some "Pp"
19-
; include_subdirs = No
20-
; special_builtin_support = None
21-
; root_module = None
22-
}
2317
; { path = "otherlibs/dyn"
2418
; main_module_name = Some "Dyn"
2519
; include_subdirs = No
2620
; special_builtin_support = None
2721
; root_module = None
2822
}
29-
; { path = "vendor/csexp/src"
30-
; main_module_name = Some "Csexp"
31-
; include_subdirs = No
32-
; special_builtin_support = None
33-
; root_module = None
34-
}
3523
; { path = "otherlibs/fs-io"
3624
; main_module_name = Some "Fs_io"
3725
; include_subdirs = No

dune-project

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -58,6 +58,7 @@ for free.
5858

5959
(package
6060
(name dune-build-info)
61+
(dir otherlibs/dune-build-info)
6162
(synopsis "Embed build information inside executable")
6263
(depends
6364
(ocaml (>= 4.08)))
@@ -72,6 +73,7 @@ executable was built.
7273

7374
(package
7475
(name dune-private-libs)
76+
(dir otherlibs/dune-private-libs)
7577
(synopsis "Private libraries of Dune")
7678
(depends
7779
(csexp (>= 1.5.0))
@@ -92,6 +94,7 @@ no stability guarantee.
9294

9395
(package
9496
(name dune-configurator)
97+
(dir otherlibs/configurator)
9598
(synopsis "Helper library for gathering system configuration")
9699
(depends
97100
(ocaml (>= 4.08.0))
@@ -110,6 +113,7 @@ Among other things, dune-configurator allows one to:
110113

111114
(package
112115
(name dune-action-plugin)
116+
(dir otherlibs/dune-action-plugin)
113117
(synopsis "[experimental] API for writing dynamic Dune actions")
114118
(depends
115119
(dune-glob (= :version))
@@ -131,6 +135,7 @@ execution of the action.
131135

132136
(package
133137
(name dune-glob)
138+
(dir otherlibs/dune-glob)
134139
(synopsis "Glob string matching language supported by dune")
135140
(depends
136141
(stdune (= :version))
@@ -143,18 +148,21 @@ understood by dune language."))
143148

144149
(package
145150
(name dune-site)
151+
(dir otherlibs/dune-site)
146152
(synopsis "Embed locations information inside executable and libraries")
147153
(depends (dune-private-libs (= :version)))
148154
(description ""))
149155

150156
(package
151157
(name dune-rpc)
158+
(dir otherlibs/dune-rpc)
152159
(synopsis "Communicate with dune using rpc")
153160
(depends ocamlc-loc csexp ordering dyn xdg (stdune (= :version)) (pp (>= 1.1.0)))
154161
(description "Library to connect and control a running dune instance"))
155162

156163
(package
157164
(name dune-rpc-lwt)
165+
(dir otherlibs/dune-rpc-lwt)
158166
(synopsis "Communicate with dune using rpc and Lwt")
159167
(depends
160168
(dune-rpc (= :version))
@@ -165,6 +173,7 @@ understood by dune language."))
165173

166174
(package
167175
(name dyn)
176+
(dir otherlibs/dyn)
168177
(synopsis "Dynamic type")
169178
(depends
170179
(ocaml (>= 4.08.0))
@@ -175,6 +184,7 @@ understood by dune language."))
175184

176185
(package
177186
(name ordering)
187+
(dir otherlibs/ordering)
178188
(synopsis "Element ordering")
179189
(depends
180190
(ocaml (>= 4.08.0)))
@@ -183,13 +193,15 @@ understood by dune language."))
183193

184194
(package
185195
(name xdg)
196+
(dir otherlibs/xdg)
186197
(synopsis "XDG Base Directory Specification")
187198
(depends
188199
(ocaml (>= 4.08)))
189200
(description "https://specifications.freedesktop.org/basedir-spec/basedir-spec-latest.html"))
190201

191202
(package
192203
(name top-closure)
204+
(dir otherlibs/top-closure)
193205
(synopsis "Topological Closure")
194206
(depends
195207
(ocaml (>= 4.08)))
@@ -198,6 +210,7 @@ understood by dune language."))
198210

199211
(package
200212
(name stdune)
213+
(dir otherlibs/stdune)
201214
(synopsis "Dune's unstable standard library")
202215
(depends
203216
(ocaml (>= 4.08.0))
@@ -213,6 +226,7 @@ understood by dune language."))
213226

214227
(package
215228
(name ocamlc-loc)
229+
(dir otherlibs/ocamlc-loc)
216230
(synopsis "Parse ocaml compiler output into structured form")
217231
(conflicts
218232
(ocaml-lsp-server (< 1.15.0)))
@@ -224,13 +238,15 @@ understood by dune language."))
224238

225239
(package
226240
(name chrome-trace)
241+
(dir otherlibs/chrome-trace)
227242
(synopsis "Chrome trace event generation library")
228243
(depends
229244
(ocaml (>= 4.08.0)))
230245
(description "This library offers no backwards compatibility guarantees. Use at your own risk."))
231246

232247
(package
233248
(name fs-io)
249+
(dir otherlibs/fs-io)
234250
(synopsis "File System Operations")
235251
(depends
236252
base-unix

flake.nix

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -249,6 +249,7 @@
249249
ocaml-lsp
250250
odoc
251251
patdiff
252+
pp
252253
ppx_expect
253254
re
254255
spawn
@@ -293,6 +294,8 @@
293294
pkgs.dune_3
294295
];
295296
buildInputs = with pkgs.ocamlPackages; [
297+
csexp
298+
pp
296299
re
297300
spawn
298301
uutf
@@ -338,6 +341,8 @@
338341
pkgs.ocaml-ng.ocamlPackages_4_14.dune_3
339342
];
340343
buildInputs = with pkgs; [
344+
ocaml-ng.ocamlPackages_4_14.csexp
345+
ocaml-ng.ocamlPackages_4_14.pp
341346
ocaml-ng.ocamlPackages_4_14.re
342347
ocaml-ng.ocamlPackages_4_14.spawn
343348
ocaml-ng.ocamlPackages_4_14.uutf
@@ -400,9 +405,17 @@
400405
spawn = osuper.spawn.overrideAttrs (old: {
401406
doCheck = false;
402407
});
408+
csexp = osuper.csexp.overrideAttrs (old: {
409+
doCheck = false;
410+
});
411+
pp = osuper.pp.overrideAttrs (old: {
412+
doCheck = false;
413+
});
403414
};
404415
extraBuildInputs =
405416
pkgs: with pkgs.ocamlPackages; [
417+
csexp
418+
pp
406419
re
407420
spawn
408421
uutf

src/dune_rules/bootstrap_info.ml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -118,7 +118,7 @@ let rule sctx ~requires_link ~main =
118118
in
119119
let externals =
120120
let available =
121-
[ "threads.posix"; "re"; "spawn"; "seq"; "uutf" ]
121+
[ "csexp"; "pp"; "re"; "seq"; "spawn"; "threads.posix"; "uutf" ]
122122
|> List.rev_map ~f:Lib_name.of_string
123123
in
124124
List.filter_map externals ~f:(fun lib ->

test/blackbox-tests/test-cases/boot/helpers.sh

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -9,14 +9,12 @@ cat > dune-project <<EOF
99
EOF
1010

1111
# These libraries are hardcoded and expected to exist:
12+
mkdir -p vendor/csexp/src
13+
mkdir -p vendor/pp/src
1214
mkdir -p vendor/re/src
1315
mkdir -p vendor/spawn/src
1416
mkdir -p vendor/uutf
1517

16-
touch vendor/re/src/re.ml
17-
touch vendor/spawn/src/spawn.ml
18-
touch vendor/uutf/uutf.ml
19-
2018
mkdir bin
2119

2220
ocamlopt="$(which ocamlopt.opt)"
Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
11
(test
22
(name artifact_substitution)
3-
(package dune-private-libs)
43
(libraries stdune dune_engine dune_rules fiber re memo))

test/unit-tests/dune

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,4 @@
1-
(executable
1+
(test
22
(name sexp_tests)
33
(modules sexp_tests)
44
(libraries stdune dune_lang))
5-
6-
(rule
7-
(alias runtest)
8-
(package dune-private-libs)
9-
(action
10-
(run ./sexp_tests.exe)))

0 commit comments

Comments
 (0)