Skip to content

Commit a71fa18

Browse files
authored
Merge branch 'main' into fix-11375
2 parents 676cccf + 6d1e608 commit a71fa18

File tree

425 files changed

+7369
-19071
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

425 files changed

+7369
-19071
lines changed

.git-blame-ignore-revs

+4
Original file line numberDiff line numberDiff line change
@@ -6,3 +6,7 @@
66
14d199fa57d05692385342685f431cd3a6a8205c
77
# switch to janestreet profile
88
cb8f84e01a2eb4a2a2cf8d5bcfe5b2fc23e93d96
9+
# ocamlformat 0.26.1
10+
f739a11a7d407db219446757093c4bc913989378
11+
# ocamlformat 0.27.0
12+
197b0c84d2e51647892fe6c9a6842265b4866255

.github/ISSUE_TEMPLATE/bug_report.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ assignees: ''
3030
## Specifications
3131

3232
- Version of `dune` (output of `dune --version`):
33-
- Version of `ocaml` (output of `ocamlc --version`)
33+
- Version of `ocaml` (output of `ocamlc --version`):
3434
- Operating system (distribution and version):
3535

3636
<!-- remove the following if not used -->

.github/workflows/workflow.yml

+9-51
Original file line numberDiff line numberDiff line change
@@ -56,13 +56,6 @@ jobs:
5656
- ocaml-compiler: 4.08.x
5757
os: ubuntu-latest
5858
skip_test: true
59-
- ocaml-compiler: 4.04.x
60-
os: ubuntu-latest
61-
skip_test: true
62-
configurator: true
63-
- ocaml-compiler: 4.02.x
64-
os: ubuntu-latest
65-
skip_test: true
6659

6760
runs-on: ${{ matrix.os }}
6861

@@ -143,6 +136,8 @@ jobs:
143136
- uses: actions/checkout@v4
144137
- uses: cachix/install-nix-action@v18
145138
- run: nix develop .#doc -c make doc
139+
env:
140+
LC_ALL: C
146141

147142
coq:
148143
name: Coq 8.16.1
@@ -164,43 +159,10 @@ jobs:
164159
with:
165160
node-version: latest
166161

167-
- name: Restore Cached Binaryen
168-
id: cache-binaryen
169-
uses: actions/cache/restore@v4
162+
- name: Set-up Binaryen
163+
uses: Aandreba/[email protected]
170164
with:
171-
path: binaryen
172-
key: ${{ runner.os }}-binaryen-version_119
173-
174-
- name: Checkout Binaryen
175-
if: steps.cache-binaryen.outputs.cache-hit != 'true'
176-
uses: actions/checkout@v4
177-
with:
178-
repository: WebAssembly/binaryen
179-
path: binaryen
180-
submodules: true
181-
ref: version_119
182-
183-
- name: Install Ninja
184-
if: steps.cache-binaryen.outputs.cache-hit != 'true'
185-
run: sudo apt-get install ninja-build
186-
187-
- name: Build Binaryen
188-
if: steps.cache-binaryen.outputs.cache-hit != 'true'
189-
working-directory: ./binaryen
190-
run: |
191-
cmake -G Ninja .
192-
ninja
193-
194-
- name: Cache Binaryen
195-
if: steps.cache-binaryen.outputs.cache-hit != 'true'
196-
uses: actions/cache/save@v4
197-
with:
198-
path: binaryen
199-
key: ${{ runner.os }}-binaryen-version_119
200-
201-
- name: Set Binaryen's Path
202-
run: |
203-
echo "$GITHUB_WORKSPACE/binaryen/bin" >> $GITHUB_PATH
165+
token: ${{ github.token }}
204166

205167
- name: Checkout Code
206168
uses: actions/checkout@v4
@@ -212,20 +174,16 @@ jobs:
212174
with:
213175
ocaml-compiler: 4.14.x
214176

177+
- name: Install faked binaryen-bin package
178+
# It's faster to use a cached version
179+
run: opam install --fake binaryen-bin
180+
215181
- name: Update Dune
216182
working-directory: ./dune
217183
run: opam pin add -n dune . --with-version 3.17.0
218184

219-
- name: Checkout Wasm_of_ocaml
220-
uses: actions/checkout@v4
221-
with:
222-
repository: ocsigen/js_of_ocaml
223-
path: wasm_of_ocaml
224-
225185
- name: Install Wasm_of_ocaml
226-
working-directory: ./wasm_of_ocaml
227186
run: |
228-
opam pin add -n . --with-version `< VERSION`
229187
opam install wasm_of_ocaml-compiler
230188
231189
- name: Set Git User

.ocamlformat

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
1-
version=0.26.2
1+
version=0.27.0
22
profile=janestreet
33
ocaml-version=4.08.0

CHANGES.md

+13
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,19 @@ If you're a contributor, please include your CHANGES entry in a file
55
`doc/changes/$PR_NAME.md`. At release time, it will be incoporated into the
66
changelog properly.
77

8+
3.17.2 (2025-01-23)
9+
-------------------
10+
11+
### Fixed
12+
13+
- Fix a crash in the Melange rules that would prevent compiling public library
14+
implementations of virtual libraries. (@anmonteiro, #11248)
15+
- Pass `melange.emit`'s `compile_flags` to the JS emission phase. (@anmonteiro,
16+
#11252)
17+
- Disallow private implementations of public virtual libs in melange mode.
18+
(@anmonteiro, #11253)
19+
- Wasm_of_ocaml: fix the execution of tests in a sandbox. (#11304, @vouillon)
20+
821
3.17.1 (2024-12-17)
922
-------------------
1023

bench/bench.ml

+22-22
Original file line numberDiff line numberDiff line change
@@ -180,28 +180,28 @@ let tag_results { size; clean; zero } =
180180
- stack_size - not very useful
181181
- forced_collections - only available in OCaml >= 4.12 *)
182182
let display_clean_and_zero_with_sandboxing
183-
({ elapsed_time
184-
; user_cpu_time
185-
; system_cpu_time
186-
; minor_words
187-
; promoted_words
188-
; major_words
189-
; minor_collections
190-
; major_collections
191-
; heap_words
192-
; heap_chunks
193-
; live_words
194-
; live_blocks
195-
; free_words
196-
; free_blocks
197-
; largest_free
198-
; fragments = _
199-
; compactions
200-
; top_heap_words
201-
; stack_size = _
202-
} :
203-
_ Metrics.t)
204-
(zero : _ Metrics.t)
183+
({ elapsed_time
184+
; user_cpu_time
185+
; system_cpu_time
186+
; minor_words
187+
; promoted_words
188+
; major_words
189+
; minor_collections
190+
; major_collections
191+
; heap_words
192+
; heap_chunks
193+
; live_words
194+
; live_blocks
195+
; free_words
196+
; free_blocks
197+
; largest_free
198+
; fragments = _
199+
; compactions
200+
; top_heap_words
201+
; stack_size = _
202+
} :
203+
_ Metrics.t)
204+
(zero : _ Metrics.t)
205205
=
206206
let display what units clean zero =
207207
{ Output.name = what

bench/gen_synthetic.ml

+3-1
Original file line numberDiff line numberDiff line change
@@ -8,10 +8,12 @@ let write_modules basedir num_modules =
88
done
99
;;
1010

11-
let dune = {|
11+
let dune =
12+
{|
1213
(library
1314
(name test))
1415
|}
16+
;;
1517

1618
let write basedir =
1719
let () = Unix.mkdir basedir 0o777 in

bench/gen_synthetic_dune_watch.ml

+12-8
Original file line numberDiff line numberDiff line change
@@ -21,10 +21,10 @@ let write_subset base_dir library_index subset =
2121
List.flatten
2222
(List.map
2323
(fun k ->
24-
List.map
25-
(fun j ->
26-
sprintf "M_%d_%d_%d_%d.f()" (library_index - 1) j mod_rows k)
27-
(count subsets_per_library))
24+
List.map
25+
(fun j ->
26+
sprintf "M_%d_%d_%d_%d.f()" (library_index - 1) j mod_rows k)
27+
(count subsets_per_library))
2828
(count mod_cols))
2929
else
3030
List.map
@@ -68,17 +68,21 @@ let write_lib ~base_dir ~lib ~dune =
6868

6969
let write base_dir =
7070
let () = Unix.mkdir base_dir 0o777 in
71-
let dune = {|
71+
let dune =
72+
{|
7273
(library
7374
(name leaf)
7475
(libraries internal))
75-
|} in
76+
|}
77+
in
7678
write_lib ~base_dir ~lib:Leaf ~dune;
77-
let dune = {|
79+
let dune =
80+
{|
7881
(library
7982
(name internal)
8083
(wrapped false))
81-
|} in
84+
|}
85+
in
8286
write_lib ~base_dir ~lib:Internal ~dune
8387
;;
8488

bench/metrics.mli

+11-11
Original file line numberDiff line numberDiff line change
@@ -6,41 +6,41 @@ open Stdune
66
[unzip] functions which make serialisation easier. *)
77
type ('float, 'int) t =
88
{ elapsed_time : 'float
9-
(** Real time elapsed since the process started and the process
9+
(** Real time elapsed since the process started and the process
1010
finished. *)
1111
; user_cpu_time : 'float
12-
(** The amount of CPU time spent in user mode during the process. Other
12+
(** The amount of CPU time spent in user mode during the process. Other
1313
processes and blocked time are not included. *)
1414
; system_cpu_time : 'float
15-
(** The amount of CPU time spent in kernel mode during the process.
15+
(** The amount of CPU time spent in kernel mode during the process.
1616
Similar to user time, other processes and time spent blocked by
1717
other processes are not counted. *)
1818
; minor_words : 'float
19-
(** Number of words allocated in the minor heap since the program was
19+
(** Number of words allocated in the minor heap since the program was
2020
started. *)
2121
; promoted_words : 'float
22-
(** Number of words that have been promoted from the minor to the major
22+
(** Number of words that have been promoted from the minor to the major
2323
heap since the program was started. *)
2424
; major_words : 'float
25-
(** Number of words allocated in the major heap since the program was
25+
(** Number of words allocated in the major heap since the program was
2626
started. *)
2727
; minor_collections : 'int
28-
(** Number of minor collections since the program was started. *)
28+
(** Number of minor collections since the program was started. *)
2929
; major_collections : 'int
30-
(** Number of major collection cycles completed since the program was
30+
(** Number of major collection cycles completed since the program was
3131
started. *)
3232
; heap_words : 'int (** Total size of the major heap, in words. *)
3333
; heap_chunks : 'int
34-
(** Number of contiguous pieces of memory that make up the major heap. *)
34+
(** Number of contiguous pieces of memory that make up the major heap. *)
3535
; live_words : 'int
36-
(** Number of words of live data in the major heap, including the header
36+
(** Number of words of live data in the major heap, including the header
3737
words. *)
3838
; live_blocks : 'int (** Number of live blocks in the major heap. *)
3939
; free_words : 'int (** Number of words in the free list. *)
4040
; free_blocks : 'int (** Number of blocks in the free list. *)
4141
; largest_free : 'int (** Size (in words) of the largest block in the free list. *)
4242
; fragments : 'int
43-
(** Number of wasted words due to fragmentation. These are 1-words free
43+
(** Number of wasted words due to fragmentation. These are 1-words free
4444
blocks placed between two live blocks. They are not available for
4545
allocation. *)
4646
; compactions : 'int (** Number of heap compactions since the program was started. *)

bench/micro/path_bench.ml

+34-33
Original file line numberDiff line numberDiff line change
@@ -8,56 +8,57 @@ let root = "."
88
let short_path = "a/b/c"
99
let long_path = List.init 20 ~f:(fun _ -> "foo-bar-baz") |> String.concat ~sep:"/"
1010

11-
let%bench_fun ("is_root" [@params
12-
path
13-
= [ "root", "."
14-
; "short path", short_path
15-
; "long path", long_path
16-
]])
11+
let%bench_fun
12+
("is_root"
13+
[@params path = [ "root", "."; "short path", short_path; "long path", long_path ]])
1714
=
1815
fun () -> ignore (Fpath.is_root path)
1916
;;
2017

21-
let%bench_fun ("reach" [@params
22-
t
23-
= [ "from root long path", (long_path, root)
24-
; "from root short path", (short_path, root)
25-
; "reach root from short path", (root, short_path)
26-
; "reach root from long path", (root, long_path)
27-
; ( "reach long path from similar long path"
28-
, ( Filename.concat long_path "a"
29-
, Filename.concat long_path "b" ) )
30-
; ( "reach short path from similar short path"
31-
, ( Filename.concat short_path "a"
32-
, Filename.concat short_path "b" ) )
33-
]])
18+
let%bench_fun
19+
("reach"
20+
[@params
21+
t
22+
= [ "from root long path", (long_path, root)
23+
; "from root short path", (short_path, root)
24+
; "reach root from short path", (root, short_path)
25+
; "reach root from long path", (root, long_path)
26+
; ( "reach long path from similar long path"
27+
, (Filename.concat long_path "a", Filename.concat long_path "b") )
28+
; ( "reach short path from similar short path"
29+
, (Filename.concat short_path "a", Filename.concat short_path "b") )
30+
]])
3431
=
3532
let t, from = t in
3633
let t = Path.of_string t in
3734
let from = Path.of_string from in
3835
fun () -> ignore (Path.reach t ~from)
3936
;;
4037

41-
let%bench_fun ("Path.Local.relative" [@params
42-
t
43-
= [ "left root", (".", long_path)
44-
; "right root", (long_path, ".")
45-
; "short paths", (short_path, short_path)
46-
; "long paths", (long_path, long_path)
47-
]])
38+
let%bench_fun
39+
("Path.Local.relative"
40+
[@params
41+
t
42+
= [ "left root", (".", long_path)
43+
; "right root", (long_path, ".")
44+
; "short paths", (short_path, short_path)
45+
; "long paths", (long_path, long_path)
46+
]])
4847
=
4948
let x, y = t in
5049
let x = Path.Local.of_string x in
5150
fun () -> ignore (Path.Local.relative x y)
5251
;;
5352

54-
let%bench_fun ("Path.Local.append" [@params
55-
t
56-
= [ "left root", (".", long_path)
57-
; "right root", (long_path, ".")
58-
; "short paths", (short_path, short_path)
59-
; "long paths", (long_path, long_path)
60-
]])
53+
let%bench_fun
54+
("Path.Local.append"
55+
[@params
56+
t
57+
= [ "left root", (".", long_path)
58+
; "right root", (long_path, ".")
59+
; "short paths", (short_path, short_path)
60+
; "long paths", (long_path, long_path)
61+
]])
6162
=
6263
let x, y = t in
6364
let x = Path.Local.of_string x in

0 commit comments

Comments
 (0)