Skip to content

Commit 7eab825

Browse files
authored
Merge pull request #1041 from ocsigen/cleanup
Cleanup
2 parents a7d7720 + 8e1a82d commit 7eab825

35 files changed

+221
-335
lines changed

.github/workflows/workflow.yml

Lines changed: 4 additions & 50 deletions
Original file line numberDiff line numberDiff line change
@@ -28,51 +28,16 @@ jobs:
2828
libev:
2929
- true
3030
- false
31-
ppx:
32-
- true
33-
local-packages:
34-
- |
35-
*.opam
3631
include:
3732
- os: ubuntu-latest
3833
ocaml-compiler: ocaml-variants.5.2.0+options,ocaml-option-flambda,ocaml-option-musl,ocaml-option-static,ocaml-option-no-compression
3934
libev: false
40-
ppx: true
41-
local-packages: |
42-
*.opam
4335
- os: macos-latest
44-
ocaml-compiler: "5.2"
45-
libev: true
46-
ppx: true
47-
local-packages: |
48-
*.opam
49-
- os: windows-latest
5036
ocaml-compiler: "5.2"
5137
libev: false
52-
ppx: true
53-
local-packages: |
54-
*.opam
55-
- os: ubuntu-latest
56-
ocaml-compiler: "5.2"
57-
libev: true
58-
ppx: false
59-
local-packages: |
60-
*.opam
61-
!lwt_ppx.opam
62-
- os: macos-latest
63-
ocaml-compiler: "5.2"
64-
libev: true
65-
ppx: false
66-
local-packages: |
67-
*.opam
68-
!lwt_ppx.opam
6938
- os: windows-latest
7039
ocaml-compiler: "5.2"
7140
libev: false
72-
ppx: false
73-
local-packages: |
74-
*.opam
75-
!lwt_ppx.opam
7641

7742
runs-on: ${{ matrix.os }}
7843

@@ -84,37 +49,26 @@ jobs:
8449
uses: ocaml/setup-ocaml@v3
8550
with:
8651
ocaml-compiler: ${{ matrix.ocaml-compiler }}
87-
opam-local-packages: ${{ matrix.local-packages }}
8852

8953
- run: opam install conf-libev
9054
if: ${{ matrix.libev == true }}
9155

92-
- run: opam install lwt_react lwt --deps-only --with-test
93-
94-
- run: opam install lwt_ppx --deps-only --with-test
95-
if: ${{ matrix.ppx == true }}
96-
97-
- run: opam exec -- dune build --only-packages lwt_react,lwt
56+
- run: opam install . --deps-only --with-test
9857

99-
- run: opam exec -- dune build --only-packages lwt_ppx
100-
if: ${{ matrix.ppx == true }}
58+
- run: opam exec -- dune build
10159

102-
- run: opam exec -- dune runtest --only-packages lwt_react,lwt
60+
- run: opam exec -- dune runtest --instrument-with bisect_ppx --force
10361

104-
- run: opam exec -- dune runtest --only-packages lwt_ppx
105-
if: ${{ matrix.ppx == true }}
62+
- run: opam exec -- bisect-ppx-report summary --per-file
10663

10764
lint-opam:
10865
runs-on: ubuntu-latest
109-
11066
steps:
11167
- name: Checkout tree
11268
uses: actions/checkout@v4
113-
11469
- name: Set-up OCaml
11570
uses: ocaml/setup-ocaml@v3
11671
with:
11772
ocaml-compiler: "5.2"
11873
dune-cache: true
119-
12074
- uses: ocaml/setup-ocaml/lint-opam@v3

Makefile

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -68,9 +68,7 @@ EXPECTED_FILES := \
6868

6969
.PHONY: coverage
7070
coverage :
71-
rm -rf _build/default/test/ppx_expect
72-
find _build -name '*.coverage' | xargs rm -f
73-
BISECT_ENABLE=yes dune runtest --force
71+
dune runtest --instrument-with bisect_ppx --force
7472
bisect-ppx-report html $(EXPECTED_FILES)
7573
bisect-ppx-report summary
7674
@echo See _coverage/index.html

docs/dune

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
(documentation
22
(package lwt)
3-
(mld_files :standard))
3+
(mld_files :standard))

dune-project

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,8 @@
2121
"Shon Feder <[email protected]>")
2222
(depends
2323
(ocaml (>= 4.08))
24-
(lwt (>= 5.3.0))))
24+
(lwt (>= 5.3.0))
25+
(bisect_ppx :with-test)))
2526

2627
(package
2728
(name lwt_ppx)
@@ -30,6 +31,7 @@
3031
(ocaml (>= 4.08))
3132
(ppxlib (>= 0.16.0))
3233
(ppx_let :with-test)
34+
(bisect_ppx :with-test)
3335
lwt))
3436

3537
(package
@@ -39,7 +41,8 @@
3941
(ocaml (>= 4.08))
4042
(cppo (and :build (>= 1.1.0)))
4143
(lwt (>= 3.0.0))
42-
(react (>= 1.0.0))))
44+
(react (>= 1.0.0))
45+
(bisect_ppx :with-test)))
4346

4447
(package
4548
(name lwt)
@@ -58,6 +61,7 @@ synchronization primitives. Code can be run in parallel on an opt-in basis.
5861
(cppo (and :build (>= 1.1.0)))
5962
(ocamlfind (and :dev (>= 1.7.3-1)))
6063
(odoc (and :with-doc (>= 2.3.0)))
64+
(bisect_ppx :with-test)
6165
dune-configurator
6266
ocplib-endian)
6367
(depopts base-threads base-unix conf-libev))

lwt.opam

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,7 @@ depends: [
2525
"cppo" {build & >= "1.1.0"}
2626
"ocamlfind" {dev & >= "1.7.3-1"}
2727
"odoc" {with-doc & >= "2.3.0"}
28+
"bisect_ppx" {with-test}
2829
"dune-configurator"
2930
"ocplib-endian"
3031
]

lwt_ppx.opam

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@ depends: [
1515
"ocaml" {>= "4.08"}
1616
"ppxlib" {>= "0.16.0"}
1717
"ppx_let" {with-test}
18+
"bisect_ppx" {with-test}
1819
"lwt"
1920
"odoc" {with-doc}
2021
]

lwt_react.opam

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@ depends: [
1515
"cppo" {build & >= "1.1.0"}
1616
"lwt" {>= "3.0.0"}
1717
"react" {>= "1.0.0"}
18+
"bisect_ppx" {with-test}
1819
"odoc" {with-doc}
1920
]
2021
build: [

lwt_retry.opam

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@ depends: [
1313
"dune" {>= "2.7"}
1414
"ocaml" {>= "4.08"}
1515
"lwt" {>= "5.3.0"}
16+
"bisect_ppx" {with-test}
1617
"odoc" {with-doc}
1718
]
1819
dev-repo: "git+https://github.com/ocsigen/lwt.git"

src/core/dune

Lines changed: 2 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -1,21 +1,9 @@
1-
(* -*- tuareg -*- *)
2-
3-
let preprocess =
4-
match Sys.getenv "BISECT_ENABLE" with
5-
| "yes" -> "(preprocess (pps bisect_ppx))"
6-
| _ -> ""
7-
| exception _ -> ""
8-
9-
let () = Jbuild_plugin.V1.send @@ {|
10-
111
(library
122
(public_name lwt)
133
(synopsis "Monadic promises and concurrent I/O")
144
(wrapped false)
15-
|} ^ preprocess ^ {|
16-
(flags (:standard -w +A-29)))
5+
(instrumentation
6+
(backend bisect_ppx)))
177

188
(documentation
199
(package lwt))
20-
21-
|}

src/core/lwt.ml

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -349,9 +349,7 @@
349349
("deprecated"), and create a local, non-deprecated alias for
350350
[Lwt_sequence] that can be referred to by the rest of the code in this
351351
module without triggering any more warnings. *)
352-
[@@@ocaml.warning "-3"]
353352
module Lwt_sequence = Lwt_sequence
354-
[@@@ocaml.warning "+3"]
355353

356354
(* Some sequence-associated storage types
357355
@@ -830,14 +828,14 @@ struct
830828
| Regular_callback_list_empty, _ -> l2
831829
| _, Regular_callback_list_empty -> l1
832830
| _, _ -> Regular_callback_list_concat (l1, l2)
833-
end [@ocaml.warning "-4"]
831+
end
834832

835833
let concat_cancel_callbacks l1 l2 =
836834
begin match l1, l2 with
837835
| Cancel_callback_list_empty, _ -> l2
838836
| _, Cancel_callback_list_empty -> l1
839837
| _, _ -> Cancel_callback_list_concat (l1, l2)
840-
end [@ocaml.warning "-4"]
838+
end
841839

842840
(* In a callback list, filters out cells of explicitly removable callbacks
843841
that have been removed. *)

src/core/lwt_condition.ml

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -31,9 +31,7 @@
3131
("deprecated"), and create a local, non-deprecated alias for
3232
[Lwt_sequence] that can be referred to by the rest of the code in this
3333
module without triggering any more warnings. *)
34-
[@@@ocaml.warning "-3"]
3534
module Lwt_sequence = Lwt_sequence
36-
[@@@ocaml.warning "+3"]
3735

3836
type 'a t = 'a Lwt.u Lwt_sequence.t
3937

src/core/lwt_mutex.ml

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,9 +8,7 @@
88
("deprecated"), and create a local, non-deprecated alias for
99
[Lwt_sequence] that can be referred to by the rest of the code in this
1010
module without triggering any more warnings. *)
11-
[@@@ocaml.warning "-3"]
1211
module Lwt_sequence = Lwt_sequence
13-
[@@@ocaml.warning "+3"]
1412

1513
open Lwt.Infix
1614

src/core/lwt_mvar.ml

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -34,9 +34,7 @@
3434
("deprecated"), and create a local, non-deprecated alias for
3535
[Lwt_sequence] that can be referred to by the rest of the code in this
3636
module without triggering any more warnings. *)
37-
[@@@ocaml.warning "-3"]
3837
module Lwt_sequence = Lwt_sequence
39-
[@@@ocaml.warning "+3"]
4038

4139
type 'a t = {
4240
mutable mvar_contents : 'a option;

src/core/lwt_pool.ml

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,9 +8,7 @@
88
("deprecated"), and create a local, non-deprecated alias for
99
[Lwt_sequence] that can be referred to by the rest of the code in this
1010
module without triggering any more warnings. *)
11-
[@@@ocaml.warning "-3"]
1211
module Lwt_sequence = Lwt_sequence
13-
[@@@ocaml.warning "+3"]
1412

1513
open Lwt.Infix
1614

src/ppx/dune

Lines changed: 4 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -1,22 +1,10 @@
1-
(* -*- tuareg -*- *)
2-
3-
let bisect_ppx =
4-
match Sys.getenv "BISECT_ENABLE" with
5-
| "yes" -> "bisect_ppx"
6-
| _ -> ""
7-
| exception _ -> ""
8-
9-
let () = Jbuild_plugin.V1.send @@ {|
10-
111
(library
12-
(name ppx_lwt)
132
(public_name lwt_ppx)
143
(synopsis "Lwt PPX syntax extension")
15-
(modules ppx_lwt)
164
(libraries ppxlib)
175
(ppx_runtime_libraries lwt)
186
(kind ppx_rewriter)
19-
(preprocess (pps ppxlib.metaquot|} ^ bisect_ppx ^ {|))
20-
(flags (:standard -w +A-4)))
21-
22-
|}
7+
(preprocess
8+
(pps ppxlib.metaquot))
9+
(instrumentation
10+
(backend bisect_ppx)))

src/react/dune

Lines changed: 2 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -1,19 +1,7 @@
1-
(* -*- tuareg -*- *)
2-
3-
let preprocess =
4-
match Sys.getenv "BISECT_ENABLE" with
5-
| "yes" -> "(preprocess (pps bisect_ppx))"
6-
| _ -> ""
7-
| exception _ -> ""
8-
9-
let () = Jbuild_plugin.V1.send @@ {|
10-
111
(library
122
(public_name lwt_react)
133
(synopsis "Reactive programming helpers for Lwt")
144
(wrapped false)
155
(libraries lwt react)
16-
|} ^ preprocess ^ {|
17-
(flags (:standard -w +A)))
18-
19-
|}
6+
(instrumentation
7+
(backend bisect_ppx)))

src/retry/dune

Lines changed: 2 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -1,19 +1,7 @@
1-
(* -*- tuareg -*- *)
2-
3-
let preprocess =
4-
match Sys.getenv "BISECT_ENABLE" with
5-
| "yes" -> "(preprocess (pps bisect_ppx))"
6-
| _ -> ""
7-
| exception _ -> ""
8-
9-
let () = Jbuild_plugin.V1.send @@ {|
10-
111
(library
122
(public_name lwt_retry)
133
(synopsis "A utility for retrying Lwt computations")
144
(wrapped false)
155
(libraries lwt lwt.unix)
16-
|} ^ preprocess ^ {|
17-
(flags (:standard -w +A)))
18-
19-
|}
6+
(instrumentation
7+
(backend bisect_ppx)))

0 commit comments

Comments
 (0)