Log a warning if a package has an incompatible main module

I’ve been tripped up by this twice now, so it would be good to provide
some feedback when it happens.