Skip to content

Generalize enabled_if to all stanzas #4080

@NathanReb

Description

@NathanReb

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    proposalRFC's that are awaiting discussion to be accepted or rejected

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions