Allow multi-version openssl/abseil alongside unicode#88
Merged
Conversation
Generalize the unicode.org hydrate special-case so parallel-installable ABI lines (openssl 1.1 vs 3, abseil LTS namespaces) can coexist in one graph instead of failing constraint intersection.
Coverage Report for CI Build 29946402969Coverage decreased (-0.5%) to 82.164%Details
Uncovered Changes
Coverage Regressions8 previously-covered lines in 3 files lost coverage.
Coverage Stats💛 - Coveralls |
There was a problem hiding this comment.
Pull request overview
This PR generalizes hydrate’s previous unicode.org-only “non-intersecting constraints” special-case into an allowlist of parallel-installable ABI lines (eg ICU majors, OpenSSL 1.1 vs 3, Abseil LTS namespaces) so dependency graphs can retain multiple version lines instead of failing during constraint intersection.
Changes:
- Introduces
MULTI_VERSION_PROJECTSand uses it to tolerate non-intersecting constraints by collecting “additional” sibling requirements. - Updates hydrate’s constraint-intersection flow (both during graph build and
condense()) to keep multiple non-intersecting ranges for allowlisted projects. - Expands
hydrate.test.tswith coverage for openssl.org and abseil.io multi-version coexistence, plus an allowlist sanity test.
Reviewed changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated 2 comments.
| File | Description |
|---|---|
| src/plumbing/hydrate.ts | Generalizes the prior unicode-only exception into an allowlisted multi-version mechanism and updates intersection/condense logic accordingly. |
| src/plumbing/hydrate.test.ts | Adds tests validating multi-version behavior for unicode.org/openssl.org/abseil.io and refactors constraint set assertions. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Comment on lines
119
to
+123
| child_node.pkg.constraint = semver.intersect(child_node.pkg.constraint, dep.constraint) | ||
| } catch (e) { | ||
| if (dep.project == 'unicode.org') { | ||
| // we handle unicode.org for now to allow situations like: | ||
| // https://github.com/pkgxdev/pantry/issues/4104 | ||
| // https://github.com/pkgxdev/pkgx/issues/899 | ||
| additional_unicodes.push(dep.constraint) | ||
| if (MULTI_VERSION_PROJECTS.has(dep.project)) { | ||
| // keep both version lines; bottles/rpaths disambiguate at runtime | ||
| pushAdditional(dep) |
Comment on lines
140
to
+144
| const pkgs = Object.values(graph) | ||
| .sort((a, b) => b.count() - a.count()) | ||
| .map(({pkg}) => pkg) | ||
|
|
||
| // see above explanation | ||
| pkgs.push(...additional_unicodes.map(constraint => ({ project: "unicode.org", constraint }))) | ||
| pkgs.push(...additional) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Generalize the unicode.org hydrate special-case so parallel-installable
ABI lines (openssl 1.1 vs 3, abseil LTS namespaces) can coexist in one
graph instead of failing constraint intersection.