ocaml / ocaml/dune

[coq] Adding a "patch" field to `coq.extraction`

Open
#5,832 2 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

rocq
Dominant language
OCaml
Stars
1.9k
Forks
500
Avg merge
15h 21m
Merged PRs (30d)
277

Description

It seems to be fairly common for Coq projects relying on extraction to need to patch some of the extracted files before proceeding to the OCaml side of the compilation.

One example of such a process is encountered in the Vellvm project where the issue described in (https://github.com/coq/coq/issues/6614) is encountered. As a fix, the following patch is applied by the Makefile right after extraction, before building the OCaml side of the project.
This problem is an obstacle to moving the project completely to a dune-based build, as attempted in this branch: we do not know how to tell dune to apply the patch at the right moment.

@rgrinberg has suggested that a dedicated field in the coq.extraction stanza could be the way to go: it indeed would be ideal as a user.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by locating the coq.extraction stanza handling and the extraction action in Dune. Review how the Makefile currently applies the Vellvm patch after extraction and before the OCaml build. Done should provide a stanza field that applies the requested patch at that point in the build.

Written by the indexing model from the issue text.

Assessment

Tech stack
ocaml
Domain
build-system
Issue type
Feature
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.