@@ -85,6 +85,8 @@ NodeId parseNode(const AttributeFactory<NodeAttributes>& factory,
8585 PartitionId partition = 0 ;
8686 const auto & header = io::GlobalInfo::loadedHeader ();
8787 if (header.version < io::Version (1 , 1 , 0 )) {
88+ io::warnOutdatedHeader (header);
89+
8890 std::optional<std::chrono::nanoseconds> stamp;
8991 deserializer.read (stamp);
9092 // guess at interlayer IDs based on node symbol prefix
@@ -204,6 +206,8 @@ template <typename Attrs>
204206AttributeFactory<Attrs> loadFactory (const io::FileHeader& header,
205207 const BinaryDeserializer& deserializer) {
206208 if (header.version < io::Version (1 , 0 , 2 )) {
209+ io::warnOutdatedHeader (header);
210+
207211 return serialization::AttributeRegistry<Attrs>::current ();
208212 }
209213
@@ -216,6 +220,8 @@ bool updateGraph(DynamicSceneGraph& graph, const BinaryDeserializer& deserialize
216220 const auto & header = io::GlobalInfo::loadedHeader ();
217221
218222 if (header.version < io::Version (1 , 1 , 2 )) {
223+ io::warnOutdatedHeader (header);
224+
219225 // NOTE(nathan) we intentionally don't try to use the layer IDs to populate anything
220226 // because they will not include partitions and cause lots of serialization churn
221227 std::vector<LayerId> layer_ids;
@@ -237,6 +243,8 @@ bool updateGraph(DynamicSceneGraph& graph, const BinaryDeserializer& deserialize
237243 }
238244
239245 if (header.version < io::Version (1 , 0 , 2 )) {
246+ io::warnOutdatedHeader (header);
247+
240248 LayerId mesh_layer_id;
241249 deserializer.read (mesh_layer_id);
242250 }
@@ -247,12 +255,16 @@ bool updateGraph(DynamicSceneGraph& graph, const BinaryDeserializer& deserialize
247255
248256 std::map<std::string, LayerKey> layer_names;
249257 if (header.version < io::Version (1 , 1 , 0 )) {
258+ io::warnOutdatedHeader (header);
259+
250260 layer_names = {{DsgLayers::OBJECTS, 2 },
251261 {DsgLayers::AGENTS, 2 },
252262 {DsgLayers::PLACES, 3 },
253263 {DsgLayers::ROOMS, 4 },
254264 {DsgLayers::BUILDINGS, 5 }};
255265 } else if (header.version < io::Version (1 , 1 , 1 )) {
266+ io::warnOutdatedHeader (header);
267+
256268 std::map<std::string, LayerId> names;
257269 deserializer.read (names);
258270 layer_names = DynamicSceneGraph::LayerNames (names.begin (), names.end ());
@@ -264,7 +276,9 @@ bool updateGraph(DynamicSceneGraph& graph, const BinaryDeserializer& deserialize
264276 graph.addLayer (key.layer , key.partition , name);
265277 }
266278
267- if (header.version >= io::Version (1 , 0 , 6 )) {
279+ if (header.version < io::Version (1 , 0 , 6 )) {
280+ io::warnOutdatedHeader (header);
281+ } else {
268282 std::string metadata_json;
269283 deserializer.read (metadata_json);
270284 try {
@@ -290,6 +304,8 @@ bool updateGraph(DynamicSceneGraph& graph, const BinaryDeserializer& deserialize
290304 }
291305
292306 if (header.version < io::Version (1 , 1 , 0 )) {
307+ io::warnOutdatedHeader (header);
308+
293309 deserializer.checkDynamicArray ();
294310 while (!deserializer.isDynamicArrayEnd ()) {
295311 stale_nodes.erase (parseNode (
0 commit comments