Skip to content

Allow multi-version openssl/abseil alongside unicode#1278

Merged
jhheider merged 1 commit into
mainfrom
multi-version-abi-coexistence
Jul 22, 2026
Merged

Allow multi-version openssl/abseil alongside unicode#1278
jhheider merged 1 commit into
mainfrom
multi-version-abi-coexistence

Conversation

@jhheider

Copy link
Copy Markdown
Contributor

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.

Copilot AI review requested due to automatic review settings July 22, 2026 18:14

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

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_PROJECTS allowlist plus helpers to collect additional non-intersecting constraints.
  • Updates hydrate() and condense() 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.

Comment thread crates/lib/src/hydrate.rs
Comment thread crates/lib/src/hydrate.rs
Copilot AI review requested due to automatic review settings July 22, 2026 18:25

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Pull request overview

Copilot reviewed 1 out of 1 changed files in this pull request and generated no new comments.

Copilot AI review requested due to automatic review settings July 22, 2026 18:33
@jhheider
jhheider force-pushed the multi-version-abi-coexistence branch from c2efb04 to 6d02484 Compare July 22, 2026 18:36

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

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 PackageReq entries. 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"];

Comment thread crates/lib/src/hydrate.rs Outdated
Copilot AI review requested due to automatic review settings July 22, 2026 18:38

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Pull request overview

Copilot reviewed 5 out of 5 changed files in this pull request and generated 2 comments.

Comment thread crates/lib/src/sync.rs
Comment thread crates/cli/src/resolve.rs
Copilot AI review requested due to automatic review settings July 22, 2026 18:43
@jhheider
jhheider force-pushed the multi-version-abi-coexistence branch from 6d02484 to 9b760e1 Compare July 22, 2026 18:43

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Pull request overview

Copilot reviewed 6 out of 6 changed files in this pull request and generated 3 comments.

Comment thread crates/lib/src/hydrate.rs Outdated
Comment thread .github/workflows/ci.yml
Comment thread .github/workflows/ci.yml
@coveralls

coveralls commented Jul 22, 2026

Copy link
Copy Markdown

Coverage Status

Coverage is 90.131%multi-version-abi-coexistence into main. No base build found for main.

Copilot AI review requested due to automatic review settings July 22, 2026 19:30
@jhheider
jhheider force-pushed the multi-version-abi-coexistence branch from 9b760e1 to 673b45b Compare July 22, 2026 19:30

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

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 trigger clippy::needless_question_mark (and this repo runs cargo clippy with -D warnings). Prefer an explicit early-return with Err(... .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 trip clippy::needless_question_mark (CI runs clippy with -D warnings). Use an explicit return 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 trust invocation, 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 include trust). 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 trust call on macOS can make this job fragile if the runner’s Homebrew doesn’t support trust, 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.
Copilot AI review requested due to automatic review settings July 22, 2026 19:39
@jhheider
jhheider force-pushed the multi-version-abi-coexistence branch from 673b45b to 54e555a Compare July 22, 2026 19:39

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Pull request overview

Copilot reviewed 9 out of 9 changed files in this pull request and generated 2 comments.

Comment thread crates/lib/src/hydrate.rs
@@ -80,30 +122,45 @@ where
pkgs.sort_by_key(|node| node.count());
Comment on lines +99 to +101
// order cryptography first so ^3 is the graph node and both ^1.1 merge
// into a single additional entry.
let input = vec![
@jhheider
jhheider merged commit c679d68 into main Jul 22, 2026
25 of 30 checks passed
@jhheider
jhheider deleted the multi-version-abi-coexistence branch July 22, 2026 19:59
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants