Skip to content
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

Allow use of ppx in dune #9223

Draft
wants to merge 18 commits into
base: main
Choose a base branch
from
Draft

Commits on Apr 22, 2024

  1. Allow use of ppx in dune

    This adds an `(include_preprocessed_sources)` stanza which generates
    rules to promote preprocessed version of sources.
    It's used in a `ppx/` folder at the project root.
    For any library or executable stanza with a `(preprocess (pps ...))`
    field in <path>, it will generate promotion rules for preprocessed
    versions in `ppx/<path>`.
    
    It also modifies `duneboot.ml` to use `ppx/<path>.ml(i)` instead of
    `<path>.ml(i)` if it exists, allowing us to use ppx in development
    without making it a build dependency.
    
    Signed-off-by: Nathan Rebours <[email protected]>
    NathanReb committed Apr 22, 2024
    Configuration menu
    Copy the full SHA
    b4e7806 View commit details
    Browse the repository at this point in the history
  2. Fix include_preprocessed_sources to work with executables

    It was naively reusing the Source_tree_map_reduce from the utop
    rules generation. It now uses its own version that collects modules
    to preprocess for libraries and executables.
    
    Signed-off-by: Nathan Rebours <[email protected]>
    NathanReb committed Apr 22, 2024
    Configuration menu
    Copy the full SHA
    bb2f7ea View commit details
    Browse the repository at this point in the history
  3. Exclude rather than include dirs in include_preprocessed_sources

    The stanza will now generate rules by scanning the whole project
    except for the listed exlude dirs. This allow us to exclude the places
    that uses ppx but aren't necessary for bootstrapping such as the
    `bench/` directory.
    
    Signed-off-by: Nathan Rebours <[email protected]>
    NathanReb committed Apr 22, 2024
    Configuration menu
    Copy the full SHA
    4adba2c View commit details
    Browse the repository at this point in the history
  4. Restrict include_preprocessed_sources to dune only

    Signed-off-by: Nathan Rebours <[email protected]>
    NathanReb committed Apr 22, 2024
    Configuration menu
    Copy the full SHA
    9c86e39 View commit details
    Browse the repository at this point in the history
  5. Exclude otherlibs from include_preprocessed_sources

    Signed-off-by: Nathan Rebours <[email protected]>
    NathanReb committed Apr 22, 2024
    Configuration menu
    Copy the full SHA
    79119bb View commit details
    Browse the repository at this point in the history
  6. Add proper description to include_preprocessed_sources extension

    Signed-off-by: Nathan Rebours <[email protected]>
    NathanReb committed Apr 22, 2024
    Configuration menu
    Copy the full SHA
    df9f1d6 View commit details
    Browse the repository at this point in the history
  7. Exclude ppx/ generated files from git diffs and git grep

    Signed-off-by: Nathan Rebours <[email protected]>
    NathanReb committed Apr 22, 2024
    Configuration menu
    Copy the full SHA
    24d942e View commit details
    Browse the repository at this point in the history
  8. Add documentation and Makefile target for include_pp_sources

    Signed-off-by: Nathan Rebours <[email protected]>
    NathanReb committed Apr 22, 2024
    Configuration menu
    Copy the full SHA
    978d96e View commit details
    Browse the repository at this point in the history
  9. Bump minimum lang version for include_pp_sources to 3.13

    Signed-off-by: Nathan Rebours <[email protected]>
    NathanReb committed Apr 22, 2024
    Configuration menu
    Copy the full SHA
    ecec6d1 View commit details
    Browse the repository at this point in the history
  10. Do not format files in ppx/

    Signed-off-by: Nathan Rebours <[email protected]>
    NathanReb committed Apr 22, 2024
    Configuration menu
    Copy the full SHA
    8e82345 View commit details
    Browse the repository at this point in the history
  11. Build ppx/ as part of @check alias

    Signed-off-by: Nathan Rebours <[email protected]>
    NathanReb committed Apr 22, 2024
    Configuration menu
    Copy the full SHA
    7a943f7 View commit details
    Browse the repository at this point in the history
  12. Format preprocessed files before promotion

    Signed-off-by: Nathan Rebours <[email protected]>
    NathanReb committed Apr 22, 2024
    Configuration menu
    Copy the full SHA
    2f34aa4 View commit details
    Browse the repository at this point in the history

Commits on Apr 25, 2024

  1. _

    Signed-off-by: Rudi Grinberg <[email protected]>
    rgrinberg committed Apr 25, 2024
    Configuration menu
    Copy the full SHA
    9498b87 View commit details
    Browse the repository at this point in the history
  2. _

    Signed-off-by: Rudi Grinberg <[email protected]>
    rgrinberg committed Apr 25, 2024
    Configuration menu
    Copy the full SHA
    a93e362 View commit details
    Browse the repository at this point in the history
  3. _

    Signed-off-by: Rudi Grinberg <[email protected]>
    rgrinberg committed Apr 25, 2024
    Configuration menu
    Copy the full SHA
    b8d9b86 View commit details
    Browse the repository at this point in the history

Commits on Jun 3, 2024

  1. Add run_if_exists action

    Signed-off-by: Nathan Rebours <[email protected]>
    NathanReb committed Jun 3, 2024
    Configuration menu
    Copy the full SHA
    ceede31 View commit details
    Browse the repository at this point in the history
  2. Use ppxlib's driver optional output mode

    Signed-off-by: Nathan Rebours <[email protected]>
    NathanReb committed Jun 3, 2024
    Configuration menu
    Copy the full SHA
    6772dd6 View commit details
    Browse the repository at this point in the history

Commits on Jun 11, 2024

  1. Update ppx/dune

    Signed-off-by: Nathan Rebours <[email protected]>
    NathanReb committed Jun 11, 2024
    Configuration menu
    Copy the full SHA
    1d190df View commit details
    Browse the repository at this point in the history