Skip to content

Conditional patches #16

New issue

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

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

Already on GitHub? Sign in to your account

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ doc: "https://ocsigen.org/js_of_ocaml/latest/manual/overview"
bug-reports: "https://github.com/ocsigen/js_of_ocaml/issues"
depends: [
"dune" {>= "2.9"}
"ocaml-variants" {= "4.12.0+flambda1" | = "4.12.0+flambda2"| = "4.12.0+pr867+flambda2" }
"ocaml" {>= "4.04" & < "4.15"}
"num" {with-test}
"ppx_expect" {>= "v0.14.2" & with-test}
"ppxlib" {>= "0.15.0"}
Expand Down Expand Up @@ -54,5 +54,5 @@ url {
]
}
x-commit-hash: "6fb1d008061b6c028c375b240882bb735d54a5bc"
patches: ["js_of_ocaml.patch"]
patches: ["js_of_ocaml.patch"] { ?ocaml-variants:flambda-backend & ocaml-variants:flambda-backend }
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

wouldn't that make opam fail in --strict mode?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm not sure what exactly --strict mode implies, but I was hoping that prefixing with the ?ocaml-variants:flambda-backend check would make it robust.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I've created switches with both a flambda-backend compiler and a regular one, and installed ocaml-compiler-libs.v0.12.4+flambda2 on them, all of this with --strict, and I didn't get any errors.

extra-files: [ ["js_of_ocaml.patch" "md5=94e0fbbd912a4bb87a5da4d74d5e7535"] ]
4 changes: 2 additions & 2 deletions packages/js_of_ocaml/js_of_ocaml.4.0.0+flambda2/opam
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ doc: "https://ocsigen.org/js_of_ocaml/latest/manual/overview"
bug-reports: "https://github.com/ocsigen/js_of_ocaml/issues"
depends: [
"dune" {>= "2.9"}
"ocaml-variants" {= "4.12.0+flambda1" | = "4.12.0+flambda2"| = "4.12.0+pr867+flambda2" }
"ocaml" {>= "4.04"}
"js_of_ocaml-compiler" {= version}
"ppxlib" {>= "0.15"}
"uchar"
Expand Down Expand Up @@ -45,5 +45,5 @@ url {
]
}
x-commit-hash: "6fb1d008061b6c028c375b240882bb735d54a5bc"
patches: ["js_of_ocaml.patch"]
patches: ["js_of_ocaml.patch"] { ?ocaml-variants:flambda-backend & ocaml-variants:flambda-backend }
extra-files: [ ["js_of_ocaml.patch" "md5=94e0fbbd912a4bb87a5da4d74d5e7535"] ]
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ homepage: "https://github.com/janestreet/ocaml-compiler-libs"
bug-reports: "https://github.com/janestreet/ocaml-compiler-libs/issues"
depends: [
"dune" {>= "2.8"}
"ocaml-variants" {= "4.12.0+flambda1" | = "4.12.0+flambda2"| = "4.12.0+pr867+flambda2" }
"ocaml" {>= "4.04.1"}
"odoc" {with-doc}
]
build: [
Expand All @@ -37,5 +37,5 @@ url {
]
}
x-commit-hash: "8cd12f18bb7171c2b67d661868c4271fae528d93"
patches: ["read_cma.patch"]
patches: ["read_cma.patch" { ?ocaml-variants:flambda-backend & ocaml-variants:flambda-backend } ]
extra-files: [ ["read_cma.patch" "md5=2ebb9731c60412575f27f3af2293a2a9"] ]
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
opam-version: "2.0"
variables { flambda-backend: true }
Original file line number Diff line number Diff line change
Expand Up @@ -45,3 +45,4 @@ extra-source "alt-signal-stack.patch" {
src: "https://github.com/ocaml/ocaml/commit/1eeb0e7fe595f5f9e1ea1edbdf785ff3b49feeeb.patch"
checksum: "sha256=59de25b95409c1927c4b607fb4b1218ff7623fca45474448c8e114a42853e3ad"
}
extra-files: [ [ "ocaml-variants.config" "md5=2e903f01e0ca006dd7c6cc7e4ec4543f" ] ]
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
opam-version: "2.0"
variables { flambda-backend: true }
Original file line number Diff line number Diff line change
Expand Up @@ -45,3 +45,4 @@ extra-source "alt-signal-stack.patch" {
src: "https://github.com/ocaml/ocaml/commit/1eeb0e7fe595f5f9e1ea1edbdf785ff3b49feeeb.patch"
checksum: "sha256=59de25b95409c1927c4b607fb4b1218ff7623fca45474448c8e114a42853e3ad"
}
extra-files: [ [ "ocaml-variants.config" "md5=2e903f01e0ca006dd7c6cc7e4ec4543f" ] ]
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
opam-version: "2.0"
variables { flambda-backend: true }
Original file line number Diff line number Diff line change
Expand Up @@ -45,3 +45,4 @@ extra-source "alt-signal-stack.patch" {
src: "https://github.com/ocaml/ocaml/commit/1eeb0e7fe595f5f9e1ea1edbdf785ff3b49feeeb.patch"
checksum: "sha256=59de25b95409c1927c4b607fb4b1218ff7623fca45474448c8e114a42853e3ad"
}
extra-files: [ [ "ocaml-variants.config" "md5=2e903f01e0ca006dd7c6cc7e4ec4543f" ] ]