--timing builds fail: CRAFTER_TIMING code in Window.cpp references members Window no longer has #178

Open
opened 2026-10-31 14:58:29 +00:00 by jorijnvdgraaf · 0 comments

crafter-build --timing (which defines CRAFTER_TIMING, project.cpp) does not compile on master (bcdc885):

implementations/Crafter.Graphics-Window.cpp:1088:5: error: use of undeclared identifier 'renderTimings'
implementations/Crafter.Graphics-Window.cpp:1482:33: error: unknown type name 'RenderingElement'
implementations/Crafter.Graphics-Window.cpp:1482:117: error: use of undeclared identifier 'renderer'
3 errors generated.

Both statements sit inside #ifdef CRAFTER_TIMING blocks:

  • Window::Update (Window.cpp:1088): renderTimings.clear();
  • Window::LogTiming (Window.cpp:1482): the loop over renderer.renderTimings, a vector of std::tuple<const RenderingElement*, std::uint32_t, std::uint32_t, std::chrono::nanoseconds>

struct Window (interfaces/Crafter.Graphics-Window.cppm, the CRAFTER_TIMING members at lines 241 to 257) declares neither renderTimings nor renderer, and no RenderingElement type exists any more; git log -S renderTimings shows the declaration left with an earlier renderer cleanup. The remaining timing members (totalUpdate, updateTimings, totalRender, vblank, frameTimes) are fine, so the flag has been broken only by these two leftovers.

Reproduce: crafter-build --timing in the repository root (a fresh variant directory, since the flag is part of the variant hash).

Fix options: drop the two leftover statements, keeping the per-listener update timings and the 100-frame ring; or replace the per-element render timings with per-pass timings over window.passes, which is what a renderer-less Window can measure. Either way a --timing build should be part of the pre-merge checks (AGENTS.md lists the flag).

`crafter-build --timing` (which defines `CRAFTER_TIMING`, project.cpp) does not compile on master (bcdc885): ``` implementations/Crafter.Graphics-Window.cpp:1088:5: error: use of undeclared identifier 'renderTimings' implementations/Crafter.Graphics-Window.cpp:1482:33: error: unknown type name 'RenderingElement' implementations/Crafter.Graphics-Window.cpp:1482:117: error: use of undeclared identifier 'renderer' 3 errors generated. ``` Both statements sit inside `#ifdef CRAFTER_TIMING` blocks: - `Window::Update` (Window.cpp:1088): `renderTimings.clear();` - `Window::LogTiming` (Window.cpp:1482): the loop over `renderer.renderTimings`, a vector of `std::tuple<const RenderingElement*, std::uint32_t, std::uint32_t, std::chrono::nanoseconds>` `struct Window` (interfaces/Crafter.Graphics-Window.cppm, the `CRAFTER_TIMING` members at lines 241 to 257) declares neither `renderTimings` nor `renderer`, and no `RenderingElement` type exists any more; `git log -S renderTimings` shows the declaration left with an earlier renderer cleanup. The remaining timing members (`totalUpdate`, `updateTimings`, `totalRender`, `vblank`, `frameTimes`) are fine, so the flag has been broken only by these two leftovers. Reproduce: `crafter-build --timing` in the repository root (a fresh variant directory, since the flag is part of the variant hash). Fix options: drop the two leftover statements, keeping the per-listener update timings and the 100-frame ring; or replace the per-element render timings with per-pass timings over `window.passes`, which is what a renderer-less `Window` can measure. Either way a `--timing` build should be part of the pre-merge checks (AGENTS.md lists the flag).
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set

Reference
Catcrafts/Crafter.Graphics#178
No description provided.