Compilation failure: Arrow version mismatch and missing async-openai features #15

Closed
opened 2026-02-16 04:15:10 -05:00 by yindo · 4 comments
Owner

Originally created by @romeromarcelo on GitHub (Nov 26, 2025).

Description

cargo install semtools fails to compile on version 1.4.0 due to dependency conflicts.

Environment

  • semtools version: 1.4.0
  • Rust version: stable
  • OS: macOS (Darwin 24.6.0)

Errors

1. Arrow Version Mismatch

The crate specifies arrow-array = "55.2.0" but lancedb 0.22.3 requires arrow 56.2.0:

error[E0277]: the trait bound `RecordBatchIterator<Map<..., ...>>: RecordBatchReader` is not satisfied
note: there are multiple different versions of crate `arrow_array` in the dependency graph

2. Missing async-openai Feature Flags

The ask module imports from async-openai but the required features aren't enabled:

error[E0432]: unresolved import `async_openai::config`
note: the item is gated behind the `_api` feature

error[E0432]: unresolved import `async_openai::types::chat`
note: the item is gated behind the `chat-completion-types` feature

error[E0432]: unresolved import `async_openai::types::responses`
note: the item is gated behind the `response-types` feature

Reproduction

cargo install semtools

Workaround

Installing without the problematic features works:

cargo install semtools --no-default-features --features=parse,search

Suggested Fix

Update Cargo.toml:

# Align arrow versions with lancedb 0.22.3
arrow-schema = { version = "56.2.0", optional = true }
arrow-array = { version = "56.2.0", optional = true }

# Add required async-openai features
async-openai = { version = "0.31.0-alpha.14", features = ["_api", "chat-completion-types", "response-types"], optional = true }

Full Error Log

Click to expand full compilation errors
error[E0432]: unresolved import `async_openai::config`
   --> src/ask/chat_agent.rs:2:19
error[E0432]: unresolved import `async_openai::types::chat`
   --> src/ask/chat_agent.rs:3:26
error[E0432]: unresolved imports `async_openai::Client`, `async_openai::types::chat`
   --> src/ask/chat_agent.rs:8:20
error[E0432]: unresolved import `async_openai::Client`
   --> src/ask/responses_agent.rs:2:5
error[E0432]: unresolved import `async_openai::config`
   --> src/ask/responses_agent.rs:3:19
error[E0432]: unresolved import `async_openai::types::responses`
   --> src/ask/responses_agent.rs:4:26
error[E0432]: unresolved import `async_openai::types::chat`
   --> src/ask/tools.rs:2:26
error[E0432]: unresolved import `async_openai::types::responses`
   --> src/ask/tools.rs:3:26
error[E0277]: the trait bound `Vec<RecordBatch>: Extend<arrow_array::record_batch::RecordBatch>` is not satisfied
   --> src/workspace/store.rs:135:18
error[E0277]: the trait bound `RecordBatchIterator<Map<..., ...>>: RecordBatchReader` is not satisfied
   --> src/workspace/store.rs:341:44
Originally created by @romeromarcelo on GitHub (Nov 26, 2025). ## Description `cargo install semtools` fails to compile on version 1.4.0 due to dependency conflicts. ## Environment - **semtools version**: 1.4.0 - **Rust version**: stable - **OS**: macOS (Darwin 24.6.0) ## Errors ### 1. Arrow Version Mismatch The crate specifies `arrow-array = "55.2.0"` but `lancedb 0.22.3` requires `arrow 56.2.0`: ``` error[E0277]: the trait bound `RecordBatchIterator<Map<..., ...>>: RecordBatchReader` is not satisfied note: there are multiple different versions of crate `arrow_array` in the dependency graph ``` ### 2. Missing async-openai Feature Flags The `ask` module imports from `async-openai` but the required features aren't enabled: ``` error[E0432]: unresolved import `async_openai::config` note: the item is gated behind the `_api` feature error[E0432]: unresolved import `async_openai::types::chat` note: the item is gated behind the `chat-completion-types` feature error[E0432]: unresolved import `async_openai::types::responses` note: the item is gated behind the `response-types` feature ``` ## Reproduction ```bash cargo install semtools ``` ## Workaround Installing without the problematic features works: ```bash cargo install semtools --no-default-features --features=parse,search ``` ## Suggested Fix Update `Cargo.toml`: ```toml # Align arrow versions with lancedb 0.22.3 arrow-schema = { version = "56.2.0", optional = true } arrow-array = { version = "56.2.0", optional = true } # Add required async-openai features async-openai = { version = "0.31.0-alpha.14", features = ["_api", "chat-completion-types", "response-types"], optional = true } ``` ## Full Error Log <details> <summary>Click to expand full compilation errors</summary> ``` error[E0432]: unresolved import `async_openai::config` --> src/ask/chat_agent.rs:2:19 error[E0432]: unresolved import `async_openai::types::chat` --> src/ask/chat_agent.rs:3:26 error[E0432]: unresolved imports `async_openai::Client`, `async_openai::types::chat` --> src/ask/chat_agent.rs:8:20 error[E0432]: unresolved import `async_openai::Client` --> src/ask/responses_agent.rs:2:5 error[E0432]: unresolved import `async_openai::config` --> src/ask/responses_agent.rs:3:19 error[E0432]: unresolved import `async_openai::types::responses` --> src/ask/responses_agent.rs:4:26 error[E0432]: unresolved import `async_openai::types::chat` --> src/ask/tools.rs:2:26 error[E0432]: unresolved import `async_openai::types::responses` --> src/ask/tools.rs:3:26 error[E0277]: the trait bound `Vec<RecordBatch>: Extend<arrow_array::record_batch::RecordBatch>` is not satisfied --> src/workspace/store.rs:135:18 error[E0277]: the trait bound `RecordBatchIterator<Map<..., ...>>: RecordBatchReader` is not satisfied --> src/workspace/store.rs:341:44 ``` </details>
yindo closed this issue 2026-02-16 04:15:10 -05:00
Author
Owner

@romeromarcelo commented on GitHub (Nov 26, 2025):

Complete Fix

I've identified and fixed all the issues. Here's the complete solution:

Fix 1: Update Arrow versions in Cargo.toml

 # Workspace-specific dependencies
 lancedb = { version = "0.22.0", default-features = false, optional = true }
-arrow-schema = { version = "55.2.0", optional = true }
-arrow-array = { version = "55.2.0", optional = true }
+arrow-schema = { version = "56.2.0", optional = true }
+arrow-array = { version = "56.2.0", optional = true }
 rand = { version = "0.8.5", optional = true }

Fix 2: Update async-openai dependency in Cargo.toml

 # Ask dependencies
-async-openai = { version = "0.31.0-alpha.10", optional = true }
+async-openai = { version = "0.31.0-alpha.14", features = ["chat-completion", "responses"], optional = true }

Note: The key insight is that chat-completion and responses features include both the types AND the API methods. Using just chat-completion-types and response-types only provides the type definitions without the client.chat() and client.responses() methods.

Fix 3: Update src/ask/responses_agent.rs for API changes

The InputItem::text_message() helper method was removed in the alpha API. Update the imports and initialization:

 use async_openai::types::responses::{
-    CreateResponseArgs, FunctionCallOutput, FunctionCallOutputItemParam, FunctionToolCall,
-    InputItem, InputParam, Item, MessageItem, OutputItem, Role, Tool,
+    CreateResponseArgs, EasyInputContent, EasyInputMessage, FunctionCallOutput,
+    FunctionCallOutputItemParam, FunctionToolCall, InputItem, InputParam, Item, MessageItem,
+    MessageType, OutputItem, Role, Tool,
 };

And update line 46:

     // Initialize input items with user message
     // Note: For Responses API, we use the instructions parameter for the system prompt
-    let mut input_items: Vec<InputItem> = vec![InputItem::text_message(Role::User, user_message)];
+    let mut input_items: Vec<InputItem> = vec![InputItem::EasyMessage(EasyInputMessage {
+        r#type: MessageType::Message,
+        role: Role::User,
+        content: EasyInputContent::Text(user_message.to_string()),
+    })];

Verification

After applying these fixes, all 4 binaries compile and install successfully:

$ cargo install --path . --force
  Installing semtools v1.4.0
   Compiling semtools v1.4.0
    Finished `release` profile [optimized] target(s) in 24.62s
  Installing /Users/.../.cargo/bin/ask
  Installing /Users/.../.cargo/bin/parse
  Installing /Users/.../.cargo/bin/search
  Installing /Users/.../.cargo/bin/workspace

$ parse --version && search --version && workspace --version && ask --version
semtools 1.4.0
semtools 1.4.0
semtools 1.4.0
semtools 1.4.0

All features now work: parse, search, workspace, and ask.

@romeromarcelo commented on GitHub (Nov 26, 2025): ## Complete Fix I've identified and fixed all the issues. Here's the complete solution: ### Fix 1: Update Arrow versions in `Cargo.toml` ```diff # Workspace-specific dependencies lancedb = { version = "0.22.0", default-features = false, optional = true } -arrow-schema = { version = "55.2.0", optional = true } -arrow-array = { version = "55.2.0", optional = true } +arrow-schema = { version = "56.2.0", optional = true } +arrow-array = { version = "56.2.0", optional = true } rand = { version = "0.8.5", optional = true } ``` ### Fix 2: Update async-openai dependency in `Cargo.toml` ```diff # Ask dependencies -async-openai = { version = "0.31.0-alpha.10", optional = true } +async-openai = { version = "0.31.0-alpha.14", features = ["chat-completion", "responses"], optional = true } ``` **Note:** The key insight is that `chat-completion` and `responses` features include both the types AND the API methods. Using just `chat-completion-types` and `response-types` only provides the type definitions without the `client.chat()` and `client.responses()` methods. ### Fix 3: Update `src/ask/responses_agent.rs` for API changes The `InputItem::text_message()` helper method was removed in the alpha API. Update the imports and initialization: ```diff use async_openai::types::responses::{ - CreateResponseArgs, FunctionCallOutput, FunctionCallOutputItemParam, FunctionToolCall, - InputItem, InputParam, Item, MessageItem, OutputItem, Role, Tool, + CreateResponseArgs, EasyInputContent, EasyInputMessage, FunctionCallOutput, + FunctionCallOutputItemParam, FunctionToolCall, InputItem, InputParam, Item, MessageItem, + MessageType, OutputItem, Role, Tool, }; ``` And update line 46: ```diff // Initialize input items with user message // Note: For Responses API, we use the instructions parameter for the system prompt - let mut input_items: Vec<InputItem> = vec![InputItem::text_message(Role::User, user_message)]; + let mut input_items: Vec<InputItem> = vec![InputItem::EasyMessage(EasyInputMessage { + r#type: MessageType::Message, + role: Role::User, + content: EasyInputContent::Text(user_message.to_string()), + })]; ``` ### Verification After applying these fixes, all 4 binaries compile and install successfully: ``` $ cargo install --path . --force Installing semtools v1.4.0 Compiling semtools v1.4.0 Finished `release` profile [optimized] target(s) in 24.62s Installing /Users/.../.cargo/bin/ask Installing /Users/.../.cargo/bin/parse Installing /Users/.../.cargo/bin/search Installing /Users/.../.cargo/bin/workspace $ parse --version && search --version && workspace --version && ask --version semtools 1.4.0 semtools 1.4.0 semtools 1.4.0 semtools 1.4.0 ``` All features now work: `parse`, `search`, `workspace`, and `ask`.
Author
Owner

@logan-markewich commented on GitHub (Nov 27, 2025):

This is pretty weird, since it installs fine for me 😅 but, I can apply these fixes, I appreciate the deep dive

@logan-markewich commented on GitHub (Nov 27, 2025): This is pretty weird, since it installs fine for me 😅 but, I can apply these fixes, I appreciate the deep dive
Author
Owner

@logan-markewich commented on GitHub (Nov 27, 2025):

Should be fixed in v1.5.1

@logan-markewich commented on GitHub (Nov 27, 2025): Should be fixed in v1.5.1
Author
Owner

@romeromarcelo commented on GitHub (Nov 27, 2025):

This is pretty weird, since it installs fine for me 😅 but, I can apply these fixes, I appreciate the deep dive
Thanks, Claude, for that 😅

And thank you for the quick fix, @logan-markewich

@romeromarcelo commented on GitHub (Nov 27, 2025): > This is pretty weird, since it installs fine for me 😅 but, I can apply these fixes, I appreciate the deep dive Thanks, Claude, for that 😅 And thank you for the quick fix, @logan-markewich
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: run-llama/semtools#15