Skip to content

fix(deps): pin ort to =2.0.0-rc.11 so cargo install doesn't break#116

Merged
runonthespot merged 1 commit into
mainfrom
fix/pin-ort-rc11
May 24, 2026
Merged

fix(deps): pin ort to =2.0.0-rc.11 so cargo install doesn't break#116
runonthespot merged 1 commit into
mainfrom
fix/pin-ort-rc11

Conversation

@runonthespot

Copy link
Copy Markdown
Contributor

Problem (severity: HIGH, user-facing)

@gianpaj hit this trying `cargo install ck-search` on 0.7.6:

```
error[E0277]: `?` couldn't convert the error: `NonNull: Sync` is not satisfied
--> ck-embed-0.7.6/src/mixedbread.rs:50:69
```

36 errors cascade out of `ck-embed::mixedbread`.

Root cause

`cargo install ck-search` without `--locked` ignores the published `Cargo.lock` and re-solves deps from scratch. Our workspace had `ort = "2.0.0-rc.11"` which is a caret range — cargo picks the latest matching release, which is now `2.0.0-rc.12`.

`ort 2.0.0-rc.12` changed `SessionOptionsPointer` to wrap a `NonNull` which is `!Sync`. That removes `Send + Sync` from `SessionBuilder`, which propagates to `ort::Error`, which means it can no longer be `?`-converted into `anyhow::Error` (which requires both).

Users hitting this can work around with `cargo install ck-search --locked`, but that's a footgun we shouldn't make them know about.

Fix

Pin to `=2.0.0-rc.11` exact. `cargo install` (with or without `--locked`) is forced to use the version we tested against. Cargo.lock unchanged.

Follow-up

Evaluate upgrade to `ort 2.0.0-rc.12` properly in a separate PR — likely needs `ck-embed::mixedbread` to map ort errors via `.map_err(anyhow::Error::msg)` or similar, since the `From` blanket impl no longer fires.

Test plan

  • `cargo check --workspace` — passes
  • `cargo update -p ort --dry-run` — locks 0 packages (pin enforced)
  • `cargo fmt --all --check` — clean
  • CI green
  • After merge: cut 0.7.7 hotfix

🤖 Generated with Claude Code

Reported by @gianpaj after trying \`cargo install ck-search\` on 0.7.6:
36 errors cascading out of ck-embed::mixedbread, all of the form
"cannot convert ort::Error<SessionBuilder> to anyhow::Error".

Root cause: cargo install (without --locked) ignores Cargo.lock and
re-solves dependencies from scratch. Our \`ort = "2.0.0-rc.11"\` is a
caret range that lets cargo pick 2.0.0-rc.12. rc.12 made
SessionOptionsPointer wrap a NonNull<OrtSessionOptions> which is
!Sync, which propagates up: SessionBuilder is no longer Sync, so
ort::Error<SessionBuilder> is no longer Send+Sync, so it can't be
?-converted into anyhow::Error (which requires both).

Workaround for users: \`cargo install ck-search --locked\` honors the
published lockfile. But that's a footgun we shouldn't ship with.

Real fix: pin to \`=2.0.0-rc.11\` exact so any resolution path picks
the version we tested against. Follow-up: evaluate rc.12 upgrade
separately — likely needs ck-embed::mixedbread to map ort errors
manually via .map_err instead of relying on `From` blanket impl.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
@runonthespot runonthespot merged commit c4668b0 into main May 24, 2026
14 checks passed
@runonthespot runonthespot deleted the fix/pin-ort-rc11 branch May 24, 2026 10:01
runonthespot added a commit that referenced this pull request May 24, 2026
Hotfix release for #116: pinning ort to =2.0.0-rc.11 so users
running \`cargo install ck-search\` (without --locked) don't
get 36 compile errors from a rc.12 upgrade they didn't ask for.

See CHANGELOG.md.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
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.

1 participant