-
Notifications
You must be signed in to change notification settings - Fork 469
Generalize enabled_if to all stanzas #4080
Description
As Travis is slowly dying I recently tried to make ppxlib work under ocaml-ci and this lead to interesting discussions with @avsm and @talex5.
ocaml-ci tries to build and run the tests for all ocaml versions your packages are comaptible with which was a problem for ppxlib as the tests weren't all working on older compiler. This used to be worked around by restricting the test on newer versions only in the opam file, which was ignored by ocaml-ci leading to failures on old compiler builds.
We agreed that it would be nicer to have a finer granularity and disable the individual tests rather than this all or none policy.
I embarked on a journey to set up our dune rules so that each test rule would be run conditionally based on the ocaml version, using (enabled_if ...) fields. That worked fairly well (see the following PR on ppxlib) but there are some stanzas that can't be disabled this way, cinaps stanzas for example. In particular, it would especially helpful for us to be able to disable them on arm32 until #4069 is fixed.
If we indeed want to aim at this for our CI, it would require dune to provide a reliable way to conditionally enable stanzas and rules so the CI can always build and test as much as possible on any given arch/ocaml version.