in build_runner_core/lib/src/generate/finalized_assets_view.dart [51:73]
bool _shouldSkipNode(AssetNode node, String? rootDir, PackageGraph packageGraph,
OptionalOutputTracker optionalOutputTracker) {
if (!node.isReadable) return true;
if (node.isDeleted) return true;
// Exclude non-lib assets if they're outside of the root directory or not from
// root package.
if (!node.id.path.startsWith('lib/')) {
if (rootDir != null && !p.isWithin(rootDir, node.id.path)) return true;
if (node.id.package != packageGraph.root.name) return true;
}
if (node is InternalAssetNode) return true;
if (node is GeneratedAssetNode) {
if (!node.wasOutput || node.isFailure || node.state != NodeState.upToDate) {
return true;
}
return !optionalOutputTracker.isRequired(node.id);
}
if (node.id.path == '.packages') return true;
if (node.id.path == '.dart_tool/package_config.json') return true;
return false;
}