Remove remaining dead code: orphan units, dead members, and all #if 0 blocks - #69
Merged
duburcqa merged 2 commits intoJul 23, 2026
Merged
Conversation
… members
- Delete the unused ECS 'System' unit: src/core/system.cpp (listed in no build
target) plus include/madrona/system.{hpp,inl} and the device
system.{hpp,inl} headers (System/SystemBase referenced nowhere; system.hpp
was included only by system.cpp).
- Delete src/render/vk/engine_interop.hpp -- a stale duplicate of the
EngineInterop struct that actually lives in render_common.hpp (zero includers).
- Drop dead BatchRenderer methods left over from the removed viewer:
importCudaData (decl only), getComponentBuffer, getLatestWaitSemaphore
(all zero callers).
- Drop the write-only RenderContext::gpu_input_ member.
Delete the 31 always-false '#if 0' (and '#if 0 && ...') blocks left across the host and nvrtc-device sources -- disabled/reference code, debug prints, and alternate implementations. None had a live '#else' branch (verified), so each is removed whole; pure deletions, no behavior change. Touches render, vk, mw device (bvh/bvh_raycast/sort_archetype), common, bridge, and several ECS headers.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Final pass of the reachability sweep. Two commits.
1. Orphan units / dead members
src/core/system.cpp(in no build target) +include/madrona/system.{hpp,inl}+ devicesystem.{hpp,inl}(System/SystemBasereferenced nowhere; the header was included only bysystem.cpp).src/render/vk/engine_interop.hpp— a stale duplicate of theEngineInteropstruct that lives inrender_common.hpp(zero includers).BatchRenderermethods left from the removed viewer:importCudaData(decl only),getComponentBuffer,getLatestWaitSemaphore(zero callers).RenderContext::gpu_input_member.2. Dead
#if 0blocks#if 0/#if 0 && ...blocks across host and nvrtc-device sources (bvh / bvh_raycast / sort_archetype / ecs_system / render / vk / common / bridge and several ECS.inlheaders). None had a live#elsebranch (verified); pure deletions, no behavior change.Kept deliberately: the zero-caller public
MGR_EXPORTAPI (Manager::numWorlds/numCams/getRenderManager/…,RenderManager::configureLighting/renderContext) — that's an interface decision, not dead code.Validation
Cluster (RTX): fresh build + full 38 batch-render tests — 38 passed, twice (once per commit).