[INFO] fetching crate cognate-llm 0.1.1... [INFO] testing cognate-llm-0.1.1 against 1.100.0-beta.13+cargoflags=--release for beta-release-1.101-3 [INFO] extracting crate cognate-llm 0.1.1 into /workspace/builds/worker-0-tc1/source [INFO] started tweaking crates.io crate cognate-llm 0.1.1 [INFO] finished tweaking crates.io crate cognate-llm 0.1.1 [INFO] tweaked toml for crates.io crate cognate-llm 0.1.1 written to /workspace/builds/worker-0-tc1/source/Cargo.toml [INFO] validating manifest of crates.io crate cognate-llm 0.1.1 on toolchain 1.100.0-beta.13 [INFO] running `"cargo" "+1.100.0-beta.13" "metadata" "--manifest-path" "Cargo.toml" "--no-deps"` [INFO] crate crates.io crate cognate-llm 0.1.1 already has a lockfile, it will not be regenerated [INFO] running `"cargo" "+1.100.0-beta.13" "fetch" "--manifest-path" "Cargo.toml"` [INFO] [stderr] Blocking waiting for file lock on package cache [INFO] [stderr] Updating crates.io index [INFO] [stderr] Blocking waiting for file lock on package cache [INFO] [stderr] Downloading crates ... [INFO] [stderr] Downloaded cognate-tools-derive v0.1.0 [INFO] [stderr] Downloaded cognate-tools v0.1.0 [INFO] [stderr] Downloaded cognate-core v0.1.0 [INFO] [stderr] Downloaded cognate-rag v0.1.0 [INFO] [stderr] Downloaded cognate-prompts-derive v0.1.0 [INFO] [stderr] Downloaded cognate-providers v0.1.0 [INFO] [stderr] Downloaded cognate-prompts v0.1.0 [INFO] [stderr] Downloaded cognate-axum v0.1.0 [INFO] running `"docker" "create" "-v" "/var/lib/crater-agent-workspace/builds/worker-0-tc1/source:/opt/rustwide/workdir:ro,Z" "-v" "/var/lib/crater-agent-workspace/builds/worker-0-tc1/target:/opt/rustwide/target:rw,Z" "-v" "/var/lib/crater-agent-workspace/cargo-home:/opt/rustwide/cargo-home:ro,Z" "-v" "/var/lib/crater-agent-workspace/rustup-home:/opt/rustwide/rustup-home:ro,Z" "-m" "1610612736" "--network" "none" "ghcr.io/rust-lang/crates-build-env/linux@sha256:13253766d39459fde29cea4e7c35a3fe37c2c19b4a224f71f2c27711c2837d36" "sleep" "infinity"` [INFO] [stdout] 3e44f2ddc8514077d7081b7fe668bdabc9191f93645949beebea4b1387f81982 [INFO] running `"docker" "start" "3e44f2ddc8514077d7081b7fe668bdabc9191f93645949beebea4b1387f81982"` [INFO] running `"docker" "inspect" "3e44f2ddc8514077d7081b7fe668bdabc9191f93645949beebea4b1387f81982"` [INFO] running `"docker" "exec" "-e" "SOURCE_DIR=/opt/rustwide/workdir" "-e" "CARGO_HOME=/opt/rustwide/cargo-home" "-e" "RUSTUP_HOME=/opt/rustwide/rustup-home" "-e" "CARGO_TARGET_DIR=/opt/rustwide/target" "-w" "/opt/rustwide/workdir" "--user" "0:0" "3e44f2ddc8514077d7081b7fe668bdabc9191f93645949beebea4b1387f81982" "/opt/rustwide/cargo-home/bin/cargo" "+1.100.0-beta.13" "metadata" "--no-deps" "--format-version=1"` [INFO] running `"docker" "inspect" "3e44f2ddc8514077d7081b7fe668bdabc9191f93645949beebea4b1387f81982"` [INFO] running `"docker" "exec" "-e" "SOURCE_DIR=/opt/rustwide/workdir" "-e" "CARGO_HOME=/opt/rustwide/cargo-home" "-e" "RUSTUP_HOME=/opt/rustwide/rustup-home" "-e" "CARGO_TARGET_DIR=/opt/rustwide/target" "-e" "CARGO_INCREMENTAL=0" "-e" "RUST_BACKTRACE=full" "-e" "RUSTFLAGS=--cap-lints=warn" "-e" "RUSTDOCFLAGS=--cap-lints=warn" "-w" "/opt/rustwide/workdir" "--user" "0:0" "3e44f2ddc8514077d7081b7fe668bdabc9191f93645949beebea4b1387f81982" "/opt/rustwide/cargo-home/bin/cargo" "+1.100.0-beta.13" "build" "--frozen" "--message-format=json" "--release"` [INFO] [stderr] Compiling libc v0.2.184 [INFO] [stderr] Compiling smallvec v1.15.1 [INFO] [stderr] Compiling parking_lot_core v0.9.12 [INFO] [stderr] Compiling scopeguard v1.2.0 [INFO] [stderr] Compiling futures-sink v0.3.32 [INFO] [stderr] Compiling cc v1.2.59 [INFO] [stderr] Compiling vcpkg v0.2.15 [INFO] [stderr] Compiling pkg-config v0.3.32 [INFO] [stderr] Compiling lock_api v0.4.14 [INFO] [stderr] Compiling futures-channel v0.3.32 [INFO] [stderr] Compiling futures-macro v0.3.32 [INFO] [stderr] Compiling http v1.4.0 [INFO] [stderr] Compiling futures-task v0.3.32 [INFO] [stderr] Compiling futures-io v0.3.32 [INFO] [stderr] Compiling serde_json v1.0.149 [INFO] [stderr] Compiling tracing-core v0.1.36 [INFO] [stderr] Compiling foreign-types-shared v0.1.1 [INFO] [stderr] Compiling hashbrown v0.16.1 [INFO] [stderr] Compiling httparse v1.10.1 [INFO] [stderr] Compiling percent-encoding v2.3.2 [INFO] [stderr] Compiling bitflags v2.11.0 [INFO] [stderr] Compiling openssl v0.10.76 [INFO] [stderr] Compiling tracing v0.1.44 [INFO] [stderr] Compiling futures-util v0.3.32 [INFO] [stderr] Compiling foreign-types v0.3.2 [INFO] [stderr] Compiling openssl-macros v0.1.1 [INFO] [stderr] Compiling fnv v1.0.7 [INFO] [stderr] Compiling tower-service v0.3.3 [INFO] [stderr] Compiling try-lock v0.2.5 [INFO] [stderr] Compiling http-body v1.0.1 [INFO] [stderr] Compiling atomic-waker v1.1.2 [INFO] [stderr] Compiling native-tls v0.2.18 [INFO] [stderr] Compiling memchr v2.8.0 [INFO] [stderr] Compiling indexmap v2.13.1 [INFO] [stderr] Compiling log v0.4.29 [INFO] [stderr] Compiling errno v0.3.14 [INFO] [stderr] Compiling signal-hook-registry v1.4.8 [INFO] [stderr] Compiling socket2 v0.6.3 [INFO] [stderr] Compiling parking_lot v0.12.5 [INFO] [stderr] Compiling mio v1.2.0 [INFO] [stderr] Compiling openssl-sys v0.9.112 [INFO] [stderr] Compiling want v0.3.1 [INFO] [stderr] Compiling icu_normalizer v2.2.0 [INFO] [stderr] Compiling tokio v1.51.1 [INFO] [stderr] Compiling openssl-probe v0.2.1 [INFO] [stderr] Compiling strsim v0.11.1 [INFO] [stderr] Compiling ident_case v1.0.1 [INFO] [stderr] Compiling idna_adapter v1.2.1 [INFO] [stderr] Compiling darling_core v0.20.11 [INFO] [stderr] Compiling form_urlencoded v1.2.2 [INFO] [stderr] Compiling sync_wrapper v1.0.2 [INFO] [stderr] Compiling thiserror v2.0.18 [INFO] [stderr] Compiling ipnet v2.12.0 [INFO] [stderr] Compiling tower-layer v0.3.3 [INFO] [stderr] Compiling idna v1.1.0 [INFO] [stderr] Compiling http-body-util v0.1.3 [INFO] [stderr] Compiling thiserror-impl v2.0.18 [INFO] [stderr] Compiling ryu v1.0.23 [INFO] [stderr] Compiling ucd-trie v0.1.7 [INFO] [stderr] Compiling iri-string v0.7.12 [INFO] [stderr] Compiling pest v2.8.6 [INFO] [stderr] Compiling rustls-pki-types v1.14.0 [INFO] [stderr] Compiling darling_macro v0.20.11 [INFO] [stderr] Compiling darling v0.20.11 [INFO] [stderr] Compiling serde_urlencoded v0.7.1 [INFO] [stderr] Compiling futures-executor v0.3.32 [INFO] [stderr] Compiling url v2.5.8 [INFO] [stderr] Compiling encoding_rs v0.8.35 [INFO] [stderr] Compiling serde_core v1.0.228 [INFO] [stderr] Compiling mime v0.3.17 [INFO] [stderr] Compiling pest_meta v2.8.6 [INFO] [stderr] Compiling futures v0.3.32 [INFO] [stderr] Compiling derive_builder_core v0.20.2 [INFO] [stderr] Compiling async-trait v0.1.89 [INFO] [stderr] Compiling derive_builder_macro v0.20.2 [INFO] [stderr] Compiling pest_generator v2.8.6 [INFO] [stderr] Compiling tokio-util v0.7.18 [INFO] [stderr] Compiling tokio-native-tls v0.3.1 [INFO] [stderr] Compiling tower v0.5.3 [INFO] [stderr] Compiling serde_derive_internals v0.29.1 [INFO] [stderr] Compiling h2 v0.4.13 [INFO] [stderr] Compiling tower-http v0.6.8 [INFO] [stderr] Compiling num-modular v0.6.1 [INFO] [stderr] Compiling schemars v0.8.22 [INFO] [stderr] Compiling schemars_derive v0.8.22 [INFO] [stderr] Compiling num-order v1.2.0 [INFO] [stderr] Compiling pest_derive v2.8.6 [INFO] [stderr] Compiling derive_builder v0.20.2 [INFO] [stderr] Compiling dyn-clone v1.0.20 [INFO] [stderr] Compiling cognate-prompts-derive v0.1.0 [INFO] [stderr] Compiling cognate-tools-derive v0.1.0 [INFO] [stderr] Compiling handlebars v6.4.0 [INFO] [stderr] Compiling hyper v1.9.0 [INFO] [stderr] Compiling hyper-util v0.1.20 [INFO] [stderr] Compiling hyper-tls v0.6.0 [INFO] [stderr] Compiling reqwest v0.12.28 [INFO] [stderr] Compiling cognate-core v0.1.0 [INFO] [stderr] Compiling cognate-providers v0.1.0 [INFO] [stderr] Compiling cognate-tools v0.1.0 [INFO] [stderr] Compiling cognate-prompts v0.1.0 [INFO] [stderr] Compiling cognate-llm v0.1.1 (/opt/rustwide/workdir) [INFO] [stderr] Finished `release` profile [optimized] target(s) in 2m 47s [INFO] running `"docker" "inspect" "3e44f2ddc8514077d7081b7fe668bdabc9191f93645949beebea4b1387f81982"` [INFO] running `"docker" "exec" "-e" "SOURCE_DIR=/opt/rustwide/workdir" "-e" "CARGO_HOME=/opt/rustwide/cargo-home" "-e" "RUSTUP_HOME=/opt/rustwide/rustup-home" "-e" "CARGO_TARGET_DIR=/opt/rustwide/target" "-e" "CARGO_INCREMENTAL=0" "-e" "RUST_BACKTRACE=full" "-e" "RUSTFLAGS=--cap-lints=warn" "-e" "RUSTDOCFLAGS=--cap-lints=warn" "-w" "/opt/rustwide/workdir" "--user" "0:0" "3e44f2ddc8514077d7081b7fe668bdabc9191f93645949beebea4b1387f81982" "/opt/rustwide/cargo-home/bin/cargo" "+1.100.0-beta.13" "test" "--frozen" "--no-run" "--message-format=json" "--release"` [INFO] [stderr] Compiling cognate-llm v0.1.1 (/opt/rustwide/workdir) [INFO] [stderr] Finished `release` profile [optimized] target(s) in 0.79s [INFO] running `"docker" "inspect" "3e44f2ddc8514077d7081b7fe668bdabc9191f93645949beebea4b1387f81982"` [INFO] running `"docker" "exec" "-e" "SOURCE_DIR=/opt/rustwide/workdir" "-e" "CARGO_HOME=/opt/rustwide/cargo-home" "-e" "RUSTUP_HOME=/opt/rustwide/rustup-home" "-e" "CARGO_TARGET_DIR=/opt/rustwide/target" "-e" "CARGO_INCREMENTAL=0" "-e" "RUST_BACKTRACE=full" "-e" "RUSTFLAGS=--cap-lints=warn" "-e" "RUSTDOCFLAGS=--cap-lints=warn" "-w" "/opt/rustwide/workdir" "--user" "0:0" "3e44f2ddc8514077d7081b7fe668bdabc9191f93645949beebea4b1387f81982" "/opt/rustwide/cargo-home/bin/cargo" "+1.100.0-beta.13" "test" "--frozen" "--release"` [INFO] [stderr] Finished `release` profile [optimized] target(s) in 0.24s [INFO] [stderr] Running unittests src/lib.rs (/opt/rustwide/target/release/build/cognate-llm/b30db20a35f986b3/out/cognate_llm-b30db20a35f986b3) [INFO] [stdout] [INFO] [stdout] running 0 tests [INFO] [stdout] [INFO] [stdout] test result: ok. 0 passed; 0 failed; 0 ignored; 0 measured; 0 filtered out; finished in 0.00s [INFO] [stdout] [INFO] [stderr] Doc-tests cognate_llm [INFO] [stdout] [INFO] [stdout] running 9 tests [INFO] [stdout] test src/lib.rs - (line 130) ... FAILED [INFO] [stdout] test src/lib.rs - (line 217) ... FAILED [INFO] [stdout] test src/lib.rs - (line 230) ... FAILED [INFO] [stdout] test src/lib.rs - (line 304) - compile ... FAILED [INFO] [stdout] test src/lib.rs - (line 246) ... FAILED [INFO] [stdout] test src/lib.rs - (line 73) ... FAILED [INFO] [stdout] test src/lib.rs - (line 196) ... FAILED [INFO] [stdout] test src/lib.rs - (line 179) ... FAILED [INFO] [stdout] test src/lib.rs - (line 98) ... FAILED [INFO] [stdout] [INFO] [stdout] failures: [INFO] [stdout] [INFO] [stdout] ---- src/lib.rs - (line 130) stdout ---- [INFO] [stdout] error: expected item, found keyword `let` [INFO] [stdout] --> src/lib.rs:134:1 [INFO] [stdout] | [INFO] [stdout] 134 | let provider = /* ... */; [INFO] [stdout] | ^^^ [INFO] [stdout] | | [INFO] [stdout] | `let` cannot be used for global variables [INFO] [stdout] | help: consider using `static` or `const` instead of `let` [INFO] [stdout] | [INFO] [stdout] = note: for a full list of items that can appear in modules, see [INFO] [stdout] [INFO] [stdout] error: aborting due to 1 previous error [INFO] [stdout] [INFO] [stdout] Couldn't compile the test. [INFO] [stdout] ---- src/lib.rs - (line 217) stdout ---- [INFO] [stdout] error[E0432]: unresolved import `tracing` [INFO] [stdout] --> src/lib.rs:218:5 [INFO] [stdout] | [INFO] [stdout] 218 | use tracing::{info, span, Level}; [INFO] [stdout] | ^^^^^^^ use of unresolved module or unlinked crate `tracing` [INFO] [stdout] | [INFO] [stdout] = help: if you wanted to use a crate named `tracing`, use `cargo add tracing` to add it to your `Cargo.toml` [INFO] [stdout] [INFO] [stdout] error[E0425]: cannot find value `provider` in this scope [INFO] [stdout] --> src/lib.rs:223:16 [INFO] [stdout] | [INFO] [stdout] 223 | let response = provider.complete(request).await?; [INFO] [stdout] | ^^^^^^^^ not found in this scope [INFO] [stdout] [INFO] [stdout] error[E0425]: cannot find value `request` in this scope [INFO] [stdout] --> src/lib.rs:223:34 [INFO] [stdout] | [INFO] [stdout] 223 | let response = provider.complete(request).await?; [INFO] [stdout] | ^^^^^^^ not found in this scope [INFO] [stdout] [INFO] [stdout] error[E0728]: `await` is only allowed inside `async` functions and blocks [INFO] [stdout] --> src/lib.rs:223:43 [INFO] [stdout] | [INFO] [stdout] 217 | fn main() { #[allow(non_snake_case)] fn _doctest_main_src_lib_rs_217_0() { [INFO] [stdout] | ----------------------------------- this is not `async` [INFO] [stdout] ... [INFO] [stdout] 223 | let response = provider.complete(request).await?; [INFO] [stdout] | ^^^^^ only allowed inside `async` functions and blocks [INFO] [stdout] [INFO] [stdout] error: aborting due to 4 previous errors [INFO] [stdout] [INFO] [stdout] Some errors have detailed explanations: E0425, E0432, E0728. [INFO] [stdout] For more information about an error, try `rustc --explain E0425`. [INFO] [stdout] Couldn't compile the test. [INFO] [stdout] ---- src/lib.rs - (line 230) stdout ---- [INFO] [stdout] error[E0425]: cannot find value `provider` in this scope [INFO] [stdout] --> src/lib.rs:233:7 [INFO] [stdout] | [INFO] [stdout] 233 | match provider.complete(request).await { [INFO] [stdout] | ^^^^^^^^ not found in this scope [INFO] [stdout] [INFO] [stdout] error[E0425]: cannot find value `request` in this scope [INFO] [stdout] --> src/lib.rs:233:25 [INFO] [stdout] | [INFO] [stdout] 233 | match provider.complete(request).await { [INFO] [stdout] | ^^^^^^^ not found in this scope [INFO] [stdout] [INFO] [stdout] error[E0728]: `await` is only allowed inside `async` functions and blocks [INFO] [stdout] --> src/lib.rs:233:34 [INFO] [stdout] | [INFO] [stdout] 230 | fn main() { #[allow(non_snake_case)] fn _doctest_main_src_lib_rs_230_0() { [INFO] [stdout] | ----------------------------------- this is not `async` [INFO] [stdout] ... [INFO] [stdout] 233 | match provider.complete(request).await { [INFO] [stdout] | ^^^^^ only allowed inside `async` functions and blocks [INFO] [stdout] [INFO] [stdout] error[E0599]: no variant named `RateLimited` found for enum `cognate_core::Error` [INFO] [stdout] --> src/lib.rs:235:16 [INFO] [stdout] | [INFO] [stdout] 235 | Err(Error::RateLimited { retry_after }) => { [INFO] [stdout] | ^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] help: there is a variant with a similar name [INFO] [stdout] | [INFO] [stdout] 235 - Err(Error::RateLimited { retry_after }) => { [INFO] [stdout] 235 + Err(Error::RateLimit { retry_after }) => { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] error: aborting due to 4 previous errors [INFO] [stdout] [INFO] [stdout] Some errors have detailed explanations: E0425, E0599, E0728. [INFO] [stdout] For more information about an error, try `rustc --explain E0425`. [INFO] [stdout] Couldn't compile the test. [INFO] [stdout] ---- src/lib.rs - (line 304) stdout ---- [INFO] [stdout] error[E0433]: cannot find module or crate `cognate` in this scope [INFO] [stdout] --> src/lib.rs:305:5 [INFO] [stdout] | [INFO] [stdout] 305 | use cognate::prelude::*; [INFO] [stdout] | ^^^^^^^ use of unresolved module or unlinked crate `cognate` [INFO] [stdout] | [INFO] [stdout] = help: if you wanted to use a crate named `cognate`, use `cargo add cognate` to add it to your `Cargo.toml` [INFO] [stdout] [INFO] [stdout] error[E0433]: cannot find module or crate `tokio` in this scope [INFO] [stdout] --> src/lib.rs:307:3 [INFO] [stdout] | [INFO] [stdout] 307 | #[tokio::main] [INFO] [stdout] | ^^^^^ use of unresolved module or unlinked crate `tokio` [INFO] [stdout] [INFO] [stdout] error[E0433]: cannot find module or crate `cognate` in this scope [INFO] [stdout] --> src/lib.rs:309:18 [INFO] [stdout] | [INFO] [stdout] 309 | let client = cognate::providers::OpenAiProvider::new("sk-...".to_string()); [INFO] [stdout] | ^^^^^^^ use of unresolved module or unlinked crate `cognate` [INFO] [stdout] | [INFO] [stdout] = help: if you wanted to use a crate named `cognate`, use `cargo add cognate` to add it to your `Cargo.toml` [INFO] [stdout] [INFO] [stdout] error[E0752]: `main` function is not allowed to be `async` [INFO] [stdout] --> src/lib.rs:308:1 [INFO] [stdout] | [INFO] [stdout] 308 | async fn main() { [INFO] [stdout] | ^^^^^^^^^^^^^^^ `main` function is not allowed to be `async` [INFO] [stdout] [INFO] [stdout] error: aborting due to 4 previous errors [INFO] [stdout] [INFO] [stdout] Some errors have detailed explanations: E0433, E0752. [INFO] [stdout] For more information about an error, try `rustc --explain E0433`. [INFO] [stdout] Couldn't compile the test. [INFO] [stdout] ---- src/lib.rs - (line 246) stdout ---- [INFO] [stdout] error[E0425]: cannot find value `request` in this scope [INFO] [stdout] --> src/lib.rs:252:30 [INFO] [stdout] | [INFO] [stdout] 252 | let response = mock.complete(request).await?; [INFO] [stdout] | ^^^^^^^ not found in this scope [INFO] [stdout] [INFO] [stdout] error[E0728]: `await` is only allowed inside `async` functions and blocks [INFO] [stdout] --> src/lib.rs:252:39 [INFO] [stdout] | [INFO] [stdout] 246 | fn main() { #[allow(non_snake_case)] fn _doctest_main_src_lib_rs_246_0() { [INFO] [stdout] | ----------------------------------- this is not `async` [INFO] [stdout] ... [INFO] [stdout] 252 | let response = mock.complete(request).await?; [INFO] [stdout] | ^^^^^ only allowed inside `async` functions and blocks [INFO] [stdout] [INFO] [stdout] error[E0599]: no method named `queue_response` found for struct `MockProvider` in the current scope [INFO] [stdout] --> src/lib.rs:250:6 [INFO] [stdout] | [INFO] [stdout] 249 | let mock = MockProvider::new() [INFO] [stdout] 250 | .queue_response(Response::text("Hello, world!")); [INFO] [stdout] | ^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] help: there is a method `push_response` with a similar name [INFO] [stdout] | [INFO] [stdout] 250 - .queue_response(Response::text("Hello, world!")); [INFO] [stdout] 250 + .push_response(Response::text("Hello, world!")); [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] error[E0433]: cannot find type `Response` in this scope [INFO] [stdout] --> src/lib.rs:250:21 [INFO] [stdout] | [INFO] [stdout] 250 | .queue_response(Response::text("Hello, world!")); [INFO] [stdout] | ^^^^^^^^ use of undeclared type `Response` [INFO] [stdout] [INFO] [stdout] error: aborting due to 4 previous errors [INFO] [stdout] [INFO] [stdout] Some errors have detailed explanations: E0425, E0433, E0599, E0728. [INFO] [stdout] For more information about an error, try `rustc --explain E0425`. [INFO] [stdout] Couldn't compile the test. [INFO] [stdout] ---- src/lib.rs - (line 73) stdout ---- [INFO] [stdout] error[E0433]: cannot find module or crate `tokio` in this scope [INFO] [stdout] --> src/lib.rs:77:3 [INFO] [stdout] | [INFO] [stdout] 77 | #[tokio::main] [INFO] [stdout] | ^^^^^ use of unresolved module or unlinked crate `tokio` [INFO] [stdout] [INFO] [stdout] error[E0752]: `main` function is not allowed to be `async` [INFO] [stdout] --> src/lib.rs:78:1 [INFO] [stdout] | [INFO] [stdout] 78 | async fn main() -> Result<(), Box> { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ `main` function is not allowed to be `async` [INFO] [stdout] [INFO] [stdout] error: aborting due to 2 previous errors [INFO] [stdout] [INFO] [stdout] Some errors have detailed explanations: E0433, E0752. [INFO] [stdout] For more information about an error, try `rustc --explain E0433`. [INFO] [stdout] Couldn't compile the test. [INFO] [stdout] ---- src/lib.rs - (line 196) stdout ---- [INFO] [stdout] error[E0432]: unresolved import `async_trait` [INFO] [stdout] --> src/lib.rs:198:5 [INFO] [stdout] | [INFO] [stdout] 198 | use async_trait::async_trait; [INFO] [stdout] | ^^^^^^^^^^^ use of unresolved module or unlinked crate `async_trait` [INFO] [stdout] | [INFO] [stdout] = help: if you wanted to use a crate named `async_trait`, use `cargo add async_trait` to add it to your `Cargo.toml` [INFO] [stdout] [INFO] [stdout] error[E0195]: lifetime parameters or bounds on method `complete` do not match the trait declaration [INFO] [stdout] --> src/lib.rs:204:22 [INFO] [stdout] | [INFO] [stdout] 204 | async fn complete(&self, req: Request) -> cognate_core::Result { [INFO] [stdout] | ^ lifetimes do not match method in trait [INFO] [stdout] | [INFO] [stdout] ::: /opt/rustwide/cargo-home/registry/src/index.crates.io-1949cf8c6b5b557f/cognate-core-0.1.0/src/lib.rs:71:5 [INFO] [stdout] | [INFO] [stdout] 71 | async fn complete(&self, req: Request) -> Result; [INFO] [stdout] | ----------------------------------------------------------- lifetimes in impl do not match this method in trait [INFO] [stdout] [INFO] [stdout] error[E0046]: not all trait items implemented, missing: `stream` [INFO] [stdout] --> src/lib.rs:203:1 [INFO] [stdout] | [INFO] [stdout] 203 | impl Provider for MyProvider { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ missing `stream` in implementation [INFO] [stdout] | [INFO] [stdout] = help: implement the missing item: `fn stream<'life0: 'async_trait, 'async_trait>(&'life0 self, _: cognate_core::Request) -> Pin> + Send + 'static)>>, cognate_core::Error>> + Send + 'async_trait)>> { todo!() }` [INFO] [stdout] [INFO] [stdout] error: aborting due to 3 previous errors [INFO] [stdout] [INFO] [stdout] Some errors have detailed explanations: E0046, E0195, E0432. [INFO] [stdout] For more information about an error, try `rustc --explain E0046`. [INFO] [stdout] Couldn't compile the test. [INFO] [stdout] ---- src/lib.rs - (line 179) stdout ---- [INFO] [stdout] error[E0425]: cannot find value `api_key` in this scope [INFO] [stdout] --> src/lib.rs:183:36 [INFO] [stdout] | [INFO] [stdout] 183 | let provider = OpenAiProvider::new(api_key)? [INFO] [stdout] | ^^^^^^^ not found in this scope [INFO] [stdout] [INFO] [stdout] error[E0277]: the `?` operator can only be used in a function that returns `Result` or `Option` (or another type that implements `FromResidual`) [INFO] [stdout] --> src/lib.rs:183:44 [INFO] [stdout] | [INFO] [stdout] 179 | fn main() { #[allow(non_snake_case)] fn _doctest_main_src_lib_rs_179_0() { [INFO] [stdout] | ----------------------------------- this function should return `Result` or `Option` to accept `?` [INFO] [stdout] ... [INFO] [stdout] 183 | let provider = OpenAiProvider::new(api_key)? [INFO] [stdout] | ^ cannot use the `?` operator in a function that returns `()` [INFO] [stdout] | [INFO] [stdout] help: consider adding return type [INFO] [stdout] | [INFO] [stdout] 179 ~ fn main() { #[allow(non_snake_case)] fn _doctest_main_src_lib_rs_179_0() -> Result<(), Box> { [INFO] [stdout] 180 | use cognate_providers::{OpenAiProvider, RetryConfig}; [INFO] [stdout] ... [INFO] [stdout] 189 | }); [INFO] [stdout] 190 + Ok(()) [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] error[E0599]: no method named `with_timeout` found for struct `OpenAiProvider` in the current scope [INFO] [stdout] --> src/lib.rs:184:6 [INFO] [stdout] | [INFO] [stdout] 183 | let provider = OpenAiProvider::new(api_key)? [INFO] [stdout] 184 | .with_timeout(Duration::from_secs(30)) [INFO] [stdout] | ^^^^^^^^^^^^ method not found in `OpenAiProvider` [INFO] [stdout] [INFO] [stdout] error[E0560]: struct `RetryConfig` has no field named `initial_backoff` [INFO] [stdout] --> src/lib.rs:187:9 [INFO] [stdout] | [INFO] [stdout] 187 | initial_backoff: Duration::from_millis(100), [INFO] [stdout] | ^^^^^^^^^^^^^^^ `RetryConfig` does not have this field [INFO] [stdout] | [INFO] [stdout] = note: available fields are: `min_delay`, `max_delay`, `factor` [INFO] [stdout] [INFO] [stdout] error[E0560]: struct `RetryConfig` has no field named `max_backoff` [INFO] [stdout] --> src/lib.rs:188:9 [INFO] [stdout] | [INFO] [stdout] 188 | max_backoff: Duration::from_secs(10), [INFO] [stdout] | ^^^^^^^^^^^ `RetryConfig` does not have this field [INFO] [stdout] | [INFO] [stdout] = note: available fields are: `min_delay`, `max_delay`, `factor` [INFO] [stdout] [INFO] [stdout] error: aborting due to 5 previous errors [INFO] [stdout] [INFO] [stdout] Some errors have detailed explanations: E0277, E0425, E0560, E0599. [INFO] [stdout] For more information about an error, try `rustc --explain E0277`. [INFO] [stdout] Couldn't compile the test. [INFO] [stdout] ---- src/lib.rs - (line 98) stdout ---- [INFO] [stdout] error[E0432]: unresolved import `serde` [INFO] [stdout] --> src/lib.rs:101:5 [INFO] [stdout] | [INFO] [stdout] 101 | use serde::{Deserialize, Serialize}; [INFO] [stdout] | ^^^^^ use of unresolved module or unlinked crate `serde` [INFO] [stdout] | [INFO] [stdout] = help: if you wanted to use a crate named `serde`, use `cargo add serde` to add it to your `Cargo.toml` [INFO] [stdout] [INFO] [stdout] error[E0432]: unresolved import `schemars` [INFO] [stdout] --> src/lib.rs:102:5 [INFO] [stdout] | [INFO] [stdout] 102 | use schemars::JsonSchema; [INFO] [stdout] | ^^^^^^^^ use of unresolved module or unlinked crate `schemars` [INFO] [stdout] | [INFO] [stdout] = help: if you wanted to use a crate named `schemars`, use `cargo add schemars` to add it to your `Cargo.toml` [INFO] [stdout] [INFO] [stdout] error[E0433]: cannot find module or crate `async_trait` in this scope [INFO] [stdout] --> src/lib.rs:104:10 [INFO] [stdout] | [INFO] [stdout] 104 | #[derive(Tool, Serialize, Deserialize, JsonSchema)] [INFO] [stdout] | ^^^^ use of unresolved module or unlinked crate `async_trait` [INFO] [stdout] | [INFO] [stdout] = note: this error originates in the derive macro `Tool` (in Nightly builds, run with -Z macro-backtrace for more info) [INFO] [stdout] [INFO] [stdout] error[E0433]: cannot find module or crate `schemars` in this scope [INFO] [stdout] --> src/lib.rs:104:10 [INFO] [stdout] | [INFO] [stdout] 104 | #[derive(Tool, Serialize, Deserialize, JsonSchema)] [INFO] [stdout] | ^^^^ use of unresolved module or unlinked crate `schemars` [INFO] [stdout] | [INFO] [stdout] = note: this error originates in the derive macro `Tool` (in Nightly builds, run with -Z macro-backtrace for more info) [INFO] [stdout] [INFO] [stdout] error[E0423]: cannot find value `Calculator` in this scope [INFO] [stdout] --> src/lib.rs:125:16 [INFO] [stdout] | [INFO] [stdout] 106 | / struct Calculator { [INFO] [stdout] 107 | | /// First number [INFO] [stdout] 108 | | a: i32, [INFO] [stdout] 109 | | /// Second number [INFO] [stdout] 110 | | b: i32, [INFO] [stdout] 111 | | } [INFO] [stdout] | |_- `Calculator` defined here [INFO] [stdout] ... [INFO] [stdout] 125 | .with_tool(Calculator); [INFO] [stdout] | ^^^^^^^^^^ help: use struct literal syntax instead: `Calculator { a: val, b: val }` [INFO] [stdout] | [INFO] [stdout] = note: a struct named `Calculator` exists in another namespace [INFO] [stdout] [INFO] [stdout] error[E0195]: lifetime parameters or bounds on method `call` do not match the trait declaration [INFO] [stdout] --> src/lib.rs:104:14 [INFO] [stdout] | [INFO] [stdout] 104 | #[derive(Tool, Serialize, Deserialize, JsonSchema)] [INFO] [stdout] | ^ lifetimes do not match method in trait [INFO] [stdout] | [INFO] [stdout] ::: /opt/rustwide/cargo-home/registry/src/index.crates.io-1949cf8c6b5b557f/cognate-tools-0.1.0/src/lib.rs:66:5 [INFO] [stdout] | [INFO] [stdout] 66 | / async fn call( [INFO] [stdout] 67 | | &self, [INFO] [stdout] 68 | | params: serde_json::Value, [INFO] [stdout] 69 | | ) -> Result>; [INFO] [stdout] | |_____________________________________________________________________________- lifetimes in impl do not match this method in trait [INFO] [stdout] | [INFO] [stdout] = note: this error originates in the derive macro `Tool` (in Nightly builds, run with -Z macro-backtrace for more info) [INFO] [stdout] [INFO] [stdout] error[E0433]: cannot find module or crate `serde_json` in this scope [INFO] [stdout] --> src/lib.rs:104:10 [INFO] [stdout] | [INFO] [stdout] 104 | #[derive(Tool, Serialize, Deserialize, JsonSchema)] [INFO] [stdout] | ^^^^ use of unresolved module or unlinked crate `serde_json` [INFO] [stdout] | [INFO] [stdout] = help: if you wanted to use a crate named `serde_json`, use `cargo add serde_json` to add it to your `Cargo.toml` [INFO] [stdout] = note: this error originates in the derive macro `Tool` (in Nightly builds, run with -Z macro-backtrace for more info) [INFO] [stdout] [INFO] [stdout] error[E0599]: no method named `with_tool` found for struct `cognate_core::Request` in the current scope [INFO] [stdout] --> src/lib.rs:125:6 [INFO] [stdout] | [INFO] [stdout] 120 | let request = Request::new() [INFO] [stdout] 121 | .with_model("gpt-4o") [INFO] [stdout] 122 | .with_messages(vec![ [INFO] [stdout] 123 | Message::user("What is 15 + 23?"), [INFO] [stdout] 124 | ]) [INFO] [stdout] 125 | .with_tool(Calculator); [INFO] [stdout] | ^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] help: there is a method `with_model` with a similar name [INFO] [stdout] | [INFO] [stdout] 125 - .with_tool(Calculator); [INFO] [stdout] 125 + .with_model(Calculator); [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] error: aborting due to 8 previous errors [INFO] [stdout] [INFO] [stdout] Some errors have detailed explanations: E0195, E0423, E0432, E0433, E0599. [INFO] [stdout] For more information about an error, try `rustc --explain E0195`. [INFO] [stdout] Couldn't compile the test. [INFO] [stdout] [INFO] [stdout] failures: [INFO] [stdout] src/lib.rs - (line 130) [INFO] [stdout] src/lib.rs - (line 179) [INFO] [stdout] src/lib.rs - (line 196) [INFO] [stdout] src/lib.rs - (line 217) [INFO] [stdout] src/lib.rs - (line 230) [INFO] [stdout] src/lib.rs - (line 246) [INFO] [stdout] src/lib.rs - (line 304) [INFO] [stdout] src/lib.rs - (line 73) [INFO] [stdout] src/lib.rs - (line 98) [INFO] [stdout] [INFO] [stdout] test result: FAILED. 0 passed; 9 failed; 0 ignored; 0 measured; 0 filtered out; finished in 0.76s [INFO] [stdout] [INFO] [stderr] error: doctest failed, to rerun pass `--doc` [INFO] running `"docker" "inspect" "3e44f2ddc8514077d7081b7fe668bdabc9191f93645949beebea4b1387f81982"` [INFO] running `"docker" "rm" "-f" "3e44f2ddc8514077d7081b7fe668bdabc9191f93645949beebea4b1387f81982"` [INFO] [stdout] 3e44f2ddc8514077d7081b7fe668bdabc9191f93645949beebea4b1387f81982