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

Conversation

lthls
Copy link
Contributor

@lthls lthls commented Oct 31, 2022

This is a proper version of #15. It introduces a configuration variable for compilers based on flambda-backend, and uses it as condition for patches that are not compatible with the upstream compiler.
(Thanks to @rjbou for helping with this.)

It also renames the ocaml-compiler-libs version to add +flambda2, as the other packages in this repo.

@@ -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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants