Keep configurator logs on Windows
Nobody has claimed this yet.
- Dominant language
- OCaml
- Stars
- 1.9k
- Forks
- 500
- Avg merge
- 15h 21m
- Merged PRs (30d)
- 277
Description
On Windows (mingw-w64 in a Cygwin environment), dune-configurator
writes object files and logs output of the compiler in a directory in
/tmp/buildXXXXXX.dune/ocaml-configuratorYYYYYY/. That directory is
deleted when the build finishes and the logs are lost. It's a problem
when implementing a configurator/discover script, because it's harder
to debug it without the compiler's output.
I suggest that either the configurator output could be retained and
its location shown to the user, or that it could be duplicated in the
_build directory, or that it could be shown with a flag.
I think it could be as simple as removing otherlibs/configurator/src/v1.ml#L50
and the rm_rf function from otherlibs/configurator/v1.ml.
(EDIT: apparently not) This is a temp directory after all. Even if it isn't
cleaned by Cygwin, there's no extreme pressure for Dune to remove it itself.
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 otherlibs/configurator/src/v1.ml around the linked cleanup line and otherlibs/configurator/v1.ml around rm_rf. Trace how the temporary configurator directory and compiler logs are created and removed on Windows/Cygwin. Done means choosing and documenting a supported way to retain or expose those logs for configurator and discover scripts.
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