ocamldebug support

Open
#4,229 8 comments 2 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

Difficulty
5/5
Estimated time
Over a week
Newbie friendliness
25/100
Issue type
Feature
Clarity
Needs clarification
Activity status
Stale
Tech stack
ocaml
Domain
build-system

Research direction

Start by reading issue #3818 and the existing dune top and dune utop behavior. Define whether dune debug $byte_file or an executable-stanza rule is the interface, then ensure the relevant CMA files, stubs, -I options, and printers are handled. Done means a basic ocamldebug workflow can be invoked and its printer-loading behavior is concrete.

Written by the indexing model from the issue text.

Description

build cli

This is an effort to centralize the discussion for a plan to improve ocamldebug support in Dune (c.f. #3818)

Some comments:

  • interface: one possibility would be to add dune debug $byte_file, that would take care of doing the right ocamldebug call, other is to expose variables so the call can be written easily as a rule
  • ocamldebug call: here we need something similar to what dune top and dune utop do, in particular:
    • all the cma files and stubs for $byte_file must be up to date
    • the corresponding -I options have to be passed to ocamldebug so cmi and cma files are built
    • additionally, printers must be loaded; we could use the attributes à la utop, or have an extra field in the (executable ...) stanza as to declare the printers library. The printers could be automatically loaded, but it would be a good idea to actually generate a concrete file to be used with the source command

I think that if we agree on the above, doing a basic rule should be pretty quick.

Dominant language
OCaml
Stars
1.9k
Forks
500
Avg merge
15h 17m
Merged PRs (30d)
287

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.

More from ocaml/dune

All issues in ocaml/dune

Similar issues

More Build System issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.