Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix regression in construct-env.ts #1037

Merged
merged 1 commit into from
Sep 13, 2024
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