[question] how to debug apparently-unnecessary rebuilds?
Nobody has claimed this yet.
- Dominant language
- OCaml
- Stars
- 1.9k
- Forks
- 500
- Avg merge
- 15h 21m
- Merged PRs (30d)
- 277
Description
I am creating a Gitlab CI script for a project using Dune. This involves caching things and reusing them on following runs. If I ask to cache Dune's _build directory, and start a new CI job without any change to the source, then some of the build will get reused as expected, but some other parts of the build get redone for no clear reason.
Question: is there a way to debug apparently-unnecessary rebuilds? For example it could be a --display option that, for each action that is performed, explains why the action was deemed necessary. Something more low-level would be fine, but preferably this would not require modifying the Dune implementation.
While trying to answer this question I found dune rules (from #265). This is useful, but it shows all dependencies for each rule, and I don't know which of the dependencies are causing the rebuild. How would I go about checking that?
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with the reported GitLab CI setup, cached _build directory, and dune rules output to understand how dependencies are currently exposed. A complete outcome would identify a practical way to determine which dependency triggers each rebuild, preferably without modifying Dune, but the issue does not name implementation files or tests.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- gitlab, ocaml
- Domain
- build-system, ci-cd
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 25/100