upstreamPaths function
The absolute paths of every kind: upstream entry of the repos.yaml
at or above start: project mode (builds) skips them without a marker
file. Empty without a repos.yaml, and when it does not parse (a build
does not fail over the manifest; git mode reports it).
Implementation
Set<String> upstreamPaths(String start) {
final root = findReposRoot(start);
if (root == null) return const {};
try {
final manifest = ReposManifest.parse(
File(p.join(root, kReposManifestFile)).readAsStringSync(),
);
return {
for (final e in manifest.entries)
if (e.kind == RepoKind.upstream)
p.join(root, p.joinAll(e.path.split('/'))),
};
} on Exception {
return const {};
}
}