ocaml / ocaml/dune

dune doesn't reset DUNE_CACHE_ROOT inside cram tests

Open
#11,501 7 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

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

Description

Opening this issue to see if there's an alternative I'm missing but running dune inside a cram tests makes warnings/hints appear about cache (and most probably any global setup for dune)

If DUNE_CACHE_ROOT is /path/that/does/not/exist/temp this output pops out:

   $ dune build @melange
+  Warning: Cache directories could not be created: Read-only file system;
+  disabling cache
+  Hint: Make sure the directory /path/that/does/not/exist/temp can be created

Reference issue from https://github.com/reasonml/reason-react/issues/870#issuecomment-2681483581

Is there any cache, or set of env variables that should be set on cram tests by users or by default?

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 reproducing the warning in a cram test that runs dune build @melange with DUNE_CACHE_ROOT set to the nonexistent path shown. Read the cram-test environment setup and determine whether cache-related variables should be reset or configured; done means the test no longer emits the cache warning without breaking cache behavior.

Written by the indexing model from the issue text.

Assessment

Tech stack
ocaml
Domain
build-system, testing
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.