mirror of
https://github.com/wpilibsuite/allwpilib
synced 2026-06-26 01:51:41 +00:00
[wpiutil] Add nested struct schemas before parent schema (#7935)
When adding struct schemas, the current logic is to add the parent/outer schema, and then add the schemas for any nested inner schemas. This reverses that order to make it easier for tools to process. Matches C++ logic.
This commit is contained in:
@@ -451,10 +451,10 @@ public class DataLog implements AutoCloseable {
|
||||
if (!seen.add(typeString)) {
|
||||
throw new UnsupportedOperationException(typeString + ": circular reference with " + seen);
|
||||
}
|
||||
addSchema(typeString, "structschema", struct.getSchema(), timestamp);
|
||||
for (Struct<?> inner : struct.getNested()) {
|
||||
addSchemaImpl(inner, timestamp, seen);
|
||||
}
|
||||
addSchema(typeString, "structschema", struct.getSchema(), timestamp);
|
||||
seen.remove(typeString);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user