Skip to content

Fix broken visual diff

@kliment1

Check entire library for missing or misordered parent inconsistency and move to correct location.

Currently, the diffed library is checked for if the parent symbol exists - therefore, the visual diff will always fail, unless the

This MR moves the check into a separate method and checks the entire new library for inconsistencies.

I think it's fair to check the entire library for bad parent symbols since any bad symbol ordering - no matter if it is related to the current diff - is a critical issue with the library to be fixed immediately (since KiCad might fail to load the entire lib IIRC). So I'd rather ring all reviewer's alarm bells, even if not related.

We should make this a critical error, not just a visual diff warning - however, since my plan at least is to check the lib in KLC using kicad-cli sym upgrade --force, KLC will fail anyway with a failure to load the library.

I have manually checked this by moving a child symbol up to the top of the lib.

image.png

Merge request reports