Allow multi-version openssl/abseil alongside unicode#1278
Conversation
There was a problem hiding this comment.
Pull request overview
This PR generalizes hydrate’s previous unicode.org-only special-case into a reusable mechanism for “parallel-installable” projects (eg ICU majors, OpenSSL sonames, Abseil LTS namespaces), so non-intersecting constraints can coexist rather than failing resolution.
Changes:
- Introduces a
MULTI_VERSION_PROJECTSallowlist plus helpers to collect additional non-intersecting constraints. - Updates
hydrate()andcondense()to preserve multiple constraints for allowlisted projects (and to return errors instead of panicking on non-allowlisted non-intersections). - Adds unit tests covering unicode/openssl/abseil multi-version hydration scenarios.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
c2efb04 to
6d02484
Compare
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 5 out of 5 changed files in this pull request and generated 1 comment.
Comments suppressed due to low confidence (1)
crates/lib/src/hydrate.rs:13
- The comment says we “keep multiple nodes” when constraints can’t intersect, but the implementation still keeps a single graph node per project (keyed by project name) and records extra ABI lines as additional
PackageReqentries. This mismatch can mislead future changes (eg expecting multiple graph nodes/parents to exist).
/// Projects whose distinct version lines are parallel-installable (different
/// sonames / ICU majors / abseil LTS namespaces). When constraints cannot
/// intersect we keep multiple nodes instead of failing the graph.
///
/// - unicode.org: ICU major ABI (see pantry#4104, pkgx#899)
/// - openssl.org: libssl.so.1.1 vs libssl.so.3
/// - abseil.io: LTS inline-namespace + soversion (20250127 vs 20250512, …)
const MULTI_VERSION_PROJECTS: &[&str] = &["unicode.org", "openssl.org", "abseil.io"];
6d02484 to
9b760e1
Compare
9b760e1 to
673b45b
Compare
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 6 out of 6 changed files in this pull request and generated no new comments.
Comments suppressed due to low confidence (4)
crates/lib/src/sync.rs:43
- Using
Err("…")?;as a statement is likely to triggerclippy::needless_question_mark(and this repo runscargo clippywith-D warnings). Prefer an explicit early-return withErr(... .into())to avoid CI failures and make control-flow clearer.
} else {
Err("PKGX_PANTRY_DIR is set but does not contain a pantry (missing projects/)")?;
}
crates/cli/src/resolve.rs:92
- Using
Err("…")?;here is likely to tripclippy::needless_question_mark(CI runs clippy with-D warnings). Use an explicitreturn Err(... .into());so this branch is clearly an early-exit and won’t fail linting.
if !resolution.pending.is_empty() {
if env::var("PKGX_NO_INSTALL").is_ok() {
Err("PKGX_NO_INSTALL is set, refusing to install pending packages")?;
}
let installed = install_multi(&resolution.pending, config, spinner.arc()).await?;
.github/workflows/ci.yml:76
- This adds a Homebrew
brew trustinvocation, but the workflow doesn’t otherwise use Homebrew to install Coveralls tooling. This extra step can introduce avoidable failures on macOS runners (eg if the runner’s Homebrew version doesn’t includetrust). If this is intended as a best-effort workaround, guard it so it won’t break CI when unavailable.
- run: brew trust coverallsapp/coveralls
if: matrix.os == 'macos-latest'
.github/workflows/ci.yml:240
- Same as above: the unconditional
brew trustcall on macOS can make this job fragile if the runner’s Homebrew doesn’t supporttrust, and it’s not otherwise used in this workflow. Consider guarding it so the step becomes a no-op when unavailable.
- run: brew trust coverallsapp/coveralls
if: matrix.os == 'macos-latest'
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.
673b45b to
54e555a
Compare
| @@ -80,30 +122,45 @@ where | |||
| pkgs.sort_by_key(|node| node.count()); | |||
| // order cryptography first so ^3 is the graph node and both ^1.1 merge | ||
| // into a single additional entry. | ||
| let input = vec![ |
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.