Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

get some error since the opam-repository windows support landed #16

Closed
hannesm opened this issue Aug 5, 2024 · 2 comments · Fixed by #17
Closed

get some error since the opam-repository windows support landed #16

hannesm opened this issue Aug 5, 2024 · 2 comments · Fixed by #17

Comments

@hannesm
Copy link
Contributor

hannesm commented Aug 5, 2024

since ocaml/opam-repository#25861 got merged, I can see the following error, which should be looked into further:

6m40s [ORB] error in duni_deps: set_of_formula: couldn't figure out or (((system-mingw) | system-msvc)) | (((system-mingw) | system-msvc))

@hannesm
Copy link
Contributor Author

hannesm commented Aug 7, 2024

I need some time to refactor and update to opam 2.2, but this change helped with the issue:

--- a/src/duni_deps.ml
+++ b/src/duni_deps.ml
@@ -11,11 +11,15 @@
 let deps opam =
   let depends = OpamFile.OPAM.depends opam in
   let env var = match OpamVariable.Full.to_string var with
-    | "monorepo" | "vendor" -> Some (OpamTypes.B true)
-    | "build" | "with-test" | "dev" | "with-doc" | "post" -> Some (B false)
+    | "monorepo" | "vendor" | "post" -> Some (OpamTypes.B true)
+    | "build" | "with-test" | "dev" | "with-doc" -> Some (B false)
+    | "os" -> Some (S "freebsd")
+    | "os-family" -> Some (S "bsd")
+    | "os-distribution" -> Some (S "freebsd")
+    | "arch" -> Some (S "x86_64")
     | _ -> None
   in
-  OpamFilter.filter_formula ~default:false env depends
+  OpamFilter.filter_formula env depends
 
 let map_of_formula f =
   let v = function

@hannesm
Copy link
Contributor Author

hannesm commented Aug 8, 2024

fixed in e3a6021

# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Development

Successfully merging a pull request may close this issue.

1 participant