Skip to content

Commit 695da49

Browse files
authored
Remove explicit multicore test (#40)
1 parent ee8455f commit 695da49

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
@@ -111,20 +111,11 @@ module Make (Opam_repo : Opam_repository_intf.S) = struct
111111
| _ -> Fmt.failwith "BUG: bad output: %s" results)
112112

113113
let ocaml = OpamPackage.Name.of_string "ocaml"
114-
let base_effects = OpamPackage.Name.of_string "base-effects"
115-
let base_domains = OpamPackage.Name.of_string "base-domains"
116-
117-
let is_multicore ocaml_version =
118-
let v =
119-
Ocaml_version.of_string_exn
120-
(OpamPackage.Version.to_string ocaml_version)
121-
in
122-
Ocaml_version.Configure_options.is_multicore v
123114

124115
(* If a local package has a literal constraint on OCaml's version and it doesn't match
125116
the platform, we just remove that package from the set to test, so other packages
126-
can still be tested. If it depends on base-effects or base-domains, require a multicore compiler. *)
127-
let compatible_with ~log ~ocaml_version (dep_name, filter) =
117+
can still be tested. *)
118+
let compatible_with ~ocaml_version (dep_name, filter) =
128119
let check_ocaml = function
129120
| OpamTypes.Constraint (op, OpamTypes.FString v) ->
130121
let v = OpamPackage.Version.of_string v in
@@ -133,16 +124,6 @@ module Make (Opam_repo : Opam_repository_intf.S) = struct
133124
in
134125
if OpamPackage.Name.equal dep_name ocaml then
135126
OpamFormula.eval check_ocaml filter
136-
else if
137-
OpamPackage.Name.equal dep_name base_effects
138-
|| OpamPackage.Name.equal dep_name base_domains
139-
then (
140-
try is_multicore ocaml_version
141-
with ex ->
142-
Log.info log "is_multicore %S failed: %a"
143-
(OpamPackage.Version.to_string ocaml_version)
144-
Fmt.exn ex;
145-
false)
146127
else true
147128

148129
let handle ~log request t =
@@ -176,9 +157,7 @@ module Make (Opam_repo : Opam_repository_intf.S) = struct
176157
else
177158
let opam = OpamFile.OPAM.read_from_string contents in
178159
let deps = OpamFile.OPAM.depends opam in
179-
OpamFormula.eval
180-
(compatible_with ~log ~ocaml_version)
181-
deps)
160+
OpamFormula.eval (compatible_with ~ocaml_version) deps)
182161
in
183162
(* If some packages are compatible but some aren't, just solve for the compatible ones.
184163
Otherwise, try to solve for everything to get a suitable error. *)

0 commit comments

Comments
 (0)