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 Assertion failed: pkgx: env is being duped when multiple unicodes in env #989

Merged
merged 2 commits into from
Sep 5, 2024

Conversation

jhheider
Copy link
Contributor

closes #988

@jhheider jhheider requested a review from mxcl March 14, 2024 20:30
@dosubot dosubot bot added the size:S This PR changes 10-29 lines, ignoring generated files. label Mar 14, 2024
@mxcl mxcl force-pushed the main branch 2 times, most recently from 9038067 to 342373c Compare April 23, 2024 21:22
@@ -36,7 +36,7 @@ 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))
const projects = new Set(installations.map(x => `${x.pkg.project}@${x.pkg.version}`))
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can't remember why we added this anyway.

Copy link
Contributor Author

@jhheider jhheider Sep 5, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

it's been a while, but i believe it's because we can allow multiple unicode lib versions in the env simultaneously, and this check trips if there are two or more (since they map to the same name).

unless you mean the dupe-check; in which case, i'm sure it's sanity checking. definitely a good idea with how complex the env can get.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I seem to recall there was an issue if an env had multiple of the same exact thing but can't remember.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

i do recall at one point early on we would sometimes get the pkg@ver duplicated; perhaps this was to ensure that bug never returned.

@dosubot dosubot bot added the lgtm This PR has been approved by a maintainer label Sep 5, 2024
@mxcl mxcl merged commit 60202f2 into main Sep 5, 2024
16 checks passed
@mxcl mxcl deleted the fix-duplication-assertion branch September 5, 2024 18:17
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
lgtm This PR has been approved by a maintainer size:S This PR changes 10-29 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

mkenv invariant assertion invalid with duplicate unicode.org packages.=
2 participants