fix build-deps outputting stuff we need to build

This commit is contained in:
Max Howell 2022-12-20 08:32:07 -05:00
parent fea7d8ad6d
commit 972f0715f4
No known key found for this signature in database
GPG key ID: 741BB84EF5BB9EEC

View file

@ -32,13 +32,20 @@ const get_deps = async (pkg: Package | PackageRequirement) => {
} }
} }
const rv: PackageRequirement[] = [] const bootstrap_required = new Set<string>()
const set = new Set<string>()
let rv: PackageRequirement[] = []
for await (const pkg of ARGV.pkgs()) { for await (const pkg of ARGV.pkgs()) {
const deps = await get_deps(pkg) const deps = await get_deps(pkg)
const wet = await hydrate(deps) const wet = await hydrate(deps)
rv.push(...wet.pkgs) rv.push(...wet.pkgs)
set.add(pkg.project)
wet.bootstrap_required.forEach(x => bootstrap_required.add(x))
} }
// we dont want to pre-install packages we intend to build
rv = rv.filter(({ project }) => !set.has(project) || bootstrap_required.has(project))
const gas = rv.map(pkg.str) const gas = rv.map(pkg.str)
if (Deno.env.get("GITHUB_ACTIONS")) { if (Deno.env.get("GITHUB_ACTIONS")) {