main does not build: Nemotron35LightningSnapshot() calls HfSnapshot 10 lines before it is declared.
What
origin/main @ 8b00f79f2 fails to compile. tests/parity/hf_snapshot.h
defines parity::Nemotron35LightningSnapshot() at :51-57, which calls
HfSnapshot(...) at :52 — but HfSnapshot is not declared until :62.
Introduced by af8170154 (evidence(MODEL-TEXT-nemotron-h): the pinned oracle
LOADS AND RUNS Nemotron-3.5-Lightning on GB10, #517), which inserted the new
helper ABOVE HfSnapshot instead of below it. Every other snapshot helper in
the file (:83, :114, :140, :178) sits after the HfSnapshot definition,
so this is a placement slip rather than a design question.
Reproduce
Header alone, no build system involved:
printf '#include "parity/hf_snapshot.h"\nint main(){return 0;}\n' > /tmp/h.cpp
g++ -std=c++20 -I tests -fsyntax-only /tmp/h.cpp
tests/parity/hf_snapshot.h: In function 'std::string parity::Nemotron35LightningSnapshot()':
tests/parity/hf_snapshot.h:52:10: error: 'HfSnapshot' was not declared in this scope
52 | return HfSnapshot("models--nvidia--NVIDIA-Nemotron-3.5-Lightning-30B-A3B-NVFP4",
| ^~~~~~~~~~
In a normal Release configure it surfaces as a failed TU rather than as a header
problem, which is why it is easy to misread as belonging to the branch that hit
it:
FAILED: tests/CMakeFiles/test_qwen36_weights.dir/vllm/test_qwen36_weights.cpp.o
Every target that includes parity/hf_snapshot.h is affected, so a full
cmake --build stops at ~413/1207.
Fix
Move Nemotron35LightningSnapshot() (and its comment block) below the
HfSnapshot definition, where the file's other five helpers already live. No
semantic change.
Why it was not caught
af8170154 landed via a row whose own gate did not include a full clean
cmake --build; the header is only reached through test TUs.
maindoes not build:Nemotron35LightningSnapshot()callsHfSnapshot10 lines before it is declared.What
origin/main@8b00f79f2fails to compile.tests/parity/hf_snapshot.hdefines
parity::Nemotron35LightningSnapshot()at:51-57, which callsHfSnapshot(...)at:52— butHfSnapshotis not declared until:62.Introduced by
af8170154(evidence(MODEL-TEXT-nemotron-h): the pinned oracleLOADS AND RUNS Nemotron-3.5-Lightning on GB10, #517), which inserted the new
helper ABOVE
HfSnapshotinstead of below it. Every other snapshot helper inthe file (
:83,:114,:140,:178) sits after theHfSnapshotdefinition,so this is a placement slip rather than a design question.
Reproduce
Header alone, no build system involved:
In a normal Release configure it surfaces as a failed TU rather than as a header
problem, which is why it is easy to misread as belonging to the branch that hit
it:
Every target that includes
parity/hf_snapshot.his affected, so a fullcmake --buildstops at ~413/1207.Fix
Move
Nemotron35LightningSnapshot()(and its comment block) below theHfSnapshotdefinition, where the file's other five helpers already live. Nosemantic change.
Why it was not caught
af8170154landed via a row whose own gate did not include a full cleancmake --build; the header is only reached through test TUs.