Skip to content

Place default trace file in the build directory#13735

Open
vouillon wants to merge 1 commit intoocaml:mainfrom
vouillon:trace
Open

Place default trace file in the build directory#13735
vouillon wants to merge 1 commit intoocaml:mainfrom
vouillon:trace

Conversation

@vouillon
Copy link
Member

@vouillon vouillon commented Mar 5, 2026

The default trace file path was hardcoded to _build/trace.csexp, resolved relative to the initial working directory. This meant it could end up outside the build directory when invoking dune from a subdirectory or when using a custom --build-dir.

Use Path.Build.root to resolve the default trace file path, placing it correctly inside the workspace's build directory. dune trace cat and dune trace commands now also find the trace file at the workspace root.

@Alizter
Copy link
Collaborator

Alizter commented Mar 5, 2026

@rgrinberg @shonfeder I think this can be considered a regression for 3.22. Probably best we include this fix for the release.

@Alizter Alizter requested a review from rgrinberg March 5, 2026 15:16
The default trace file path was hardcoded to `_build/trace.csexp`,
resolved relative to the initial working directory. This meant it
could end up outside the build directory when invoking dune from a
subdirectory or when using a custom `--build-dir`.

Use `Path.Build.root` to resolve the default trace file path, placing
it correctly inside the workspace's build directory. `dune trace cat`
and `dune trace commands` now also find the trace file at the
workspace root.

Signed-off-by: Jérôme Vouillon <jerome.vouillon@gmail.com>
@shonfeder
Copy link
Member

Anything preventing us merging here? It looks like its been approved, and it is marked as blocking the release.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants