Skip to content

Commit bd1c464

Browse files
annacrombiemensinda
authored andcommitted
print warning when using fastyaml loader
1 parent b0d29dd commit bd1c464

File tree

1 file changed

+7
-2
lines changed

1 file changed

+7
-2
lines changed

docs/refman/loaderyaml.py

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -295,9 +295,9 @@ def _load_module(self, path: Path) -> T.List[Object]:
295295
return [module, *objs]
296296

297297
def load_impl(self) -> ReferenceManual:
298-
mlog.log('Loading YAML refererence manual')
298+
mlog.log('Loading YAML reference manual')
299299
with mlog.nested():
300-
return ReferenceManual(
300+
manual = ReferenceManual(
301301
functions=[self._load_function(x) for x in self.func_dir.iterdir()],
302302
objects=mesonlib.listify([
303303
[self._load_object(ObjectType.ELEMENTARY, x) for x in self.elem_dir.iterdir()],
@@ -306,3 +306,8 @@ def load_impl(self) -> ReferenceManual:
306306
[self._load_module(x) for x in self.modules_dir.iterdir()]
307307
], flatten=True)
308308
)
309+
310+
if not self.strict:
311+
mlog.warning('YAML reference manual loaded using the best-effort fastyaml loader. Results are not guaranteed to be stable or correct.')
312+
313+
return manual

0 commit comments

Comments
 (0)