Context: How are the generated/medatata files generated in Magento 2.2?
generated/medatata
Details: How does Magento\Setup\Module\Di\App\Task\Operation\Area::getDefinitionsCollection() work?
Magento\Setup\Module\Di\App\Task\Operation\Area::getDefinitionsCollection()
Details:
Magento\Setup\Module\Di\Compiler\Config\Reader::generateCachePerScope()
Magento\Setup\Module\Di\Compiler\Config\ModificationChain::modify()