Skip to content

Instantly share code, notes, and snippets.

@sxlijin
Created June 19, 2024 22:48
Show Gist options
  • Save sxlijin/65165e44bba9167b4c03cc2ab15d0005 to your computer and use it in GitHub Desktop.
Save sxlijin/65165e44bba9167b4c03cc2ab15d0005 to your computer and use it in GitHub Desktop.
maturin license-file.workspace log
~/sandbox/python-repro is 📦 v0.1.0 via 🐍 v3.12.3 | [0] at 15:45:16
❯ poetry remove baml-py; RUST_LOG=maturin=debug poetry run maturin build --manifest-path ~/baml/engine/language_client_python/Cargo.toml && poetry add ~/baml/engine/target/wheels/baml_py-0.40.0-cp38-abi3-macosx_11_0_arm64.whl
Updating dependencies
Resolving dependencies... (0.1s)
Package operations: 0 installs, 0 updates, 1 removal
- Removing baml-py (0.40.0 /Users/sam/baml/engine/target/wheels/baml_py-0.40.0-cp38-abi3-macosx_11_0_arm64.whl)
Writing lock file
2024-06-19T22:46:47.190696Z DEBUG into_build_context: maturin::project_layout: Using cargo manifest path from command line argument: "/Users/sam/baml/engine/language_client_python/Cargo.toml"
2024-06-19T22:46:47.190720Z DEBUG into_build_context:resolve_cargo_metadata: maturin::project_layout: Resolving cargo metadata from "/Users/sam/baml/engine/language_client_python/Cargo.toml"
2024-06-19T22:46:47.424911Z INFO into_build_context:resolve_cargo_metadata: maturin::project_layout: close time.busy=234ms time.idle=1.00µs
2024-06-19T22:46:47.425799Z DEBUG into_build_context: maturin::project_layout: Found pyproject.toml at "/Users/sam/baml/engine/language_client_python/pyproject.toml"
2024-06-19T22:46:47.425974Z DEBUG into_build_context:resolve_cargo_metadata: maturin::project_layout: Resolving cargo metadata from "/Users/sam/baml/engine/language_client_python/Cargo.toml"
2024-06-19T22:46:47.596025Z INFO into_build_context:resolve_cargo_metadata: maturin::project_layout: close time.busy=170ms time.idle=1.00µs
📦 Including license file "/Users/sam/baml/engine/language_client_python/LICENSE"
2024-06-19T22:46:47.596296Z DEBUG into_build_context: maturin::project_layout: Project layout resolved project_root=/Users/sam/baml/engine/language_client_python python_dir=/Users/sam/baml/engine/language_client_python/python_src rust_module=/Users/sam/baml/engine/language_client_python/python_src/baml_py python_module=/Users/sam/baml/engine/language_client_python/python_src/baml_py extension_name=baml_py module_name=baml_py
🍹 Building a mixed python/rust project
🔗 Found pyo3 bindings with abi3 support for Python ≥ 3.8
2024-06-19T22:46:47.647361Z DEBUG into_build_context:check_executable: maturin::python_interpreter: Found CPython interpreter at /Users/sam/Library/Caches/pypoetry/virtualenvs/python-repro-0_9WWp8L-py3.12/bin/python executable=python
2024-06-19T22:46:47.647393Z INFO into_build_context:check_executable: maturin::python_interpreter: close time.busy=19.8ms time.idle=11.7µs executable=python
🐍 Not using a specific python interpreter
📡 Using build options features from pyproject.toml
2024-06-19T22:46:47.647429Z INFO into_build_context: maturin::build_options: close time.busy=457ms time.idle=1.67µs
2024-06-19T22:46:47.647847Z DEBUG build_wheels: maturin::compile: Setting additional linker args for macOS: ["-C", "link-arg=-undefined", "-C", "link-arg=dynamic_lookup", "-C", "link-args=-Wl,-install_name,@rpath/baml_py.abi3.so"]
💻 Using `MACOSX_DEPLOYMENT_TARGET=11.0` for aarch64-apple-darwin by default
2024-06-19T22:46:47.682307Z DEBUG build_wheels: maturin::compile: Running env -u CARGO MACOSX_DEPLOYMENT_TARGET="11.0" "cargo" "rustc" "--features" "pyo3/extension-module" "--message-format" "json-render-diagnostics" "--manifest-path" "/Users/sam/baml/engine/language_client_python/Cargo.toml" "--lib" "--" "-C" "link-arg=-undefined" "-C" "link-arg=dynamic_lookup" "-C" "link-args=-Wl,-install_name,@rpath/baml_py.abi3.so"
warning: /Users/sam/baml/engine/language_client_ruby/ext/ruby_ffi/Cargo.toml: unused manifest key: dependencies.magnus.default
Blocking waiting for file lock on build directory
Compiling pyo3-build-config v0.21.2
warning: unused variable: `v`
--> baml-lib/baml-types/src/baml_value.rs:239:29
|
239 | fn visit_bytes<E>(self, v: &[u8]) -> Result<Self::Value, E>
| ^ help: if this is intentional, prefix it with an underscore: `_v`
|
= note: `#[warn(unused_variables)]` on by default
warning: unused variable: `v`
--> baml-lib/baml-types/src/baml_value.rs:253:28
|
253 | fn visit_i128<E>(self, v: i128) -> Result<Self::Value, E>
| ^ help: if this is intentional, prefix it with an underscore: `_v`
warning: unused variable: `v`
--> baml-lib/baml-types/src/baml_value.rs:260:28
|
260 | fn visit_u128<E>(self, v: u128) -> Result<Self::Value, E>
| ^ help: if this is intentional, prefix it with an underscore: `_v`
warning: `baml-types` (lib) generated 3 warnings
warning: unexpected `cfg` condition value: `use-pyo3`
--> baml-lib/parser-database/build.rs:3:11
|
3 | #[cfg(feature = "use-pyo3")]
| ^^^^^^^^^^^^^^^^^^^^
|
= note: expected values for `feature` are: `default`
= help: consider adding `use-pyo3` as a feature in `Cargo.toml`
= note: see <https://doc.rust-lang.org/nightly/rustc/check-cfg/cargo-specifics.html> for more information about checking conditional configuration
= note: `#[warn(unexpected_cfgs)]` on by default
warning: `internal-baml-parser-database` (build script) generated 1 warning
warning: unused variable: `e`
--> baml-lib/jinja/src/output_format/types.rs:311:37
|
311 | FieldType::Enum(e) => inner_str.len() > 15,
| ^ help: if this is intentional, prefix it with an underscore: `_e`
|
= note: `#[warn(unused_variables)]` on by default
warning: unused variable: `e`
--> baml-lib/jinja/src/output_format/mod.rs:27:23
|
27 | .map_err(|e| std::fmt::Error {})?;
| ^ help: if this is intentional, prefix it with an underscore: `_e`
warning: type `RenderSetting<std::string::String>` is more private than the item `RenderOptions::prefix`
--> baml-lib/jinja/src/output_format/types.rs:71:5
|
71 | pub prefix: RenderSetting<String>,
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ field `RenderOptions::prefix` is reachable at visibility `pub`
|
note: but type `RenderSetting<std::string::String>` is only usable at visibility `pub(self)`
--> baml-lib/jinja/src/output_format/types.rs:58:1
|
58 | enum RenderSetting<T> {
| ^^^^^^^^^^^^^^^^^^^^^
= note: `#[warn(private_interfaces)]` on by default
warning: type `RenderSetting<std::string::String>` is more private than the item `RenderOptions::enum_value_prefix`
--> baml-lib/jinja/src/output_format/types.rs:73:5
|
73 | pub enum_value_prefix: RenderSetting<String>,
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ field `RenderOptions::enum_value_prefix` is reachable at visibility `pub`
|
note: but type `RenderSetting<std::string::String>` is only usable at visibility `pub(self)`
--> baml-lib/jinja/src/output_format/types.rs:58:1
|
58 | enum RenderSetting<T> {
| ^^^^^^^^^^^^^^^^^^^^^
warning: type `RenderSetting<bool>` is more private than the item `RenderOptions::always_hoist_enums`
--> baml-lib/jinja/src/output_format/types.rs:74:5
|
74 | pub always_hoist_enums: RenderSetting<bool>,
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ field `RenderOptions::always_hoist_enums` is reachable at visibility `pub`
|
note: but type `RenderSetting<bool>` is only usable at visibility `pub(self)`
--> baml-lib/jinja/src/output_format/types.rs:58:1
|
58 | enum RenderSetting<T> {
| ^^^^^^^^^^^^^^^^^^^^^
warning: field `name` is never read
--> baml-lib/jinja/src/output_format/types.rs:149:5
|
148 | struct ClassRender {
| ----------- field in this struct
149 | name: String,
| ^^^^
|
= note: `#[warn(dead_code)]` on by default
warning: `internal-baml-jinja` (lib) generated 6 warnings
warning: fields `name` and `type_dependencies` are never read
--> baml-lib/parser-database/src/types/mod.rs:320:9
|
318 | pub struct TemplateStringProperties {
| ------------------------ fields in this struct
319 | // Not all template strings have names (e.g. function prompt)
320 | pub name: Option<String>,
| ^^^^
321 | pub type_dependencies: HashSet<String>,
| ^^^^^^^^^^^^^^^^^
|
= note: `TemplateStringProperties` has derived impls for the traits `Clone` and `Debug`, but these are intentionally ignored during dead code analysis
= note: `#[warn(dead_code)]` on by default
warning: `internal-baml-parser-database` (lib) generated 1 warning
warning: unused import: `WithSerialize`
--> baml-lib/baml-core/src/ir/repr.rs:13:73
|
13 | ParserDatabase, PromptAst, RetryPolicyStrategy, ToStringAttributes, WithSerialize,
| ^^^^^^^^^^^^^
|
= note: `#[warn(unused_imports)]` on by default
warning: unnecessary parentheses around function argument
--> baml-lib/baml-core/src/ir/repr.rs:297:17
|
297 | (match idn {
| ^
...
305 | }),
| ^
|
= note: `#[warn(unused_parens)]` on by default
help: remove these parentheses
|
297 ~ match idn {
298 | ast::Identifier::Primitive(t, ..) => FieldType::Primitive(*t),
...
304 | _ => bail!("Field type uses unsupported identifier type"),
305 ~ },
|
warning: unused import: `internal_baml_schema_ast::ast`
--> baml-lib/baml-core/src/ir/mod.rs:6:5
|
6 | use internal_baml_schema_ast::ast;
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
warning: unused import: `json_schema::WithJsonSchema`
--> baml-lib/baml-core/src/ir/mod.rs:12:16
|
12 | pub(super) use json_schema::WithJsonSchema;
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^
warning: unused import: `DatamodelWarning`
--> baml-lib/baml-core/src/validate/validation_pipeline/validations/clients.rs:1:49
|
1 | use internal_baml_diagnostics::{DatamodelError, DatamodelWarning};
| ^^^^^^^^^^^^^^^^
warning: unused import: `VariantArray`
--> baml-lib/baml-core/src/validate/generator_loader/v2.rs:5:13
|
5 | use strum::{VariantArray, VariantNames};
| ^^^^^^^^^^^^
warning: unused variable: `name`
--> baml-lib/baml-core/src/validate/generator_loader/v1.rs:141:12
|
141 | Ok(name) => (),
| ^^^^ help: if this is intentional, prefix it with an underscore: `_name`
|
= note: `#[warn(unused_variables)]` on by default
warning: unused variable: `name`
--> baml-lib/baml-core/src/validate/generator_loader/v1.rs:148:12
|
148 | Ok(name) => (),
| ^^^^ help: if this is intentional, prefix it with an underscore: `_name`
warning: unused variable: `name`
--> baml-lib/baml-core/src/validate/generator_loader/v1.rs:155:12
|
155 | Ok(name) => (),
| ^^^^ help: if this is intentional, prefix it with an underscore: `_name`
warning: type alias `Prompt` is never used
--> baml-lib/baml-core/src/ir/mod.rs:37:17
|
37 | pub(super) type Prompt = repr::Prompt;
| ^^^^^^
|
= note: `#[warn(dead_code)]` on by default
warning: trait `ScopeTrait` is never used
--> baml-lib/baml-core/src/ir/ir_helpers/scope_diagnostics.rs:4:7
|
4 | trait ScopeTrait {
| ^^^^^^^^^^
warning: `internal-baml-core` (lib) generated 11 warnings (run `cargo fix --lib -p internal-baml-core` to apply 5 suggestions)
warning: unused imports: `collections::HashMap` and `iter`
--> baml-lib/jsonish/src/deserializer/coercer/ir_ref/coerce_class.rs:1:11
|
1 | use std::{collections::HashMap, iter};
| ^^^^^^^^^^^^^^^^^^^^ ^^^^
|
= note: `#[warn(unused_imports)]` on by default
warning: unused imports: `ClassFieldWalker`, `ClassWalker`, and `ast::Field`
--> baml-lib/jsonish/src/deserializer/coercer/ir_ref/coerce_class.rs:6:5
|
6 | ast::Field,
| ^^^^^^^^^^
7 | ir::{ClassFieldWalker, ClassWalker, FieldType},
| ^^^^^^^^^^^^^^^^ ^^^^^^^^^^^
warning: unused imports: `collections::HashMap` and `fmt::Display`
--> baml-lib/jsonish/src/deserializer/coercer/mod.rs:10:11
|
10 | use std::{collections::HashMap, fmt::Display};
| ^^^^^^^^^^^^^^^^^^^^ ^^^^^^^^^^^^
warning: unused import: `repr::IntermediateRepr`
--> baml-lib/jsonish/src/deserializer/coercer/mod.rs:12:30
|
12 | use internal_baml_core::ir::{repr::IntermediateRepr, FieldType};
| ^^^^^^^^^^^^^^^^^^^^^^
warning: unused variable: `e`
--> baml-lib/jsonish/src/deserializer/coercer/field_type.rs:99:29
|
99 | FieldType::Enum(e) => None,
| ^ help: if this is intentional, prefix it with an underscore: `_e`
|
= note: `#[warn(unused_variables)]` on by default
warning: unused variable: `c`
--> baml-lib/jsonish/src/deserializer/coercer/field_type.rs:100:30
|
100 | FieldType::Class(c) => None,
| ^ help: if this is intentional, prefix it with an underscore: `_c`
warning: unused variable: `merged_errors`
--> baml-lib/jsonish/src/deserializer/coercer/ir_ref/coerce_class.rs:216:21
|
216 | let merged_errors = required_values
| ^^^^^^^^^^^^^ help: if this is intentional, prefix it with an underscore: `_merged_errors`
warning: unused variable: `e`
--> baml-lib/jsonish/src/deserializer/coercer/ir_ref/coerce_class.rs:202:30
|
202 | Some(Err(e)) => None,
| ^ help: if this is intentional, prefix it with an underscore: `_e`
warning: unused variable: `item`
--> baml-lib/jsonish/src/deserializer/coercer/mod.rs:128:9
|
128 | item: Option<&crate::jsonish::Value>,
| ^^^^ help: if this is intentional, prefix it with an underscore: `_item`
warning: unused variable: `x`
--> baml-lib/jsonish/src/jsonish/parser/fixing_parser/json_parse_state.rs:200:49
|
200 | ... x => {
| ^ help: if this is intentional, prefix it with an underscore: `_x`
warning: type `ParsingMode` is more private than the item `ParseOptions::next_from_mode`
--> baml-lib/jsonish/src/jsonish/parser/mod.rs:35:5
|
35 | pub fn next_from_mode(&self, curr_mode: ParsingMode) -> Self {
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ method `ParseOptions::next_from_mode` is reachable at visibility `pub(crate)`
|
note: but type `ParsingMode` is only usable at visibility `pub(self)`
--> baml-lib/jsonish/src/jsonish/parser/mod.rs:29:1
|
29 | enum ParsingMode {
| ^^^^^^^^^^^^^^^^
= note: `#[warn(private_interfaces)]` on by default
warning: function `find_in_json_markdown` is never used
--> baml-lib/jsonish/src/jsonish/iterative_parser.rs:14:4
|
14 | fn find_in_json_markdown(str: &str, options: &JSONishOptions) -> Result<serde_json::Value> {
| ^^^^^^^^^^^^^^^^^^^^^
|
= note: `#[warn(dead_code)]` on by default
warning: function `find_all_json_objects` is never used
--> baml-lib/jsonish/src/jsonish/iterative_parser.rs:59:4
|
59 | fn find_all_json_objects(input: &str, options: &JSONishOptions) -> Result<serde_json::Value> {
| ^^^^^^^^^^^^^^^^^^^^^
warning: multiple variants are never constructed
--> baml-lib/jsonish/src/jsonish/iterative_parser.rs:109:5
|
107 | enum JsonCollection {
| -------------- variants in this enum
108 | // Key, Value
109 | Object(Vec<String>, Vec<serde_json::Value>),
| ^^^^^^
110 | Array(Vec<serde_json::Value>),
| ^^^^^
111 | QuotedString(String),
| ^^^^^^^^^^^^
112 | SingleQuotedString(String),
| ^^^^^^^^^^^^^^^^^^
113 | // Handles numbers, booleans, null, and unquoted strings
114 | UnquotedString(String),
| ^^^^^^^^^^^^^^
115 | // Starting with // or #
116 | TrailingComment(String),
| ^^^^^^^^^^^^^^^
117 | // Content between /* and */
118 | BlockComment(String),
| ^^^^^^^^^^^^
|
= note: `JsonCollection` has a derived impl for the trait `Debug`, but this is intentionally ignored during dead code analysis
warning: method `name` is never used
--> baml-lib/jsonish/src/jsonish/iterative_parser.rs:122:8
|
121 | impl JsonCollection {
| ------------------- method in this implementation
122 | fn name(&self) -> &'static str {
| ^^^^
warning: struct `JsonParseState` is never constructed
--> baml-lib/jsonish/src/jsonish/iterative_parser.rs:171:8
|
171 | struct JsonParseState {
| ^^^^^^^^^^^^^^
warning: multiple associated items are never used
--> baml-lib/jsonish/src/jsonish/iterative_parser.rs:179:8
|
178 | impl JsonParseState {
| ------------------- associated items in this implementation
179 | fn new() -> Self {
| ^^^
...
186 | fn complete_collection(&mut self) {
| ^^^^^^^^^^^^^^^^^^^
...
229 | fn consume(&mut self, token: char) -> Result<usize> {
| ^^^^^^^
...
247 | fn is_string_complete(&self) -> bool {
| ^^^^^^^^^^^^^^^^^^
...
272 | fn should_close_unescaped_string(
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
...
372 | fn should_close_string(
| ^^^^^^^^^^^^^^^^^^^
...
467 | pub fn process_token(
| ^^^^^^^^^^^^^
...
596 | fn find_any_starting_value(
| ^^^^^^^^^^^^^^^^^^^^^^^
warning: function `try_fix_jsonish` is never used
--> baml-lib/jsonish/src/jsonish/iterative_parser.rs:648:8
|
648 | pub fn try_fix_jsonish<'a>(str: &str) -> Result<serde_json::Value> {
| ^^^^^^^^^^^^^^^
warning: fields `all_finding_all_json_objects`, `allow_markdown_json`, `allow_fixes`, `allow_as_string`, and `depth` are never read
--> baml-lib/jsonish/src/jsonish/iterative_parser.rs:727:5
|
726 | pub struct JSONishOptions {
| -------------- fields in this struct
727 | all_finding_all_json_objects: bool,
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
728 | allow_markdown_json: bool,
| ^^^^^^^^^^^^^^^^^^^
729 | allow_fixes: bool,
| ^^^^^^^^^^^
730 | allow_as_string: bool,
| ^^^^^^^^^^^^^^^
731 | depth: usize,
| ^^^^^
|
= note: `JSONishOptions` has a derived impl for the trait `Debug`, but this is intentionally ignored during dead code analysis
warning: method `recursive` is never used
--> baml-lib/jsonish/src/jsonish/iterative_parser.rs:745:8
|
734 | impl JSONishOptions {
| ------------------- method in this implementation
...
745 | fn recursive(&self) -> Self {
| ^^^^^^^^^
warning: function `parse_jsonish_value` is never used
--> baml-lib/jsonish/src/jsonish/iterative_parser.rs:758:8
|
758 | pub fn parse_jsonish_value<'a>(str: &'a str, options: JSONishOptions) -> Result<serde_json::Value> {
| ^^^^^^^^^^^^^^^^^^^
warning: method `is_string_complete` is never used
--> baml-lib/jsonish/src/jsonish/parser/fixing_parser/json_parse_state.rs:83:8
|
15 | impl JsonParseState {
| ------------------- method in this implementation
...
83 | fn is_string_complete(&self) -> bool {
| ^^^^^^^^^^^^^^^^^^
warning: `jsonish` (lib) generated 22 warnings (run `cargo fix --lib -p jsonish` to apply 4 suggestions)
warning: unused import: `askama::Template`
--> language-client-codegen/src/python/mod.rs:7:5
|
7 | use askama::Template;
| ^^^^^^^^^^^^^^^^
|
= note: `#[warn(unused_imports)]` on by default
warning: unused import: `collections::BTreeMap`
--> language-client-codegen/src/ruby/mod.rs:6:11
|
6 | use std::{collections::BTreeMap, path::PathBuf};
| ^^^^^^^^^^^^^^^^^^^^^
warning: unused variable: `node`
--> language-client-codegen/src/python/generate_types.rs:152:26
|
152 | pub fn add_default_value(node: &FieldType, type_str: &String) -> String {
| ^^^^ help: if this is intentional, prefix it with an underscore: `_node`
|
= note: `#[warn(unused_variables)]` on by default
warning: unused variable: `args`
--> language-client-codegen/src/python/mod.rs:83:21
|
83 | fn try_from((_, args): (&'_ IntermediateRepr, &'_ crate::GeneratorArgs)) -> Result<Self> {
| ^^^^ help: if this is intentional, prefix it with an underscore: `_args`
warning: method `add_file` is never used
--> language-client-codegen/src/dir_writer.rs:101:19
|
71 | impl<L: LanguageFeatures + Default> FileCollector<L> {
| ---------------------------------------------------- method in this implementation
...
101 | pub(super) fn add_file<K: AsRef<str>, V: AsRef<str>>(&mut self, name: K, contents: V) {
| ^^^^^^^^
|
= note: `#[warn(dead_code)]` on by default
warning: `internal-baml-codegen` (lib) generated 5 warnings (run `cargo fix --lib -p internal-baml-codegen` to apply 2 suggestions)
warning: unexpected `cfg` condition value: `no_wasm`
--> baml-runtime/src/lib.rs:1:17
|
1 | #[cfg(all(test, feature = "no_wasm"))]
| ^^^^^^^^^^^^^^^^^^^
|
= note: expected values for `feature` are: `defaults` and `internal`
= help: consider adding `no_wasm` as a feature in `Cargo.toml`
= note: see <https://doc.rust-lang.org/nightly/rustc/check-cfg/cargo-specifics.html> for more information about checking conditional configuration
= note: `#[warn(unexpected_cfgs)]` on by default
warning: unused import: `std::ops::Deref`
--> baml-runtime/src/internal/llm_client/orchestrator/stream.rs:1:5
|
1 | use std::ops::Deref;
| ^^^^^^^^^^^^^^^
|
= note: `#[warn(unused_imports)]` on by default
warning: unused import: `retry_policy::CallablePolicy`
--> baml-runtime/src/internal/llm_client/primitive/mod.rs:21:5
|
21 | retry_policy::CallablePolicy,
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
warning: unused imports: `Arc`, `Mutex`, and `fmt::format`
--> baml-runtime/src/internal/llm_client/primitive/anthropic/anthropic_client.rs:3:5
|
3 | fmt::format,
| ^^^^^^^^^^^
4 | sync::{Arc, Mutex},
| ^^^ ^^^^^
warning: unused import: `SinkExt`
--> baml-runtime/src/internal/llm_client/primitive/anthropic/anthropic_client.rs:10:15
|
10 | use futures::{SinkExt, StreamExt};
| ^^^^^^^
warning: unused import: `reqwest::Response`
--> baml-runtime/src/internal/llm_client/primitive/anthropic/anthropic_client.rs:15:5
|
15 | use reqwest::Response;
| ^^^^^^^^^^^^^^^^^
warning: unused import: `reqwest::Response`
--> baml-runtime/src/internal/llm_client/primitive/google/google_client.rs:23:5
|
23 | use reqwest::Response;
| ^^^^^^^^^^^^^^^^^
warning: unused import: `WithCompletion`
--> baml-runtime/src/internal/llm_client/primitive/openai/openai_client.rs:14:39
|
14 | SseResponseTrait, StreamResponse, WithCompletion, WithStreamChat,
| ^^^^^^^^^^^^^^
warning: unused import: `fmt::format`
--> baml-runtime/src/internal/llm_client/primitive/request.rs:1:33
|
1 | use std::{collections::HashMap, fmt::format};
| ^^^^^^^^^^^
warning: unused import: `LLMErrorResponse`
--> baml-runtime/src/internal/llm_client/traits/chat.rs:5:28
|
5 | internal::llm_client::{LLMErrorResponse, LLMResponse},
| ^^^^^^^^^^^^^^^^
warning: unused import: `SseResponseTrait`
--> baml-runtime/src/internal/llm_client/traits/chat.rs:9:13
|
9 | use super::{SseResponseTrait, StreamResponse};
| ^^^^^^^^^^^^^^^^
warning: unused import: `retry_policy::CallablePolicy`
--> baml-runtime/src/internal/llm_client/traits/mod.rs:18:13
|
18 | use super::{retry_policy::CallablePolicy, LLMResponse, ModelFeatures};
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
warning: unused import: `HashMap`
--> baml-runtime/src/internal/prompt_renderer/render_output_format.rs:1:24
|
1 | use std::collections::{HashMap, HashSet};
| ^^^^^^^
warning: unused import: `self`
--> baml-runtime/src/cli/generate.rs:2:15
|
2 | runtime::{self, runtime_interface::baml_src_files},
| ^^^^
warning: unused import: `internal_baml_core::configuration::GeneratorOutputType`
--> baml-runtime/src/cli/generate.rs:6:5
|
6 | use internal_baml_core::configuration::GeneratorOutputType;
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
warning: unused import: `super::LanguageClientType`
--> baml-runtime/src/cli/generate.rs:9:5
|
9 | use super::LanguageClientType;
| ^^^^^^^^^^^^^^^^^^^^^^^^^
warning: unused macro definition: `internal_feature`
--> baml-runtime/src/macros.rs:2:14
|
2 | macro_rules! internal_feature {
| ^^^^^^^^^^^^^^^^
|
= note: `#[warn(unused_macros)]` on by default
warning: unused import: `Mutex`
--> baml-runtime/src/runtime/runtime_interface.rs:4:17
|
4 | sync::{Arc, Mutex},
| ^^^^^
warning: unused imports: `LLMPrimitiveProvider`, `RuntimeContextManager`, `TestResponse`, `TracingSpan`, and `type_builder::TypeBuilder`
--> baml-runtime/src/runtime/runtime_interface.rs:13:53
|
13 | orchestrate_call, IterOrchestrator, LLMPrimitiveProvider, OrchestrationScope,
| ^^^^^^^^^^^^^^^^^^^^
...
22 | tracing::{BamlTracer, TracingSpan},
| ^^^^^^^^^^^
23 | type_builder::TypeBuilder,
| ^^^^^^^^^^^^^^^^^^^^^^^^^
24 | FunctionResult, FunctionResultStream, InternalRuntimeInterface, RuntimeContext,
25 | RuntimeContextManager, RuntimeInterface, TestResponse,
| ^^^^^^^^^^^^^^^^^^^^^ ^^^^^^^^^^^^
warning: unused import: `cfg_if::cfg_if`
--> baml-runtime/src/runtime_interface.rs:3:5
|
3 | use cfg_if::cfg_if;
| ^^^^^^^^^^^^^^
warning: unused import: `crate::type_builder::TypeBuilder`
--> baml-runtime/src/runtime_interface.rs:12:5
|
12 | use crate::type_builder::TypeBuilder;
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
warning: unused import: `TestResponse`
--> baml-runtime/src/runtime_interface.rs:18:37
|
18 | FunctionResult, RuntimeContext, TestResponse,
| ^^^^^^^^^^^^
warning: unused import: `instant::Duration`
--> baml-runtime/src/tracing/api_wrapper/mod.rs:6:5
|
6 | use instant::Duration;
| ^^^^^^^^^^^^^^^^^
warning: unused import: `serde_json::json`
--> baml-runtime/src/tracing/mod.rs:11:5
|
11 | use serde_json::json;
| ^^^^^^^^^^^^^^^^
warning: unused import: `std::any::Any`
--> baml-runtime/src/types/response.rs:169:5
|
169 | use std::any::Any;
| ^^^^^^^^^^^^^
warning: unused imports: `Stream` and `stream::StreamExt`
--> baml-runtime/src/types/stream.rs:3:15
|
3 | use futures::{stream::StreamExt, Stream};
| ^^^^^^^^^^^^^^^^^ ^^^^^^
warning: unused import: `internal_baml_core::ir::IRHelper`
--> baml-runtime/src/types/stream.rs:5:5
|
5 | use internal_baml_core::ir::IRHelper;
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
warning: unused import: `internal_baml_jinja::Type`
--> baml-runtime/src/types/stream.rs:6:5
|
6 | use internal_baml_jinja::Type;
| ^^^^^^^^^^^^^^^^^^^^^^^^^
warning: unused imports: `ErrorCode`, `LLMErrorResponse`, `LLMPrimitiveProvider`, `OrchestrationScope`, `RuntimeContext`, and `self`
--> baml-runtime/src/types/stream.rs:14:17
|
14 | self, orchestrate_stream, LLMPrimitiveProvider, OrchestrationScope,
| ^^^^ ^^^^^^^^^^^^^^^^^^^^ ^^^^^^^^^^^^^^^^^^
...
17 | ErrorCode, LLMErrorResponse,
| ^^^^^^^^^ ^^^^^^^^^^^^^^^^
...
23 | FunctionResult, RuntimeContext, RuntimeContextManager,
| ^^^^^^^^^^^^^^
warning: unused import: `super::response::LLMResponse`
--> baml-runtime/src/types/stream.rs:26:5
|
26 | use super::response::LLMResponse;
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
warning: `#[macro_use]` only has an effect on `extern crate` and modules
--> baml-runtime/src/macros.rs:1:1
|
1 | #[macro_use]
| ^^^^^^^^^^^^
|
= note: `#[warn(unused_attributes)]` on by default
warning: unused variable: `ctx`
--> baml-runtime/src/internal/llm_client/primitive/anthropic/anthropic_client.rs:298:9
|
298 | ctx: &RuntimeContext,
| ^^^ help: if this is intentional, prefix it with an underscore: `_ctx`
|
= note: `#[warn(unused_variables)]` on by default
warning: unused variable: `ctx`
--> baml-runtime/src/internal/llm_client/primitive/google/google_client.rs:223:9
|
223 | ctx: &RuntimeContext,
| ^^^ help: if this is intentional, prefix it with an underscore: `_ctx`
warning: unused variable: `ctx`
--> baml-runtime/src/internal/llm_client/primitive/openai/openai_client.rs:380:9
|
380 | ctx: &RuntimeContext,
| ^^^ help: if this is intentional, prefix it with an underscore: `_ctx`
warning: unused import: `Context`
--> baml-runtime/src/internal/llm_client/primitive/openai/openai_client.rs:3:14
|
3 | use anyhow::{Context, Result};
| ^^^^^^^
warning: unused variable: `name`
--> baml-runtime/src/internal/llm_client/llm_provider.rs:40:13
|
40 | name => LLMPrimitiveProvider::try_from((client, ctx))
| ^^^^ help: if this is intentional, prefix it with an underscore: `_name`
warning: unused variable: `ctx`
--> baml-runtime/src/internal/prompt_renderer/render_output_format.rs:69:5
|
69 | ctx: &RuntimeContext,
| ^^^ help: if this is intentional, prefix it with an underscore: `_ctx`
warning: fields `v1_functions` and `v2_functions` are never read
--> baml-runtime/src/internal/ir_features.rs:4:5
|
3 | pub struct IrFeatures {
| ---------- fields in this struct
4 | v1_functions: Vec<String>,
| ^^^^^^^^^^^^
5 | v2_functions: bool,
| ^^^^^^^^^^^^
|
= note: `#[warn(dead_code)]` on by default
warning: function `fetch_image` is never used
--> baml-runtime/src/internal/llm_client/common/images.rs:6:10
|
6 | async fn fetch_image(url: &str) -> Result<Vec<u8>> {
| ^^^^^^^^^^^
warning: function `download_image_as_base64` is never used
--> baml-runtime/src/internal/llm_client/common/images.rs:42:14
|
42 | pub async fn download_image_as_base64(url: &str) -> Result<(String, String)> {
| ^^^^^^^^^^^^^^^^^^^^^^^^
warning: type alias `CompletionResponse` is never used
--> baml-runtime/src/internal/llm_client/primitive/openai/types.rs:3:10
|
3 | pub type CompletionResponse = ChatCompletionGeneric<CompletionChoice>;
| ^^^^^^^^^^^^^^^^^^
warning: field `index` is never read
--> baml-runtime/src/internal/llm_client/primitive/openai/types.rs:80:9
|
79 | pub struct ChatCompletionChoiceDelta {
| ------------------------- field in this struct
80 | pub index: u64,
| ^^^^^
|
= note: `ChatCompletionChoiceDelta` has derived impls for the traits `Debug` and `Clone`, but these are intentionally ignored during dead code analysis
warning: field `role` is never read
--> baml-runtime/src/internal/llm_client/primitive/openai/types.rs:89:9
|
87 | pub struct ChatCompletionMessageDelta {
| -------------------------- field in this struct
88 | /// The role of the author of this message.
89 | pub role: Option<ChatCompletionMessageRole>,
| ^^^^
|
= note: `ChatCompletionMessageDelta` has derived impls for the traits `Debug` and `Clone`, but these are intentionally ignored during dead code analysis
warning: field `error` is never read
--> baml-runtime/src/internal/llm_client/primitive/openai/types.rs:156:9
|
155 | pub struct OpenAIErrorResponse {
| ------------------- field in this struct
156 | pub error: OpenAIError,
| ^^^^^
|
= note: `OpenAIErrorResponse` has a derived impl for the trait `Debug`, but this is intentionally ignored during dead code analysis
warning: fields `message`, `type`, and `code` are never read
--> baml-runtime/src/internal/llm_client/primitive/openai/types.rs:161:9
|
160 | pub struct OpenAIError {
| ----------- fields in this struct
161 | pub message: String,
| ^^^^^^^
162 | pub r#type: String,
| ^^^^^^
163 | pub code: Option<String>,
| ^^^^
|
= note: `OpenAIError` has a derived impl for the trait `Debug`, but this is intentionally ignored during dead code analysis
warning: associated function `from` is never used
--> baml-runtime/src/internal/prompt_renderer/render_output_format.rs:41:8
|
40 | impl OverridableValue<bool> {
| --------------------------- associated function in this implementation
41 | fn from(v: Option<&BamlValue>) -> Self {
| ^^^^
warning: associated function `from_file_content` is never used
--> baml-runtime/src/runtime_interface.rs:25:8
|
21 | pub(crate) trait RuntimeConstructor {
| ------------------ associated function in this trait
...
25 | fn from_file_content<T: AsRef<str>>(
| ^^^^^^^^^^^^^^^^^
warning: field `status` is never read
--> baml-runtime/src/tracing/api_wrapper/mod.rs:172:5
|
171 | struct LogResponse {
| ----------- field in this struct
172 | status: Option<String>,
| ^^^^^^
warning: methods `check_cache`, `create_session`, and `finish_session` are never used
--> baml-runtime/src/tracing/api_wrapper/api_interface.rs:10:14
|
9 | pub(crate) trait BoundaryAPI {
| ----------- methods in this trait
10 | async fn check_cache(&self, payload: &CacheRequest) -> Result<Option<CacheResponse>>;
| ^^^^^^^^^^^
11 | async fn log_schema(&self, payload: &LogSchema) -> Result<()>;
12 | async fn create_session(&self) -> Result<CreateSessionResponse>;
| ^^^^^^^^^^^^^^
13 | async fn finish_session(&self) -> Result<()>;
| ^^^^^^^^^^^^^^
warning: trait `BoundaryTestAPI` is never used
--> baml-runtime/src/tracing/api_wrapper/api_interface.rs:18:18
|
18 | pub(crate) trait BoundaryTestAPI {
| ^^^^^^^^^^^^^^^
warning: struct `UpdateTestCaseRequest` is never constructed
--> baml-runtime/src/tracing/api_wrapper/api_interface.rs:41:19
|
41 | pub(crate) struct UpdateTestCaseRequest {
| ^^^^^^^^^^^^^^^^^^^^^
warning: struct `CacheRequest` is never constructed
--> baml-runtime/src/tracing/api_wrapper/api_interface.rs:48:19
|
48 | pub(crate) struct CacheRequest {
| ^^^^^^^^^^^^
warning: struct `CacheResponse` is never constructed
--> baml-runtime/src/tracing/api_wrapper/api_interface.rs:56:19
|
56 | pub(crate) struct CacheResponse {
| ^^^^^^^^^^^^^
warning: struct `UpdateTestCase` is never constructed
--> baml-runtime/src/tracing/api_wrapper/core_types.rs:8:19
|
8 | pub(crate) struct UpdateTestCase {
| ^^^^^^^^^^^^^^
warning: variant `Single` is never constructed
--> baml-runtime/src/tracing/api_wrapper/core_types.rs:187:5
|
186 | pub(crate) enum MetadataType {
| ------------ variant in this enum
187 | Single(LLMEventSchema),
| ^^^^^^
|
= note: `MetadataType` has a derived impl for the trait `Debug`, but this is intentionally ignored during dead code analysis
warning: variant `Stop` is never constructed
--> baml-runtime/src/tracing/threaded_tracer.rs:9:5
|
8 | enum TxEventSignal {
| ------------- variant in this enum
9 | Stop,
| ^^^^
warning: `baml-runtime` (lib) generated 56 warnings (run `cargo fix --lib -p baml-runtime` to apply 28 suggestions)
Compiling pyo3-macros-backend v0.21.2
Compiling pyo3-ffi v0.21.2
Compiling pyo3 v0.21.2
Compiling baml-python-ffi v0.1.0 (/Users/sam/baml/engine/language_client_python)
Compiling pyo3-macros v0.21.2
Compiling pyo3-asyncio v0.21.0 (https://github.com/BoundaryML/pyo3-asyncio.git?branch=migration-pyo3-0.21#d1ec6407)
Compiling pythonize v0.21.1
warning: unused import: `PyClass`
--> language_client_python/src/parse_py_type.rs:9:5
|
9 | PyClass, PyErr, PyObject, PyResult, Python, ToPyObject,
| ^^^^^^^
|
= note: `#[warn(unused_imports)]` on by default
warning: `baml-python-ffi` (lib) generated 1 warning (run `cargo fix --lib -p baml-python-ffi` to apply 1 suggestion)
Finished `dev` profile [unoptimized + debuginfo] target(s) in 13.95s
2024-06-19T22:47:01.703207Z INFO build_wheels:warn_missing_py_init: maturin::compile: close time.busy=13.2ms time.idle=1.67µs
2024-06-19T22:47:01.810468Z DEBUG build_wheels: maturin::module_writer: Adding baml_py-0.40.0.dist-info/METADATA
2024-06-19T22:47:01.810558Z DEBUG build_wheels: maturin::module_writer: Adding baml_py-0.40.0.dist-info/WHEEL
2024-06-19T22:47:01.810611Z DEBUG build_wheels: maturin::module_writer: Adding baml_py-0.40.0.dist-info/entry_points.txt
2024-06-19T22:47:01.810654Z DEBUG build_wheels: maturin::module_writer: Adding baml_py-0.40.0.dist-info/license_files/LICENSE from /Users/sam/baml/engine/language_client_python/../LICENSE
2024-06-19T22:47:01.810910Z DEBUG build_wheels: maturin::module_writer: Adding baml_py-0.40.0.dist-info/license_files/LICENSE from /Users/sam/baml/engine/language_client_python/LICENSE
2024-06-19T22:47:01.812266Z DEBUG build_wheels:write_bindings_module: maturin::module_writer: Adding baml_py/type_builder.py from /Users/sam/baml/engine/language_client_python/python_src/baml_py/type_builder.py
2024-06-19T22:47:01.812397Z DEBUG build_wheels:write_bindings_module: maturin::module_writer: Adding baml_py/__init__.py from /Users/sam/baml/engine/language_client_python/python_src/baml_py/__init__.py
2024-06-19T22:47:01.812488Z DEBUG build_wheels:write_bindings_module: maturin::module_writer: Adding baml_py/stream.py from /Users/sam/baml/engine/language_client_python/python_src/baml_py/stream.py
2024-06-19T22:47:01.812571Z DEBUG build_wheels:write_bindings_module: maturin::module_writer: Adding baml_py/py.typed from /Users/sam/baml/engine/language_client_python/python_src/baml_py/py.typed
2024-06-19T22:47:01.812626Z DEBUG build_wheels:write_bindings_module: maturin::module_writer: Adding baml_py/baml_py.pyi from /Users/sam/baml/engine/language_client_python/python_src/baml_py/baml_py.pyi
2024-06-19T22:47:01.813616Z DEBUG build_wheels:write_bindings_module: maturin::module_writer: Adding baml_py/ctx_manager.py from /Users/sam/baml/engine/language_client_python/python_src/baml_py/ctx_manager.py
2024-06-19T22:47:01.813761Z DEBUG build_wheels:write_bindings_module: maturin::module_writer: Adding baml_py/baml_py.abi3.so from /Users/sam/baml/engine/target/debug/maturin/libbaml_py.dylib
2024-06-19T22:47:02.955390Z INFO build_wheels:write_bindings_module: maturin::module_writer: close time.busy=1.14s time.idle=1.58µs
2024-06-19T22:47:02.955410Z DEBUG build_wheels: maturin::module_writer: Adding baml_py-0.40.0.dist-info/RECORD
📦 Built wheel for abi3 Python ≥ 3.8 to /Users/sam/baml/engine/target/wheels/baml_py-0.40.0-cp38-abi3-macosx_11_0_arm64.whl
2024-06-19T22:47:02.957299Z INFO build_wheels: maturin::build_context: close time.busy=15.3s time.idle=1.08µs
Updating dependencies
Resolving dependencies... (0.1s)
Package operations: 1 install, 0 updates, 0 removals
- Installing baml-py (0.40.0 /Users/sam/baml/engine/target/wheels/baml_py-0.40.0-cp38-abi3-macosx_11_0_arm64.whl): Installing...
Installing /Users/sam/Library/Caches/pypoetry/virtualenvs/python-repro-0_9WWp8L-py3.12/lib/python3.12/site-packages/baml_py-0.40.0.dist-info/license_files/LICENSE over exi
- Installing baml-py (0.40.0 /Users/sam/baml/engine/target/wheels/baml_py-0.40.0-cp38-abi3-macosx_11_0_arm64.whl)
Warning: Validation of the RECORD file of baml_py-0.40.0-cp38-abi3-macosx_11_0_arm64.whl failed. Please report to the maintainers of that package so they can fix their build process. Details:
In /Users/sam/baml/engine/target/wheels/baml_py-0.40.0-cp38-abi3-macosx_11_0_arm64.whl, baml_py-0.40.0.dist-info/license_files/LICENSE is not mentioned in RECORD
Writing lock file
~/sandbox/python-repro is 📦 v0.1.0 via 🐍 v3.12.3 | [0] took 17s at 15:47:10
~/sandbox/python-repro is 📦 v0.1.0 via 🐍 v3.12.3 | [0] at 15:47:23
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment