Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 5 additions & 1 deletion src/prefab/construct-env.ts
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,11 @@ export default async function(pkgenv: { installations: Installation[] }) {
///////////////////////// reworked from useShellEnv needs porting back to libpkgx
async function mkenv({installations}: {installations: Installation[]}) {
const projects = new Set(installations.map(x => `${x.pkg.project}@${x.pkg.version}`))
console.assert(projects.size == installations.length, "pkgx: env is being duped")

// we need to do this as well, since we allow multiple versions of e.g. unicode.org.
// however, if we *just* use this as `projects`, then tests below like `projects.has('cmake.org')` will fail
const projects_with_versions = new Set(installations.map(x => `${x.pkg.project}@${x.pkg.version}`))
console.assert(projects_with_versions.size == installations.length, "pkgx: env is being duped")

const common_vars: Record<string, OrderedSet<string>> = {}
const common_keys = new Set<string>()
Expand Down