Skip to content

Commit 6384de2

Browse files
benmandrewmoyodiallo
authored andcommitted
Remove explicit multicore test (#40)
1 parent baa9c92 commit 6384de2

4 files changed

Lines changed: 6 additions & 27 deletions

File tree

service/service.ml

Lines changed: 3 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -115,20 +115,11 @@ module Make (Opam_repo : Opam_repository_intf.S) = struct
115115
| _ -> Fmt.failwith "BUG: bad output: %s" results)
116116

117117
let ocaml = OpamPackage.Name.of_string "ocaml"
118-
let base_effects = OpamPackage.Name.of_string "base-effects"
119-
let base_domains = OpamPackage.Name.of_string "base-domains"
120-
121-
let is_multicore ocaml_version =
122-
let v =
123-
Ocaml_version.of_string_exn
124-
(OpamPackage.Version.to_string ocaml_version)
125-
in
126-
Ocaml_version.Configure_options.is_multicore v
127118

128119
(* If a local package has a literal constraint on OCaml's version and it doesn't match
129120
the platform, we just remove that package from the set to test, so other packages
130-
can still be tested. If it depends on base-effects or base-domains, require a multicore compiler. *)
131-
let compatible_with ~log ~ocaml_version (dep_name, filter) =
121+
can still be tested. *)
122+
let compatible_with ~ocaml_version (dep_name, filter) =
132123
let check_ocaml = function
133124
| OpamTypes.Constraint (op, OpamTypes.FString v) ->
134125
let v = OpamPackage.Version.of_string v in
@@ -137,16 +128,6 @@ module Make (Opam_repo : Opam_repository_intf.S) = struct
137128
in
138129
if OpamPackage.Name.equal dep_name ocaml then
139130
OpamFormula.eval check_ocaml filter
140-
else if
141-
OpamPackage.Name.equal dep_name base_effects
142-
|| OpamPackage.Name.equal dep_name base_domains
143-
then (
144-
try is_multicore ocaml_version
145-
with ex ->
146-
Log.info log "is_multicore %S failed: %a"
147-
(OpamPackage.Version.to_string ocaml_version)
148-
Fmt.exn ex;
149-
false)
150131
else true
151132

152133
let handle ~log request t =
@@ -180,9 +161,7 @@ module Make (Opam_repo : Opam_repository_intf.S) = struct
180161
else
181162
let opam = OpamFile.OPAM.read_from_string contents in
182163
let deps = OpamFile.OPAM.depends opam in
183-
OpamFormula.eval
184-
(compatible_with ~log ~ocaml_version)
185-
deps)
164+
OpamFormula.eval (compatible_with ~ocaml_version) deps)
186165
in
187166
(* If some packages are compatible but some aren't, just solve for the compatible ones.
188167
Otherwise, try to solve for everything to get a suitable error. *)

0 commit comments

Comments
 (0)