build-aux/check-coupling: Prohibit supplier imports of UI packages

The reverse was checked, but apparently a check for suppliers importing the
UI was never added.
main
Mike Gerwitz 2022-01-28 10:49:23 -05:00
parent 2a84e44a58
commit cd13b80f31
2 changed files with 7 additions and 2 deletions

View File

@ -43,6 +43,11 @@ Linker
entities within the XML document. In some cases, it can reduce peak entities within the XML document. In some cases, it can reduce peak
memory usage by half. memory usage by half.
Tools
=====
- `build-aux/check-coupling` will now prevent `supplier/` packages from
importing `ui/` packages; previously only the reverse was true.
v18.0.3 (2021-07-21) v18.0.3 (2021-07-21)
==================== ====================

View File

@ -70,13 +70,13 @@ find-violations()
$( non-supplier-maps ) \ $( non-supplier-maps ) \
| grep ' /suppliers/' | grep ' /suppliers/'
# Suppliers must not import other suppliers. # Suppliers must not import other suppliers or UI packages.
# TODO: Check against supplier maps # TODO: Check against supplier maps
for supplier in suppliers/*.xml; do for supplier in suppliers/*.xml; do
local name=$( basename "$supplier" .xml ) local name=$( basename "$supplier" .xml )
lsimports "$supplier" $( supplier-packages "$name" ) \ lsimports "$supplier" $( supplier-packages "$name" ) \
| grep ' /suppliers/' \ | grep ' /suppliers/\|/ui/' \
| grep -v " /suppliers/$name/" | grep -v " /suppliers/$name/"
done done
} }