Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ name = "cocoindex"
# Version used for local development is always higher than others to take precedence.
# Will be overridden for specific release versions.
version = "999.0.0"
edition = "2021"
edition = "2024"

[profile.release]
codegen-units = 1
Expand Down
2 changes: 1 addition & 1 deletion src/builder/analyzed_flow.rs
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ use crate::{ops::interface::FlowInstanceContext, prelude::*};
use super::{analyzer, plan};
use crate::{
ops::registry::ExecutorFactoryRegistry,
service::error::{shared_ok, SharedError, SharedResultExt},
service::error::{SharedError, SharedResultExt, shared_ok},
setup::{self, ObjectSetupStatus},
};

Expand Down
16 changes: 8 additions & 8 deletions src/builder/analyzer.rs
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,8 @@ use crate::{
base::{schema::*, spec::*},
ops::{interface::*, registry::*},
};
use futures::future::{try_join3, BoxFuture};
use futures::{future::try_join_all, FutureExt};
use futures::future::{BoxFuture, try_join3};
use futures::{FutureExt, future::try_join_all};

#[derive(Debug)]
pub(super) enum ValueTypeBuilder {
Expand Down Expand Up @@ -668,15 +668,15 @@ impl AnalyzerContext<'_> {
import_op: NamedSpec<ImportOpSpec>,
metadata: Option<&mut FlowSetupMetadata>,
existing_source_states: Option<&Vec<&SourceSetupState>>,
) -> Result<impl Future<Output = Result<AnalyzedImportOp>> + Send> {
) -> Result<impl Future<Output = Result<AnalyzedImportOp>> + Send + use<>> {
let factory = self.registry.get(&import_op.spec.source.kind);
let source_factory = match factory {
Some(ExecutorFactory::Source(source_executor)) => source_executor.clone(),
_ => {
return Err(anyhow::anyhow!(
"Source executor not found for kind: {}",
import_op.spec.source.kind
))
));
}
};
let (output_type, executor) = source_factory.build(
Expand Down Expand Up @@ -817,7 +817,7 @@ impl AnalyzerContext<'_> {
return Err(anyhow::anyhow!(
"Transform op kind not found: {}",
op.op.kind
))
));
}
}
}
Expand Down Expand Up @@ -967,7 +967,7 @@ impl AnalyzerContext<'_> {
declarations: Vec<serde_json::Value>,
flow_setup_state: &mut FlowSetupState<DesiredMode>,
existing_target_states: &HashMap<&ResourceIdentifier, Vec<&TargetSetupState>>,
) -> Result<Vec<impl Future<Output = Result<AnalyzedExportOp>> + Send>> {
) -> Result<Vec<impl Future<Output = Result<AnalyzedExportOp>> + Send + use<>>> {
let mut collection_specs = Vec::<interface::ExportDataCollectionSpec>::new();
let mut data_fields_infos = Vec::<ExportDataFieldsInfo>::new();
for idx in export_op_group.op_idx.iter() {
Expand Down Expand Up @@ -1104,7 +1104,7 @@ impl AnalyzerContext<'_> {
&self,
op_scope: &Arc<OpScope>,
reactive_ops: &[NamedSpec<ReactiveOpSpec>],
) -> Result<impl Future<Output = Result<AnalyzedOpScope>> + Send> {
) -> Result<impl Future<Output = Result<AnalyzedOpScope>> + Send + use<>> {
let op_futs = reactive_ops
.iter()
.map(|reactive_op| self.analyze_reactive_op(op_scope, reactive_op))
Expand Down Expand Up @@ -1147,7 +1147,7 @@ pub fn analyze_flow(
registry: &ExecutorFactoryRegistry,
) -> Result<(
FlowSchema,
impl Future<Output = Result<ExecutionPlan>> + Send,
impl Future<Output = Result<ExecutionPlan>> + Send + use<>,
setup::FlowSetupState<setup::DesiredMode>,
)> {
let existing_metadata_versions = || {
Expand Down
10 changes: 5 additions & 5 deletions src/execution/evaluator.rs
Original file line number Diff line number Diff line change
@@ -1,17 +1,17 @@
use std::sync::{Mutex, OnceLock};
use std::{borrow::Cow, collections::BTreeMap};

use anyhow::{bail, Context, Ok, Result};
use anyhow::{Context, Ok, Result, bail};
use futures::future::try_join_all;

use crate::builder::{plan::*, AnalyzedTransientFlow};
use crate::builder::{AnalyzedTransientFlow, plan::*};
use crate::py::IntoPyResult;
use crate::{
base::{schema, value},
utils::immutable::RefList,
};

use super::memoization::{evaluate_with_cell, EvaluationMemory, EvaluationMemoryOptions};
use super::memoization::{EvaluationMemory, EvaluationMemoryOptions, evaluate_with_cell};

#[derive(Debug)]
pub struct ScopeValueBuilder {
Expand Down Expand Up @@ -183,7 +183,7 @@ impl<'a> ScopeEntry<'a> {
) -> &'b value::KeyValue {
if indices.is_empty() {
key_val
} else if let value::KeyValue::Struct(ref fields) = key_val {
} else if let value::KeyValue::Struct(fields) = key_val {
Self::get_local_key_field(&fields[indices[0] as usize], &indices[1..])
} else {
panic!("Only struct can be accessed by sub field");
Expand All @@ -196,7 +196,7 @@ impl<'a> ScopeEntry<'a> {
) -> &'b value::Value<ScopeValueBuilder> {
if indices.is_empty() {
val
} else if let value::Value::Struct(ref fields) = val {
} else if let value::Value::Struct(fields) = val {
Self::get_local_field(&fields.fields[indices[0] as usize], &indices[1..])
} else {
panic!("Only struct can be accessed by sub field");
Expand Down