The catch of this practice is that we must remember never to build or depend on FooImpl directly, we can only build or depend on FooWrapper. We can insert some lines in any file under Sources/FooImpl to get ourselves notified when the above rule is violated:
// Sources/FooImpl/xxx.swift
#if !Foo
#error("FooImpl is leaked into the build graph without trait 'Foo' being enabled")
#else