From 1702b5cf44192764625725692cb93b337c4779fd Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Cl=C3=A9ment=20Renault?= Date: Wed, 8 May 2024 15:26:21 +0200 Subject: [PATCH 01/29] Prepare for processing documents edition --- dump/src/lib.rs | 1 + index-scheduler/src/autobatcher.rs | 9 ++++++- index-scheduler/src/batch.rs | 29 +++++++++++++++++++++- index-scheduler/src/insta_snapshot.rs | 6 +++++ index-scheduler/src/utils.rs | 22 ++++++++++++++++- meilisearch-types/src/task_view.rs | 9 +++++++ meilisearch-types/src/tasks.rs | 35 ++++++++++++++++++++++++++- 7 files changed, 107 insertions(+), 4 deletions(-) diff --git a/dump/src/lib.rs b/dump/src/lib.rs index 42cb0e444..4c511b28e 100644 --- a/dump/src/lib.rs +++ b/dump/src/lib.rs @@ -166,6 +166,7 @@ impl From for KindDump { documents_count, allow_index_creation, }, + KindWithContent::DocumentEdition { .. } => todo!(), KindWithContent::DocumentDeletion { documents_ids, .. } => { KindDump::DocumentDeletion { documents_ids } } diff --git a/index-scheduler/src/autobatcher.rs b/index-scheduler/src/autobatcher.rs index dc184947c..96201bebb 100644 --- a/index-scheduler/src/autobatcher.rs +++ b/index-scheduler/src/autobatcher.rs @@ -24,6 +24,7 @@ enum AutobatchKind { allow_index_creation: bool, primary_key: Option, }, + DocumentEdition, DocumentDeletion, DocumentDeletionByFilter, DocumentClear, @@ -63,6 +64,7 @@ impl From for AutobatchKind { primary_key, .. } => AutobatchKind::DocumentImport { method, allow_index_creation, primary_key }, + KindWithContent::DocumentEdition { .. } => AutobatchKind::DocumentEdition, KindWithContent::DocumentDeletion { .. } => AutobatchKind::DocumentDeletion, KindWithContent::DocumentClear { .. } => AutobatchKind::DocumentClear, KindWithContent::DocumentDeletionByFilter { .. } => { @@ -98,6 +100,9 @@ pub enum BatchKind { primary_key: Option, operation_ids: Vec, }, + DocumentEdition { + id: TaskId, + }, DocumentDeletion { deletion_ids: Vec, }, @@ -199,6 +204,7 @@ impl BatchKind { }), allow_index_creation, ), + K::DocumentEdition => (Break(BatchKind::DocumentEdition { id: task_id }), false), K::DocumentDeletion => { (Continue(BatchKind::DocumentDeletion { deletion_ids: vec![task_id] }), false) } @@ -222,7 +228,7 @@ impl BatchKind { match (self, kind) { // We don't batch any of these operations - (this, K::IndexCreation | K::IndexUpdate | K::IndexSwap | K::DocumentDeletionByFilter) => Break(this), + (this, K::IndexCreation | K::IndexUpdate | K::IndexSwap | K::DocumentEdition | K::DocumentDeletionByFilter) => Break(this), // We must not batch tasks that don't have the same index creation rights if the index doesn't already exists. (this, kind) if !index_already_exists && this.allow_index_creation() == Some(false) && kind.allow_index_creation() == Some(true) => { Break(this) @@ -519,6 +525,7 @@ impl BatchKind { | BatchKind::IndexDeletion { .. } | BatchKind::IndexUpdate { .. } | BatchKind::IndexSwap { .. } + | BatchKind::DocumentEdition { .. } | BatchKind::DocumentDeletionByFilter { .. }, _, ) => { diff --git a/index-scheduler/src/batch.rs b/index-scheduler/src/batch.rs index cd5525eea..d996881c2 100644 --- a/index-scheduler/src/batch.rs +++ b/index-scheduler/src/batch.rs @@ -106,6 +106,10 @@ pub(crate) enum IndexOperation { operations: Vec, tasks: Vec, }, + DocumentEdition { + index_uid: String, + task: Task, + }, IndexDocumentDeletionByFilter { index_uid: String, task: Task, @@ -164,7 +168,8 @@ impl Batch { | IndexOperation::DocumentClear { tasks, .. } => { RoaringBitmap::from_iter(tasks.iter().map(|task| task.uid)) } - IndexOperation::IndexDocumentDeletionByFilter { task, .. } => { + IndexOperation::DocumentEdition { task, .. } + | IndexOperation::IndexDocumentDeletionByFilter { task, .. } => { RoaringBitmap::from_sorted_iter(std::iter::once(task.uid)).unwrap() } IndexOperation::SettingsAndDocumentOperation { @@ -228,6 +233,7 @@ impl IndexOperation { pub fn index_uid(&self) -> &str { match self { IndexOperation::DocumentOperation { index_uid, .. } + | IndexOperation::DocumentEdition { index_uid, .. } | IndexOperation::IndexDocumentDeletionByFilter { index_uid, .. } | IndexOperation::DocumentClear { index_uid, .. } | IndexOperation::Settings { index_uid, .. } @@ -243,6 +249,9 @@ impl fmt::Display for IndexOperation { IndexOperation::DocumentOperation { .. } => { f.write_str("IndexOperation::DocumentOperation") } + IndexOperation::DocumentEdition { .. } => { + f.write_str("IndexOperation::DocumentEdition") + } IndexOperation::IndexDocumentDeletionByFilter { .. } => { f.write_str("IndexOperation::IndexDocumentDeletionByFilter") } @@ -295,6 +304,21 @@ impl IndexScheduler { _ => unreachable!(), } } + BatchKind::DocumentEdition { id } => { + let task = self.get_task(rtxn, id)?.ok_or(Error::CorruptedTaskQueue)?; + match &task.kind { + KindWithContent::DocumentEdition { index_uid, .. } => { + Ok(Some(Batch::IndexOperation { + op: IndexOperation::DocumentEdition { + index_uid: index_uid.clone(), + task, + }, + must_create_index: false, + })) + } + _ => unreachable!(), + } + } BatchKind::DocumentOperation { method, operation_ids, .. } => { let tasks = self.get_existing_tasks(rtxn, operation_ids)?; let primary_key = tasks @@ -1386,6 +1410,9 @@ impl IndexScheduler { Ok(tasks) } + IndexOperation::DocumentEdition { .. } => { + todo!() + } IndexOperation::IndexDocumentDeletionByFilter { mut task, index_uid: _ } => { let filter = if let KindWithContent::DocumentDeletionByFilter { filter_expr, .. } = diff --git a/index-scheduler/src/insta_snapshot.rs b/index-scheduler/src/insta_snapshot.rs index d8625a2c7..915f1b5dd 100644 --- a/index-scheduler/src/insta_snapshot.rs +++ b/index-scheduler/src/insta_snapshot.rs @@ -177,6 +177,12 @@ fn snapshot_details(d: &Details) -> String { } => { format!("{{ received_documents: {received_documents}, indexed_documents: {indexed_documents:?} }}") } + Details::DocumentEdition { + edited_documents, + edition_code, + } => { + format!("{{ edited_documents: {edited_documents:?}, edition_code: {edition_code:?} }}") + } Details::SettingsUpdate { settings } => { format!("{{ settings: {settings:?} }}") } diff --git a/index-scheduler/src/utils.rs b/index-scheduler/src/utils.rs index 260ff6ee4..788a70fb8 100644 --- a/index-scheduler/src/utils.rs +++ b/index-scheduler/src/utils.rs @@ -238,6 +238,7 @@ pub fn swap_index_uid_in_task(task: &mut Task, swap: (&str, &str)) { let mut index_uids = vec![]; match &mut task.kind { K::DocumentAdditionOrUpdate { index_uid, .. } => index_uids.push(index_uid), + K::DocumentEdition { index_uid, .. } => index_uids.push(index_uid), K::DocumentDeletion { index_uid, .. } => index_uids.push(index_uid), K::DocumentDeletionByFilter { index_uid, .. } => index_uids.push(index_uid), K::DocumentClear { index_uid } => index_uids.push(index_uid), @@ -408,7 +409,26 @@ impl IndexScheduler { match status { Status::Succeeded => assert!(indexed_documents <= received_documents), Status::Failed | Status::Canceled => assert_eq!(indexed_documents, 0), - status => panic!("DocumentAddition can't have an indexed_document set if it's {}", status), + status => panic!("DocumentAddition can't have an indexed_documents set if it's {}", status), + } + } + None => { + assert!(matches!(status, Status::Enqueued | Status::Processing)) + } + } + } + Details::DocumentEdition { edited_documents, .. } => { + assert_eq!(kind.as_kind(), Kind::DocumentEdition); + match edited_documents { + Some(edited_documents) => { + assert!(matches!( + status, + Status::Succeeded | Status::Failed | Status::Canceled + )); + match status { + Status::Succeeded => (), + Status::Failed | Status::Canceled => assert_eq!(edited_documents, 0), + status => panic!("DocumentEdition can't have an edited_documents set if it's {}", status), } } None => { diff --git a/meilisearch-types/src/task_view.rs b/meilisearch-types/src/task_view.rs index 659427c9d..f09ed5f45 100644 --- a/meilisearch-types/src/task_view.rs +++ b/meilisearch-types/src/task_view.rs @@ -54,6 +54,8 @@ pub struct DetailsView { #[serde(skip_serializing_if = "Option::is_none")] pub indexed_documents: Option>, #[serde(skip_serializing_if = "Option::is_none")] + pub edited_documents: Option>, + #[serde(skip_serializing_if = "Option::is_none")] pub primary_key: Option>, #[serde(skip_serializing_if = "Option::is_none")] pub provided_ids: Option, @@ -70,6 +72,8 @@ pub struct DetailsView { #[serde(skip_serializing_if = "Option::is_none")] pub dump_uid: Option>, #[serde(skip_serializing_if = "Option::is_none")] + pub edition_code: Option, + #[serde(skip_serializing_if = "Option::is_none")] #[serde(flatten)] pub settings: Option>>, #[serde(skip_serializing_if = "Option::is_none")] @@ -86,6 +90,11 @@ impl From
for DetailsView { ..DetailsView::default() } } + Details::DocumentEdition { edited_documents, edition_code } => DetailsView { + edited_documents: Some(edited_documents), + edition_code: Some(edition_code), + ..DetailsView::default() + }, Details::SettingsUpdate { mut settings } => { settings.hide_secrets(); DetailsView { settings: Some(settings), ..DetailsView::default() } diff --git a/meilisearch-types/src/tasks.rs b/meilisearch-types/src/tasks.rs index 693ee4242..e722d15da 100644 --- a/meilisearch-types/src/tasks.rs +++ b/meilisearch-types/src/tasks.rs @@ -48,6 +48,7 @@ impl Task { | TaskDeletion { .. } | IndexSwap { .. } => None, DocumentAdditionOrUpdate { index_uid, .. } + | DocumentEdition { index_uid, .. } | DocumentDeletion { index_uid, .. } | DocumentDeletionByFilter { index_uid, .. } | DocumentClear { index_uid } @@ -67,7 +68,8 @@ impl Task { pub fn content_uuid(&self) -> Option { match self.kind { KindWithContent::DocumentAdditionOrUpdate { content_file, .. } => Some(content_file), - KindWithContent::DocumentDeletion { .. } + KindWithContent::DocumentEdition { .. } + | KindWithContent::DocumentDeletion { .. } | KindWithContent::DocumentDeletionByFilter { .. } | KindWithContent::DocumentClear { .. } | KindWithContent::SettingsUpdate { .. } @@ -94,6 +96,10 @@ pub enum KindWithContent { documents_count: u64, allow_index_creation: bool, }, + DocumentEdition { + index_uid: String, + edition_code: String, + }, DocumentDeletion { index_uid: String, documents_ids: Vec, @@ -150,6 +156,7 @@ impl KindWithContent { pub fn as_kind(&self) -> Kind { match self { KindWithContent::DocumentAdditionOrUpdate { .. } => Kind::DocumentAdditionOrUpdate, + KindWithContent::DocumentEdition { .. } => Kind::DocumentEdition, KindWithContent::DocumentDeletion { .. } => Kind::DocumentDeletion, KindWithContent::DocumentDeletionByFilter { .. } => Kind::DocumentDeletion, KindWithContent::DocumentClear { .. } => Kind::DocumentDeletion, @@ -174,6 +181,7 @@ impl KindWithContent { | TaskCancelation { .. } | TaskDeletion { .. } => vec![], DocumentAdditionOrUpdate { index_uid, .. } + | DocumentEdition { index_uid, .. } | DocumentDeletion { index_uid, .. } | DocumentDeletionByFilter { index_uid, .. } | DocumentClear { index_uid } @@ -202,6 +210,12 @@ impl KindWithContent { indexed_documents: None, }) } + KindWithContent::DocumentEdition { edition_code, .. } => { + Some(Details::DocumentEdition { + edited_documents: None, + edition_code: edition_code.clone(), + }) + } KindWithContent::DocumentDeletion { index_uid: _, documents_ids } => { Some(Details::DocumentDeletion { provided_ids: documents_ids.len(), @@ -250,6 +264,12 @@ impl KindWithContent { indexed_documents: Some(0), }) } + KindWithContent::DocumentEdition { edition_code, .. } => { + Some(Details::DocumentEdition { + edited_documents: Some(0), + edition_code: edition_code.clone(), + }) + } KindWithContent::DocumentDeletion { index_uid: _, documents_ids } => { Some(Details::DocumentDeletion { provided_ids: documents_ids.len(), @@ -301,6 +321,12 @@ impl From<&KindWithContent> for Option
{ indexed_documents: None, }) } + KindWithContent::DocumentEdition { edition_code, .. } => { + Some(Details::DocumentEdition { + edited_documents: None, + edition_code: edition_code.clone(), + }) + } KindWithContent::DocumentDeletion { .. } => None, KindWithContent::DocumentDeletionByFilter { .. } => None, KindWithContent::DocumentClear { .. } => None, @@ -394,6 +420,7 @@ impl std::error::Error for ParseTaskStatusError {} #[serde(rename_all = "camelCase")] pub enum Kind { DocumentAdditionOrUpdate, + DocumentEdition, DocumentDeletion, SettingsUpdate, IndexCreation, @@ -410,6 +437,7 @@ impl Kind { pub fn related_to_one_index(&self) -> bool { match self { Kind::DocumentAdditionOrUpdate + | Kind::DocumentEdition | Kind::DocumentDeletion | Kind::SettingsUpdate | Kind::IndexCreation @@ -427,6 +455,7 @@ impl Display for Kind { fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { match self { Kind::DocumentAdditionOrUpdate => write!(f, "documentAdditionOrUpdate"), + Kind::DocumentEdition => write!(f, "documentEdition"), Kind::DocumentDeletion => write!(f, "documentDeletion"), Kind::SettingsUpdate => write!(f, "settingsUpdate"), Kind::IndexCreation => write!(f, "indexCreation"), @@ -454,6 +483,8 @@ impl FromStr for Kind { Ok(Kind::IndexDeletion) } else if kind.eq_ignore_ascii_case("documentAdditionOrUpdate") { Ok(Kind::DocumentAdditionOrUpdate) + } else if kind.eq_ignore_ascii_case("documentEdition") { + Ok(Kind::DocumentEdition) } else if kind.eq_ignore_ascii_case("documentDeletion") { Ok(Kind::DocumentDeletion) } else if kind.eq_ignore_ascii_case("settingsUpdate") { @@ -496,6 +527,7 @@ impl std::error::Error for ParseTaskKindError {} #[derive(Debug, PartialEq, Eq, Clone, Serialize, Deserialize)] pub enum Details { DocumentAdditionOrUpdate { received_documents: u64, indexed_documents: Option }, + DocumentEdition { edited_documents: Option, edition_code: String }, SettingsUpdate { settings: Box> }, IndexInfo { primary_key: Option }, DocumentDeletion { provided_ids: usize, deleted_documents: Option }, @@ -514,6 +546,7 @@ impl Details { Self::DocumentAdditionOrUpdate { indexed_documents, .. } => { *indexed_documents = Some(0) } + Self::DocumentEdition { edited_documents, .. } => *edited_documents = Some(0), Self::DocumentDeletion { deleted_documents, .. } => *deleted_documents = Some(0), Self::DocumentDeletionByFilter { deleted_documents, .. } => { *deleted_documents = Some(0) From ba859596426fc3110f5ae02417e35b0f26d27e6f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Cl=C3=A9ment=20Renault?= Date: Wed, 8 May 2024 15:53:40 +0200 Subject: [PATCH 02/29] Support filtering the documents to edit with lua --- index-scheduler/src/batch.rs | 93 ++++++++++++++++++++- index-scheduler/src/insta_snapshot.rs | 3 +- meilisearch-types/src/task_view.rs | 13 +-- meilisearch-types/src/tasks.rs | 16 ++-- meilisearch/src/routes/indexes/documents.rs | 45 ++++++++++ 5 files changed, 153 insertions(+), 17 deletions(-) diff --git a/index-scheduler/src/batch.rs b/index-scheduler/src/batch.rs index d996881c2..4d0cea8f4 100644 --- a/index-scheduler/src/batch.rs +++ b/index-scheduler/src/batch.rs @@ -1410,8 +1410,55 @@ impl IndexScheduler { Ok(tasks) } - IndexOperation::DocumentEdition { .. } => { - todo!() + IndexOperation::DocumentEdition { mut task, .. } => { + let (filter, edition_code) = + if let KindWithContent::DocumentEdition { filter_expr, edition_code, .. } = + &task.kind + { + (filter_expr, edition_code) + } else { + unreachable!() + }; + let edited_documents = edit_documents_by_function( + index_wtxn, + filter, + edition_code, + self.index_mapper.indexer_config(), + self.must_stop_processing.clone(), + index, + ); + let (original_filter, edition_code) = + if let Some(Details::DocumentEdition { + original_filter, edition_code, .. + }) = task.details + { + (original_filter, edition_code) + } else { + // In the case of a `documentDeleteByFilter` the details MUST be set + unreachable!(); + }; + + match edited_documents { + Ok(edited_documents) => { + task.status = Status::Succeeded; + task.details = Some(Details::DocumentEdition { + original_filter, + edition_code, + edited_documents: Some(edited_documents), + }); + } + Err(e) => { + task.status = Status::Failed; + task.details = Some(Details::DocumentEdition { + original_filter, + edition_code, + edited_documents: Some(0), + }); + task.error = Some(e.into()); + } + } + + Ok(vec![task]) } IndexOperation::IndexDocumentDeletionByFilter { mut task, index_uid: _ } => { let filter = @@ -1701,3 +1748,45 @@ fn delete_document_by_filter<'a>( 0 }) } + +fn edit_documents_by_function<'a>( + wtxn: &mut RwTxn<'a>, + filter: &serde_json::Value, + code: &str, + indexer_config: &IndexerConfig, + must_stop_processing: MustStopProcessing, + index: &'a Index, +) -> Result { + let filter = Filter::from_json(filter)?; + Ok(if let Some(filter) = filter { + let candidates = filter.evaluate(wtxn, index).map_err(|err| match err { + milli::Error::UserError(milli::UserError::InvalidFilter(_)) => { + Error::from(err).with_custom_error_code(Code::InvalidDocumentFilter) + } + e => e.into(), + })?; + + let config = IndexDocumentsConfig { + update_method: IndexDocumentsMethod::ReplaceDocuments, + ..Default::default() + }; + + let mut builder = milli::update::IndexDocuments::new( + wtxn, + index, + indexer_config, + config, + |indexing_step| tracing::debug!(update = ?indexing_step), + || must_stop_processing.get(), + )?; + + todo!("edit documents with the code and reinsert them in the builder") + // let (new_builder, count) = builder.remove_documents_from_db_no_batch(&candidates)?; + // builder = new_builder; + + // let _ = builder.execute()?; + // count + } else { + 0 + }) +} diff --git a/index-scheduler/src/insta_snapshot.rs b/index-scheduler/src/insta_snapshot.rs index 915f1b5dd..f202eca03 100644 --- a/index-scheduler/src/insta_snapshot.rs +++ b/index-scheduler/src/insta_snapshot.rs @@ -180,8 +180,9 @@ fn snapshot_details(d: &Details) -> String { Details::DocumentEdition { edited_documents, edition_code, + original_filter, } => { - format!("{{ edited_documents: {edited_documents:?}, edition_code: {edition_code:?} }}") + format!("{{ edited_documents: {edited_documents:?}, edition_code: {edition_code:?}, original_filter: {original_filter:?} }}") } Details::SettingsUpdate { settings } => { format!("{{ settings: {settings:?} }}") diff --git a/meilisearch-types/src/task_view.rs b/meilisearch-types/src/task_view.rs index f09ed5f45..d718ee33a 100644 --- a/meilisearch-types/src/task_view.rs +++ b/meilisearch-types/src/task_view.rs @@ -90,11 +90,14 @@ impl From
for DetailsView { ..DetailsView::default() } } - Details::DocumentEdition { edited_documents, edition_code } => DetailsView { - edited_documents: Some(edited_documents), - edition_code: Some(edition_code), - ..DetailsView::default() - }, + Details::DocumentEdition { edited_documents, original_filter, edition_code } => { + DetailsView { + edited_documents: Some(edited_documents), + original_filter: Some(Some(original_filter)), + edition_code: Some(edition_code), + ..DetailsView::default() + } + } Details::SettingsUpdate { mut settings } => { settings.hide_secrets(); DetailsView { settings: Some(settings), ..DetailsView::default() } diff --git a/meilisearch-types/src/tasks.rs b/meilisearch-types/src/tasks.rs index e722d15da..e6bb57cf7 100644 --- a/meilisearch-types/src/tasks.rs +++ b/meilisearch-types/src/tasks.rs @@ -98,6 +98,7 @@ pub enum KindWithContent { }, DocumentEdition { index_uid: String, + filter_expr: serde_json::Value, edition_code: String, }, DocumentDeletion { @@ -210,9 +211,10 @@ impl KindWithContent { indexed_documents: None, }) } - KindWithContent::DocumentEdition { edition_code, .. } => { + KindWithContent::DocumentEdition { index_uid: _, edition_code, filter_expr } => { Some(Details::DocumentEdition { edited_documents: None, + original_filter: filter_expr.to_string(), edition_code: edition_code.clone(), }) } @@ -264,9 +266,10 @@ impl KindWithContent { indexed_documents: Some(0), }) } - KindWithContent::DocumentEdition { edition_code, .. } => { + KindWithContent::DocumentEdition { index_uid: _, filter_expr, edition_code } => { Some(Details::DocumentEdition { edited_documents: Some(0), + original_filter: filter_expr.to_string(), edition_code: edition_code.clone(), }) } @@ -321,12 +324,7 @@ impl From<&KindWithContent> for Option
{ indexed_documents: None, }) } - KindWithContent::DocumentEdition { edition_code, .. } => { - Some(Details::DocumentEdition { - edited_documents: None, - edition_code: edition_code.clone(), - }) - } + KindWithContent::DocumentEdition { .. } => None, KindWithContent::DocumentDeletion { .. } => None, KindWithContent::DocumentDeletionByFilter { .. } => None, KindWithContent::DocumentClear { .. } => None, @@ -527,7 +525,7 @@ impl std::error::Error for ParseTaskKindError {} #[derive(Debug, PartialEq, Eq, Clone, Serialize, Deserialize)] pub enum Details { DocumentAdditionOrUpdate { received_documents: u64, indexed_documents: Option }, - DocumentEdition { edited_documents: Option, edition_code: String }, + DocumentEdition { edited_documents: Option, original_filter: String, edition_code: String }, SettingsUpdate { settings: Box> }, IndexInfo { primary_key: Option }, DocumentDeletion { provided_ids: usize, deleted_documents: Option }, diff --git a/meilisearch/src/routes/indexes/documents.rs b/meilisearch/src/routes/indexes/documents.rs index 7c6cbc85d..380e2dd4f 100644 --- a/meilisearch/src/routes/indexes/documents.rs +++ b/meilisearch/src/routes/indexes/documents.rs @@ -82,6 +82,7 @@ pub fn configure(cfg: &mut web::ServiceConfig) { web::resource("/delete-batch").route(web::post().to(SeqHandler(delete_documents_batch))), ) .service(web::resource("/delete").route(web::post().to(SeqHandler(delete_documents_by_filter)))) + .service(web::resource("/edit").route(web::post().to(SeqHandler(edit_documents_by_function)))) .service(web::resource("/fetch").route(web::post().to(SeqHandler(documents_by_query_post)))) .service( web::resource("/{document_id}") @@ -574,6 +575,50 @@ pub async fn delete_documents_by_filter( Ok(HttpResponse::Accepted().json(task)) } +#[derive(Debug, Deserr)] +#[deserr(error = DeserrJsonError, rename_all = camelCase, deny_unknown_fields)] +pub struct DocumentEditionByFunction { + #[deserr(error = DeserrJsonError, missing_field_error = DeserrJsonError::missing_document_filter)] + filter: Value, + #[deserr(error = DeserrJsonError, missing_field_error = DeserrJsonError::missing_document_filter)] + function: String, +} + +pub async fn edit_documents_by_function( + index_scheduler: GuardedData, Data>, + index_uid: web::Path, + body: AwebJson, + req: HttpRequest, + opt: web::Data, + _analytics: web::Data, +) -> Result { + debug!(parameters = ?body, "Edit documents by function"); + let index_uid = IndexUid::try_from(index_uid.into_inner())?; + let index_uid = index_uid.into_inner(); + let DocumentEditionByFunction { filter, function } = body.into_inner(); + + // analytics.delete_documents(DocumentDeletionKind::PerFilter, &req); + + // we ensure the filter is well formed before enqueuing it + || -> Result<_, ResponseError> { + Ok(crate::search::parse_filter(&filter)?.ok_or(MeilisearchHttpError::EmptyFilter)?) + }() + // and whatever was the error, the error code should always be an InvalidDocumentFilter + .map_err(|err| ResponseError::from_msg(err.message, Code::InvalidDocumentFilter))?; + let task = + KindWithContent::DocumentEdition { index_uid, filter_expr: filter, edition_code: function }; + + let uid = get_task_id(&req, &opt)?; + let dry_run = is_dry_run(&req, &opt)?; + let task: SummarizedTaskView = + tokio::task::spawn_blocking(move || index_scheduler.register(task, uid, dry_run)) + .await?? + .into(); + + debug!(returns = ?task, "Delete documents by filter"); + Ok(HttpResponse::Accepted().json(task)) +} + pub async fn clear_all_documents( index_scheduler: GuardedData, Data>, index_uid: web::Path, From efc156a4a42d4d3ccdda8574270ac96f2cff0cfa Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Cl=C3=A9ment=20Renault?= Date: Wed, 8 May 2024 23:37:57 +0200 Subject: [PATCH 03/29] Executing Lua works correctly --- Cargo.lock | 853 +++++++++++--------- index-scheduler/src/batch.rs | 48 +- meilisearch-types/src/task_view.rs | 2 +- meilisearch-types/src/tasks.rs | 59 +- meilisearch/src/routes/indexes/documents.rs | 16 +- milli/Cargo.toml | 1 + milli/src/update/index_documents/mod.rs | 58 +- 7 files changed, 616 insertions(+), 421 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 05bd80213..ed3a0cc48 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -4,11 +4,11 @@ version = 3 [[package]] name = "actix-codec" -version = "0.5.2" +version = "0.5.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5f7b0a21988c1bf877cf4759ef5ddaac04c1c9fe808c9142ecb78ba97d97a28a" +checksum = "617a8268e3537fe1d8c9ead925fca49ef6400927ee7bc26750e90ecee14ce4b8" dependencies = [ - "bitflags 2.6.0", + "bitflags 1.3.2", "bytes", "futures-core", "futures-sink", @@ -56,7 +56,7 @@ dependencies = [ "flate2", "futures-core", "h2", - "http 0.2.12", + "http 0.2.11", "httparse", "httpdate", "itoa", @@ -80,7 +80,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "e01ed3140b2f8d422c68afa1ed2e85d996ea619c988ac834d255db32138655cb" dependencies = [ "quote", - "syn 2.0.70", + "syn 2.0.60", ] [[package]] @@ -91,7 +91,7 @@ checksum = "13d324164c51f63867b57e73ba5936ea151b8a41a1d23d1031eeb9f70d0236f8" dependencies = [ "bytestring", "cfg-if", - "http 0.2.12", + "http 0.2.11", "regex-lite", "serde", "tracing", @@ -110,9 +110,9 @@ dependencies = [ [[package]] name = "actix-server" -version = "2.4.0" +version = "2.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b02303ce8d4e8be5b855af6cf3c3a08f3eff26880faad82bab679c22d3650cb5" +checksum = "3e8613a75dd50cc45f473cee3c34d59ed677c0f7b44480ce3b8247d7dc519327" dependencies = [ "actix-rt", "actix-service", @@ -120,7 +120,8 @@ dependencies = [ "futures-core", "futures-util", "mio", - "socket2", + "num_cpus", + "socket2 0.4.9", "tokio", "tracing", ] @@ -152,7 +153,7 @@ dependencies = [ "tokio-rustls 0.24.1", "tokio-util", "tracing", - "webpki-roots 0.25.4", + "webpki-roots 0.25.3", ] [[package]] @@ -201,7 +202,7 @@ dependencies = [ "serde_json", "serde_urlencoded", "smallvec", - "socket2", + "socket2 0.5.5", "time", "url", ] @@ -215,14 +216,14 @@ dependencies = [ "actix-router", "proc-macro2", "quote", - "syn 2.0.70", + "syn 2.0.60", ] [[package]] name = "addr2line" -version = "0.22.0" +version = "0.20.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6e4503c46a5c0c7844e948c9a4d6acd9f50cccb4de1c48eb9e291ea17470c678" +checksum = "f4fa78e18c64fce05e902adecd7a5eed15a5e0a3439f7b0e169f0252214865e3" dependencies = [ "gimli", ] @@ -294,9 +295,9 @@ dependencies = [ [[package]] name = "allocator-api2" -version = "0.2.18" +version = "0.2.16" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5c6cb57a04249c6480766f7f7cef5467412af1490f8d1e243141daddada3264f" +checksum = "0942ffc6dcaadf03badf6e6a2d0228460359d5e34b57ccdc720b7382dfbd5ec5" [[package]] name = "anes" @@ -306,51 +307,50 @@ checksum = "4b46cbb362ab8752921c97e041f5e366ee6297bd428a31275b9fcf1e380f7299" [[package]] name = "anstream" -version = "0.6.14" +version = "0.6.13" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "418c75fa768af9c03be99d17643f93f79bbba589895012a80e3452a19ddda15b" +checksum = "d96bd03f33fe50a863e394ee9718a706f988b9079b20c3784fb726e7678b62fb" dependencies = [ "anstyle", "anstyle-parse", "anstyle-query", "anstyle-wincon", "colorchoice", - "is_terminal_polyfill", "utf8parse", ] [[package]] name = "anstyle" -version = "1.0.7" +version = "1.0.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "038dfcf04a5feb68e9c60b21c9625a54c2c0616e79b72b0fd87075a056ae1d1b" +checksum = "8901269c6307e8d93993578286ac0edf7f195079ffff5ebdeea6a59ffb7e36bc" [[package]] name = "anstyle-parse" -version = "0.2.4" +version = "0.2.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c03a11a9034d92058ceb6ee011ce58af4a9bf61491aa7e1e59ecd24bd40d22d4" +checksum = "938874ff5980b03a87c5524b3ae5b59cf99b1d6bc836848df7bc5ada9643c333" dependencies = [ "utf8parse", ] [[package]] name = "anstyle-query" -version = "1.1.0" +version = "1.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ad186efb764318d35165f1758e7dcef3b10628e26d41a44bc5550652e6804391" +checksum = "5ca11d4be1bab0c8bc8734a9aa7bf4ee8316d462a08c6ac5052f888fef5b494b" dependencies = [ - "windows-sys 0.52.0", + "windows-sys 0.48.0", ] [[package]] name = "anstyle-wincon" -version = "3.0.3" +version = "3.0.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "61a38449feb7068f52bb06c12759005cf459ee52bb4adc1d5a7c4322d716fb19" +checksum = "f0699d10d2f4d628a98ee7b57b289abbc98ff3bad977cb3152709d4bf2330628" dependencies = [ "anstyle", - "windows-sys 0.52.0", + "windows-sys 0.48.0", ] [[package]] @@ -410,20 +410,20 @@ checksum = "6e0c28dcc82d7c8ead5cb13beb15405b57b8546e93215673ff8ca0349a028107" dependencies = [ "proc-macro2", "quote", - "syn 2.0.70", + "syn 2.0.60", ] [[package]] name = "autocfg" -version = "1.3.0" +version = "1.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0c4b4d0bd25bd0b74681c0ad21497610ce1b7c91b1022cd21c80c6fbdd9476b0" +checksum = "f1fdabc7756949593fe60f30ec81974b613357de856987752631dea1e3394c80" [[package]] name = "backtrace" -version = "0.3.73" +version = "0.3.68" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5cc23269a4f8976d0a4d2e7109211a419fe30e8d88d677cd60b6bc79c5732e0a" +checksum = "4319208da049c43661739c5fade2ba182f09d1dc2299b32298d3a31692b17e12" dependencies = [ "addr2line", "cc", @@ -512,7 +512,7 @@ dependencies = [ "regex", "rustc-hash", "shlex", - "syn 2.0.70", + "syn 2.0.60", ] [[package]] @@ -597,7 +597,7 @@ dependencies = [ "proc-macro-crate", "proc-macro2", "quote", - "syn 2.0.70", + "syn 2.0.60", "syn_derive", ] @@ -683,9 +683,9 @@ dependencies = [ [[package]] name = "bytecount" -version = "0.6.8" +version = "0.6.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5ce89b21cab1437276d2650d57e971f9d548a2d9037cc231abdc0562b97498ce" +checksum = "2c676a478f63e9fa2dd5368a42f28bba0d6c560b775f38583c8bbaa7fcd67c9c" [[package]] name = "bytemuck" @@ -698,13 +698,13 @@ dependencies = [ [[package]] name = "bytemuck_derive" -version = "1.7.0" +version = "1.6.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1ee891b04274a59bd38b412188e24b849617b2e45a0fd8d057deb63e7403761b" +checksum = "4da9a32f3fed317401fa3c862968128267c3106685286e15d5aaa3d7389c2f60" dependencies = [ "proc-macro2", "quote", - "syn 2.0.70", + "syn 2.0.60", ] [[package]] @@ -721,9 +721,9 @@ checksum = "514de17de45fdb8dc022b1a7975556c53c86f9f0aa5f534b98977b171857c2c9" [[package]] name = "bytestring" -version = "1.3.1" +version = "1.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "74d80203ea6b29df88012294f62733de21cfeab47f17b41af3a38bc30a03ee72" +checksum = "238e4886760d98c4f899360c834fa93e62cf7f721ac3c2da375cbdf4b8679aae" dependencies = [ "bytes", ] @@ -751,9 +751,9 @@ dependencies = [ [[package]] name = "camino" -version = "1.1.7" +version = "1.1.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e0ec6b951b160caa93cc0c7b209e5a3bff7aae9062213451ac99493cd844c239" +checksum = "c59e92b5a388f549b863a7bea62612c09f24c8393560709a54558a9abdfb3b9c" dependencies = [ "serde", ] @@ -768,7 +768,7 @@ dependencies = [ "candle-kernels", "cudarc", "gemm", - "half", + "half 2.4.0", "memmap2", "num-traits", "num_cpus", @@ -797,7 +797,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "b006b30f66a0d94fc9cef0ac4de6ce510565f35ae2c6c35ce5d4aacfb0fc8eeb" dependencies = [ "candle-core", - "half", + "half 2.4.0", "num-traits", "rayon", "safetensors", @@ -826,9 +826,9 @@ dependencies = [ [[package]] name = "cargo-platform" -version = "0.1.8" +version = "0.1.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "24b1f0365a6c6bb4020cd05806fd0d33c44d38046b8bd7f0e40814b9763cabfc" +checksum = "ceed8ef69d8518a5dda55c07425450b58a4e1946f4951eab6d7191ee86c2443d" dependencies = [ "serde", ] @@ -865,9 +865,9 @@ checksum = "37b2a672a2cb129a2e41c10b1224bb368f9f37a2b16b612598138befd7b37eb5" [[package]] name = "cc" -version = "1.1.0" +version = "1.0.104" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "eaff6f8ce506b9773fa786672d63fc7a191ffea1be33f72bbd4aeacefca9ffc8" +checksum = "74b6a57f98764a267ff415d50a25e6e166f3831a5071af4995296ea97d210490" dependencies = [ "jobserver", "libc", @@ -942,9 +942,9 @@ dependencies = [ [[package]] name = "ciborium" -version = "0.2.2" +version = "0.2.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "42e69ffd6f0917f5c029256a24d0161db17cea3997d185db0d35926308770f0e" +checksum = "effd91f6c78e5a4ace8a5d3c0b6bfaec9e2baaef55f3efc00e45fb2e477ee926" dependencies = [ "ciborium-io", "ciborium-ll", @@ -953,18 +953,18 @@ dependencies = [ [[package]] name = "ciborium-io" -version = "0.2.2" +version = "0.2.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "05afea1e0a06c9be33d539b876f1ce3692f4afea2cb41f740e7743225ed1c757" +checksum = "cdf919175532b369853f5d5e20b26b43112613fd6fe7aee757e35f7a44642656" [[package]] name = "ciborium-ll" -version = "0.2.2" +version = "0.2.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "57663b653d948a338bfb3eeba9bb2fd5fcfaecb9e199e87e1eda4d9e8b240fd9" +checksum = "defaa24ecc093c77630e6c15e17c51f5e187bf35ee514f4e2d67baaa96dae22b" dependencies = [ "ciborium-io", - "half", + "half 1.8.2", ] [[package]] @@ -979,9 +979,9 @@ dependencies = [ [[package]] name = "clang-sys" -version = "1.8.1" +version = "1.7.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0b023947811758c97c59bf9d1c188fd619ad4718dcaa767947df1cadb14f39f4" +checksum = "67523a3b4be3ce1989d607a828d036249522dd9c1c8de7f4dd2dae43a37369d1" dependencies = [ "glob", "libc", @@ -1019,7 +1019,7 @@ dependencies = [ "heck 0.5.0", "proc-macro2", "quote", - "syn 2.0.70", + "syn 2.0.60", ] [[package]] @@ -1042,9 +1042,9 @@ dependencies = [ [[package]] name = "colorchoice" -version = "1.0.1" +version = "1.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0b6a852b24ab71dffc585bcb46eaf7959d175cb865a7152e35b348d1b2960422" +checksum = "acbf1af155f9b9ef647e42cdc158db4b64a1b61f743629225fde6f3e0be2a7c7" [[package]] name = "concat-arrays" @@ -1059,15 +1059,15 @@ dependencies = [ [[package]] name = "console" -version = "0.15.8" +version = "0.15.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0e1f83fc076bd6dd27517eacdf25fef6c4dfe5f1d7448bafaaf3a26f13b5e4eb" +checksum = "c926e00cc70edefdc64d3a5ff31cc65bb97a3460097762bd23afb4d8145fccf8" dependencies = [ "encode_unicode", "lazy_static", "libc", "unicode-width", - "windows-sys 0.52.0", + "windows-sys 0.45.0", ] [[package]] @@ -1104,15 +1104,15 @@ dependencies = [ [[package]] name = "core-foundation-sys" -version = "0.8.6" +version = "0.8.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "06ea2b9bc92be3c2baa9334a323ebca2d6f074ff852cd1d7b11064035cd3868f" +checksum = "e496a50fda8aacccc86d7529e2c1e0892dbd0f898a6b5645b5561b89c3210efa" [[package]] name = "cow-utils" -version = "0.1.3" +version = "0.1.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "417bef24afe1460300965a25ff4a24b8b45ad011948302ec221e8a0a81eb2c79" +checksum = "79bb3adfaf5f75d24b01aee375f7555907840fa2800e5ec8fa3b9e2031830173" [[package]] name = "cpufeatures" @@ -1282,7 +1282,7 @@ version = "0.11.7" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "56ee2a3fbbd981e1c7ea73cc2af136e754eb22d17436de37155227ee4dbe0cf4" dependencies = [ - "half", + "half 2.4.0", "libloading", ] @@ -1298,12 +1298,12 @@ dependencies = [ [[package]] name = "darling" -version = "0.20.10" +version = "0.20.9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6f63b86c8a8826a49b8c21f08a2d07338eec8d900540f8630dc76284be802989" +checksum = "83b2eb4d90d12bdda5ed17de686c2acb4c57914f8f921b8da7e112b5a36f3fe1" dependencies = [ - "darling_core 0.20.10", - "darling_macro 0.20.10", + "darling_core 0.20.9", + "darling_macro 0.20.9", ] [[package]] @@ -1322,16 +1322,16 @@ dependencies = [ [[package]] name = "darling_core" -version = "0.20.10" +version = "0.20.9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "95133861a8032aaea082871032f5815eb9e98cef03fa916ab4500513994df9e5" +checksum = "622687fe0bac72a04e5599029151f5796111b90f1baaa9b544d807a5e31cd120" dependencies = [ "fnv", "ident_case", "proc-macro2", "quote", "strsim 0.11.1", - "syn 2.0.70", + "syn 2.0.60", ] [[package]] @@ -1347,13 +1347,13 @@ dependencies = [ [[package]] name = "darling_macro" -version = "0.20.10" +version = "0.20.9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d336a2a514f6ccccaa3e09b02d41d35330c07ddf03a62165fcec10bb561c7806" +checksum = "733cabb43482b1a1b53eee8583c2b9e8684d592215ea83efd305dd31bc2f0178" dependencies = [ - "darling_core 0.20.10", + "darling_core 0.20.9", "quote", - "syn 2.0.70", + "syn 2.0.60", ] [[package]] @@ -1389,7 +1389,7 @@ checksum = "67e77553c4162a157adbf834ebae5b415acbecbeafc7a74b0e886657506a7611" dependencies = [ "proc-macro2", "quote", - "syn 2.0.70", + "syn 2.0.60", ] [[package]] @@ -1428,10 +1428,10 @@ version = "0.20.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "d48cda787f839151732d396ac69e3473923d54312c070ee21e9effcaa8ca0b1d" dependencies = [ - "darling 0.20.10", + "darling 0.20.9", "proc-macro2", "quote", - "syn 2.0.70", + "syn 2.0.60", ] [[package]] @@ -1451,20 +1451,20 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "206868b8242f27cecce124c19fd88157fbd0dd334df2587f36417bafbc85097b" dependencies = [ "derive_builder_core 0.20.0", - "syn 2.0.70", + "syn 2.0.60", ] [[package]] name = "derive_more" -version = "0.99.18" +version = "0.99.17" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5f33878137e4dafd7fa914ad4e259e18a4e8e532b9617a2d0150262bf53abfce" +checksum = "4fb810d30a7c1953f91334de7244731fc3f3c10d7fe163338a35b9f640960321" dependencies = [ "convert_case 0.4.0", "proc-macro2", "quote", "rustc_version", - "syn 2.0.70", + "syn 1.0.109", ] [[package]] @@ -1493,7 +1493,7 @@ dependencies = [ "convert_case 0.6.0", "proc-macro2", "quote", - "syn 2.0.70", + "syn 2.0.60", ] [[package]] @@ -1563,7 +1563,7 @@ checksum = "97369cbbc041bc366949bc74d34658d6cda5621039731c6310521892a3a20ae0" dependencies = [ "proc-macro2", "quote", - "syn 2.0.70", + "syn 2.0.60", ] [[package]] @@ -1696,9 +1696,9 @@ checksum = "a246d82be1c9d791c5dfde9a2bd045fc3cbba3fa2b11ad558f27d01712f00569" [[package]] name = "encoding_rs" -version = "0.8.34" +version = "0.8.33" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b45de904aa0b010bce2ab45264d0631681847fa7b6f2eaa7dab7619943bc4f59" +checksum = "7268b386296a025e474d5140678f75d6de9493ae55a5d709eeb9dd08149945e1" dependencies = [ "cfg-if", ] @@ -1721,7 +1721,7 @@ dependencies = [ "heck 0.4.1", "proc-macro2", "quote", - "syn 2.0.70", + "syn 2.0.60", ] [[package]] @@ -1741,7 +1741,7 @@ checksum = "a1ab991c1362ac86c61ab6f556cff143daa22e5a15e4e189df818b2fd19fe65b" dependencies = [ "proc-macro2", "quote", - "syn 2.0.70", + "syn 2.0.60", ] [[package]] @@ -1752,9 +1752,9 @@ checksum = "5443807d6dff69373d433ab9ef5378ad8df50ca6298caf15de6e52e24aaf54d5" [[package]] name = "errno" -version = "0.3.9" +version = "0.3.8" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "534c5cf6194dfab3db3242765c03bbe257cf92f22b38f6bc0c58d59108a820ba" +checksum = "a258e46cdc063eb8519c00b9fc845fc47bcfca4130e2f08e88665ceda8474245" dependencies = [ "libc", "windows-sys 0.52.0", @@ -1805,14 +1805,14 @@ dependencies = [ [[package]] name = "filetime" -version = "0.2.23" +version = "0.2.22" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1ee447700ac8aa0b2f2bd7bc4462ad686ba06baa6727ac149a2d6277f0d240fd" +checksum = "d4029edd3e734da6fe05b6cd7bd2960760a616bd2ddd0d59a0124746d6272af0" dependencies = [ "cfg-if", "libc", - "redox_syscall 0.4.1", - "windows-sys 0.52.0", + "redox_syscall 0.3.5", + "windows-sys 0.48.0", ] [[package]] @@ -1926,7 +1926,7 @@ checksum = "87750cf4b7a4c0625b1529e4c543c2182106e4dedc60a2a6455e00d212c489ac" dependencies = [ "proc-macro2", "quote", - "syn 2.0.70", + "syn 2.0.60", ] [[package]] @@ -1995,6 +1995,30 @@ dependencies = [ "serde_json", ] +[[package]] +name = "gc-arena" +version = "0.5.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "24d4a9d8c3c1ef4301b8afc383e53e102a13f9947da2181bf82828480dcc5165" +dependencies = [ + "allocator-api2", + "gc-arena-derive", + "hashbrown 0.14.3", + "sptr", +] + +[[package]] +name = "gc-arena-derive" +version = "0.5.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8c952d28a64896b1c4ac382dcd7beeaeaabc13e8c7c7f800ea2938abd828ed30" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.60", + "synstructure", +] + [[package]] name = "gemm" version = "0.17.1" @@ -2053,7 +2077,7 @@ checksum = "a2e7ea062c987abcd8db95db917b4ffb4ecdfd0668471d8dc54734fdff2354e8" dependencies = [ "bytemuck", "dyn-stack", - "half", + "half 2.4.0", "num-complex", "num-traits", "once_cell", @@ -2074,7 +2098,7 @@ dependencies = [ "dyn-stack", "gemm-common", "gemm-f32", - "half", + "half 2.4.0", "num-complex", "num-traits", "paste", @@ -2131,9 +2155,9 @@ checksum = "36d244a08113319b5ebcabad2b8b7925732d15eec46d7e7ac3c11734f3b7a6ad" [[package]] name = "getrandom" -version = "0.2.15" +version = "0.2.14" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c4567c8db10ae91089c99af84c68c38da3ec2f087c3f82960bcdbf3656b6f4d7" +checksum = "94b22e06ecb0110981051723910cbf0b5f5e09a2062dd7663334ee79a9d1286c" dependencies = [ "cfg-if", "js-sys", @@ -2156,9 +2180,9 @@ dependencies = [ [[package]] name = "gimli" -version = "0.29.0" +version = "0.27.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "40ecd4077b5ae9fd2e9e169b102c6c330d0605168eb0e8bf79952b256dbefffd" +checksum = "b6c80984affa11d98d1b88b66ac8853f143217b399d3c74116778ff8fdb4ed2e" [[package]] name = "git2" @@ -2202,7 +2226,7 @@ dependencies = [ "futures-core", "futures-sink", "futures-util", - "http 0.2.12", + "http 0.2.11", "indexmap", "slab", "tokio", @@ -2212,9 +2236,15 @@ dependencies = [ [[package]] name = "half" -version = "2.4.1" +version = "1.8.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6dd08c532ae367adf81c312a4580bc67f1d0fe8bc9c460520283f4c0ff277888" +checksum = "eabb4a44450da02c90444cf74558da904edde8fb4e9035a9a6a4e15445af0bd7" + +[[package]] +name = "half" +version = "2.4.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b5eceaaeec696539ddaf7b333340f1af35a5aa87ae3e4f3ead0532f72affab2e" dependencies = [ "bytemuck", "cfg-if", @@ -2244,9 +2274,9 @@ dependencies = [ [[package]] name = "hashbrown" -version = "0.14.5" +version = "0.14.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e5274423e17b7c9fc20b6e7e208532f9b19825d82dfd615708b70edd83df41f1" +checksum = "290f1a1d9242c78d09ce40a5e87e7554ee637af1351968159f4952f028f75604" dependencies = [ "ahash 0.8.11", "allocator-api2", @@ -2350,9 +2380,9 @@ dependencies = [ [[package]] name = "http" -version = "0.2.12" +version = "0.2.11" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "601cbb57e577e2f5ef5be8e7b83f0f63994f25aa94d673e54a92d5c516d101f1" +checksum = "8947b1a6fad4393052c7ba1f4cd97bed3e953a95c79c92ad9b051a04611d9fbb" dependencies = [ "bytes", "fnv", @@ -2395,15 +2425,15 @@ dependencies = [ [[package]] name = "httparse" -version = "1.9.4" +version = "1.8.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0fcc0b4a115bf80b728eb8ea024ad5bd707b615bfed49e0665b6e0f86fd082d9" +checksum = "d897f394bad6a705d5f4104762e116a75639e470d80901eed05a860a95cb1904" [[package]] name = "httpdate" -version = "1.0.3" +version = "1.0.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "df3b46402a9d5adb4c86a0cf463f42e19994e3ee891101b1841f30a545cb49a9" +checksum = "c4a1e36c821dbe04574f602848a19f742f4fb3c98d40449f11bcad18d6b17421" [[package]] name = "hyper" @@ -2439,7 +2469,7 @@ dependencies = [ "tokio", "tokio-rustls 0.26.0", "tower-service", - "webpki-roots 0.26.3", + "webpki-roots 0.26.1", ] [[package]] @@ -2455,7 +2485,7 @@ dependencies = [ "http-body", "hyper", "pin-project-lite", - "socket2", + "socket2 0.5.5", "tokio", "tower", "tower-service", @@ -2525,15 +2555,15 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "168fb715dda47215e360912c096649d23d58bf392ac62f73919e831745e40f26" dependencies = [ "equivalent", - "hashbrown 0.14.5", + "hashbrown 0.14.3", "serde", ] [[package]] name = "indicatif" -version = "0.17.8" +version = "0.17.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "763a5a8f45087d6bcea4222e7b72c291a054edf80e4ef6efd2a4979878c7bea3" +checksum = "fb28741c9db9a713d93deb3bb9515c20788cef5815265bee4980e87bde7e0f25" dependencies = [ "console", "instant", @@ -2568,18 +2598,18 @@ dependencies = [ [[package]] name = "instant" -version = "0.1.13" +version = "0.1.12" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e0242819d153cba4b4b05a5a8f2a7e9bbf97b6055b2a002b395c96b5ff3c0222" +checksum = "7a5bbe824c507c5da5956355e86a746d82e0e1464f65d862cc5e71da70e94b2c" dependencies = [ "cfg-if", ] [[package]] name = "ipnet" -version = "2.9.0" +version = "2.8.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8f518f335dce6725a761382244631d86cf0ccb2863413590b31338feb467f9c3" +checksum = "28b29a3cd74f0f4598934efe3aeba42bae0eb4680554128851ebbecb02af14e6" [[package]] name = "irg-kvariants" @@ -2603,12 +2633,6 @@ dependencies = [ "windows-sys 0.52.0", ] -[[package]] -name = "is_terminal_polyfill" -version = "1.70.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f8478577c03552c21db0e2724ffb8986a5ce7af88107e6be5d2ee6e158c12800" - [[package]] name = "itertools" version = "0.10.5" @@ -2778,7 +2802,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "e310b3a6b5907f99202fcdb4960ff45b93735d7c7d96b760fcff8db2dc0e103d" dependencies = [ "cfg-if", - "windows-targets 0.52.6", + "windows-targets 0.52.4", ] [[package]] @@ -2808,21 +2832,11 @@ dependencies = [ "libc", ] -[[package]] -name = "libredox" -version = "0.1.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c0ff37bd590ca25063e35af745c343cb7a0271906fb7b37e4813e8f79f00268d" -dependencies = [ - "bitflags 2.6.0", - "libc", -] - [[package]] name = "libz-sys" -version = "1.1.18" +version = "1.1.15" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c15da26e5af7e25c90b37a2d75cdbf940cf4a55316de9d84c679c9b8bfabf82e" +checksum = "037731f5d3aaa87a5675e895b63ddff1a87624bc29f77004ea829809654e48f6" dependencies = [ "cc", "libc", @@ -3151,9 +3165,9 @@ checksum = "0717cef1bc8b636c6e1c1bbdefc09e6322da8a9321966e8928ef80d20f7f770f" [[package]] name = "linux-raw-sys" -version = "0.4.14" +version = "0.4.12" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "78b3ae25bc7c8c38cec158d1f2757ee79e9b3740fbc7ccf0e59e4b08d793fa89" +checksum = "c4cd1a83af159aa67994778be9070f0ae1bd732942279cabb14f86f986a21456" [[package]] name = "liquid" @@ -3194,7 +3208,7 @@ checksum = "915f6d0a2963a27cd5205c1902f32ddfe3bc035816afd268cf88c0fc0f8d287e" dependencies = [ "proc-macro2", "quote", - "syn 2.0.70", + "syn 2.0.60", ] [[package]] @@ -3231,26 +3245,27 @@ dependencies = [ [[package]] name = "local-channel" -version = "0.1.5" +version = "0.1.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b6cbc85e69b8df4b8bb8b89ec634e7189099cea8927a276b7384ce5488e53ec8" +checksum = "7f303ec0e94c6c54447f84f3b0ef7af769858a9c4ef56ef2a986d3dcd4c3fc9c" dependencies = [ "futures-core", "futures-sink", + "futures-util", "local-waker", ] [[package]] name = "local-waker" -version = "0.1.4" +version = "0.1.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4d873d7c67ce09b42110d801813efbc9364414e356be9935700d368351657487" +checksum = "e34f76eb3611940e0e7d53a9aaa4e6a3151f69541a282fd0dad5571420c53ff1" [[package]] name = "lock_api" -version = "0.4.12" +version = "0.4.11" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "07af8b9cdd281b7915f413fa73f29ebd5d55d0d3f0155584dade1ff18cea1b17" +checksum = "3c168f8615b12bc01f9c17e2eb0cc07dcae1940121185446edc3744920e8ef45" dependencies = [ "autocfg", "scopeguard", @@ -3264,9 +3279,9 @@ checksum = "9374ef4228402d4b7e403e5838cb880d9ee663314b0a900d5a6aabf0c213552e" [[package]] name = "log" -version = "0.4.22" +version = "0.4.21" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a7a70ba024b9dc04c27ea2f0c0548feb474ec5c54bba33a7f72f873a39d07b24" +checksum = "90ed8c1e510134f979dbc4f070f87d4313098b704861a105fe34231c70a3901c" [[package]] name = "lzma-rs" @@ -3303,7 +3318,7 @@ dependencies = [ "once_cell", "proc-macro2", "quote", - "syn 2.0.70", + "syn 2.0.60", ] [[package]] @@ -3534,6 +3549,7 @@ dependencies = [ "obkv", "once_cell", "ordered-float", + "piccolo", "rand", "rayon", "roaring", @@ -3572,9 +3588,9 @@ checksum = "6877bb514081ee2a7ff5ef9de3281f14a4dd4bceac4c09388074a6b5df8a139a" [[package]] name = "mime_guess" -version = "2.0.5" +version = "2.0.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f7c44f8e672c00fe5308fa235f821cb4198414e1c77935c1ab6948d3fd78550e" +checksum = "4192263c238a5f0d0c6bfd21f336a313a4ce1c450542449ca191bb657b4642ef" dependencies = [ "mime", "unicase", @@ -3588,9 +3604,9 @@ checksum = "68354c5c6bd36d73ff3feceb05efa59b6acb7626617f4962be322a825e61f79a" [[package]] name = "miniz_oxide" -version = "0.7.4" +version = "0.7.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b8a240ddb74feaf34a79a7add65a741f3167852fba007066dcac1ca548d89c08" +checksum = "9d811f3e15f28568be3407c8e7fdb6514c1cda3cb30683f15b6a1a1dc4ea14a7" dependencies = [ "adler", ] @@ -3609,9 +3625,9 @@ dependencies = [ [[package]] name = "monostate" -version = "0.1.13" +version = "0.1.9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0d208407d7552cd041d8cdb69a1bc3303e029c598738177a3d87082004dc0e1e" +checksum = "15f370ae88093ec6b11a710dec51321a61d420fafd1bad6e30d01bd9c920e8ee" dependencies = [ "monostate-impl", "serde", @@ -3619,13 +3635,13 @@ dependencies = [ [[package]] name = "monostate-impl" -version = "0.1.13" +version = "0.1.9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a7ce64b975ed4f123575d11afd9491f2e37bbd5813fbfbc0f09ae1fbddea74e0" +checksum = "371717c0a5543d6a800cac822eac735aa7d2d2fbb41002e9856a4089532dbdce" dependencies = [ "proc-macro2", "quote", - "syn 2.0.70", + "syn 2.0.60", ] [[package]] @@ -3676,19 +3692,20 @@ dependencies = [ [[package]] name = "num-bigint" -version = "0.4.6" +version = "0.4.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a5e44f723f1133c9deac646763579fdb3ac745e418f2a7af9cd0c431da1f20b9" +checksum = "f93ab6289c7b344a8a9f60f88d80aa20032336fe78da341afc91c8a2341fc75f" dependencies = [ + "autocfg", "num-integer", "num-traits", ] [[package]] name = "num-complex" -version = "0.4.6" +version = "0.4.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "73f88a1307638156682bada9d7604135552957b7818057dcef22705b4d509495" +checksum = "23c6602fda94a57c990fe0df199a035d83576b496aa29f4e634a8ac6004e68a6" dependencies = [ "bytemuck", "num-traits", @@ -3702,18 +3719,19 @@ checksum = "51d515d32fb182ee37cda2ccdcb92950d6a3c2893aa280e540671c2cd0f3b1d9" [[package]] name = "num-integer" -version = "0.1.46" +version = "0.1.45" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7969661fd2958a5cb096e56c8e1ad0444ac2bbcd0061bd28660485a44879858f" +checksum = "225d3389fb3509a24c93f5c29eb6bde2586b98d9f016636dff58d7c6f7569cd9" dependencies = [ + "autocfg", "num-traits", ] [[package]] name = "num-traits" -version = "0.2.19" +version = "0.2.18" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "071dfc062690e90b734c0b2273ce72ad0ffa95f0c74596bc250dcfd960262841" +checksum = "da0df0e5185db44f69b44f26786fe401b6c293d1907744beaa7fa62b2e5a517a" dependencies = [ "autocfg", "libm", @@ -3747,7 +3765,7 @@ dependencies = [ "proc-macro-crate", "proc-macro2", "quote", - "syn 2.0.70", + "syn 2.0.60", ] [[package]] @@ -3767,9 +3785,9 @@ checksum = "830b246a0e5f20af87141b25c173cd1b609bd7779a4617d6ec582abaf90870f3" [[package]] name = "object" -version = "0.36.1" +version = "0.31.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "081b846d1d56ddfc18fdf1a922e4f6e07a11768ea1b92dec44e42b72712ccfce" +checksum = "8bda667d9f2b5051b8833f59f3bf748b28ef54f850f4fcb389a252aa383866d1" dependencies = [ "memchr", ] @@ -3810,9 +3828,9 @@ dependencies = [ [[package]] name = "oorandom" -version = "11.1.4" +version = "11.1.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b410bbe7e14ab526a0e86877eb47c6996a2bd7746f027ba551028c925390e4e9" +checksum = "0ab1bc2a289d34bd04a330323ac98a1b4bc82c9d9fcb1e66b63caa84da26b575" [[package]] name = "option-ext" @@ -3863,22 +3881,22 @@ dependencies = [ [[package]] name = "parking_lot_core" -version = "0.9.10" +version = "0.9.8" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1e401f977ab385c9e4e3ab30627d6f26d00e2c73eef317493c4ec6d468726cf8" +checksum = "93f00c865fe7cabf650081affecd3871070f26767e7b2070a3ffae14c654b447" dependencies = [ "cfg-if", "libc", - "redox_syscall 0.5.2", + "redox_syscall 0.3.5", "smallvec", - "windows-targets 0.52.6", + "windows-targets 0.48.1", ] [[package]] name = "paste" -version = "1.0.15" +version = "1.0.14" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "57c0d7b74b563b49d38dae00a0c37d4d6de9b432382b2892f0574ddcae73fd0a" +checksum = "de3145af08024dea9fa9914f381a17b8fc6034dfb00f3a84013f7ff43f29ed4c" [[package]] name = "path-matchers" @@ -3907,11 +3925,11 @@ dependencies = [ [[package]] name = "pem" -version = "3.0.4" +version = "3.0.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8e459365e590736a54c3fa561947c84837534b8e9af6fc5bf781307e82658fae" +checksum = "1b8fcc794035347fb64beda2d3b462595dd2753e3f268d89c5aae77e8cf2c310" dependencies = [ - "base64 0.22.1", + "base64 0.21.7", "serde", ] @@ -3931,20 +3949,19 @@ dependencies = [ [[package]] name = "pest" -version = "2.7.11" +version = "2.7.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cd53dff83f26735fdc1ca837098ccf133605d794cdae66acfc2bfac3ec809d95" +checksum = "1acb4a4365a13f749a93f1a094a7805e5cfa0955373a9de860d962eaa3a5fe5a" dependencies = [ - "memchr", "thiserror", "ucd-trie", ] [[package]] name = "pest_derive" -version = "2.7.11" +version = "2.7.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2a548d2beca6773b1c244554d36fcf8548a8a58e74156968211567250e48e49a" +checksum = "666d00490d4ac815001da55838c500eafb0320019bbaa44444137c48b443a853" dependencies = [ "pest", "pest_generator", @@ -3952,22 +3969,22 @@ dependencies = [ [[package]] name = "pest_generator" -version = "2.7.11" +version = "2.7.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3c93a82e8d145725dcbaf44e5ea887c8a869efdcc28706df2d08c69e17077183" +checksum = "68ca01446f50dbda87c1786af8770d535423fa8a53aec03b8f4e3d7eb10e0929" dependencies = [ "pest", "pest_meta", "proc-macro2", "quote", - "syn 2.0.70", + "syn 2.0.60", ] [[package]] name = "pest_meta" -version = "2.7.11" +version = "2.7.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a941429fea7e08bedec25e4f6785b6ffaacc6b755da98df5ef3e7dcf4a124c4f" +checksum = "56af0a30af74d0445c0bf6d9d051c979b516a1a5af790d251daee76005420a48" dependencies = [ "once_cell", "pest", @@ -4014,7 +4031,7 @@ dependencies = [ "phf_shared", "proc-macro2", "quote", - "syn 2.0.70", + "syn 2.0.60", ] [[package]] @@ -4027,23 +4044,38 @@ dependencies = [ ] [[package]] -name = "pin-project" -version = "1.1.5" +name = "piccolo" +version = "0.3.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b6bf43b791c5b9e34c3d182969b4abb522f9343702850a2e57f460d00d09b4b3" +checksum = "93dd1815b42446904bb2689d1c5d7680e8c68113d5b15a5a3297ba6c7a5f84af" +dependencies = [ + "ahash 0.8.11", + "allocator-api2", + "anyhow", + "gc-arena", + "hashbrown 0.14.3", + "rand", + "thiserror", +] + +[[package]] +name = "pin-project" +version = "1.1.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0302c4a0442c456bd56f841aee5c3bfd17967563f6fadc9ceb9f9c23cf3807e0" dependencies = [ "pin-project-internal", ] [[package]] name = "pin-project-internal" -version = "1.1.5" +version = "1.1.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2f38a4412a78282e09a2cf38d195ea5420d15ba0602cb375210efbc877243965" +checksum = "266c042b60c9c76b8d53061e52b2e0d1116abc57cefc8c5cd671619a56ac3690" dependencies = [ "proc-macro2", "quote", - "syn 2.0.70", + "syn 2.0.60", ] [[package]] @@ -4081,9 +4113,9 @@ dependencies = [ [[package]] name = "plotters" -version = "0.3.6" +version = "0.3.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a15b6eccb8484002195a3e44fe65a4ce8e93a625797a063735536fd59cb01cf3" +checksum = "d2c224ba00d7cadd4d5c660deaf2098e5e80e07846537c51f9cfa4be50c1fd45" dependencies = [ "num-traits", "plotters-backend", @@ -4094,24 +4126,24 @@ dependencies = [ [[package]] name = "plotters-backend" -version = "0.3.6" +version = "0.3.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "414cec62c6634ae900ea1c56128dfe87cf63e7caece0852ec76aba307cebadb7" +checksum = "9e76628b4d3a7581389a35d5b6e2139607ad7c75b17aed325f210aa91f4a9609" [[package]] name = "plotters-svg" -version = "0.3.6" +version = "0.3.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "81b30686a7d9c3e010b84284bdd26a29f2138574f52f5eb6f794fc0ad924e705" +checksum = "38f6d39893cca0701371e3c27294f09797214b86f1fb951b89ade8ec04e2abab" dependencies = [ "plotters-backend", ] [[package]] name = "portable-atomic" -version = "1.6.0" +version = "1.5.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7170ef9988bc169ba16dd36a7fa041e5c4cbeb6a35b76d4c03daded371eae7c0" +checksum = "3bccab0e7fd7cc19f820a1c8c91720af652d0c88dc9664dd72aef2614f04af3b" [[package]] name = "powerfmt" @@ -4131,7 +4163,7 @@ version = "3.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "6d37c51ca738a55da99dc0c4a34860fd675453b8b36209178c2249bb13651284" dependencies = [ - "toml_edit 0.21.1", + "toml_edit 0.21.0", ] [[package]] @@ -4160,9 +4192,9 @@ dependencies = [ [[package]] name = "proc-macro2" -version = "1.0.86" +version = "1.0.81" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5e719e8df665df0d1c8fbfd238015744736151d4445ec0836b8e628aae103b77" +checksum = "3d1597b0c024618f09a9c3b8655b7e430397a36d23fdafec26d6965e9eec3eba" dependencies = [ "unicode-ident", ] @@ -4235,9 +4267,9 @@ dependencies = [ [[package]] name = "pulp" -version = "0.18.21" +version = "0.18.9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0ec8d02258294f59e4e223b41ad7e81c874aa6b15bc4ced9ba3965826da0eed5" +checksum = "03457ac216146f43f921500bac4e892d5cd32b0479b929cbfc90f95cd6c599c2" dependencies = [ "bytemuck", "libm", @@ -4287,7 +4319,7 @@ checksum = "9096629c45860fc7fb143e125eb826b5e721e10be3263160c7d60ca832cf8c46" dependencies = [ "libc", "once_cell", - "socket2", + "socket2 0.5.5", "tracing", "windows-sys 0.52.0", ] @@ -4395,30 +4427,30 @@ checksum = "03251193000f4bd3b042892be858ee50e8b3719f2b08e5833ac4353724632430" [[package]] name = "redox_syscall" -version = "0.4.1" +version = "0.2.16" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4722d768eff46b75989dd134e5c353f0d6296e5aaa3132e776cbdb56be7731aa" +checksum = "fb5a58c1855b4b6819d59012155603f0b22ad30cad752600aadfcb695265519a" dependencies = [ "bitflags 1.3.2", ] [[package]] name = "redox_syscall" -version = "0.5.2" +version = "0.3.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c82cf8cff14456045f55ec4241383baeff27af886adb72ffb2162f99911de0fd" +checksum = "567664f262709473930a4bf9e51bf2ebf3348f2e748ccc50dea20646858f8f29" dependencies = [ - "bitflags 2.6.0", + "bitflags 1.3.2", ] [[package]] name = "redox_users" -version = "0.4.5" +version = "0.4.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bd283d9651eeda4b2a83a43c1c91b266c40fd76ecd39a50a8c630ae69dc72891" +checksum = "b033d837a7cf162d7993aded9304e30a83213c648b6e389db233191f891e5c2b" dependencies = [ "getrandom", - "libredox", + "redox_syscall 0.2.16", "thiserror", ] @@ -4436,9 +4468,9 @@ dependencies = [ [[package]] name = "regex-automata" -version = "0.4.7" +version = "0.4.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "38caf58cc5ef2fed281f89292ef23f6365465ed9a41b7a7754eb4e26496c92df" +checksum = "86b83b8b9847f9bf95ef68afb0b8e6cdb80f498442f5179a29fad448fcc1eaea" dependencies = [ "aho-corasick", "memchr", @@ -4453,9 +4485,9 @@ checksum = "53a49587ad06b26609c52e423de037e7f57f20d53535d66e08c695f347df952a" [[package]] name = "regex-syntax" -version = "0.8.4" +version = "0.8.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7a66a03ae7c801facd77a29370b4faec201768915ac14a721ba36f20bc9c209b" +checksum = "c08c74e62047bb2de4ff487b251e4a92e24f48745648451635cec7d591162d9f" [[package]] name = "rend" @@ -4507,7 +4539,7 @@ dependencies = [ "wasm-bindgen-futures", "wasm-streams", "web-sys", - "webpki-roots 0.26.3", + "webpki-roots 0.26.1", "winreg", ] @@ -4596,9 +4628,9 @@ dependencies = [ [[package]] name = "rustc-demangle" -version = "0.1.24" +version = "0.1.23" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "719b953e2095829ee67db738b3bfa9fa368c94900df327b3f07fe6e794d2fe1f" +checksum = "d626bb9dae77e28219937af045c257c28bfd3f69333c512553507f5f9798cb76" [[package]] name = "rustc-hash" @@ -4617,9 +4649,9 @@ dependencies = [ [[package]] name = "rustix" -version = "0.38.34" +version = "0.38.31" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "70dc5ec042f7a43c4a73241207cecc9873a06d45debb38b329f8541d85c2730f" +checksum = "6ea3e1a662af26cd7a3ba09c0297a31af215563ecf42817c98df621387f4e949" dependencies = [ "bitflags 2.6.0", "errno", @@ -4709,15 +4741,15 @@ checksum = "955d28af4278de8121b7ebeb796b6a45735dc01436d898801014aced2773a3d6" [[package]] name = "ryu" -version = "1.0.18" +version = "1.0.17" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f3cb5ba0dc43242ce17de99c180e96db90b235b8a9fdc9543c96d2209116bd9f" +checksum = "e86697c916019a8588c99b5fac3cead74ec0b4b819707a682fd4d23fa0ce1ba1" [[package]] name = "safetensors" -version = "0.4.3" +version = "0.4.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8ced76b22c7fba1162f11a5a75d9d8405264b467a07ae0c9c29be119b9297db9" +checksum = "8d980e6bfb34436fb0a81e42bc41af43f11805bbbca443e7f68e9faaabe669ed" dependencies = [ "serde", "serde_json", @@ -4770,9 +4802,9 @@ dependencies = [ [[package]] name = "semver" -version = "1.0.23" +version = "1.0.18" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "61697e0a1c7e512e84a621326239844a24d8207b4669b41bc18b32ea5cbf988b" +checksum = "b0293b4b29daaf487284529cc2f5675b8e57c61f70167ba415a463651fd6a918" dependencies = [ "serde", ] @@ -4809,7 +4841,7 @@ checksum = "e0cd7e117be63d3c3678776753929474f3b04a43a080c744d6b0ae2a8c28e222" dependencies = [ "proc-macro2", "quote", - "syn 2.0.70", + "syn 2.0.60", ] [[package]] @@ -4904,9 +4936,9 @@ checksum = "0fda2ff0d084019ba4d7c6f371c95d8fd75ce3524c3cb8fb653a3023f6323e64" [[package]] name = "signal-hook-registry" -version = "1.4.2" +version = "1.4.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a9e9e0b4211b72e7b8b6e85c807d36c212bdb33ea8587f7569562a84df5465b1" +checksum = "d8229b473baa5980ac72ef434c4415e70c4b5e71b423043adb4ba059f89c99a1" dependencies = [ "libc", ] @@ -4925,9 +4957,9 @@ checksum = "f27f6278552951f1f2b8cf9da965d10969b2efdea95a6ec47987ab46edfe263a" [[package]] name = "similar" -version = "2.5.0" +version = "2.2.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fa42c91313f1d05da9b26f267f931cf178d4aba455b4c4622dd7355eb80c6640" +checksum = "420acb44afdae038210c99e69aae24109f32f15500aa708e81d46c9f29d55fcf" [[package]] name = "simple_asn1" @@ -4955,9 +4987,9 @@ checksum = "56199f7ddabf13fe5074ce809e7d3f42b42ae711800501b5b16ea82ad029c39d" [[package]] name = "slab" -version = "0.4.9" +version = "0.4.8" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8f92a496fb766b417c996b9c5e57daf2f7ad3b0bebe1ccfca4856390e3d3bb67" +checksum = "6528351c9bc8ab22353f9d776db39a20288e8d6c37ef8cfe3317cf875eecfc2d" dependencies = [ "autocfg", ] @@ -4997,12 +5029,22 @@ dependencies = [ [[package]] name = "socket2" -version = "0.5.7" +version = "0.4.9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ce305eb0b4296696835b71df73eb912e0f1ffd2556a501fcede6e0c50349191c" +checksum = "64a4a911eed85daf18834cfaa86a79b7d266ff93ff5ba14005426219480ed662" dependencies = [ "libc", - "windows-sys 0.52.0", + "winapi", +] + +[[package]] +name = "socket2" +version = "0.5.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7b5fac59a5cb5dd637972e5fca70daf0523c9067fcdc4842f053dae04a18f8e9" +dependencies = [ + "libc", + "windows-sys 0.48.0", ] [[package]] @@ -5034,6 +5076,12 @@ dependencies = [ "unicode-segmentation", ] +[[package]] +name = "sptr" +version = "0.3.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3b9b39299b249ad65f3b7e96443bad61c02ca5cd3589f46cb6d610a0fd6c0d6a" + [[package]] name = "stable_deref_trait" version = "1.2.0" @@ -5071,31 +5119,31 @@ checksum = "7da8b5736845d9f2fcb837ea5d9e2628564b3b043a70948a3f0b778838c5fb4f" [[package]] name = "strum" -version = "0.26.3" +version = "0.26.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8fec0f0aef304996cf250b31b5a10dee7980c85da9d759361292b8bca5a18f06" +checksum = "5d8cec3501a5194c432b2b7976db6b7d10ec95c253208b45f83f7136aa985e29" dependencies = [ "strum_macros", ] [[package]] name = "strum_macros" -version = "0.26.4" +version = "0.26.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4c6bee85a5a24955dc440386795aa378cd9cf82acd5f764469152d2270e581be" +checksum = "c6cf59daf282c0a494ba14fd21610a0325f9f90ec9d1231dea26bcb1d696c946" dependencies = [ - "heck 0.5.0", + "heck 0.4.1", "proc-macro2", "quote", "rustversion", - "syn 2.0.70", + "syn 2.0.60", ] [[package]] name = "subtle" -version = "2.6.1" +version = "2.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "13c2bddecc57b384dee18652358fb23172facb8a2c51ccc10d74c157bdea3292" +checksum = "81cdd64d312baedb58e21336b31bc043b77e01cc99033ce76ef539f78e965ebc" [[package]] name = "syn" @@ -5110,9 +5158,9 @@ dependencies = [ [[package]] name = "syn" -version = "2.0.70" +version = "2.0.60" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2f0209b68b3613b093e0ec905354eccaedcfe83b8cb37cbdeae64026c3064c16" +checksum = "909518bc7b1c9b779f1bbf07f2929d35af9f0f37e47c6e9ef7f9dddc1e1821f3" dependencies = [ "proc-macro2", "quote", @@ -5128,7 +5176,7 @@ dependencies = [ "proc-macro-error", "proc-macro2", "quote", - "syn 2.0.70", + "syn 2.0.60", ] [[package]] @@ -5154,7 +5202,7 @@ checksum = "c8af7666ab7b6390ab78131fb5b0fce11d6b7a6951602017c35fa82800708971" dependencies = [ "proc-macro2", "quote", - "syn 2.0.70", + "syn 2.0.60", ] [[package]] @@ -5250,14 +5298,14 @@ checksum = "46c3384250002a6d5af4d114f2845d37b57521033f30d5c3f46c4d70e1197533" dependencies = [ "proc-macro2", "quote", - "syn 2.0.70", + "syn 2.0.60", ] [[package]] name = "thread_local" -version = "1.1.8" +version = "1.1.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8b9ef9bad013ada3808854ceac7b46812a6465ba368859a37e2100283d2d719c" +checksum = "3fdd6f064ccff2d6567adcb3873ca630700f00b5ad3f060c25b5dcfd9a4ce152" dependencies = [ "cfg-if", "once_cell", @@ -5323,9 +5371,9 @@ dependencies = [ [[package]] name = "tinyvec" -version = "1.8.0" +version = "1.6.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "445e881f4f6d382d5f27c034e25eb92edd7c784ceab92a0937db7f2e9471b938" +checksum = "87cc5ceb3875bb20c2890005a4e226a4651264a5c75edb2421b52861a0a0cb50" dependencies = [ "tinyvec_macros", ] @@ -5380,7 +5428,7 @@ dependencies = [ "parking_lot", "pin-project-lite", "signal-hook-registry", - "socket2", + "socket2 0.5.5", "tokio-macros", "windows-sys 0.48.0", ] @@ -5393,7 +5441,7 @@ checksum = "5f5ae998a069d4b5aba8ee9dad856af7d520c3699e6159b185c2acd48155d39a" dependencies = [ "proc-macro2", "quote", - "syn 2.0.70", + "syn 2.0.60", ] [[package]] @@ -5453,9 +5501,9 @@ dependencies = [ [[package]] name = "toml_edit" -version = "0.21.1" +version = "0.21.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6a8534fd7f78b5405e860340ad6575217ce99f38d4d5c8f2442cb5ecb50090e1" +checksum = "d34d383cd00a163b4a5b85053df514d45bc330f6de7737edfe0a93311d1eaa03" dependencies = [ "indexmap", "toml_datetime", @@ -5535,7 +5583,7 @@ checksum = "34704c8d6ebcbc939824180af020566b01a7c01f80641264eba0999f6c2b6be7" dependencies = [ "proc-macro2", "quote", - "syn 2.0.70", + "syn 2.0.60", ] [[package]] @@ -5614,9 +5662,9 @@ dependencies = [ [[package]] name = "try-lock" -version = "0.2.5" +version = "0.2.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e421abadd41a4225275504ea4d6566923418b7f05506fbc9c0fe86ba7396114b" +checksum = "3528ecfd12c466c6f163363caf2d02a71161dd5e1cc6ae7b34207ea2d42d81ed" [[package]] name = "typenum" @@ -5641,9 +5689,9 @@ dependencies = [ [[package]] name = "unicase" -version = "2.7.0" +version = "2.6.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f7d2d4dafb69621809a81864c9c1b864479e1235c0dd4e199924b9742439ed89" +checksum = "50f37be617794602aabbeee0be4f259dc1778fabe05e2d67ee8f79326d5cb4f6" dependencies = [ "version_check", ] @@ -5692,9 +5740,9 @@ checksum = "d4c87d22b6e3f4a18d4d40ef354e97c90fcb14dd91d7dc0aa9d8a1172ebf7202" [[package]] name = "unicode-width" -version = "0.1.13" +version = "0.1.11" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0336d538f7abc86d282a4189614dfaa90810dfc2c6f6427eaf88e16311dd225d" +checksum = "e51733f11c9c4f72aa0c160008246859e340b00807569a0da0e7a1079b27ba85" [[package]] name = "unicode_categories" @@ -5724,7 +5772,7 @@ dependencies = [ "serde_json", "socks", "url", - "webpki-roots 0.26.3", + "webpki-roots 0.26.1", ] [[package]] @@ -5747,15 +5795,15 @@ checksum = "daf8dba3b7eb870caf1ddeed7bc9d2a049f3cfdfae7cb521b087cc33ae4c49da" [[package]] name = "utf8-width" -version = "0.1.7" +version = "0.1.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "86bd8d4e895da8537e5315b8254664e6b769c4ff3db18321b297a1e7004392e3" +checksum = "5190c9442dcdaf0ddd50f37420417d219ae5261bbf5db120d0f9bab996c9cba1" [[package]] name = "utf8parse" -version = "0.2.2" +version = "0.2.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "06abde3611657adf66d383f00b093d7faecc7fa57071cce2578660c9f1010821" +checksum = "711b9620af191e0cdc7468a8d14e709c3dcdb115b36f838e601583af800a370a" [[package]] name = "uuid" @@ -5881,15 +5929,15 @@ dependencies = [ "once_cell", "proc-macro2", "quote", - "syn 2.0.70", + "syn 2.0.60", "wasm-bindgen-shared", ] [[package]] name = "wasm-bindgen-futures" -version = "0.4.42" +version = "0.4.37" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "76bc14366121efc8dbb487ab05bcc9d346b3b5ec0eaa76e46594cabbe51762c0" +checksum = "c02dbc21516f9f1f04f187958890d7e6026df8d16540b7ad9492bc34a67cea03" dependencies = [ "cfg-if", "js-sys", @@ -5915,7 +5963,7 @@ checksum = "e94f17b526d0a461a191c78ea52bbce64071ed5c04c9ffe424dcb38f74171bb7" dependencies = [ "proc-macro2", "quote", - "syn 2.0.70", + "syn 2.0.60", "wasm-bindgen-backend", "wasm-bindgen-shared", ] @@ -5941,9 +5989,9 @@ dependencies = [ [[package]] name = "web-sys" -version = "0.3.69" +version = "0.3.64" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "77afa9a11836342370f4817622a2f0f418b134426d91a82dfb48f532d2ec13ef" +checksum = "9b85cbef8c220a6abc02aefd892dfc0fc23afb1c6a426316ec33253a3877249b" dependencies = [ "js-sys", "wasm-bindgen", @@ -5951,15 +5999,15 @@ dependencies = [ [[package]] name = "webpki-roots" -version = "0.25.4" +version = "0.25.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5f20c57d8d7db6d3b86154206ae5d8fba62dd39573114de97c2cb0578251f8e1" +checksum = "1778a42e8b3b90bff8d0f5032bf22250792889a5cdc752aa0020c84abe3aaf10" [[package]] name = "webpki-roots" -version = "0.26.3" +version = "0.26.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bd7c23921eeb1713a4e851530e9b9756e4fb0e89978582942612524cf09f01cd" +checksum = "b3de34ae270483955a94f4b21bdaaeb83d508bb84a01435f393818edb0012009" dependencies = [ "rustls-pki-types", ] @@ -5970,7 +6018,7 @@ version = "0.16.4" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "471d1c1645d361eb782a1650b1786a8fb58dd625e681a04c09f5ff7c8764a7b0" dependencies = [ - "hashbrown 0.14.5", + "hashbrown 0.14.3", "once_cell", ] @@ -5992,11 +6040,11 @@ checksum = "ac3b87c63620426dd9b991e5ce0329eff545bccbbb34f3be09ff6fb6ab51b7b6" [[package]] name = "winapi-util" -version = "0.1.8" +version = "0.1.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4d4cc384e1e73b93bafa6fb4f1df8c41695c8a91cf9c4c64358067d15a7b6c6b" +checksum = "f29e6f9198ba0d26b4c9f07dbe6f9ed633e1f3d5b8b414090084349e46a52596" dependencies = [ - "windows-sys 0.52.0", + "winapi", ] [[package]] @@ -6012,7 +6060,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "e48a53791691ab099e5e2ad123536d0fff50652600abaf43bbf952894110d0be" dependencies = [ "windows-core", - "windows-targets 0.52.6", + "windows-targets 0.52.4", ] [[package]] @@ -6021,7 +6069,16 @@ version = "0.52.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "33ab640c8d7e35bf8ba19b884ba838ceb4fba93a4e8c65a9059d08afcfc683d9" dependencies = [ - "windows-targets 0.52.6", + "windows-targets 0.52.4", +] + +[[package]] +name = "windows-sys" +version = "0.45.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "75283be5efb2831d37ea142365f009c02ec203cd29a3ebecbc093d52315b66d0" +dependencies = [ + "windows-targets 0.42.2", ] [[package]] @@ -6030,7 +6087,7 @@ version = "0.48.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "677d2418bec65e3338edb076e806bc1ec15693c5d0104683f2efe857f61056a9" dependencies = [ - "windows-targets 0.48.5", + "windows-targets 0.48.1", ] [[package]] @@ -6039,129 +6096,179 @@ version = "0.52.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "282be5f36a8ce781fad8c8ae18fa3f9beff57ec1b52cb3de0789201425d9a33d" dependencies = [ - "windows-targets 0.52.6", + "windows-targets 0.52.4", ] [[package]] name = "windows-targets" -version = "0.48.5" +version = "0.42.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9a2fa6e2155d7247be68c096456083145c183cbbbc2764150dda45a87197940c" +checksum = "8e5180c00cd44c9b1c88adb3693291f1cd93605ded80c250a75d472756b4d071" dependencies = [ - "windows_aarch64_gnullvm 0.48.5", - "windows_aarch64_msvc 0.48.5", - "windows_i686_gnu 0.48.5", - "windows_i686_msvc 0.48.5", - "windows_x86_64_gnu 0.48.5", - "windows_x86_64_gnullvm 0.48.5", - "windows_x86_64_msvc 0.48.5", + "windows_aarch64_gnullvm 0.42.2", + "windows_aarch64_msvc 0.42.2", + "windows_i686_gnu 0.42.2", + "windows_i686_msvc 0.42.2", + "windows_x86_64_gnu 0.42.2", + "windows_x86_64_gnullvm 0.42.2", + "windows_x86_64_msvc 0.42.2", ] [[package]] name = "windows-targets" -version = "0.52.6" +version = "0.48.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9b724f72796e036ab90c1021d4780d4d3d648aca59e491e6b98e725b84e99973" +checksum = "05d4b17490f70499f20b9e791dcf6a299785ce8af4d709018206dc5b4953e95f" dependencies = [ - "windows_aarch64_gnullvm 0.52.6", - "windows_aarch64_msvc 0.52.6", - "windows_i686_gnu 0.52.6", - "windows_i686_gnullvm", - "windows_i686_msvc 0.52.6", - "windows_x86_64_gnu 0.52.6", - "windows_x86_64_gnullvm 0.52.6", - "windows_x86_64_msvc 0.52.6", + "windows_aarch64_gnullvm 0.48.0", + "windows_aarch64_msvc 0.48.0", + "windows_i686_gnu 0.48.0", + "windows_i686_msvc 0.48.0", + "windows_x86_64_gnu 0.48.0", + "windows_x86_64_gnullvm 0.48.0", + "windows_x86_64_msvc 0.48.0", +] + +[[package]] +name = "windows-targets" +version = "0.52.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7dd37b7e5ab9018759f893a1952c9420d060016fc19a472b4bb20d1bdd694d1b" +dependencies = [ + "windows_aarch64_gnullvm 0.52.4", + "windows_aarch64_msvc 0.52.4", + "windows_i686_gnu 0.52.4", + "windows_i686_msvc 0.52.4", + "windows_x86_64_gnu 0.52.4", + "windows_x86_64_gnullvm 0.52.4", + "windows_x86_64_msvc 0.52.4", ] [[package]] name = "windows_aarch64_gnullvm" -version = "0.48.5" +version = "0.42.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2b38e32f0abccf9987a4e3079dfb67dcd799fb61361e53e2882c3cbaf0d905d8" +checksum = "597a5118570b68bc08d8d59125332c54f1ba9d9adeedeef5b99b02ba2b0698f8" [[package]] name = "windows_aarch64_gnullvm" -version = "0.52.6" +version = "0.48.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "32a4622180e7a0ec044bb555404c800bc9fd9ec262ec147edd5989ccd0c02cd3" +checksum = "91ae572e1b79dba883e0d315474df7305d12f569b400fcf90581b06062f7e1bc" + +[[package]] +name = "windows_aarch64_gnullvm" +version = "0.52.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "bcf46cf4c365c6f2d1cc93ce535f2c8b244591df96ceee75d8e83deb70a9cac9" [[package]] name = "windows_aarch64_msvc" -version = "0.48.5" +version = "0.42.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "dc35310971f3b2dbbf3f0690a219f40e2d9afcf64f9ab7cc1be722937c26b4bc" +checksum = "e08e8864a60f06ef0d0ff4ba04124db8b0fb3be5776a5cd47641e942e58c4d43" [[package]] name = "windows_aarch64_msvc" -version = "0.52.6" +version = "0.48.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "09ec2a7bb152e2252b53fa7803150007879548bc709c039df7627cabbd05d469" +checksum = "b2ef27e0d7bdfcfc7b868b317c1d32c641a6fe4629c171b8928c7b08d98d7cf3" + +[[package]] +name = "windows_aarch64_msvc" +version = "0.52.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "da9f259dd3bcf6990b55bffd094c4f7235817ba4ceebde8e6d11cd0c5633b675" [[package]] name = "windows_i686_gnu" -version = "0.48.5" +version = "0.42.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a75915e7def60c94dcef72200b9a8e58e5091744960da64ec734a6c6e9b3743e" +checksum = "c61d927d8da41da96a81f029489353e68739737d3beca43145c8afec9a31a84f" [[package]] name = "windows_i686_gnu" -version = "0.52.6" +version = "0.48.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8e9b5ad5ab802e97eb8e295ac6720e509ee4c243f69d781394014ebfe8bbfa0b" +checksum = "622a1962a7db830d6fd0a69683c80a18fda201879f0f447f065a3b7467daa241" [[package]] -name = "windows_i686_gnullvm" -version = "0.52.6" +name = "windows_i686_gnu" +version = "0.52.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0eee52d38c090b3caa76c563b86c3a4bd71ef1a819287c19d586d7334ae8ed66" +checksum = "b474d8268f99e0995f25b9f095bc7434632601028cf86590aea5c8a5cb7801d3" [[package]] name = "windows_i686_msvc" -version = "0.48.5" +version = "0.42.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8f55c233f70c4b27f66c523580f78f1004e8b5a8b659e05a4eb49d4166cca406" +checksum = "44d840b6ec649f480a41c8d80f9c65108b92d89345dd94027bfe06ac444d1060" [[package]] name = "windows_i686_msvc" -version = "0.52.6" +version = "0.48.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "240948bc05c5e7c6dabba28bf89d89ffce3e303022809e73deaefe4f6ec56c66" +checksum = "4542c6e364ce21bf45d69fdd2a8e455fa38d316158cfd43b3ac1c5b1b19f8e00" + +[[package]] +name = "windows_i686_msvc" +version = "0.52.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1515e9a29e5bed743cb4415a9ecf5dfca648ce85ee42e15873c3cd8610ff8e02" [[package]] name = "windows_x86_64_gnu" -version = "0.48.5" +version = "0.42.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "53d40abd2583d23e4718fddf1ebec84dbff8381c07cae67ff7768bbf19c6718e" +checksum = "8de912b8b8feb55c064867cf047dda097f92d51efad5b491dfb98f6bbb70cb36" [[package]] name = "windows_x86_64_gnu" -version = "0.52.6" +version = "0.48.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "147a5c80aabfbf0c7d901cb5895d1de30ef2907eb21fbbab29ca94c5b08b1a78" +checksum = "ca2b8a661f7628cbd23440e50b05d705db3686f894fc9580820623656af974b1" + +[[package]] +name = "windows_x86_64_gnu" +version = "0.52.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5eee091590e89cc02ad514ffe3ead9eb6b660aedca2183455434b93546371a03" [[package]] name = "windows_x86_64_gnullvm" -version = "0.48.5" +version = "0.42.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0b7b52767868a23d5bab768e390dc5f5c55825b6d30b86c844ff2dc7414044cc" +checksum = "26d41b46a36d453748aedef1486d5c7a85db22e56aff34643984ea85514e94a3" [[package]] name = "windows_x86_64_gnullvm" -version = "0.52.6" +version = "0.48.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "24d5b23dc417412679681396f2b49f3de8c1473deb516bd34410872eff51ed0d" +checksum = "7896dbc1f41e08872e9d5e8f8baa8fdd2677f29468c4e156210174edc7f7b953" + +[[package]] +name = "windows_x86_64_gnullvm" +version = "0.52.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "77ca79f2451b49fa9e2af39f0747fe999fcda4f5e241b2898624dca97a1f2177" [[package]] name = "windows_x86_64_msvc" -version = "0.48.5" +version = "0.42.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ed94fce61571a4006852b7389a063ab983c02eb1bb37b47f8272ce92d06d9538" +checksum = "9aec5da331524158c6d1a4ac0ab1541149c0b9505fde06423b02f5ef0106b9f0" [[package]] name = "windows_x86_64_msvc" -version = "0.52.6" +version = "0.48.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "589f6da84c646204747d1270a2a5661ea66ed1cced2631d546fdfb155959f9ec" +checksum = "1a515f5799fe4961cb532f983ce2b23082366b898e52ffbce459c86f67c8378a" + +[[package]] +name = "windows_x86_64_msvc" +version = "0.52.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "32b752e52a2da0ddfbdbcc6fceadfeede4c939ed16d13e648833a61dfb611ed8" [[package]] name = "winnow" @@ -6253,9 +6360,9 @@ dependencies = [ [[package]] name = "yoke" -version = "0.7.4" +version = "0.7.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6c5b1314b079b0930c31e3af543d8ee1757b1951ae1e1565ec704403a7240ca5" +checksum = "65e71b2e4f287f467794c671e2b8f8a5f3716b3c829079a1c44740148eff07e4" dependencies = [ "serde", "stable_deref_trait", @@ -6265,54 +6372,54 @@ dependencies = [ [[package]] name = "yoke-derive" -version = "0.7.4" +version = "0.7.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "28cc31741b18cb6f1d5ff12f5b7523e3d6eb0852bbbad19d73905511d9849b95" +checksum = "9e6936f0cce458098a201c245a11bef556c6a0181129c7034d10d76d1ec3a2b8" dependencies = [ "proc-macro2", "quote", - "syn 2.0.70", + "syn 2.0.60", "synstructure", ] [[package]] name = "zerocopy" -version = "0.7.35" +version = "0.7.32" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1b9b4fd18abc82b8136838da5d50bae7bdea537c574d8dc1a34ed098d6c166f0" +checksum = "74d4d3961e53fa4c9a25a8637fc2bfaf2595b3d3ae34875568a5cf64787716be" dependencies = [ "zerocopy-derive", ] [[package]] name = "zerocopy-derive" -version = "0.7.35" +version = "0.7.32" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fa4f8080344d4671fb4e831a13ad1e68092748387dfc4f55e356242fae12ce3e" +checksum = "9ce1b18ccd8e73a9321186f97e46f9f04b778851177567b1975109d26a08d2a6" dependencies = [ "proc-macro2", "quote", - "syn 2.0.70", + "syn 2.0.60", ] [[package]] name = "zerofrom" -version = "0.1.4" +version = "0.1.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "91ec111ce797d0e0784a1116d0ddcdbea84322cd79e5d5ad173daeba4f93ab55" +checksum = "655b0814c5c0b19ade497851070c640773304939a6c0fd5f5fb43da0696d05b7" dependencies = [ "zerofrom-derive", ] [[package]] name = "zerofrom-derive" -version = "0.1.4" +version = "0.1.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0ea7b4a3637ea8669cedf0f1fd5c286a17f3de97b8dd5a70a6c167a1730e63a5" +checksum = "e6a647510471d372f2e6c2e6b7219e44d8c574d24fdc11c610a61455782f18c3" dependencies = [ "proc-macro2", "quote", - "syn 2.0.70", + "syn 2.0.60", "synstructure", ] @@ -6333,7 +6440,7 @@ checksum = "ce36e65b0d2999d2aafac989fb249189a141aee1f53c612c1f37d72631959f69" dependencies = [ "proc-macro2", "quote", - "syn 2.0.70", + "syn 2.0.60", ] [[package]] @@ -6423,9 +6530,9 @@ dependencies = [ [[package]] name = "zstd-sys" -version = "2.0.12+zstd.1.5.6" +version = "2.0.10+zstd.1.5.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0a4e40c320c3cb459d9a9ff6de98cff88f4751ee9275d140e2be94a2b74e4c13" +checksum = "c253a4914af5bafc8fa8c86ee400827e83cf6ec01195ec1f1ed8441bf00d65aa" dependencies = [ "cc", "pkg-config", diff --git a/index-scheduler/src/batch.rs b/index-scheduler/src/batch.rs index 4d0cea8f4..254af6a1e 100644 --- a/index-scheduler/src/batch.rs +++ b/index-scheduler/src/batch.rs @@ -1751,42 +1751,40 @@ fn delete_document_by_filter<'a>( fn edit_documents_by_function<'a>( wtxn: &mut RwTxn<'a>, - filter: &serde_json::Value, + filter: &Option, code: &str, indexer_config: &IndexerConfig, must_stop_processing: MustStopProcessing, index: &'a Index, ) -> Result { - let filter = Filter::from_json(filter)?; - Ok(if let Some(filter) = filter { - let candidates = filter.evaluate(wtxn, index).map_err(|err| match err { + let candidates = match filter.as_ref().map(Filter::from_json) { + Some(Ok(Some(filter))) => filter.evaluate(wtxn, index).map_err(|err| match err { milli::Error::UserError(milli::UserError::InvalidFilter(_)) => { Error::from(err).with_custom_error_code(Code::InvalidDocumentFilter) } e => e.into(), - })?; + })?, + None | Some(Ok(None)) => index.documents_ids(wtxn)?, + Some(Err(e)) => return Err(e.into()), + }; - let config = IndexDocumentsConfig { - update_method: IndexDocumentsMethod::ReplaceDocuments, - ..Default::default() - }; + let config = IndexDocumentsConfig { + update_method: IndexDocumentsMethod::ReplaceDocuments, + ..Default::default() + }; - let mut builder = milli::update::IndexDocuments::new( - wtxn, - index, - indexer_config, - config, - |indexing_step| tracing::debug!(update = ?indexing_step), - || must_stop_processing.get(), - )?; + let mut builder = milli::update::IndexDocuments::new( + wtxn, + index, + indexer_config, + config, + |indexing_step| tracing::debug!(update = ?indexing_step), + || must_stop_processing.get(), + )?; - todo!("edit documents with the code and reinsert them in the builder") - // let (new_builder, count) = builder.remove_documents_from_db_no_batch(&candidates)?; - // builder = new_builder; + let (new_builder, count) = builder.edit_documents(&candidates, code)?; + builder = new_builder; - // let _ = builder.execute()?; - // count - } else { - 0 - }) + let _ = builder.execute()?; + Ok(count.unwrap()) } diff --git a/meilisearch-types/src/task_view.rs b/meilisearch-types/src/task_view.rs index d718ee33a..b8e55e8a8 100644 --- a/meilisearch-types/src/task_view.rs +++ b/meilisearch-types/src/task_view.rs @@ -93,7 +93,7 @@ impl From
for DetailsView { Details::DocumentEdition { edited_documents, original_filter, edition_code } => { DetailsView { edited_documents: Some(edited_documents), - original_filter: Some(Some(original_filter)), + original_filter: Some(original_filter), edition_code: Some(edition_code), ..DetailsView::default() } diff --git a/meilisearch-types/src/tasks.rs b/meilisearch-types/src/tasks.rs index e6bb57cf7..0501ed5ff 100644 --- a/meilisearch-types/src/tasks.rs +++ b/meilisearch-types/src/tasks.rs @@ -98,7 +98,7 @@ pub enum KindWithContent { }, DocumentEdition { index_uid: String, - filter_expr: serde_json::Value, + filter_expr: Option, edition_code: String, }, DocumentDeletion { @@ -214,7 +214,7 @@ impl KindWithContent { KindWithContent::DocumentEdition { index_uid: _, edition_code, filter_expr } => { Some(Details::DocumentEdition { edited_documents: None, - original_filter: filter_expr.to_string(), + original_filter: filter_expr.as_ref().map(|v| v.to_string()), edition_code: edition_code.clone(), }) } @@ -269,7 +269,7 @@ impl KindWithContent { KindWithContent::DocumentEdition { index_uid: _, filter_expr, edition_code } => { Some(Details::DocumentEdition { edited_documents: Some(0), - original_filter: filter_expr.to_string(), + original_filter: filter_expr.as_ref().map(|v| v.to_string()), edition_code: edition_code.clone(), }) } @@ -524,17 +524,48 @@ impl std::error::Error for ParseTaskKindError {} #[derive(Debug, PartialEq, Eq, Clone, Serialize, Deserialize)] pub enum Details { - DocumentAdditionOrUpdate { received_documents: u64, indexed_documents: Option }, - DocumentEdition { edited_documents: Option, original_filter: String, edition_code: String }, - SettingsUpdate { settings: Box> }, - IndexInfo { primary_key: Option }, - DocumentDeletion { provided_ids: usize, deleted_documents: Option }, - DocumentDeletionByFilter { original_filter: String, deleted_documents: Option }, - ClearAll { deleted_documents: Option }, - TaskCancelation { matched_tasks: u64, canceled_tasks: Option, original_filter: String }, - TaskDeletion { matched_tasks: u64, deleted_tasks: Option, original_filter: String }, - Dump { dump_uid: Option }, - IndexSwap { swaps: Vec }, + DocumentAdditionOrUpdate { + received_documents: u64, + indexed_documents: Option, + }, + DocumentEdition { + edited_documents: Option, + original_filter: Option, + edition_code: String, + }, + SettingsUpdate { + settings: Box>, + }, + IndexInfo { + primary_key: Option, + }, + DocumentDeletion { + provided_ids: usize, + deleted_documents: Option, + }, + DocumentDeletionByFilter { + original_filter: String, + deleted_documents: Option, + }, + ClearAll { + deleted_documents: Option, + }, + TaskCancelation { + matched_tasks: u64, + canceled_tasks: Option, + original_filter: String, + }, + TaskDeletion { + matched_tasks: u64, + deleted_tasks: Option, + original_filter: String, + }, + Dump { + dump_uid: Option, + }, + IndexSwap { + swaps: Vec, + }, } impl Details { diff --git a/meilisearch/src/routes/indexes/documents.rs b/meilisearch/src/routes/indexes/documents.rs index 380e2dd4f..83c75ca4d 100644 --- a/meilisearch/src/routes/indexes/documents.rs +++ b/meilisearch/src/routes/indexes/documents.rs @@ -579,7 +579,7 @@ pub async fn delete_documents_by_filter( #[deserr(error = DeserrJsonError, rename_all = camelCase, deny_unknown_fields)] pub struct DocumentEditionByFunction { #[deserr(error = DeserrJsonError, missing_field_error = DeserrJsonError::missing_document_filter)] - filter: Value, + filter: Option, #[deserr(error = DeserrJsonError, missing_field_error = DeserrJsonError::missing_document_filter)] function: String, } @@ -599,12 +599,14 @@ pub async fn edit_documents_by_function( // analytics.delete_documents(DocumentDeletionKind::PerFilter, &req); - // we ensure the filter is well formed before enqueuing it - || -> Result<_, ResponseError> { - Ok(crate::search::parse_filter(&filter)?.ok_or(MeilisearchHttpError::EmptyFilter)?) - }() - // and whatever was the error, the error code should always be an InvalidDocumentFilter - .map_err(|err| ResponseError::from_msg(err.message, Code::InvalidDocumentFilter))?; + if let Some(ref filter) = filter { + // we ensure the filter is well formed before enqueuing it + || -> Result<_, ResponseError> { + Ok(crate::search::parse_filter(filter)?.ok_or(MeilisearchHttpError::EmptyFilter)?) + }() + // and whatever was the error, the error code should always be an InvalidDocumentFilter + .map_err(|err| ResponseError::from_msg(err.message, Code::InvalidDocumentFilter))?; + } let task = KindWithContent::DocumentEdition { index_uid, filter_expr: filter, edition_code: function }; diff --git a/milli/Cargo.toml b/milli/Cargo.toml index 64f0116d3..a06c00dd7 100644 --- a/milli/Cargo.toml +++ b/milli/Cargo.toml @@ -83,6 +83,7 @@ rand = "0.8.5" tracing = "0.1.40" ureq = { version = "2.10.0", features = ["json"] } url = "2.5.2" +piccolo = "0.3.1" [dev-dependencies] mimalloc = { version = "0.1.43", default-features = false } diff --git a/milli/src/update/index_documents/mod.rs b/milli/src/update/index_documents/mod.rs index 727c763aa..b2a81b393 100644 --- a/milli/src/update/index_documents/mod.rs +++ b/milli/src/update/index_documents/mod.rs @@ -40,7 +40,7 @@ use crate::update::{ IndexerConfig, UpdateIndexingStep, WordPrefixDocids, WordPrefixIntegerDocids, WordsPrefixesFst, }; use crate::vector::EmbeddingConfigs; -use crate::{CboRoaringBitmapCodec, Index, Result}; +use crate::{fields_ids_map, CboRoaringBitmapCodec, Index, Result}; static MERGED_DATABASE_COUNT: usize = 7; static PREFIX_DATABASE_COUNT: usize = 4; @@ -172,6 +172,62 @@ where Ok((self, Ok(indexed_documents))) } + #[tracing::instrument(level = "trace", skip_all, target = "indexing::documents")] + pub fn edit_documents( + mut self, + documents: &RoaringBitmap, + code: &str, + ) -> Result<(Self, StdResult)> { + // Early return when there is no document to add + if documents.is_empty() { + return Ok((self, Ok(0))); + } + + let mut lua = piccolo::Lua::core(); + let executor = lua.enter(|ctx| ctx.stash(piccolo::Executor::new(ctx))); + let fields_ids_map = self.index.fields_ids_map(self.wtxn)?; + + for docid in documents { + let document = match self.index.documents.get(self.wtxn, &docid)? { + Some(document) => document, + None => panic!("a document should always exists"), + }; + + lua.try_enter(|ctx| { + let closure = match piccolo::Closure::load( + ctx, + None, + ("return ".to_string() + code).as_bytes(), + ) { + Ok(closure) => closure, + Err(_) => piccolo::Closure::load(ctx, None, code.as_bytes())?, + }; + let function = piccolo::Function::Closure(closure); + + let table = piccolo::Table::new(&ctx); + table.set(ctx, "internal-id", docid)?; + table.set(ctx, "title", "hello")?; + table.set(ctx, "description", "world")?; + dbg!(&table); + ctx.set_global("doc", table)?; + + ctx.fetch(&executor).restart(ctx, function, ()); + Ok(()) + }) + .unwrap(); + + lua.execute::<()>(&executor).unwrap(); + lua.try_enter(|ctx| { + let value = ctx.get_global("doc"); + dbg!(value); + Ok(()) + }) + .unwrap(); + } + + Ok((self, Ok(documents.len()))) + } + pub fn with_embedders(mut self, embedders: EmbeddingConfigs) -> Self { self.embedders = embedders; self From 2d97164d9f2ff01a673738a0764ad7030163b8ed Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Cl=C3=A9ment=20Renault?= Date: Thu, 9 May 2024 13:07:32 +0200 Subject: [PATCH 04/29] It works perfectly with some Rhai --- Cargo.lock | 1561 ++++++++++------------- milli/Cargo.toml | 2 +- milli/src/update/index_documents/mod.rs | 115 +- 3 files changed, 729 insertions(+), 949 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index ed3a0cc48..85a4c30ab 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -45,7 +45,7 @@ dependencies = [ "actix-service", "actix-tls", "actix-utils", - "ahash 0.8.11", + "ahash", "base64 0.22.1", "bitflags 2.6.0", "brotli", @@ -99,9 +99,9 @@ dependencies = [ [[package]] name = "actix-rt" -version = "2.10.0" +version = "2.9.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "24eda4e2a6e042aa4e55ac438a2ae052d3b5da0ecf83d7411e1a368946925208" +checksum = "28f32d40287d3f402ae0028a9d54bef51af15c8769492826a69d28f81893151d" dependencies = [ "actix-macros", "futures-core", @@ -150,7 +150,7 @@ dependencies = [ "impl-more", "pin-project-lite", "tokio", - "tokio-rustls 0.24.1", + "tokio-rustls", "tokio-util", "tracing", "webpki-roots 0.25.3", @@ -182,7 +182,7 @@ dependencies = [ "actix-tls", "actix-utils", "actix-web-codegen", - "ahash 0.8.11", + "ahash", "bytes", "bytestring", "cfg-if", @@ -219,6 +219,18 @@ dependencies = [ "syn 2.0.60", ] +[[package]] +name = "actix-web-static-files" +version = "4.0.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "adf6d1ef6d7a60e084f9e0595e2a5234abda14e76c105ecf8e2d0e8800c41a1f" +dependencies = [ + "actix-web", + "derive_more", + "futures-util", + "static-files", +] + [[package]] name = "addr2line" version = "0.20.0" @@ -245,17 +257,6 @@ dependencies = [ "cpufeatures", ] -[[package]] -name = "ahash" -version = "0.7.8" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "891477e0c6a8957309ee5c45a6368af3ae14bb510732d2684ffa19af310920f9" -dependencies = [ - "getrandom", - "once_cell", - "version_check", -] - [[package]] name = "ahash" version = "0.8.11" @@ -263,6 +264,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "e89da841a80418a9b391ebaea17f5c112ffaaa96f621d2c285b5174da76b9011" dependencies = [ "cfg-if", + "const-random", "getrandom", "once_cell", "version_check", @@ -271,9 +273,9 @@ dependencies = [ [[package]] name = "aho-corasick" -version = "1.1.3" +version = "1.1.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8e60d3430d3a69478ad0993f19238d2df97c507009a52b3c10addcd7f6bcb916" +checksum = "b2969dcb958b36655471fc61f7e416fa76033bdd4bfed0678d8fee1e2d07a1f0" dependencies = [ "memchr", ] @@ -355,9 +357,9 @@ dependencies = [ [[package]] name = "anyhow" -version = "1.0.86" +version = "1.0.82" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b3d1d046238990b9cf5bcde22a3fb3584ee5cf65fb2765f454ed428c7a0063da" +checksum = "f538837af36e6f6a9be0faa67f9a314f8119e4e4b5867c6ab40ed60360142519" dependencies = [ "backtrace", ] @@ -377,12 +379,6 @@ dependencies = [ "derive_arbitrary", ] -[[package]] -name = "arrayvec" -version = "0.7.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "96d30a06541fbafbc7f82ed10c06164cfbd2c401138f6addd8404629c4b16711" - [[package]] name = "arroy" version = "0.4.0" @@ -393,7 +389,7 @@ dependencies = [ "byteorder", "heed", "log", - "memmap2", + "memmap2 0.9.4", "ordered-float", "rand", "rayon", @@ -403,16 +399,63 @@ dependencies = [ ] [[package]] -name = "async-trait" -version = "0.1.81" +name = "assert-json-diff" +version = "2.0.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6e0c28dcc82d7c8ead5cb13beb15405b57b8546e93215673ff8ca0349a028107" +checksum = "47e4f2b81832e72834d7518d8487a0396a28cc408186a2e8854c0f98011faf12" +dependencies = [ + "serde", + "serde_json", +] + +[[package]] +name = "async-stream" +version = "0.3.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "cd56dd203fef61ac097dd65721a419ddccb106b2d2b70ba60a6b529f03961a51" +dependencies = [ + "async-stream-impl", + "futures-core", + "pin-project-lite", +] + +[[package]] +name = "async-stream-impl" +version = "0.3.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "16e62a023e7c117e27523144c5d2459f4397fcc3cab0085af8e2224f643a0193" dependencies = [ "proc-macro2", "quote", "syn 2.0.60", ] +[[package]] +name = "async-trait" +version = "0.1.77" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c980ee35e870bd1a4d2c8294d4c04d0499e67bca1e4b5cefcc693c2fa00caea9" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.60", +] + +[[package]] +name = "atomic" +version = "0.5.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c59bdb34bc650a32731b31bd8f0829cc15d24a708ee31559e0bb34f2bc320cba" + +[[package]] +name = "atomic-polyfill" +version = "0.1.11" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e3ff7eb3f316534d83a8a2c3d1674ace8a5a71198eba31e2e2b597833f699b28" +dependencies = [ + "critical-section", +] + [[package]] name = "autocfg" version = "1.2.0" @@ -452,6 +495,12 @@ version = "0.22.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "72b3254f16251a8381aa12e40e3c4d2f0199f8c6508fbecb9d91f575e0fbb8c6" +[[package]] +name = "base64ct" +version = "1.6.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8c3c1a368f70d6cf7302d78f8f7093da241fb8e8807c05cc9e51a125895a6d5b" + [[package]] name = "benchmarks" version = "1.9.0" @@ -497,16 +546,16 @@ dependencies = [ [[package]] name = "bindgen" -version = "0.69.4" +version = "0.68.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a00dc851838a2120612785d195287475a3ac45514741da670b735818822129a0" +checksum = "726e4313eb6ec35d2730258ad4e15b547ee75d6afaa1361a922e78e59b7d8078" dependencies = [ "bitflags 2.6.0", "cexpr", "clang-sys", - "itertools 0.12.1", "lazy_static", "lazycell", + "peeking_take_while", "proc-macro2", "quote", "regex", @@ -556,18 +605,6 @@ dependencies = [ "serde", ] -[[package]] -name = "bitvec" -version = "1.0.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1bc2832c24239b0141d5674bb9174f9d68a8b5b3f2753311927c172ca46f7e9c" -dependencies = [ - "funty", - "radium", - "tap", - "wyz", -] - [[package]] name = "block-buffer" version = "0.10.4" @@ -577,30 +614,6 @@ dependencies = [ "generic-array", ] -[[package]] -name = "borsh" -version = "1.5.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a6362ed55def622cddc70a4746a68554d7b687713770de539e59a739b249f8ed" -dependencies = [ - "borsh-derive", - "cfg_aliases", -] - -[[package]] -name = "borsh-derive" -version = "1.5.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c3ef8005764f53cd4dca619f5bf64cafd4664dada50ece25e4d81de54c80cc0b" -dependencies = [ - "once_cell", - "proc-macro-crate", - "proc-macro2", - "quote", - "syn 2.0.60", - "syn_derive", -] - [[package]] name = "brotli" version = "6.0.0" @@ -624,9 +637,9 @@ dependencies = [ [[package]] name = "bstr" -version = "1.9.1" +version = "1.9.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "05efc5cfd9110c8416e471df0e96702d58690178e206e61b7173706673c93706" +checksum = "c48f0051a4b4c5e0b6d365cd04af53aeaa209e3cc15ec2cdb69e73cc87fbd0dc" dependencies = [ "memchr", "regex-automata", @@ -644,43 +657,20 @@ dependencies = [ [[package]] name = "bumpalo" -version = "3.16.0" +version = "3.15.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "79296716171880943b8470b5f8d03aa55eb2e645a4874bdbb28adb49162e012c" +checksum = "7ff69b9dd49fd426c69a0db9fc04dd934cdb6645ff000864d98f7e2af8830eaa" [[package]] name = "byte-unit" -version = "5.1.4" +version = "4.0.19" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "33ac19bdf0b2665407c39d82dbc937e951e7e2001609f0fb32edd0af45a2d63e" +checksum = "da78b32057b8fdfc352504708feeba7216dcd65a2c9ab02978cbd288d1279b6c" dependencies = [ - "rust_decimal", "serde", "utf8-width", ] -[[package]] -name = "bytecheck" -version = "0.6.12" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "23cdc57ce23ac53c931e88a43d06d070a6fd142f2617be5855eb75efc9beb1c2" -dependencies = [ - "bytecheck_derive", - "ptr_meta", - "simdutf8", -] - -[[package]] -name = "bytecheck_derive" -version = "0.6.12" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3db406d29fbcd95542e92559bed4d8ad92636d1ca8b3b72ede10b4bcc010e659" -dependencies = [ - "proc-macro2", - "quote", - "syn 1.0.109", -] - [[package]] name = "bytecount" version = "0.6.3" @@ -715,9 +705,9 @@ checksum = "1fd0f2584146f6f2ef48085050886acf353beff7305ebd1ae69500e27c67f64b" [[package]] name = "bytes" -version = "1.6.0" +version = "1.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "514de17de45fdb8dc022b1a7975556c53c86f9f0aa5f534b98977b171857c2c9" +checksum = "a2bd12c1caf447e69cd4528f47f94d203fd2582878ecb9e9465484c4148a8223" [[package]] name = "bytestring" @@ -760,16 +750,16 @@ dependencies = [ [[package]] name = "candle-core" -version = "0.6.0" +version = "0.4.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d5b18de020c2729dbf7ac390325312644808b6ba9b7962f1f724e9185b1d53c7" +checksum = "6f1b20174c1707e20f4cb364a355b449803c03e9b0c9193324623cf9787a4e00" dependencies = [ "byteorder", "candle-kernels", "cudarc", "gemm", "half 2.4.0", - "memmap2", + "memmap2 0.9.4", "num-traits", "num_cpus", "rand", @@ -778,23 +768,23 @@ dependencies = [ "safetensors", "thiserror", "yoke", - "zip 1.1.4", + "zip", ] [[package]] name = "candle-kernels" -version = "0.6.0" +version = "0.4.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8bc0a71be8b2f0950b63fd602a5e10a74a4f94a5fd63059ae455e96163389488" +checksum = "5845911a44164ebb73b56a0e23793ba1b583bad102af7400fe4768babc5815b2" dependencies = [ "bindgen_cuda", ] [[package]] name = "candle-nn" -version = "0.6.0" +version = "0.4.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b006b30f66a0d94fc9cef0ac4de6ce510565f35ae2c6c35ce5d4aacfb0fc8eeb" +checksum = "66a27533c8edfc915a6459f9850641ef523a829fa1a181c670766c1f752d873a" dependencies = [ "candle-core", "half 2.4.0", @@ -807,14 +797,13 @@ dependencies = [ [[package]] name = "candle-transformers" -version = "0.6.0" +version = "0.4.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4f0d4eb6a0d9279d5829b06b2bf3caa117904eefd6dcf879d16e687c4a84034c" +checksum = "b5847699f0643da05e57fc473672566e93dc36d82c1b7eeb970c6154d3434fe1" dependencies = [ "byteorder", "candle-core", "candle-nn", - "fancy-regex 0.13.0", "num-traits", "rand", "rayon", @@ -849,9 +838,9 @@ dependencies = [ [[package]] name = "cargo_toml" -version = "0.20.3" +version = "0.18.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4895c018bb228aa6b3ba1a0285543fcb4b704734c3fb1f72afaa75aa769500c1" +checksum = "802b755090e39835a4b0440fb0bbee0df7495a8b337f63db21e616f7821c7e8c" dependencies = [ "serde", "toml", @@ -898,12 +887,6 @@ version = "1.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "baf1de4339761588bc0619e3cbc0120ee582ebb74b53b4efbf79117bd2da40fd" -[[package]] -name = "cfg_aliases" -version = "0.2.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "613afe47fcd5fac7ccf1db93babcb082c5994d996f20b8b159f2ad1658eb5724" - [[package]] name = "change-detection" version = "1.2.0" @@ -916,9 +899,9 @@ dependencies = [ [[package]] name = "charabia" -version = "0.8.12" +version = "0.8.11" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9868a22f10dee80498a8a2b6c641d80bf28ea4495fcf71c2dc4836c2dd23958c" +checksum = "11a09ae38cfcc153f01576c3f579dfd916e0320f1b474f298c8d680b2dd92eb6" dependencies = [ "aho-corasick", "cow-utils", @@ -990,9 +973,9 @@ dependencies = [ [[package]] name = "clap" -version = "4.5.9" +version = "4.4.17" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "64acc1846d54c1fe936a78dc189c34e28d3f5afc348403f28ecf53660b9b8462" +checksum = "80932e03c33999b9235edb8655bc9df3204adc9887c2f95b50cb1deb9fd54253" dependencies = [ "clap_builder", "clap_derive", @@ -1000,23 +983,23 @@ dependencies = [ [[package]] name = "clap_builder" -version = "4.5.9" +version = "4.4.17" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6fb8393d67ba2e7bfaf28a23458e4e2b543cc73a99595511eb207fdb8aede942" +checksum = "d6c0db58c659eef1c73e444d298c27322a1b52f6927d2ad470c0c0f96fa7b8fa" dependencies = [ "anstream", "anstyle", "clap_lex", - "strsim 0.11.1", + "strsim 0.10.0", ] [[package]] name = "clap_derive" -version = "4.5.8" +version = "4.4.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2bac35c6dafb060fd4d275d9a4ffae97917c13a6327903a8be2153cd964f7085" +checksum = "cf9804afaaf59a91e75b022a30fb7229a7901f60c755489cc61c9b423b836442" dependencies = [ - "heck 0.5.0", + "heck", "proc-macro2", "quote", "syn 2.0.60", @@ -1024,9 +1007,9 @@ dependencies = [ [[package]] name = "clap_lex" -version = "0.7.1" +version = "0.6.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4b82cf0babdbd58558212896d1a4272303a57bdb245c2bf1147185fb45640e70" +checksum = "702fc72eb24e5a1e48ce58027a675bc24edd52096d5397d4aea7c6dd9eca0bd1" [[package]] name = "color-spantrace" @@ -1071,10 +1054,30 @@ dependencies = [ ] [[package]] -name = "constant_time_eq" -version = "0.3.0" +name = "const-random" +version = "0.1.18" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f7144d30dcf0fafbce74250a3963025d8d52177934239851c917d29f1df280c2" +checksum = "87e00182fe74b066627d63b85fd550ac2998d4b0bd86bfed477a0ae4c7c71359" +dependencies = [ + "const-random-macro", +] + +[[package]] +name = "const-random-macro" +version = "0.1.16" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f9d839f2a20b0aee515dc581a6172f2321f96cab76c1a38a4c584a194955390e" +dependencies = [ + "getrandom", + "once_cell", + "tiny-keccak", +] + +[[package]] +name = "constant_time_eq" +version = "0.1.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "245097e9a4535ee1e3e3931fcfcd55a796a44c643e8596ff6566d68f09b87bbc" [[package]] name = "convert_case" @@ -1102,6 +1105,16 @@ dependencies = [ "version_check", ] +[[package]] +name = "core-foundation" +version = "0.9.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "194a7a9e6de53fa55116934067c844d9d749312f75c6f6d0980e8c252f8c2146" +dependencies = [ + "core-foundation-sys", + "libc", +] + [[package]] name = "core-foundation-sys" version = "0.8.4" @@ -1123,26 +1136,11 @@ dependencies = [ "libc", ] -[[package]] -name = "crc" -version = "3.2.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "69e6e4d7b33a94f0991c26729976b10ebde1d34c3ee82408fb536164fa10d636" -dependencies = [ - "crc-catalog", -] - -[[package]] -name = "crc-catalog" -version = "2.4.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "19d374276b40fb8bbdee95aef7c7fa6b5316ec764510eb64b8dd0e2ed0d7e7f5" - [[package]] name = "crc32fast" -version = "1.4.2" +version = "1.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a97769d94ddab943e4510d138150169a2758b5ef3eb191a9ee688de3e23ef7b3" +checksum = "b3855a8a784b474f333699ef2bbca9db2c4a1f6d9088a90a2d25b1eb53111eaa" dependencies = [ "cfg-if", ] @@ -1183,6 +1181,12 @@ dependencies = [ "itertools 0.10.5", ] +[[package]] +name = "critical-section" +version = "1.1.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6548a0ad5d2549e111e1f6a11a6c2e2d00ce6a3dafe22948d67c2b443f775e52" + [[package]] name = "crossbeam" version = "0.8.4" @@ -1198,9 +1202,9 @@ dependencies = [ [[package]] name = "crossbeam-channel" -version = "0.5.13" +version = "0.5.11" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "33480d6946193aa8033910124896ca395333cae7e2d1113d1fef6c3272217df2" +checksum = "176dc175b78f56c0f321911d9c8eb2b77a78a4860b9c19db83835fea1a46649b" dependencies = [ "crossbeam-utils", ] @@ -1235,9 +1239,9 @@ dependencies = [ [[package]] name = "crossbeam-utils" -version = "0.8.20" +version = "0.8.19" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "22ec99545bb0ed0ea7bb9b8e1e9122ea386ff8a48c0922e43f36d45ab09e0e80" +checksum = "248e3bacc7dc6baa3b21e405ee045c3047101a49145e7e9eca583ab4c2ca5345" [[package]] name = "crunchy" @@ -1278,12 +1282,11 @@ dependencies = [ [[package]] name = "cudarc" -version = "0.11.7" +version = "0.10.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "56ee2a3fbbd981e1c7ea73cc2af136e754eb22d17436de37155227ee4dbe0cf4" +checksum = "9395df0cab995685664e79cc35ad6302bf08fb9c5d82301875a183affe1278b1" dependencies = [ "half 2.4.0", - "libloading", ] [[package]] @@ -1365,12 +1368,6 @@ dependencies = [ "uuid", ] -[[package]] -name = "deflate64" -version = "0.1.8" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "83ace6c86376be0b6cdcf3fb41882e81d94b31587573d1cfa9d01cd06bba210d" - [[package]] name = "deranged" version = "0.3.11" @@ -1401,6 +1398,15 @@ dependencies = [ "derive_builder_macro 0.12.0", ] +[[package]] +name = "derive_builder" +version = "0.13.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8f59169f400d8087f238c5c0c7db6a28af18681717f3b623227d92f397e938c7" +dependencies = [ + "derive_builder_macro 0.13.1", +] + [[package]] name = "derive_builder" version = "0.20.0" @@ -1422,6 +1428,18 @@ dependencies = [ "syn 1.0.109", ] +[[package]] +name = "derive_builder_core" +version = "0.13.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a4ec317cc3e7ef0928b0ca6e4a634a4d6c001672ae210438cf114a83e56b018d" +dependencies = [ + "darling 0.14.4", + "proc-macro2", + "quote", + "syn 1.0.109", +] + [[package]] name = "derive_builder_core" version = "0.20.0" @@ -1444,6 +1462,16 @@ dependencies = [ "syn 1.0.109", ] +[[package]] +name = "derive_builder_macro" +version = "0.13.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "870368c3fb35b8031abb378861d4460f573b92238ec2152c927a21f77e3e0127" +dependencies = [ + "derive_builder_core 0.13.1", + "syn 1.0.109", +] + [[package]] name = "derive_builder_macro" version = "0.20.0" @@ -1469,9 +1497,9 @@ dependencies = [ [[package]] name = "deserr" -version = "0.6.2" +version = "0.6.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bfe971a2a48625fda3198032f35de60939828c4aed47d76715c21698801b985c" +checksum = "3418e814bb893a61b25a60db71dccab7cb70035d94ffe58c9b4a70387ac42083" dependencies = [ "actix-http", "actix-utils", @@ -1481,14 +1509,14 @@ dependencies = [ "serde-cs", "serde_json", "serde_urlencoded", - "strsim 0.11.1", + "strsim 0.10.0", ] [[package]] name = "deserr-internal" -version = "0.6.2" +version = "0.7.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "aae89f00c97a75940185084a826c0aace055774ad57a58211625606449ea0bd8" +checksum = "9cadd9624c995ecbd6d6c81ec0804fbbb335e3acba5326a06067ccd33295a37e" dependencies = [ "convert_case 0.6.0", "proc-macro2", @@ -1498,9 +1526,9 @@ dependencies = [ [[package]] name = "deunicode" -version = "1.6.0" +version = "1.4.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "339544cc9e2c4dc3fc7149fd630c5f22263a4fdf18a98afd0075784968b5cf00" +checksum = "3ae2a35373c5c74340b79ae6780b498b2b183915ec5dacf263aac5a099bf485a" [[package]] name = "digest" @@ -1555,17 +1583,6 @@ dependencies = [ "winapi", ] -[[package]] -name = "displaydoc" -version = "0.2.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "97369cbbc041bc366949bc74d34658d6cda5621039731c6310521892a3a20ae0" -dependencies = [ - "proc-macro2", - "quote", - "syn 2.0.60", -] - [[package]] name = "doc-comment" version = "0.3.3" @@ -1588,9 +1605,10 @@ dependencies = [ "anyhow", "big_s", "flate2", - "http 1.1.0", + "http 0.2.11", "maplit", "meili-snap", + "meilisearch-auth", "meilisearch-types", "once_cell", "regex", @@ -1617,9 +1635,9 @@ dependencies = [ [[package]] name = "either" -version = "1.13.0" +version = "1.10.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "60b1af1c220855b6ceac025d3f6ecdd2b7c4894bfe9cd9bda4fbb4bc7c0d4cf0" +checksum = "11157ac094ffbdde99aa67b23417ebdd801842852b500e395a45a9c0aac03e4a" dependencies = [ "serde", ] @@ -1718,7 +1736,7 @@ version = "0.6.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "5ffccbb6966c05b32ef8fbac435df276c4ae4d3dc55a8cd0eb9745e6c12f546a" dependencies = [ - "heck 0.4.1", + "heck", "proc-macro2", "quote", "syn 2.0.60", @@ -1726,18 +1744,18 @@ dependencies = [ [[package]] name = "enum-iterator" -version = "2.1.0" +version = "1.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c280b9e6b3ae19e152d8e31cf47f18389781e119d4013a2a2bb0180e5facc635" +checksum = "9fd242f399be1da0a5354aa462d57b4ab2b4ee0683cc552f7c007d2d12d36e94" dependencies = [ "enum-iterator-derive", ] [[package]] name = "enum-iterator-derive" -version = "1.4.0" +version = "1.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a1ab991c1362ac86c61ab6f556cff143daa22e5a15e4e189df818b2fd19fe65b" +checksum = "03cdc46ec28bd728e67540c528013c6a10eb69a02eb31078a1bda695438cbfb8" dependencies = [ "proc-macro2", "quote", @@ -1777,26 +1795,39 @@ dependencies = [ ] [[package]] -name = "fancy-regex" -version = "0.13.0" +name = "fastrand" +version = "2.0.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "531e46835a22af56d1e3b66f04844bed63158bc094a628bec1d321d9b4c44bf2" +checksum = "25cbce373ec4653f1a01a31e8a5e5ec0c622dc27ff9c4e6606eefef5cbbed4a5" + +[[package]] +name = "faux" +version = "0.1.10" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "14b55a7f424e532314115b5cdc6d9711b15ac453bfe0dcfa212baebc5efacd60" dependencies = [ - "bit-set", - "regex-automata", - "regex-syntax", + "faux_macros", + "paste", ] [[package]] -name = "fastrand" -version = "2.1.0" +name = "faux_macros" +version = "0.1.10" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9fc0510504f03c51ada170672ac806f1f105a88aa97a5281117e1ddc3368e51a" +checksum = "d15473d7f83b54a44826907af16ae5727eaacaf6e53b51474016d3efd9aa35d5" +dependencies = [ + "darling 0.20.9", + "proc-macro2", + "quote", + "syn 2.0.60", + "uuid", +] [[package]] name = "file-store" version = "1.9.0" dependencies = [ + "faux", "tempfile", "thiserror", "tracing", @@ -1827,9 +1858,9 @@ dependencies = [ [[package]] name = "flate2" -version = "1.0.30" +version = "1.0.28" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5f54427cfd1c7829e2a139fcefea601bf088ebca651d2bf53ebc600eac295dae" +checksum = "46303f565772937ffe1d394a4fac6f411c6013172fadde9dcdb1e147a086940e" dependencies = [ "crc32fast", "miniz_oxide", @@ -1864,12 +1895,6 @@ version = "0.4.7" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "7ab85b9b05e3978cc9a9cf8fea7f01b494e1a09ed3037e16ba39edc7a29eb61a" -[[package]] -name = "funty" -version = "2.0.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e6d5a32815ae3f33302d95fdcb2ce17862f8c65363dcfd29360480ba1001fc9c" - [[package]] name = "futures" version = "0.3.30" @@ -1983,42 +2008,17 @@ dependencies = [ [[package]] name = "fxprof-processed-profile" -version = "0.7.0" +version = "0.6.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ce20bbb48248608ba4908b45fe36e17e40f56f8c6bb385ecf5d3c4a1e8b05a22" +checksum = "27d12c0aed7f1e24276a241aadc4cb8ea9f83000f34bc062b7cc2d51e3b0fabd" dependencies = [ "bitflags 2.6.0", "debugid", "fxhash", "serde", - "serde_derive", "serde_json", ] -[[package]] -name = "gc-arena" -version = "0.5.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "24d4a9d8c3c1ef4301b8afc383e53e102a13f9947da2181bf82828480dcc5165" -dependencies = [ - "allocator-api2", - "gc-arena-derive", - "hashbrown 0.14.3", - "sptr", -] - -[[package]] -name = "gc-arena-derive" -version = "0.5.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8c952d28a64896b1c4ac382dcd7beeaeaabc13e8c7c7f800ea2938abd828ed30" -dependencies = [ - "proc-macro2", - "quote", - "syn 2.0.60", - "synstructure", -] - [[package]] name = "gemm" version = "0.17.1" @@ -2186,9 +2186,9 @@ checksum = "b6c80984affa11d98d1b88b66ac8853f143217b399d3c74116778ff8fdb4ed2e" [[package]] name = "git2" -version = "0.19.0" +version = "0.18.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b903b73e45dc0c6c596f2d37eccece7c1c8bb6e4407b001096387c63d0d93724" +checksum = "1b3ba52851e73b46a4c3df1d89343741112003f0f6f13beb0dfac9e457c3fdcd" dependencies = [ "bitflags 2.6.0", "libc", @@ -2205,9 +2205,9 @@ checksum = "d2fabcfbdc87f4758337ca535fb41a6d701b65693ce38287d856d1674551ec9b" [[package]] name = "grenad" -version = "0.4.7" +version = "0.4.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "350d89047298d3b1b40050acd11ab76e487b854a104b760ebc5a7f375093de77" +checksum = "c297f45167e6d543eb728e12ff284283e4ba2182a25c6cdcec883fda3316c7e7" dependencies = [ "bytemuck", "byteorder", @@ -2256,39 +2256,33 @@ dependencies = [ [[package]] name = "hash32" -version = "0.3.1" +version = "0.2.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "47d60b12902ba28e2730cd37e95b8c9223af2808df9e902d4df49588d1470606" +checksum = "b0c35f58762feb77d74ebe43bdbc3210f09be9fe6742234d573bacc26ed92b67" dependencies = [ "byteorder", ] -[[package]] -name = "hashbrown" -version = "0.12.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8a9ee70c43aaf417c914396645a0fa852624801b24ebb7ae78fe8272889ac888" -dependencies = [ - "ahash 0.7.8", -] - [[package]] name = "hashbrown" version = "0.14.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "290f1a1d9242c78d09ce40a5e87e7554ee637af1351968159f4952f028f75604" dependencies = [ - "ahash 0.8.11", + "ahash", "allocator-api2", ] [[package]] name = "heapless" -version = "0.8.0" +version = "0.7.16" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0bfb9eb618601c89945a70e254898da93b13be0388091d42117462b265bb3fad" +checksum = "db04bc24a18b9ea980628ecf00e6c0264f3c1426dac36c00cb49b6fbad8b0743" dependencies = [ + "atomic-polyfill", "hash32", + "rustc_version", + "spin", "stable_deref_trait", ] @@ -2298,12 +2292,6 @@ version = "0.4.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "95505c38b4572b2d910cecb0281560f54b440a19336cbbcb27bf6ce6adc6f5a8" -[[package]] -name = "heck" -version = "0.5.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2304e00983f87ffb38b55b444b5e3b60a884b5d30c0fca7d82fe33449bbe55ea" - [[package]] name = "heed" version = "0.20.3" @@ -2317,7 +2305,7 @@ dependencies = [ "libc", "lmdb-master-sys", "once_cell", - "page_size", + "page_size 0.6.0", "synchronoise", "url", ] @@ -2359,7 +2347,7 @@ version = "0.3.2" source = "git+https://github.com/dureuill/hf-hub.git?branch=rust_tls#88d4f11cb9fa079f2912bacb96f5080b16825ce8" dependencies = [ "dirs", - "http 1.1.0", + "http 1.0.0", "indicatif", "log", "rand", @@ -2391,9 +2379,9 @@ dependencies = [ [[package]] name = "http" -version = "1.1.0" +version = "1.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "21b9ddb458710bc376481b842f5da65cdf31522de232c1ca8146abce2a358258" +checksum = "b32afd38673a8016f7c9ae69e5af41a58f81b1d31689040f2f1959594ce194ea" dependencies = [ "bytes", "fnv", @@ -2402,24 +2390,12 @@ dependencies = [ [[package]] name = "http-body" -version = "1.0.0" +version = "0.4.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1cac85db508abc24a2e48553ba12a996e87244a0395ce011e62b37158745d643" +checksum = "d5f38f16d184e36f2408a55281cd658ecbd3ca05cce6d6510a176eca393e26d1" dependencies = [ "bytes", - "http 1.1.0", -] - -[[package]] -name = "http-body-util" -version = "0.1.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "793429d76616a256bcb62c2a2ec2bed781c8307e797e2598c50010f2bee2544f" -dependencies = [ - "bytes", - "futures-util", - "http 1.1.0", - "http-body", + "http 0.2.11", "pin-project-lite", ] @@ -2437,59 +2413,40 @@ checksum = "c4a1e36c821dbe04574f602848a19f742f4fb3c98d40449f11bcad18d6b17421" [[package]] name = "hyper" -version = "1.4.1" +version = "0.14.27" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "50dfd22e0e76d0f662d429a5f80fcaf3855009297eab6a0a9f8543834744ba05" +checksum = "ffb1cfd654a8219eaef89881fdb3bb3b1cdc5fa75ded05d6933b2b382e395468" dependencies = [ "bytes", "futures-channel", + "futures-core", "futures-util", - "http 1.1.0", + "h2", + "http 0.2.11", "http-body", "httparse", + "httpdate", "itoa", "pin-project-lite", - "smallvec", + "socket2 0.4.9", "tokio", + "tower-service", + "tracing", "want", ] [[package]] name = "hyper-rustls" -version = "0.27.2" +version = "0.24.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5ee4be2c948921a1a5320b629c4193916ed787a7f7f293fd3f7f5a6c9de74155" +checksum = "8d78e1e73ec14cf7375674f74d7dde185c8206fd9dea6fb6295e8a98098aaa97" dependencies = [ "futures-util", - "http 1.1.0", + "http 0.2.11", "hyper", - "hyper-util", - "rustls 0.23.11", - "rustls-pki-types", + "rustls 0.21.12", "tokio", - "tokio-rustls 0.26.0", - "tower-service", - "webpki-roots 0.26.1", -] - -[[package]] -name = "hyper-util" -version = "0.1.6" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3ab92f4f49ee4fb4f997c784b7a2e0fa70050211e0b6a287f898c3c9785ca956" -dependencies = [ - "bytes", - "futures-channel", - "futures-util", - "http 1.1.0", - "http-body", - "hyper", - "pin-project-lite", - "socket2 0.5.5", - "tokio", - "tower", - "tower-service", - "tracing", + "tokio-rustls", ] [[package]] @@ -2524,7 +2481,7 @@ dependencies = [ "bincode", "crossbeam", "csv", - "derive_builder 0.20.0", + "derive_builder 0.12.0", "dump", "enum-iterator", "file-store", @@ -2534,7 +2491,7 @@ dependencies = [ "meili-snap", "meilisearch-auth", "meilisearch-types", - "page_size", + "page_size 0.5.0", "rayon", "roaring", "serde", @@ -2555,7 +2512,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "168fb715dda47215e360912c096649d23d58bf392ac62f73919e831745e40f26" dependencies = [ "equivalent", - "hashbrown 0.14.3", + "hashbrown", "serde", ] @@ -2583,9 +2540,9 @@ dependencies = [ [[package]] name = "insta" -version = "1.39.0" +version = "1.34.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "810ae6042d48e2c9e9215043563a58a80b877bc863228a74cf10c49d4620a6f5" +checksum = "5d64600be34b2fcfc267740a243fa7744441bb4947a619ac4e5bb6507f35fbfc" dependencies = [ "console", "lazy_static", @@ -2594,6 +2551,7 @@ dependencies = [ "pest_derive", "serde", "similar", + "yaml-rust", ] [[package]] @@ -2605,6 +2563,17 @@ dependencies = [ "cfg-if", ] +[[package]] +name = "io-lifetimes" +version = "1.0.11" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "eae7b9aee968036d54dce06cebaefd919e4472e753296daccd6d344e3e2df0c2" +dependencies = [ + "hermit-abi", + "libc", + "windows-sys 0.48.0", +] + [[package]] name = "ipnet" version = "2.8.0" @@ -2613,9 +2582,9 @@ checksum = "28b29a3cd74f0f4598934efe3aeba42bae0eb4680554128851ebbecb02af14e6" [[package]] name = "irg-kvariants" -version = "0.1.1" +version = "0.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ef2af7c331f2536964a32b78a7d2e0963d78b42f4a76323b16cc7d94b1ddce26" +checksum = "c73214298363629cf9dbfc93b426808865ee3c121029778cb31b1284104fdf78" dependencies = [ "csv", "once_cell", @@ -2624,12 +2593,12 @@ dependencies = [ [[package]] name = "is-terminal" -version = "0.4.12" +version = "0.4.10" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f23ff5ef2b80d608d61efee834934d862cd92461afc0560dedf493e4c033738b" +checksum = "0bad00257d07be169d870ab665980b06cdb366d792ad690bf2e76876dc503455" dependencies = [ "hermit-abi", - "libc", + "rustix 0.38.31", "windows-sys 0.52.0", ] @@ -2660,15 +2629,6 @@ dependencies = [ "either", ] -[[package]] -name = "itertools" -version = "0.13.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "413ee7dfc52ee1a4949ceeb7dbc8a33f2d6c088194d9f922fb8318faf1f01186" -dependencies = [ - "either", -] - [[package]] name = "itoa" version = "1.0.11" @@ -2677,13 +2637,13 @@ checksum = "49f1f14873335454500d59611f1cf4a4b0f786f9ac11f4312a78e4cf2566695b" [[package]] name = "jieba-rs" -version = "0.7.0" +version = "0.6.8" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c1e2b0210dc78b49337af9e49d7ae41a39dceac6e5985613f1cf7763e2f76a25" +checksum = "93f0c1347cd3ac8d7c6e3a2dc33ac496d365cf09fc0831aa61111e1a6738983e" dependencies = [ "cedarwood", - "derive_builder 0.20.0", "fxhash", + "hashbrown", "lazy_static", "phf", "phf_codegen", @@ -2718,9 +2678,9 @@ dependencies = [ [[package]] name = "jsonwebtoken" -version = "9.3.0" +version = "9.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b9ae10193d25051e74945f1ea2d0b42e03cc3b890f7e4cc5faa44997d808193f" +checksum = "5c7ea04a7c5c055c175f189b6dc6ba036fd62306b58c66c9f6389036c503a3f4" dependencies = [ "base64 0.21.7", "js-sys", @@ -2758,9 +2718,9 @@ checksum = "d4345964bb142484797b161f473a503a434de77149dd8c7427788c6e13379388" [[package]] name = "lazy_static" -version = "1.5.0" +version = "1.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bbd2bcb4c963f2ddae06a2efc7e9f3591312473c50c6685e1f298068316e66fe" +checksum = "e2abad23fbc42b3700f2f279844dc832adb2b2eb069b2df918f455c4e18cc646" [[package]] name = "lazycell" @@ -2785,9 +2745,9 @@ checksum = "97b3888a4aecf77e811145cadf6eef5901f4782c53886191b2f693f24761847c" [[package]] name = "libgit2-sys" -version = "0.17.0+1.8.1" +version = "0.16.2+1.7.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "10472326a8a6477c3c20a64547b0059e4b0d086869eee31e6d7da728a8eb7224" +checksum = "ee4126d8b4ee5c9d9ea891dd875cfdc1e9d0950437179104b183d7d8a74d24e8" dependencies = [ "cc", "libc", @@ -2797,12 +2757,12 @@ dependencies = [ [[package]] name = "libloading" -version = "0.8.4" +version = "0.8.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e310b3a6b5907f99202fcdb4960ff45b93735d7c7d96b760fcff8db2dc0e103d" +checksum = "c571b676ddfc9a8c12f1f3d3085a7b163966a8fd8098a90640953ce5f6170161" dependencies = [ "cfg-if", - "windows-targets 0.52.4", + "windows-sys 0.48.0", ] [[package]] @@ -2813,9 +2773,9 @@ checksum = "4ec2a862134d2a7d32d7983ddcdd1c4923530833c9f2ea1a44fc5fa473989058" [[package]] name = "libmimalloc-sys" -version = "0.1.39" +version = "0.1.35" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "23aa6811d3bd4deb8a84dde645f943476d13b248d818edcf8ce0b2f37f036b44" +checksum = "3979b5c37ece694f1f5e51e7ecc871fdb0f517ed04ee45f88d15d6d553cb9664" dependencies = [ "cc", "libc", @@ -2823,9 +2783,9 @@ dependencies = [ [[package]] name = "libproc" -version = "0.14.8" +version = "0.14.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ae9ea4b75e1a81675429dafe43441df1caea70081e82246a8cccf514884a88bb" +checksum = "229004ebba9d1d5caf41623f1523b6d52abb47d9f6ab87f7e6fc992e3b854aef" dependencies = [ "bindgen", "errno", @@ -2846,9 +2806,9 @@ dependencies = [ [[package]] name = "lindera" -version = "0.32.2" +version = "0.31.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c6cbc1aad631a7da0a7e9bc4b8669fa92ac9ca8eeb7b35a807376dd3034443ff" +checksum = "dcd4fa369654517f72c10b24adf03ad4ce69d19facb79c3cb3cf9b4580ac352f" dependencies = [ "lindera-analyzer", "lindera-core", @@ -2859,9 +2819,9 @@ dependencies = [ [[package]] name = "lindera-analyzer" -version = "0.32.2" +version = "0.31.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "74508ffbb24e36905d1718b261460e378a748029b07bcd7e06f0d18500b8194c" +checksum = "c2cba7fe275cb8ec4c594cfee9cc39e48b71e02a089457d52f3e70dc146a8133" dependencies = [ "anyhow", "bincode", @@ -2887,24 +2847,11 @@ dependencies = [ "yada", ] -[[package]] -name = "lindera-assets" -version = "0.32.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6a677c371ecb3bd02b751be306ea09876cd47cf426303ad5f10a3fd6f9a4ded6" -dependencies = [ - "encoding", - "flate2", - "lindera-core", - "tar", - "ureq", -] - [[package]] name = "lindera-cc-cedict" -version = "0.32.2" +version = "0.31.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c35944000d05a177e981f037b5f0805f283b32f05a0c35713003bef136ca8cb4" +checksum = "240adf9faba3f09ad16557aefcd316dd00ebb940ac94334a629660d772f118c1" dependencies = [ "bincode", "byteorder", @@ -2916,9 +2863,9 @@ dependencies = [ [[package]] name = "lindera-cc-cedict-builder" -version = "0.32.2" +version = "0.31.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "85b8f642bc9c9130682569975772a17336c6aab26d11fc0f823f3e663167ace6" +checksum = "f12241f9e74babe708a0b9441d9f3fa67cb29fd01257918f30ffd480ca568820" dependencies = [ "anyhow", "lindera-core", @@ -2928,9 +2875,9 @@ dependencies = [ [[package]] name = "lindera-compress" -version = "0.32.2" +version = "0.31.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a7825d8d63592aa5727d67bd209170ac82df56c369533efbf0ddbac277bb68ec" +checksum = "50f9f7a858d70ff9e4383cbd507ca9e98c8faf0319e08c10df4c30cb58c9ca6c" dependencies = [ "anyhow", "flate2", @@ -2939,9 +2886,9 @@ dependencies = [ [[package]] name = "lindera-core" -version = "0.32.2" +version = "0.31.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0c28191456debc98af6aa5f7db77872471983e9fa2a737b1c232b6ef543aed62" +checksum = "7f09810ab98ce2a084d788ac38fbb7b31697f34bc47c61de0d880320a674bd15" dependencies = [ "anyhow", "bincode", @@ -2956,9 +2903,9 @@ dependencies = [ [[package]] name = "lindera-decompress" -version = "0.32.2" +version = "0.31.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4788a1ead2f63f3fc2888109272921dedd86a87b7d0bf05e9daab46600daac51" +checksum = "d53400c9b2dd6b45f82d9fa5b5efe079f3acaf6ce609dba8d42c8a76baaa2b12" dependencies = [ "anyhow", "flate2", @@ -2967,9 +2914,9 @@ dependencies = [ [[package]] name = "lindera-dictionary" -version = "0.32.2" +version = "0.31.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bdf5f91725e32b9a21b1656baa7030766c9bafc4de4b4ddeb8ffdde7224dd2f6" +checksum = "2053d064a515839250438b8dfa6cf445e2b97633232ded34a54f267e945d196e" dependencies = [ "anyhow", "bincode", @@ -2992,9 +2939,9 @@ dependencies = [ [[package]] name = "lindera-dictionary-builder" -version = "0.32.2" +version = "0.31.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e41f00ba7ac541b0ffd8c30e7a73f2dd197546cc5780462ec4f2e4782945a780" +checksum = "14f486924055f8bedcc5877572e4dc91fbc10370862430ac2e5f7f0d671a18c8" dependencies = [ "anyhow", "bincode", @@ -3014,9 +2961,9 @@ dependencies = [ [[package]] name = "lindera-filter" -version = "0.32.2" +version = "0.31.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "273d27e01e1377e2647314a4a5b9bdca4b52a867b319069ebae8c10191146eca" +checksum = "bb3904fc279f0297f6fd6210435adab1f8c82ba84eba8635407c791af51c0d8a" dependencies = [ "anyhow", "csv", @@ -3039,9 +2986,9 @@ dependencies = [ [[package]] name = "lindera-ipadic" -version = "0.32.2" +version = "0.31.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b97a52ff0af5acb700093badaf7078051ab9ffd9071859724445a60193995f1f" +checksum = "4aa3ef2f1f6838b0fa2e2fca2896242bb83bc877c1760cdb6fa23449ab95d664" dependencies = [ "bincode", "byteorder", @@ -3053,9 +3000,9 @@ dependencies = [ [[package]] name = "lindera-ipadic-builder" -version = "0.32.2" +version = "0.31.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bf5031c52686128db13f774b2c5a8abfd52b4cc1f904041d8411aa19d630ce4d" +checksum = "a41287db18eadb58d73a04d49778d41c161549fbbbe155d4338976b7b8541c7d" dependencies = [ "anyhow", "lindera-core", @@ -3065,9 +3012,9 @@ dependencies = [ [[package]] name = "lindera-ipadic-neologd" -version = "0.32.2" +version = "0.31.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d6b36764b27b169aa11d24888141f206a6c246a5b195c1e67127485bac512fb6" +checksum = "49382256f245078400bf7e72663f9eb30afcd9ed54cd46f29d7db1be529678e1" dependencies = [ "bincode", "byteorder", @@ -3079,9 +3026,9 @@ dependencies = [ [[package]] name = "lindera-ipadic-neologd-builder" -version = "0.32.2" +version = "0.31.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "abf36e40ace904741efdd883ed5c4dba6425f65156a0fb5d3f73a386335950dc" +checksum = "5ae9cfd2fda68ef526ef0c7b50c5d4d5582a4daa6ecd0cea9e2b0b62564a2a5d" dependencies = [ "anyhow", "lindera-core", @@ -3091,24 +3038,27 @@ dependencies = [ [[package]] name = "lindera-ko-dic" -version = "0.32.2" +version = "0.31.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4c92a1a3564b531953f0238cbcea392f2905f7b27b449978cf9e702a80e1086d" +checksum = "7f86d03a863f3ae1d269e7b7d4dd2cce9385a53463479bafc5d7aa48719f36db" dependencies = [ "bincode", "byteorder", - "lindera-assets", + "encoding", + "flate2", "lindera-core", "lindera-decompress", "lindera-ko-dic-builder", "once_cell", + "tar", + "ureq", ] [[package]] name = "lindera-ko-dic-builder" -version = "0.32.2" +version = "0.31.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9f2c60425abc1548570c2568858f74a1f042105ecd89faa39c651b4315350fd9" +checksum = "bd0f44f2e56358c5879dfb5e7f76cc6ba7853ec31082c4e3f8fb65fb2d849c51" dependencies = [ "anyhow", "lindera-core", @@ -3118,9 +3068,9 @@ dependencies = [ [[package]] name = "lindera-tokenizer" -version = "0.32.2" +version = "0.31.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "903e558981bcb6f59870aa7d6b4bcb09e8f7db778886a6a70f67fd74c9fa2ca3" +checksum = "7c5182735cdc2832ac757b31e8a5b150a3514357a30efe3dec212f8dcb06ba14" dependencies = [ "bincode", "lindera-core", @@ -3132,24 +3082,27 @@ dependencies = [ [[package]] name = "lindera-unidic" -version = "0.32.2" +version = "0.31.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d227c3ce9cbd905f865c46c65a0470fd04e89b71104d7f92baa71a212ffe1d4b" +checksum = "6c63da104728dd1cf14bfa564753cbfa996f6078ed2e23e31475bd1d639fc597" dependencies = [ "bincode", "byteorder", - "lindera-assets", + "encoding", + "flate2", "lindera-core", "lindera-decompress", "lindera-unidic-builder", "once_cell", + "tar", + "ureq", ] [[package]] name = "lindera-unidic-builder" -version = "0.32.2" +version = "0.31.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "99e2c50015c242e02c451acb6748667ac6fd1d3d667cd7db48cd89e2f2d2377e" +checksum = "04acecbc068dac21766a1b7ed1f2608b6f250d10b4f8bff67abc2a00437a0974" dependencies = [ "anyhow", "lindera-core", @@ -3163,6 +3116,12 @@ version = "0.5.6" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "0717cef1bc8b636c6e1c1bbdefc09e6322da8a9321966e8928ef80d20f7f770f" +[[package]] +name = "linux-raw-sys" +version = "0.1.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f051f77a7c8e6957c0696eac88f26b0117e54f52d3fc682ab19397a8812846a4" + [[package]] name = "linux-raw-sys" version = "0.4.12" @@ -3171,9 +3130,9 @@ checksum = "c4cd1a83af159aa67994778be9070f0ae1bd732942279cabb14f86f986a21456" [[package]] name = "liquid" -version = "0.26.6" +version = "0.26.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "10929f201279ba14da3297b957dcda1e0bf7a6f3bb5115688be684aa8864e9cc" +checksum = "69f68ae1011499ae2ef879f631891f21c78e309755f4a5e483c4a8f12e10b609" dependencies = [ "doc-comment", "liquid-core", @@ -3184,12 +3143,12 @@ dependencies = [ [[package]] name = "liquid-core" -version = "0.26.6" +version = "0.26.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3aef4b2160791f456eb880c990a97746f693746f92302ef5f1d06111cf14b768" +checksum = "79e0724dfcaad5cfb7965ea0f178ca0870b8d7315178f4a7179f5696f7f04d5f" dependencies = [ "anymap2", - "itertools 0.12.1", + "itertools 0.10.5", "kstring", "liquid-derive", "num-traits", @@ -3202,9 +3161,9 @@ dependencies = [ [[package]] name = "liquid-derive" -version = "0.26.5" +version = "0.26.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "915f6d0a2963a27cd5205c1902f32ddfe3bc035816afd268cf88c0fc0f8d287e" +checksum = "fc2fb41a9bb4257a3803154bdf7e2df7d45197d1941c9b1a90ad815231630721" dependencies = [ "proc-macro2", "quote", @@ -3213,11 +3172,11 @@ dependencies = [ [[package]] name = "liquid-lib" -version = "0.26.6" +version = "0.26.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "73f48fc446873f74d869582f5c4b8cbf3248c93395e410a67af5809b3731e44a" +checksum = "e2a17e273a6fb1fb6268f7a5867ddfd0bd4683c7e19b51084f3d567fad4348c0" dependencies = [ - "itertools 0.12.1", + "itertools 0.10.5", "liquid-core", "once_cell", "percent-encoding", @@ -3228,9 +3187,9 @@ dependencies = [ [[package]] name = "litemap" -version = "0.7.3" +version = "0.7.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "643cb0b8d4fcc284004d5fd0d67ccf61dfffadb7f75e1e71bc420f4688a3a704" +checksum = "f9d642685b028806386b2b6e75685faadd3eb65a85fff7df711ce18446a422da" [[package]] name = "lmdb-master-sys" @@ -3271,28 +3230,12 @@ dependencies = [ "scopeguard", ] -[[package]] -name = "lockfree-object-pool" -version = "0.1.6" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9374ef4228402d4b7e403e5838cb880d9ee663314b0a900d5a6aabf0c213552e" - [[package]] name = "log" version = "0.4.21" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "90ed8c1e510134f979dbc4f070f87d4313098b704861a105fe34231c70a3901c" -[[package]] -name = "lzma-rs" -version = "0.3.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "297e814c836ae64db86b36cf2a557ba54368d03f6afcd7d947c266692f71115e" -dependencies = [ - "byteorder", - "crc", -] - [[package]] name = "macro_rules_attribute" version = "0.2.0" @@ -3351,7 +3294,10 @@ dependencies = [ "actix-rt", "actix-utils", "actix-web", + "actix-web-static-files", "anyhow", + "assert-json-diff", + "async-stream", "async-trait", "brotli", "bstr", @@ -3370,11 +3316,12 @@ dependencies = [ "futures", "futures-util", "hex", + "http 0.2.11", "index-scheduler", "indexmap", "insta", "is-terminal", - "itertools 0.13.0", + "itertools 0.11.0", "jsonwebtoken", "lazy_static", "manifest-dir-macros", @@ -3398,14 +3345,14 @@ dependencies = [ "regex", "reqwest", "rustls 0.21.12", - "rustls-pemfile 1.0.4", + "rustls-pemfile", "segment", "serde", "serde_json", "serde_urlencoded", "sha-1", "sha2", - "siphasher 1.0.1", + "siphasher 1.0.0", "slice-group-by", "static-files", "sysinfo", @@ -3416,6 +3363,7 @@ dependencies = [ "thiserror", "time", "tokio", + "tokio-stream", "toml", "tracing", "tracing-actix-web", @@ -3424,15 +3372,16 @@ dependencies = [ "url", "urlencoding", "uuid", + "walkdir", "yaup", - "zip 2.1.3", + "zip", ] [[package]] name = "meilisearch-auth" version = "1.9.0" dependencies = [ - "base64 0.22.1", + "base64 0.21.7", "enum-iterator", "hmac", "maplit", @@ -3463,7 +3412,7 @@ dependencies = [ "fst", "insta", "meili-snap", - "memmap2", + "memmap2 0.7.1", "milli", "roaring", "serde", @@ -3493,9 +3442,18 @@ dependencies = [ [[package]] name = "memchr" -version = "2.7.4" +version = "2.7.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "78ca9ab1a0babb1e7d5695e3530886289c18cf2f87ec19a575a0abdce112e3a3" +checksum = "523dc4f511e55ab87b694dc30d0f820d60906ef06413f93d4d7a1385599cc149" + +[[package]] +name = "memmap2" +version = "0.7.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f49388d20533534cd19360ad3d6a7dadc885944aa802ba3995040c5ec11288c6" +dependencies = [ + "libc", +] [[package]] name = "memmap2" @@ -3537,21 +3495,22 @@ dependencies = [ "hf-hub", "indexmap", "insta", - "itertools 0.13.0", + "itertools 0.11.0", "json-depth-checker", "levenshtein_automata", "liquid", "maplit", "md5", "meili-snap", - "memmap2", + "memmap2 0.7.1", "mimalloc", "obkv", "once_cell", "ordered-float", - "piccolo", "rand", + "rand_pcg", "rayon", + "rhai", "roaring", "rstar", "serde", @@ -3573,9 +3532,9 @@ dependencies = [ [[package]] name = "mimalloc" -version = "0.1.43" +version = "0.1.39" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "68914350ae34959d83f732418d51e2427a794055d0b9529f48259ac07af65633" +checksum = "fa01922b5ea280a911e323e4d2fd24b7fe5cc4042e0d2cda3c40775cdc4bdc9c" dependencies = [ "libmimalloc-sys", ] @@ -3747,27 +3706,6 @@ dependencies = [ "libc", ] -[[package]] -name = "num_enum" -version = "0.7.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "02339744ee7253741199f897151b38e72257d13802d4ee837285cc2990a90845" -dependencies = [ - "num_enum_derive", -] - -[[package]] -name = "num_enum_derive" -version = "0.7.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "681030a937600a36906c185595136d26abfebb4aa9c65701cefcaf8578bb982b" -dependencies = [ - "proc-macro-crate", - "proc-macro2", - "quote", - "syn 2.0.60", -] - [[package]] name = "num_threads" version = "0.1.7" @@ -3794,9 +3732,9 @@ dependencies = [ [[package]] name = "obkv" -version = "0.2.2" +version = "0.2.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a2e27bcfe835a379d32352112f6b8dbae2d99d16a5fff42abe6e5ba5386c1e5a" +checksum = "6c459142426056c639ff88d053ebaaaeca0ee1411c94362892398ef4ccd81080" [[package]] name = "once_cell" @@ -3840,9 +3778,9 @@ checksum = "04744f49eae99ab78e0d5c0b603ab218f515ea8cfe5a456d7629ad883a3b6e7d" [[package]] name = "ordered-float" -version = "4.2.1" +version = "4.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "19ff2cf528c6c03d9ed653d6c4ce1dc0582dc4af309790ad92f07c1cd551b0be" +checksum = "a76df7075c7d4d01fdcb46c912dd17fba5b60c78ea480b475f2b6ab6f666584e" dependencies = [ "num-traits", ] @@ -3859,6 +3797,16 @@ version = "3.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "c1b04fb49957986fdce4d6ee7a65027d55d4b6d2265e5848bbb507b58ccfdb6f" +[[package]] +name = "page_size" +version = "0.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1b7663cbd190cfd818d08efa8497f6cd383076688c49a391ef7c0d03cd12b561" +dependencies = [ + "libc", + "winapi", +] + [[package]] name = "page_size" version = "0.6.0" @@ -3871,9 +3819,9 @@ dependencies = [ [[package]] name = "parking_lot" -version = "0.12.3" +version = "0.12.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f1bf18183cf54e8d6059647fc3063646a1801cf30896933ec2311622cc4b9a27" +checksum = "3742b2c103b9f06bc9fff0a37ff4912935851bee6d36f3c02bcc755bcfec228f" dependencies = [ "lock_api", "parking_lot_core", @@ -3892,6 +3840,17 @@ dependencies = [ "windows-targets 0.48.1", ] +[[package]] +name = "password-hash" +version = "0.4.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7676374caaee8a325c9e7a2ae557f216c5563a171d6997b0ef8a65af35147700" +dependencies = [ + "base64ct", + "rand_core", + "subtle", +] + [[package]] name = "paste" version = "1.0.14" @@ -3915,14 +3874,22 @@ checksum = "498a099351efa4becc6a19c72aa9270598e8fd274ca47052e37455241c88b696" [[package]] name = "pbkdf2" -version = "0.12.2" +version = "0.11.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f8ed6a7761f76e3b9f92dfb0a60a6a6477c61024b775147ff0973a02653abaf2" +checksum = "83a0692ec44e4cf1ef28ca317f14f8f07da2d95ec3fa01f86e4467b725e60917" dependencies = [ "digest", "hmac", + "password-hash", + "sha2", ] +[[package]] +name = "peeking_take_while" +version = "0.1.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "19b17cddbe7ec3f8bc800887bab5e717348c95ea2ca0b1bf0837fb964dc67099" + [[package]] name = "pem" version = "3.0.3" @@ -4043,21 +4010,6 @@ dependencies = [ "siphasher 0.3.11", ] -[[package]] -name = "piccolo" -version = "0.3.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "93dd1815b42446904bb2689d1c5d7680e8c68113d5b15a5a3297ba6c7a5f84af" -dependencies = [ - "ahash 0.8.11", - "allocator-api2", - "anyhow", - "gc-arena", - "hashbrown 0.14.3", - "rand", - "thiserror", -] - [[package]] name = "pin-project" version = "1.1.4" @@ -4080,9 +4032,9 @@ dependencies = [ [[package]] name = "pin-project-lite" -version = "0.2.14" +version = "0.2.13" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bda66fc9667c18cb2758a2ac84d1167245054bcf85d5d1aaa6923f45801bdd02" +checksum = "8afb450f006bf6385ca15ef45d71d2288452bc3683ce2e2cacc0d18e4be60b58" [[package]] name = "pin-utils" @@ -4157,15 +4109,6 @@ version = "0.2.17" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "5b40af805b3121feab8a3c29f04d8ad262fa8e0561883e7653e024ae4479e6de" -[[package]] -name = "proc-macro-crate" -version = "3.1.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6d37c51ca738a55da99dc0c4a34860fd675453b8b36209178c2249bb13651284" -dependencies = [ - "toml_edit 0.21.0", -] - [[package]] name = "proc-macro-error" version = "1.0.4" @@ -4201,32 +4144,22 @@ dependencies = [ [[package]] name = "procfs" -version = "0.16.0" +version = "0.14.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "731e0d9356b0c25f16f33b5be79b1c57b562f141ebfcdb0ad8ac2c13a24293b4" +checksum = "b1de8dacb0873f77e6aefc6d71e044761fcc68060290f5b1089fcdf84626bb69" dependencies = [ - "bitflags 2.6.0", + "bitflags 1.3.2", + "byteorder", "hex", "lazy_static", - "procfs-core", - "rustix", -] - -[[package]] -name = "procfs-core" -version = "0.16.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2d3554923a69f4ce04c4a754260c338f505ce22642d3830e049a399fc2059a29" -dependencies = [ - "bitflags 2.6.0", - "hex", + "rustix 0.36.16", ] [[package]] name = "prometheus" -version = "0.13.4" +version = "0.13.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3d33c28a30771f7f96db69893f78b857f7450d7e0237e9c8fc6427a81bae7ed1" +checksum = "449811d15fbdf5ceb5c1144416066429cf82316e2ec8ce0c1f6f8a02e7bbcf8c" dependencies = [ "cfg-if", "fnv", @@ -4245,26 +4178,6 @@ version = "2.28.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "106dd99e98437432fed6519dedecfade6a06a73bb7b2a1e019fdd2bee5778d94" -[[package]] -name = "ptr_meta" -version = "0.1.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0738ccf7ea06b608c10564b31debd4f5bc5e197fc8bfe088f68ae5ce81e7a4f1" -dependencies = [ - "ptr_meta_derive", -] - -[[package]] -name = "ptr_meta_derive" -version = "0.1.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "16b845dbfca988fa33db069c0e230574d15a3088f147a87b64c7589eb662c9ac" -dependencies = [ - "proc-macro2", - "quote", - "syn 1.0.109", -] - [[package]] name = "pulp" version = "0.18.9" @@ -4277,53 +4190,6 @@ dependencies = [ "reborrow", ] -[[package]] -name = "quinn" -version = "0.11.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e4ceeeeabace7857413798eb1ffa1e9c905a9946a57d81fb69b4b71c4d8eb3ad" -dependencies = [ - "bytes", - "pin-project-lite", - "quinn-proto", - "quinn-udp", - "rustc-hash", - "rustls 0.23.11", - "thiserror", - "tokio", - "tracing", -] - -[[package]] -name = "quinn-proto" -version = "0.11.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ddf517c03a109db8100448a4be38d498df8a210a99fe0e1b9eaf39e78c640efe" -dependencies = [ - "bytes", - "rand", - "ring", - "rustc-hash", - "rustls 0.23.11", - "slab", - "thiserror", - "tinyvec", - "tracing", -] - -[[package]] -name = "quinn-udp" -version = "0.5.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9096629c45860fc7fb143e125eb826b5e721e10be3263160c7d60ca832cf8c46" -dependencies = [ - "libc", - "once_cell", - "socket2 0.5.5", - "tracing", - "windows-sys 0.52.0", -] - [[package]] name = "quote" version = "1.0.36" @@ -4333,12 +4199,6 @@ dependencies = [ "proc-macro2", ] -[[package]] -name = "radium" -version = "0.7.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "dc33ff2d4973d518d823d61aa239014831e521c75da58e3df4840d3f47749d09" - [[package]] name = "rand" version = "0.8.5" @@ -4379,6 +4239,16 @@ dependencies = [ "rand", ] +[[package]] +name = "rand_pcg" +version = "0.3.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "59cad018caf63deb318e5a4586d99a24424a364f40f1e5778c29aca23f4fc73e" +dependencies = [ + "rand_core", + "serde", +] + [[package]] name = "raw-cpuid" version = "10.7.0" @@ -4456,9 +4326,9 @@ dependencies = [ [[package]] name = "regex" -version = "1.10.5" +version = "1.10.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b91213439dad192326a0d7c6ee3955910425f441d7038e0d6933b0aec5c4517f" +checksum = "c117dbdfde9c8308975b6a18d71f3f385c89461f7b3fb054288ecf2a2058ba4c" dependencies = [ "aho-corasick", "memchr", @@ -4489,32 +4359,22 @@ version = "0.8.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "c08c74e62047bb2de4ff487b251e4a92e24f48745648451635cec7d591162d9f" -[[package]] -name = "rend" -version = "0.4.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "71fe3824f5629716b1589be05dacd749f6aa084c87e00e016714a8cdfccc997c" -dependencies = [ - "bytecheck", -] - [[package]] name = "reqwest" -version = "0.12.5" +version = "0.11.23" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c7d6d2a27d57148378eb5e111173f4276ad26340ecc5c49a4a2152167a2d6a37" +checksum = "37b1ae8d9ac08420c66222fb9096fc5de435c3c48542bc5336c51892cffafb41" dependencies = [ - "base64 0.22.1", + "base64 0.21.7", "bytes", - "futures-channel", + "encoding_rs", "futures-core", "futures-util", - "http 1.1.0", + "h2", + "http 0.2.11", "http-body", - "http-body-util", "hyper", "hyper-rustls", - "hyper-util", "ipnet", "js-sys", "log", @@ -4522,16 +4382,14 @@ dependencies = [ "once_cell", "percent-encoding", "pin-project-lite", - "quinn", - "rustls 0.23.11", - "rustls-pemfile 2.1.2", - "rustls-pki-types", + "rustls 0.21.12", + "rustls-pemfile", "serde", "serde_json", "serde_urlencoded", - "sync_wrapper", + "system-configuration", "tokio", - "tokio-rustls 0.26.0", + "tokio-rustls", "tokio-util", "tower-service", "url", @@ -4539,10 +4397,39 @@ dependencies = [ "wasm-bindgen-futures", "wasm-streams", "web-sys", - "webpki-roots 0.26.1", + "webpki-roots 0.25.3", "winreg", ] +[[package]] +name = "rhai" +version = "1.19.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "61797318be89b1a268a018a92a7657096d83f3ecb31418b9e9c16dcbb043b702" +dependencies = [ + "ahash", + "bitflags 2.6.0", + "instant", + "num-traits", + "once_cell", + "rhai_codegen", + "serde", + "smallvec", + "smartstring", + "thin-vec", +] + +[[package]] +name = "rhai_codegen" +version = "2.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a5a11a05ee1ce44058fa3d5961d05194fdbe3ad6b40f904af764d81b86450e6b" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.60", +] + [[package]] name = "ring" version = "0.17.8" @@ -4558,35 +4445,6 @@ dependencies = [ "windows-sys 0.52.0", ] -[[package]] -name = "rkyv" -version = "0.7.44" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5cba464629b3394fc4dbc6f940ff8f5b4ff5c7aef40f29166fd4ad12acbc99c0" -dependencies = [ - "bitvec", - "bytecheck", - "bytes", - "hashbrown 0.12.3", - "ptr_meta", - "rend", - "rkyv_derive", - "seahash", - "tinyvec", - "uuid", -] - -[[package]] -name = "rkyv_derive" -version = "0.7.44" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a7dddfff8de25e6f62b9d64e6e432bf1c6736c57d20323e15ee10435fbda7c65" -dependencies = [ - "proc-macro2", - "quote", - "syn 1.0.109", -] - [[package]] name = "roaring" version = "0.10.6" @@ -4600,9 +4458,9 @@ dependencies = [ [[package]] name = "rstar" -version = "0.12.0" +version = "0.11.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "133315eb94c7b1e8d0cb097e5a710d850263372fd028fff18969de708afc7008" +checksum = "73111312eb7a2287d229f06c00ff35b51ddee180f017ab6dec1f69d62ac098d6" dependencies = [ "heapless", "num-traits", @@ -4610,22 +4468,6 @@ dependencies = [ "smallvec", ] -[[package]] -name = "rust_decimal" -version = "1.35.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1790d1c4c0ca81211399e0e0af16333276f375209e71a37b67698a373db5b47a" -dependencies = [ - "arrayvec", - "borsh", - "bytes", - "num-traits", - "rand", - "rkyv", - "serde", - "serde_json", -] - [[package]] name = "rustc-demangle" version = "0.1.23" @@ -4647,6 +4489,20 @@ dependencies = [ "semver", ] +[[package]] +name = "rustix" +version = "0.36.16" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6da3636faa25820d8648e0e31c5d519bbb01f72fdf57131f0f5f7da5fed36eab" +dependencies = [ + "bitflags 1.3.2", + "errno", + "io-lifetimes", + "libc", + "linux-raw-sys 0.1.4", + "windows-sys 0.45.0", +] + [[package]] name = "rustix" version = "0.38.31" @@ -4656,7 +4512,7 @@ dependencies = [ "bitflags 2.6.0", "errno", "libc", - "linux-raw-sys", + "linux-raw-sys 0.4.12", "windows-sys 0.52.0", ] @@ -4674,15 +4530,14 @@ dependencies = [ [[package]] name = "rustls" -version = "0.23.11" +version = "0.22.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4828ea528154ae444e5a642dbb7d5623354030dc9822b83fd9bb79683c7399d0" +checksum = "bf4ef73721ac7bcd79b2b315da7779d8fc09718c6b3d2d1b2d94850eb8c18432" dependencies = [ "log", - "once_cell", "ring", "rustls-pki-types", - "rustls-webpki 0.102.5", + "rustls-webpki 0.102.2", "subtle", "zeroize", ] @@ -4696,21 +4551,11 @@ dependencies = [ "base64 0.21.7", ] -[[package]] -name = "rustls-pemfile" -version = "2.1.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "29993a25686778eb88d4189742cd713c9bce943bc54251a33509dc63cbacf73d" -dependencies = [ - "base64 0.22.1", - "rustls-pki-types", -] - [[package]] name = "rustls-pki-types" -version = "1.7.0" +version = "1.4.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "976295e77ce332211c0d24d92c0e83e50f5c5f046d11082cea19f3df13a3562d" +checksum = "ecd36cc4259e3e4514335c4a138c6b43171a8d61d8f5c9348f9fc7529416f247" [[package]] name = "rustls-webpki" @@ -4724,9 +4569,9 @@ dependencies = [ [[package]] name = "rustls-webpki" -version = "0.102.5" +version = "0.102.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f9a6fccd794a42c2c105b513a2f62bc3fd8f3ba57a4593677ceb0bd035164d78" +checksum = "faaa0a62740bedb9b2ef5afa303da42764c012f743917351dc9a237ea1663610" dependencies = [ "ring", "rustls-pki-types", @@ -4735,9 +4580,9 @@ dependencies = [ [[package]] name = "rustversion" -version = "1.0.17" +version = "1.0.14" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "955d28af4278de8121b7ebeb796b6a45735dc01436d898801014aced2773a3d6" +checksum = "7ffc183a10b4478d04cbbbfc96d0873219d962dd5accaff2ffbd4ceb7df837f4" [[package]] name = "ryu" @@ -4780,17 +4625,11 @@ dependencies = [ "untrusted", ] -[[package]] -name = "seahash" -version = "4.1.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1c107b6f4780854c8b126e228ea8869f4d7b71260f962fefb57b996b8959ba6b" - [[package]] name = "segment" -version = "0.2.4" +version = "0.2.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5bdca318192c89bb31bffa2ef8e9e9898bc80f15a78db2fdd41cd051f1b41d01" +checksum = "12485833e00457a6bbba60397d3f19362751a0caefe27f6755fff1a2be4fd601" dependencies = [ "async-trait", "reqwest", @@ -4817,9 +4656,9 @@ checksum = "a3f0bf26fd526d2a95683cd0f87bf103b8539e2ca1ef48ce002d67aad59aa0b4" [[package]] name = "serde" -version = "1.0.204" +version = "1.0.203" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bc76f558e0cbb2a839d37354c575f1dc3fdc6546b5be373ba43d95f231bf7c12" +checksum = "7253ab4de971e72fb7be983802300c30b5a7f0c2e56fab8abfc6a214307c0094" dependencies = [ "serde_derive", ] @@ -4835,9 +4674,9 @@ dependencies = [ [[package]] name = "serde_derive" -version = "1.0.204" +version = "1.0.203" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e0cd7e117be63d3c3678776753929474f3b04a43a080c744d6b0ae2a8c28e222" +checksum = "500cbc0ebeb6f46627f50f3f5811ccf6bf00643be300b4c3eabc0ef55dc5b5ba" dependencies = [ "proc-macro2", "quote", @@ -4867,9 +4706,9 @@ dependencies = [ [[package]] name = "serde_spanned" -version = "0.6.6" +version = "0.6.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "79e674e01f999af37c49f70a6ede167a8a60b2503e56c5599532a65baa5969a0" +checksum = "eb3622f419d1296904700073ea6cc23ad690adbd66f13ea683df73298736f0c1" dependencies = [ "serde", ] @@ -4943,18 +4782,6 @@ dependencies = [ "libc", ] -[[package]] -name = "simd-adler32" -version = "0.3.7" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d66dc143e6b11c1eddc06d5c423cfc97062865baf299914ab64caa38182078fe" - -[[package]] -name = "simdutf8" -version = "0.1.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f27f6278552951f1f2b8cf9da965d10969b2efdea95a6ec47987ab46edfe263a" - [[package]] name = "similar" version = "2.2.1" @@ -4981,9 +4808,9 @@ checksum = "38b58827f4464d87d377d175e90bf58eb00fd8716ff0a62f80356b5e61555d0d" [[package]] name = "siphasher" -version = "1.0.1" +version = "1.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "56199f7ddabf13fe5074ce809e7d3f42b42ae711800501b5b16ea82ad029c39d" +checksum = "54ac45299ccbd390721be55b412d41931911f654fa99e2cb8bfb57184b2061fe" [[package]] name = "slab" @@ -5012,9 +4839,12 @@ dependencies = [ [[package]] name = "smallvec" -version = "1.13.2" +version = "1.12.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3c5e1a9a646d36c3599cd173a41282daf47c44583ad367b8e6837255952e5c67" +checksum = "2593d31f82ead8df961d8bd23a64c2ccf2eb5dd34b0a34bfb4dd54011c72009e" +dependencies = [ + "serde", +] [[package]] name = "smartstring" @@ -5023,6 +4853,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "3fb72c633efbaa2dd666986505016c32c3044395ceaf881518399d2f4127ee29" dependencies = [ "autocfg", + "serde", "static_assertions", "version_check", ] @@ -5063,6 +4894,9 @@ name = "spin" version = "0.9.8" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "6980e8d7511241f8acf4aebddbb1ff938df5eebe98691418c4468d0b72a96a67" +dependencies = [ + "lock_api", +] [[package]] name = "spm_precompiled" @@ -5076,12 +4910,6 @@ dependencies = [ "unicode-segmentation", ] -[[package]] -name = "sptr" -version = "0.3.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3b9b39299b249ad65f3b7e96443bad61c02ca5cd3589f46cb6d610a0fd6c0d6a" - [[package]] name = "stable_deref_trait" version = "1.2.0" @@ -5090,9 +4918,9 @@ checksum = "a8f112729512f8e442d81f95a8a7ddf2b7c6b8a1a6f509a95864142b30cab2d3" [[package]] name = "static-files" -version = "0.2.4" +version = "0.2.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4e8590e848e1c53be9258210bcd4a8f4118e08988f03a4e2d63b62e4ad9f7ced" +checksum = "64712ea1e3e140010e1d9605872ba205afa2ab5bd38191cc6ebd248ae1f6a06b" dependencies = [ "change-detection", "mime_guess", @@ -5132,7 +4960,7 @@ version = "0.26.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "c6cf59daf282c0a494ba14fd21610a0325f9f90ec9d1231dea26bcb1d696c946" dependencies = [ - "heck 0.4.1", + "heck", "proc-macro2", "quote", "rustversion", @@ -5167,24 +4995,6 @@ dependencies = [ "unicode-ident", ] -[[package]] -name = "syn_derive" -version = "0.1.8" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1329189c02ff984e9736652b1631330da25eaa6bc639089ed4915d25446cbe7b" -dependencies = [ - "proc-macro-error", - "proc-macro2", - "quote", - "syn 2.0.60", -] - -[[package]] -name = "sync_wrapper" -version = "1.0.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a7065abeca94b6a8a577f9bd45aa0867a2238b74e8eb67cf10d492bc39351394" - [[package]] name = "synchronoise" version = "1.0.1" @@ -5221,9 +5031,9 @@ dependencies = [ [[package]] name = "sysinfo" -version = "0.30.13" +version = "0.30.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0a5b4ddaee55fb2bea2bf0e5000747e5f5c0de765e5a5ff87f4cd106439f4bb3" +checksum = "1fb4f3438c8f6389c864e61221cbc97e9bca98b4daf39a5beb7bea660f528bb2" dependencies = [ "cfg-if", "core-foundation-sys", @@ -5235,16 +5045,31 @@ dependencies = [ ] [[package]] -name = "tap" -version = "1.0.1" +name = "system-configuration" +version = "0.5.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "55937e1799185b12863d447f42597ed69d9928686b8d88a1df17376a097d8369" +checksum = "ba3a3adc5c275d719af8cb4272ea1c4a6d668a777f37e115f6d11ddbc1c8e0e7" +dependencies = [ + "bitflags 1.3.2", + "core-foundation", + "system-configuration-sys", +] + +[[package]] +name = "system-configuration-sys" +version = "0.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a75fb188eb626b924683e3b95e3a48e63551fcfb51949de2f06a9d91dbee93c9" +dependencies = [ + "core-foundation-sys", + "libc", +] [[package]] name = "tar" -version = "0.4.41" +version = "0.4.40" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cb797dad5fb5b76fcf519e702f4a589483b5ef06567f160c392832c1f5e44909" +checksum = "b16afcea1f22891c49a00c751c7b63b2233284064f11a200fc624137c51e2ddb" dependencies = [ "filetime", "libc", @@ -5268,7 +5093,7 @@ checksum = "85b77fafb263dd9d05cbeac119526425676db3784113aa9295c88498cbf8bff1" dependencies = [ "cfg-if", "fastrand", - "rustix", + "rustix 0.38.31", "windows-sys 0.52.0", ] @@ -5281,6 +5106,15 @@ dependencies = [ "winapi-util", ] +[[package]] +name = "thin-vec" +version = "0.2.13" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a38c90d48152c236a3ab59271da4f4ae63d678c5d7ad6b7714d7cb9760be5e4b" +dependencies = [ + "serde", +] + [[package]] name = "thiserror" version = "1.0.61" @@ -5313,14 +5147,14 @@ dependencies = [ [[package]] name = "tiktoken-rs" -version = "0.5.9" +version = "0.5.8" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c314e7ce51440f9e8f5a497394682a57b7c323d0f4d0a6b1b13c429056e0e234" +checksum = "40894b788eb28bbb7e36bdc8b7b1b1488b9c93fa3730f315ab965330c94c0842" dependencies = [ "anyhow", "base64 0.21.7", "bstr", - "fancy-regex 0.12.0", + "fancy-regex", "lazy_static", "parking_lot", "rustc-hash", @@ -5328,9 +5162,9 @@ dependencies = [ [[package]] name = "time" -version = "0.3.36" +version = "0.3.34" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5dfd88e563464686c916c7e46e623e520ddc6d79fa6641390f2e3fa86e83e885" +checksum = "c8248b6521bb14bc45b4067159b9b6ad792e2d6d754d6c41fb50e29fefe38749" dependencies = [ "deranged", "itoa", @@ -5351,14 +5185,23 @@ checksum = "ef927ca75afb808a4d64dd374f00a2adf8d0fcff8e7b184af886c3c87ec4a3f3" [[package]] name = "time-macros" -version = "0.2.18" +version = "0.2.17" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3f252a68540fde3a3877aeea552b832b40ab9a69e318efd078774a01ddee1ccf" +checksum = "7ba3a3ef41e6672a2f0f001392bb5dcd3ff0a9992d618ca761a11c3121547774" dependencies = [ "num-conv", "time-core", ] +[[package]] +name = "tiny-keccak" +version = "2.0.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2c9d3793400a45f954c52e73d068316d76b6f4e36977e3fcebb13a2721e80237" +dependencies = [ + "crunchy", +] + [[package]] name = "tinytemplate" version = "1.2.1" @@ -5416,9 +5259,9 @@ dependencies = [ [[package]] name = "tokio" -version = "1.38.0" +version = "1.35.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ba4f4a02a7a80d6f274636f0aa95c7e383b912d41fe721a31f29e29698585a4a" +checksum = "c89b4efa943be685f629b149f53829423f8f5531ea21249408e8e2f8671ec104" dependencies = [ "backtrace", "bytes", @@ -5435,9 +5278,9 @@ dependencies = [ [[package]] name = "tokio-macros" -version = "2.3.0" +version = "2.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5f5ae998a069d4b5aba8ee9dad856af7d520c3699e6159b185c2acd48155d39a" +checksum = "5b8a1e28f2deaa14e508979454cb3a223b10b938b45af148bc0986de36f1923b" dependencies = [ "proc-macro2", "quote", @@ -5455,46 +5298,47 @@ dependencies = [ ] [[package]] -name = "tokio-rustls" -version = "0.26.0" +name = "tokio-stream" +version = "0.1.14" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0c7bc40d0e5a97695bb96e27995cd3a08538541b0a846f65bba7a359f36700d4" +checksum = "397c988d37662c7dda6d2208364a706264bf3d6138b11d436cbac0ad38832842" dependencies = [ - "rustls 0.23.11", - "rustls-pki-types", + "futures-core", + "pin-project-lite", "tokio", ] [[package]] name = "tokio-util" -version = "0.7.11" +version = "0.7.8" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9cf6b47b3771c49ac75ad09a6162f53ad4b8088b76ac60e8ec1455b31a189fe1" +checksum = "806fe8c2c87eccc8b3267cbae29ed3ab2d0bd37fca70ab622e46aaa9375ddb7d" dependencies = [ "bytes", "futures-core", "futures-sink", "pin-project-lite", "tokio", + "tracing", ] [[package]] name = "toml" -version = "0.8.14" +version = "0.8.8" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6f49eb2ab21d2f26bd6db7bf383edc527a7ebaee412d17af4d40fdccd442f335" +checksum = "a1a195ec8c9da26928f773888e0742ca3ca1040c6cd859c919c9f59c1954ab35" dependencies = [ "serde", "serde_spanned", "toml_datetime", - "toml_edit 0.22.15", + "toml_edit", ] [[package]] name = "toml_datetime" -version = "0.6.6" +version = "0.6.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4badfd56924ae69bcc9039335b2e017639ce3f9b001c393c1b2d1ef846ce2cbf" +checksum = "3550f4e9685620ac18a50ed434eb3aec30db8ba93b0287467bca5826ea25baf1" dependencies = [ "serde", ] @@ -5504,46 +5348,14 @@ name = "toml_edit" version = "0.21.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "d34d383cd00a163b4a5b85053df514d45bc330f6de7737edfe0a93311d1eaa03" -dependencies = [ - "indexmap", - "toml_datetime", - "winnow 0.5.40", -] - -[[package]] -name = "toml_edit" -version = "0.22.15" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d59a3a72298453f564e2b111fa896f8d07fabb36f51f06d7e875fc5e0b5a3ef1" dependencies = [ "indexmap", "serde", "serde_spanned", "toml_datetime", - "winnow 0.6.13", + "winnow", ] -[[package]] -name = "tower" -version = "0.4.13" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b8fa9be0de6cf49e536ce1851f987bd21a43b771b09473c3549a6c853db37c1c" -dependencies = [ - "futures-core", - "futures-util", - "pin-project", - "pin-project-lite", - "tokio", - "tower-layer", - "tower-service", -] - -[[package]] -name = "tower-layer" -version = "0.3.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c20c8dbed6283a09604c3e69b4b7eeb54e298b8a600d4d5ecb5ad39de609f1d0" - [[package]] name = "tower-service" version = "0.3.2" @@ -5680,9 +5492,9 @@ checksum = "ed646292ffc8188ef8ea4d1e0e0150fb15a5c2e12ad9b8fc191ae7a8a7f3c4b9" [[package]] name = "unescaper" -version = "0.1.5" +version = "0.1.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c878a167baa8afd137494101a688ef8c67125089ff2249284bd2b5f9bfedb815" +checksum = "d8f0f68e58d297ba8b22b8b5a96a87b863ba6bb46aaf51e19a4b02c5a6dd5b7f" dependencies = [ "thiserror", ] @@ -5758,16 +5570,17 @@ checksum = "8ecb6da28b8a351d773b68d5825ac39017e680750f980f3a1a85cd8dd28a47c1" [[package]] name = "ureq" -version = "2.10.0" +version = "2.9.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "72139d247e5f97a3eff96229a7ae85ead5328a39efe76f8bf5a06313d505b6ea" +checksum = "d11a831e3c0b56e438a28308e7c810799e3c118417f342d30ecec080105395cd" dependencies = [ "base64 0.22.1", "flate2", "log", "once_cell", - "rustls 0.23.11", + "rustls 0.22.4", "rustls-pki-types", + "rustls-webpki 0.102.2", "serde", "serde_json", "socks", @@ -5807,10 +5620,11 @@ checksum = "711b9620af191e0cdc7468a8d14e709c3dcdb115b36f838e601583af800a370a" [[package]] name = "uuid" -version = "1.10.0" +version = "1.7.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "81dfa00651efa65069b0b6b651f4aaa31ba9e3c3ce0137aaad053604ee7e0314" +checksum = "f00cc9702ca12d3c81455259621e676d0f7251cec66a21e98fe2e9a37db93b2a" dependencies = [ + "atomic", "getrandom", "serde", ] @@ -5829,24 +5643,25 @@ checksum = "accd4ea62f7bb7a82fe23066fb0957d48ef677f6eeb8215f372f52e48bb32426" [[package]] name = "vergen" -version = "9.0.0" +version = "9.0.0-beta.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c32e7318e93a9ac53693b6caccfb05ff22e04a44c7cf8a279051f24c09da286f" +checksum = "107dc53b443fe8cc380798abb75ad6b7038281165109afea1f1b28bb47047ed5" dependencies = [ "anyhow", - "derive_builder 0.20.0", + "derive_builder 0.13.1", + "getset", "rustversion", "vergen-lib", ] [[package]] name = "vergen-git2" -version = "1.0.0" +version = "1.0.0-beta.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a62c52cd2b2b8b7ec75fc20111b3022ac3ff83e4fc14b9497cfcfd39c54f9c67" +checksum = "8875c5d71074bb67118774e3d795ab6fe77c3ae3161cb54e19104cabc49487f1" dependencies = [ "anyhow", - "derive_builder 0.20.0", + "derive_builder 0.13.1", "git2", "rustversion", "time", @@ -5856,12 +5671,12 @@ dependencies = [ [[package]] name = "vergen-lib" -version = "0.1.3" +version = "0.1.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e06bee42361e43b60f363bad49d63798d0f42fb1768091812270eca00c784720" +checksum = "26ebfba72ba904559f25f41ea1512335b5a46459084258cea0857549d9645187" dependencies = [ "anyhow", - "derive_builder 0.20.0", + "derive_builder 0.13.1", "getset", "rustversion", ] @@ -5976,9 +5791,9 @@ checksum = "af190c94f2773fdb3729c55b007a722abb5384da03bc0986df4c289bf5567e96" [[package]] name = "wasm-streams" -version = "0.4.0" +version = "0.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b65dc4c90b63b118468cf747d8bf3566c1913ef60be765b5730ead9e0a3ba129" +checksum = "b4609d447824375f43e1ffbc051b50ad8f4b3ae8219680c94452ea05eb240ac7" dependencies = [ "futures-util", "js-sys", @@ -6018,7 +5833,7 @@ version = "0.16.4" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "471d1c1645d361eb782a1650b1786a8fb58dd625e681a04c09f5ff7c8764a7b0" dependencies = [ - "hashbrown 0.14.3", + "hashbrown", "once_cell", ] @@ -6279,43 +6094,23 @@ dependencies = [ "memchr", ] -[[package]] -name = "winnow" -version = "0.6.13" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "59b5e5f6c299a3c7890b876a2a587f3115162487e704907d9b6cd29473052ba1" -dependencies = [ - "memchr", -] - [[package]] name = "winreg" -version = "0.52.0" +version = "0.50.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a277a57398d4bfa075df44f501a17cfdf8542d224f0d36095a2adc7aee4ef0a5" +checksum = "524e57b2c537c0f9b1e69f1965311ec12182b4122e45035b1508cd24d2adadb1" dependencies = [ "cfg-if", "windows-sys 0.48.0", ] -[[package]] -name = "wyz" -version = "0.5.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "05f360fc0b24296329c78fda852a1e9ae82de9cf7b27dae4b7f62f118f77b9ed" -dependencies = [ - "tap", -] - [[package]] name = "xattr" -version = "1.3.1" +version = "1.0.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8da84f1a25939b27f6820d92aed108f83ff920fdf11a7b19366c27c4cda81d4f" +checksum = "f4686009f71ff3e5c4dbcf1a282d0a44db3f021ba69350cd42086b3e5f1c6985" dependencies = [ "libc", - "linux-raw-sys", - "rustix", ] [[package]] @@ -6347,6 +6142,15 @@ version = "0.5.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "aed111bd9e48a802518765906cbdadf0b45afb72b9c81ab049a3b86252adffdd" +[[package]] +name = "yaml-rust" +version = "0.4.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "56c1936c4cc7a1c9ab21a1ebb602eb942ba868cbd44a99cb7cdc5892335e1c85" +dependencies = [ + "linked-hash-map", +] + [[package]] name = "yaup" version = "0.3.1" @@ -6425,106 +6229,55 @@ dependencies = [ [[package]] name = "zeroize" -version = "1.8.1" +version = "1.7.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ced3678a2879b30306d323f4542626697a464a97c0a07c9aebf7ebca65cd4dde" -dependencies = [ - "zeroize_derive", -] - -[[package]] -name = "zeroize_derive" -version = "1.4.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ce36e65b0d2999d2aafac989fb249189a141aee1f53c612c1f37d72631959f69" -dependencies = [ - "proc-macro2", - "quote", - "syn 2.0.60", -] +checksum = "525b4ec142c6b68a2d10f01f7bbf6755599ca3f81ea53b8431b7dd348f5fdb2d" [[package]] name = "zerovec" -version = "0.10.4" +version = "0.10.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "aa2b893d79df23bfb12d5461018d408ea19dfafe76c2c7ef6d4eba614f8ff079" +checksum = "eff4439ae91fb5c72b8abc12f3f2dbf51bd27e6eadb9f8a5bc8898dddb0e27ea" dependencies = [ "zerofrom", ] [[package]] name = "zip" -version = "1.1.4" +version = "0.6.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9cc23c04387f4da0374be4533ad1208cbb091d5c11d070dfef13676ad6497164" -dependencies = [ - "arbitrary", - "crc32fast", - "crossbeam-utils", - "displaydoc", - "indexmap", - "num_enum", - "thiserror", -] - -[[package]] -name = "zip" -version = "2.1.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "775a2b471036342aa69bc5a602bc889cb0a06cda00477d0c69566757d5553d39" +checksum = "760394e246e4c28189f19d488c058bf16f564016aefac5d32bb1f3b51d5e9261" dependencies = [ "aes", - "arbitrary", + "byteorder", "bzip2", "constant_time_eq", "crc32fast", "crossbeam-utils", - "deflate64", - "displaydoc", "flate2", "hmac", - "indexmap", - "lzma-rs", - "memchr", "pbkdf2", - "rand", "sha1", - "thiserror", "time", - "zeroize", - "zopfli", "zstd", ] -[[package]] -name = "zopfli" -version = "0.8.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e5019f391bac5cf252e93bbcc53d039ffd62c7bfb7c150414d61369afe57e946" -dependencies = [ - "bumpalo", - "crc32fast", - "lockfree-object-pool", - "log", - "once_cell", - "simd-adler32", -] - [[package]] name = "zstd" -version = "0.13.2" +version = "0.11.2+zstd.1.5.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fcf2b778a664581e31e389454a7072dab1647606d44f7feea22cd5abb9c9f3f9" +checksum = "20cc960326ece64f010d2d2107537f26dc589a6573a316bd5b1dba685fa5fde4" dependencies = [ "zstd-safe", ] [[package]] name = "zstd-safe" -version = "7.2.0" +version = "5.0.2+zstd.1.5.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fa556e971e7b568dc775c136fc9de8c779b1c2fc3a63defaafadffdbd3181afa" +checksum = "1d2a5585e04f9eea4b2a3d1eca508c4dee9592a89ef6f450c11719da0726f4db" dependencies = [ + "libc", "zstd-sys", ] diff --git a/milli/Cargo.toml b/milli/Cargo.toml index a06c00dd7..13ad29e77 100644 --- a/milli/Cargo.toml +++ b/milli/Cargo.toml @@ -83,7 +83,7 @@ rand = "0.8.5" tracing = "0.1.40" ureq = { version = "2.10.0", features = ["json"] } url = "2.5.2" -piccolo = "0.3.1" +rhai = { version = "1.18.0", features = ["serde", "no_module", "no_custom_syntax"] } [dev-dependencies] mimalloc = { version = "0.1.43", default-features = false } diff --git a/milli/src/update/index_documents/mod.rs b/milli/src/update/index_documents/mod.rs index b2a81b393..b29321c3c 100644 --- a/milli/src/update/index_documents/mod.rs +++ b/milli/src/update/index_documents/mod.rs @@ -16,6 +16,7 @@ use grenad::{Merger, MergerBuilder}; use heed::types::Str; use heed::Database; use rand::SeedableRng; +use rhai::{Engine, Scope}; use roaring::RoaringBitmap; use serde::{Deserialize, Serialize}; use slice_group_by::GroupBy; @@ -32,7 +33,7 @@ pub use self::helpers::{ }; use self::helpers::{grenad_obkv_into_chunks, GrenadParameters}; pub use self::transform::{Transform, TransformOutput}; -use crate::documents::{obkv_to_object, DocumentsBatchReader}; +use crate::documents::{obkv_to_object, DocumentsBatchBuilder, DocumentsBatchReader}; use crate::error::{Error, InternalError, UserError}; use crate::thread_pool_no_abort::ThreadPoolNoAbortBuilder; pub use crate::update::index_documents::helpers::CursorClonableMmap; @@ -40,7 +41,7 @@ use crate::update::{ IndexerConfig, UpdateIndexingStep, WordPrefixDocids, WordPrefixIntegerDocids, WordsPrefixesFst, }; use crate::vector::EmbeddingConfigs; -use crate::{fields_ids_map, CboRoaringBitmapCodec, Index, Result}; +use crate::{CboRoaringBitmapCodec, FieldsIdsMap, Index, Object, Result}; static MERGED_DATABASE_COUNT: usize = 7; static PREFIX_DATABASE_COUNT: usize = 4; @@ -174,7 +175,7 @@ where #[tracing::instrument(level = "trace", skip_all, target = "indexing::documents")] pub fn edit_documents( - mut self, + self, documents: &RoaringBitmap, code: &str, ) -> Result<(Self, StdResult)> { @@ -183,49 +184,75 @@ where return Ok((self, Ok(0))); } - let mut lua = piccolo::Lua::core(); - let executor = lua.enter(|ctx| ctx.stash(piccolo::Executor::new(ctx))); - let fields_ids_map = self.index.fields_ids_map(self.wtxn)?; - - for docid in documents { - let document = match self.index.documents.get(self.wtxn, &docid)? { - Some(document) => document, - None => panic!("a document should always exists"), - }; - - lua.try_enter(|ctx| { - let closure = match piccolo::Closure::load( - ctx, - None, - ("return ".to_string() + code).as_bytes(), - ) { - Ok(closure) => closure, - Err(_) => piccolo::Closure::load(ctx, None, code.as_bytes())?, - }; - let function = piccolo::Function::Closure(closure); - - let table = piccolo::Table::new(&ctx); - table.set(ctx, "internal-id", docid)?; - table.set(ctx, "title", "hello")?; - table.set(ctx, "description", "world")?; - dbg!(&table); - ctx.set_global("doc", table)?; - - ctx.fetch(&executor).restart(ctx, function, ()); - Ok(()) - }) - .unwrap(); - - lua.execute::<()>(&executor).unwrap(); - lua.try_enter(|ctx| { - let value = ctx.get_global("doc"); - dbg!(value); - Ok(()) - }) - .unwrap(); + /// Transform every field of a raw obkv store into a JSON Object. + pub fn all_obkv_to_rhaimap( + obkv: obkv::KvReaderU16, + fields_ids_map: &FieldsIdsMap, + ) -> Result { + let all_keys = obkv.iter().map(|(k, _v)| k).collect::>(); + all_keys + .iter() + .copied() + .flat_map(|id| obkv.get(id).map(|value| (id, value))) + .map(|(id, value)| { + let name = fields_ids_map.name(id).ok_or( + crate::error::FieldIdMapMissingEntry::FieldId { + field_id: id, + process: "allobkv_to_rhaimap", + }, + )?; + let value = serde_json::from_slice(value) + .map_err(crate::error::InternalError::SerdeJson)?; + Ok((name.into(), value)) + }) + .collect() } - Ok((self, Ok(documents.len()))) + fn rhaimap_to_object(map: rhai::Map) -> Object { + let mut output = Object::new(); + for (key, value) in map { + let value = serde_json::to_value(&value).unwrap(); + output.insert(key.into(), value); + } + output + } + + let engine = Engine::new(); + let ast = engine.compile(code).unwrap(); + let fields_ids_map = self.index.fields_ids_map(self.wtxn)?; + let primary_key = self.index.primary_key(self.wtxn)?.unwrap(); + let primary_key_id = fields_ids_map.id(primary_key).unwrap(); + let mut documents_batch_builder = tempfile::tempfile().map(DocumentsBatchBuilder::new)?; + + for docid in documents { + let (document, document_id) = match self.index.documents.get(self.wtxn, &docid)? { + Some(obkv) => { + let document_id_bytes = obkv.get(primary_key_id).unwrap(); + let document_id: serde_json::Value = + serde_json::from_slice(document_id_bytes).unwrap(); + let document = all_obkv_to_rhaimap(obkv, &fields_ids_map)?; + (document, document_id) + } + None => panic!("documents must exist"), + }; + + let mut scope = Scope::new(); + scope.push("doc", document); + + let new_document = engine.eval_ast_with_scope::(&mut scope, &ast).unwrap(); + let new_document = rhaimap_to_object(new_document); + + assert_eq!( + document_id, new_document[primary_key], + "you cannot change the document id when editing documents" + ); + documents_batch_builder.append_json_object(&new_document)?; + } + + let file = documents_batch_builder.into_inner()?; + let reader = DocumentsBatchReader::from_reader(file)?; + + self.add_documents(reader) } pub fn with_embedders(mut self, embedders: EmbeddingConfigs) -> Self { From 45af18ae9c89876647c5c36ce79cc37d76f423eb Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Cl=C3=A9ment=20Renault?= Date: Thu, 9 May 2024 21:51:51 +0200 Subject: [PATCH 05/29] Check the Rhai syntax before accepting the script --- meilisearch/src/routes/indexes/documents.rs | 5 +++++ milli/src/lib.rs | 2 +- milli/src/update/index_documents/mod.rs | 8 +++++--- 3 files changed, 11 insertions(+), 4 deletions(-) diff --git a/meilisearch/src/routes/indexes/documents.rs b/meilisearch/src/routes/indexes/documents.rs index 83c75ca4d..98a526eb8 100644 --- a/meilisearch/src/routes/indexes/documents.rs +++ b/meilisearch/src/routes/indexes/documents.rs @@ -599,6 +599,11 @@ pub async fn edit_documents_by_function( // analytics.delete_documents(DocumentDeletionKind::PerFilter, &req); + let engine = milli::rhai::Engine::new(); + if let Err(e) = engine.compile(&function) { + return Err(ResponseError::from_msg(e.to_string(), Code::BadRequest)); + } + if let Some(ref filter) = filter { // we ensure the filter is well formed before enqueuing it || -> Result<_, ResponseError> { diff --git a/milli/src/lib.rs b/milli/src/lib.rs index 581ffc73c..fcb0da19c 100644 --- a/milli/src/lib.rs +++ b/milli/src/lib.rs @@ -45,7 +45,7 @@ pub use search::new::{ }; use serde_json::Value; pub use thread_pool_no_abort::{PanicCatched, ThreadPoolNoAbort, ThreadPoolNoAbortBuilder}; -pub use {charabia as tokenizer, heed}; +pub use {charabia as tokenizer, heed, rhai}; pub use self::asc_desc::{AscDesc, AscDescError, Member, SortError}; pub use self::criterion::{default_criteria, Criterion, CriterionError}; diff --git a/milli/src/update/index_documents/mod.rs b/milli/src/update/index_documents/mod.rs index b29321c3c..6c1139f58 100644 --- a/milli/src/update/index_documents/mod.rs +++ b/milli/src/update/index_documents/mod.rs @@ -16,7 +16,7 @@ use grenad::{Merger, MergerBuilder}; use heed::types::Str; use heed::Database; use rand::SeedableRng; -use rhai::{Engine, Scope}; +use rhai::{Dynamic, Engine, Scope}; use roaring::RoaringBitmap; use serde::{Deserialize, Serialize}; use slice_group_by::GroupBy; @@ -239,11 +239,13 @@ where let mut scope = Scope::new(); scope.push("doc", document); - let new_document = engine.eval_ast_with_scope::(&mut scope, &ast).unwrap(); + let _ = engine.eval_ast_with_scope::(&mut scope, &ast).unwrap(); + let new_document = scope.remove("doc").unwrap(); let new_document = rhaimap_to_object(new_document); assert_eq!( - document_id, new_document[primary_key], + Some(&document_id), + new_document.get(primary_key), "you cannot change the document id when editing documents" ); documents_batch_builder.append_json_object(&new_document)?; From 246f0e713030fc8b10301aacceabcbeef3190bce Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Cl=C3=A9ment=20Renault?= Date: Thu, 9 May 2024 23:26:46 +0200 Subject: [PATCH 06/29] Make the filter field really optional --- meilisearch/src/routes/indexes/documents.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/meilisearch/src/routes/indexes/documents.rs b/meilisearch/src/routes/indexes/documents.rs index 98a526eb8..5571b02eb 100644 --- a/meilisearch/src/routes/indexes/documents.rs +++ b/meilisearch/src/routes/indexes/documents.rs @@ -578,7 +578,7 @@ pub async fn delete_documents_by_filter( #[derive(Debug, Deserr)] #[deserr(error = DeserrJsonError, rename_all = camelCase, deny_unknown_fields)] pub struct DocumentEditionByFunction { - #[deserr(error = DeserrJsonError, missing_field_error = DeserrJsonError::missing_document_filter)] + #[deserr(default, error = DeserrJsonError)] filter: Option, #[deserr(error = DeserrJsonError, missing_field_error = DeserrJsonError::missing_document_filter)] function: String, From 2fae96ac14cae644d101bc0206db71bc0a9bfad3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Cl=C3=A9ment=20Renault?= Date: Thu, 9 May 2024 23:59:01 +0200 Subject: [PATCH 07/29] Show the actual number of actually edited documents --- milli/src/update/index_documents/mod.rs | 41 +++++++++++++------------ 1 file changed, 22 insertions(+), 19 deletions(-) diff --git a/milli/src/update/index_documents/mod.rs b/milli/src/update/index_documents/mod.rs index 6c1139f58..74fed9af9 100644 --- a/milli/src/update/index_documents/mod.rs +++ b/milli/src/update/index_documents/mod.rs @@ -41,7 +41,7 @@ use crate::update::{ IndexerConfig, UpdateIndexingStep, WordPrefixDocids, WordPrefixIntegerDocids, WordsPrefixesFst, }; use crate::vector::EmbeddingConfigs; -use crate::{CboRoaringBitmapCodec, FieldsIdsMap, Index, Object, Result}; +use crate::{all_obkv_to_json, CboRoaringBitmapCodec, FieldsIdsMap, Index, Object, Result}; static MERGED_DATABASE_COUNT: usize = 7; static PREFIX_DATABASE_COUNT: usize = 4; @@ -184,7 +184,7 @@ where return Ok((self, Ok(0))); } - /// Transform every field of a raw obkv store into a JSON Object. + /// Transform every field of a raw obkv store into a Rhai Map. pub fn all_obkv_to_rhaimap( obkv: obkv::KvReaderU16, fields_ids_map: &FieldsIdsMap, @@ -225,30 +225,33 @@ where let mut documents_batch_builder = tempfile::tempfile().map(DocumentsBatchBuilder::new)?; for docid in documents { - let (document, document_id) = match self.index.documents.get(self.wtxn, &docid)? { - Some(obkv) => { - let document_id_bytes = obkv.get(primary_key_id).unwrap(); - let document_id: serde_json::Value = - serde_json::from_slice(document_id_bytes).unwrap(); - let document = all_obkv_to_rhaimap(obkv, &fields_ids_map)?; - (document, document_id) - } - None => panic!("documents must exist"), - }; + let (document, document_object, document_id) = + match self.index.documents.get(self.wtxn, &docid)? { + Some(obkv) => { + let document_id_bytes = obkv.get(primary_key_id).unwrap(); + let document_id: serde_json::Value = + serde_json::from_slice(document_id_bytes).unwrap(); + let document = all_obkv_to_rhaimap(obkv, &fields_ids_map)?; + let document_object = all_obkv_to_json(obkv, &fields_ids_map)?; + (document, document_object, document_id) + } + None => panic!("documents must exist"), + }; let mut scope = Scope::new(); scope.push("doc", document); - let _ = engine.eval_ast_with_scope::(&mut scope, &ast).unwrap(); let new_document = scope.remove("doc").unwrap(); let new_document = rhaimap_to_object(new_document); - assert_eq!( - Some(&document_id), - new_document.get(primary_key), - "you cannot change the document id when editing documents" - ); - documents_batch_builder.append_json_object(&new_document)?; + if document_object != new_document { + assert_eq!( + Some(&document_id), + new_document.get(primary_key), + "you cannot change the document id when editing documents" + ); + documents_batch_builder.append_json_object(&new_document)?; + } } let file = documents_batch_builder.into_inner()?; From f07256971a0b5789884fb7b73e9a9c61b9ce8690 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Cl=C3=A9ment=20Renault?= Date: Fri, 10 May 2024 00:16:58 +0200 Subject: [PATCH 08/29] Fix tests --- index-scheduler/src/lib.rs | 4 ++++ meilisearch/src/routes/tasks.rs | 2 +- meilisearch/tests/tasks/errors.rs | 6 +++--- 3 files changed, 8 insertions(+), 4 deletions(-) diff --git a/index-scheduler/src/lib.rs b/index-scheduler/src/lib.rs index 0b98cc22a..253de0964 100644 --- a/index-scheduler/src/lib.rs +++ b/index-scheduler/src/lib.rs @@ -4744,6 +4744,7 @@ mod tests { "types": { "documentAdditionOrUpdate": 0, "documentDeletion": 0, + "documentEdition": 0, "dumpCreation": 0, "indexCreation": 3, "indexDeletion": 0, @@ -4775,6 +4776,7 @@ mod tests { "types": { "documentAdditionOrUpdate": 0, "documentDeletion": 0, + "documentEdition": 0, "dumpCreation": 0, "indexCreation": 3, "indexDeletion": 0, @@ -4813,6 +4815,7 @@ mod tests { "types": { "documentAdditionOrUpdate": 0, "documentDeletion": 0, + "documentEdition": 0, "dumpCreation": 0, "indexCreation": 3, "indexDeletion": 0, @@ -4852,6 +4855,7 @@ mod tests { "types": { "documentAdditionOrUpdate": 0, "documentDeletion": 0, + "documentEdition": 0, "dumpCreation": 0, "indexCreation": 3, "indexDeletion": 0, diff --git a/meilisearch/src/routes/tasks.rs b/meilisearch/src/routes/tasks.rs index a4cf68d57..3dc6520af 100644 --- a/meilisearch/src/routes/tasks.rs +++ b/meilisearch/src/routes/tasks.rs @@ -591,7 +591,7 @@ mod tests { let err = deserr_query_params::(params).unwrap_err(); snapshot!(meili_snap::json_string!(err), @r###" { - "message": "Invalid value in parameter `types`: `createIndex` is not a valid task type. Available types are `documentAdditionOrUpdate`, `documentDeletion`, `settingsUpdate`, `indexCreation`, `indexDeletion`, `indexUpdate`, `indexSwap`, `taskCancelation`, `taskDeletion`, `dumpCreation`, `snapshotCreation`.", + "message": "Invalid value in parameter `types`: `createIndex` is not a valid task type. Available types are `documentAdditionOrUpdate`, `documentEdition`, `documentDeletion`, `settingsUpdate`, `indexCreation`, `indexDeletion`, `indexUpdate`, `indexSwap`, `taskCancelation`, `taskDeletion`, `dumpCreation`, `snapshotCreation`.", "code": "invalid_task_types", "type": "invalid_request", "link": "https://docs.meilisearch.com/errors#invalid_task_types" diff --git a/meilisearch/tests/tasks/errors.rs b/meilisearch/tests/tasks/errors.rs index 830c4c8e7..2c85acf0e 100644 --- a/meilisearch/tests/tasks/errors.rs +++ b/meilisearch/tests/tasks/errors.rs @@ -97,7 +97,7 @@ async fn task_bad_types() { snapshot!(code, @"400 Bad Request"); snapshot!(json_string!(response), @r###" { - "message": "Invalid value in parameter `types`: `doggo` is not a valid task type. Available types are `documentAdditionOrUpdate`, `documentDeletion`, `settingsUpdate`, `indexCreation`, `indexDeletion`, `indexUpdate`, `indexSwap`, `taskCancelation`, `taskDeletion`, `dumpCreation`, `snapshotCreation`.", + "message": "Invalid value in parameter `types`: `doggo` is not a valid task type. Available types are `documentAdditionOrUpdate`, `documentEdition`, `documentDeletion`, `settingsUpdate`, `indexCreation`, `indexDeletion`, `indexUpdate`, `indexSwap`, `taskCancelation`, `taskDeletion`, `dumpCreation`, `snapshotCreation`.", "code": "invalid_task_types", "type": "invalid_request", "link": "https://docs.meilisearch.com/errors#invalid_task_types" @@ -108,7 +108,7 @@ async fn task_bad_types() { snapshot!(code, @"400 Bad Request"); snapshot!(json_string!(response), @r###" { - "message": "Invalid value in parameter `types`: `doggo` is not a valid task type. Available types are `documentAdditionOrUpdate`, `documentDeletion`, `settingsUpdate`, `indexCreation`, `indexDeletion`, `indexUpdate`, `indexSwap`, `taskCancelation`, `taskDeletion`, `dumpCreation`, `snapshotCreation`.", + "message": "Invalid value in parameter `types`: `doggo` is not a valid task type. Available types are `documentAdditionOrUpdate`, `documentEdition`, `documentDeletion`, `settingsUpdate`, `indexCreation`, `indexDeletion`, `indexUpdate`, `indexSwap`, `taskCancelation`, `taskDeletion`, `dumpCreation`, `snapshotCreation`.", "code": "invalid_task_types", "type": "invalid_request", "link": "https://docs.meilisearch.com/errors#invalid_task_types" @@ -119,7 +119,7 @@ async fn task_bad_types() { snapshot!(code, @"400 Bad Request"); snapshot!(json_string!(response), @r###" { - "message": "Invalid value in parameter `types`: `doggo` is not a valid task type. Available types are `documentAdditionOrUpdate`, `documentDeletion`, `settingsUpdate`, `indexCreation`, `indexDeletion`, `indexUpdate`, `indexSwap`, `taskCancelation`, `taskDeletion`, `dumpCreation`, `snapshotCreation`.", + "message": "Invalid value in parameter `types`: `doggo` is not a valid task type. Available types are `documentAdditionOrUpdate`, `documentEdition`, `documentDeletion`, `settingsUpdate`, `indexCreation`, `indexDeletion`, `indexUpdate`, `indexSwap`, `taskCancelation`, `taskDeletion`, `dumpCreation`, `snapshotCreation`.", "code": "invalid_task_types", "type": "invalid_request", "link": "https://docs.meilisearch.com/errors#invalid_task_types" From f4add9304380cc209af06343a1b8b0d3de43f9be Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Cl=C3=A9ment=20Renault?= Date: Fri, 10 May 2024 12:22:13 +0200 Subject: [PATCH 09/29] Limit the number of script operations --- milli/src/update/index_documents/mod.rs | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/milli/src/update/index_documents/mod.rs b/milli/src/update/index_documents/mod.rs index 74fed9af9..83e07c722 100644 --- a/milli/src/update/index_documents/mod.rs +++ b/milli/src/update/index_documents/mod.rs @@ -217,7 +217,10 @@ where output } - let engine = Engine::new(); + let mut engine = Engine::new(); + //It is an arbitrary value. We need to let users define this in the settings. + engine.set_max_operations(1_000_000); + let ast = engine.compile(code).unwrap(); let fields_ids_map = self.index.fields_ids_map(self.wtxn)?; let primary_key = self.index.primary_key(self.wtxn)?.unwrap(); From f32e6c32fc198848771c21eafba6cc86515d3e3e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Cl=C3=A9ment=20Renault?= Date: Fri, 10 May 2024 19:42:44 +0200 Subject: [PATCH 10/29] Rename editionCode to function --- index-scheduler/src/batch.rs | 21 ++++++++++----------- index-scheduler/src/insta_snapshot.rs | 4 ++-- meilisearch-types/src/task_view.rs | 6 +++--- meilisearch-types/src/tasks.rs | 12 ++++++------ meilisearch/src/routes/indexes/documents.rs | 2 +- 5 files changed, 22 insertions(+), 23 deletions(-) diff --git a/index-scheduler/src/batch.rs b/index-scheduler/src/batch.rs index 254af6a1e..04dc49a52 100644 --- a/index-scheduler/src/batch.rs +++ b/index-scheduler/src/batch.rs @@ -1411,28 +1411,27 @@ impl IndexScheduler { Ok(tasks) } IndexOperation::DocumentEdition { mut task, .. } => { - let (filter, edition_code) = - if let KindWithContent::DocumentEdition { filter_expr, edition_code, .. } = + let (filter, function) = + if let KindWithContent::DocumentEdition { filter_expr, function, .. } = &task.kind { - (filter_expr, edition_code) + (filter_expr, function) } else { unreachable!() }; let edited_documents = edit_documents_by_function( index_wtxn, filter, - edition_code, + function, self.index_mapper.indexer_config(), self.must_stop_processing.clone(), index, ); - let (original_filter, edition_code) = - if let Some(Details::DocumentEdition { - original_filter, edition_code, .. - }) = task.details + let (original_filter, function) = + if let Some(Details::DocumentEdition { original_filter, function, .. }) = + task.details { - (original_filter, edition_code) + (original_filter, function) } else { // In the case of a `documentDeleteByFilter` the details MUST be set unreachable!(); @@ -1443,7 +1442,7 @@ impl IndexScheduler { task.status = Status::Succeeded; task.details = Some(Details::DocumentEdition { original_filter, - edition_code, + function, edited_documents: Some(edited_documents), }); } @@ -1451,7 +1450,7 @@ impl IndexScheduler { task.status = Status::Failed; task.details = Some(Details::DocumentEdition { original_filter, - edition_code, + function, edited_documents: Some(0), }); task.error = Some(e.into()); diff --git a/index-scheduler/src/insta_snapshot.rs b/index-scheduler/src/insta_snapshot.rs index f202eca03..b54b43652 100644 --- a/index-scheduler/src/insta_snapshot.rs +++ b/index-scheduler/src/insta_snapshot.rs @@ -179,10 +179,10 @@ fn snapshot_details(d: &Details) -> String { } Details::DocumentEdition { edited_documents, - edition_code, + function, original_filter, } => { - format!("{{ edited_documents: {edited_documents:?}, edition_code: {edition_code:?}, original_filter: {original_filter:?} }}") + format!("{{ edited_documents: {edited_documents:?}, function: {function:?}, original_filter: {original_filter:?} }}") } Details::SettingsUpdate { settings } => { format!("{{ settings: {settings:?} }}") diff --git a/meilisearch-types/src/task_view.rs b/meilisearch-types/src/task_view.rs index b8e55e8a8..a402e470c 100644 --- a/meilisearch-types/src/task_view.rs +++ b/meilisearch-types/src/task_view.rs @@ -72,7 +72,7 @@ pub struct DetailsView { #[serde(skip_serializing_if = "Option::is_none")] pub dump_uid: Option>, #[serde(skip_serializing_if = "Option::is_none")] - pub edition_code: Option, + pub function: Option, #[serde(skip_serializing_if = "Option::is_none")] #[serde(flatten)] pub settings: Option>>, @@ -90,11 +90,11 @@ impl From
for DetailsView { ..DetailsView::default() } } - Details::DocumentEdition { edited_documents, original_filter, edition_code } => { + Details::DocumentEdition { edited_documents, original_filter, function } => { DetailsView { edited_documents: Some(edited_documents), original_filter: Some(original_filter), - edition_code: Some(edition_code), + function: Some(function), ..DetailsView::default() } } diff --git a/meilisearch-types/src/tasks.rs b/meilisearch-types/src/tasks.rs index 0501ed5ff..7edaa2eee 100644 --- a/meilisearch-types/src/tasks.rs +++ b/meilisearch-types/src/tasks.rs @@ -99,7 +99,7 @@ pub enum KindWithContent { DocumentEdition { index_uid: String, filter_expr: Option, - edition_code: String, + function: String, }, DocumentDeletion { index_uid: String, @@ -211,11 +211,11 @@ impl KindWithContent { indexed_documents: None, }) } - KindWithContent::DocumentEdition { index_uid: _, edition_code, filter_expr } => { + KindWithContent::DocumentEdition { index_uid: _, function, filter_expr } => { Some(Details::DocumentEdition { edited_documents: None, original_filter: filter_expr.as_ref().map(|v| v.to_string()), - edition_code: edition_code.clone(), + function: function.clone(), }) } KindWithContent::DocumentDeletion { index_uid: _, documents_ids } => { @@ -266,11 +266,11 @@ impl KindWithContent { indexed_documents: Some(0), }) } - KindWithContent::DocumentEdition { index_uid: _, filter_expr, edition_code } => { + KindWithContent::DocumentEdition { index_uid: _, filter_expr, function } => { Some(Details::DocumentEdition { edited_documents: Some(0), original_filter: filter_expr.as_ref().map(|v| v.to_string()), - edition_code: edition_code.clone(), + function: function.clone(), }) } KindWithContent::DocumentDeletion { index_uid: _, documents_ids } => { @@ -531,7 +531,7 @@ pub enum Details { DocumentEdition { edited_documents: Option, original_filter: Option, - edition_code: String, + function: String, }, SettingsUpdate { settings: Box>, diff --git a/meilisearch/src/routes/indexes/documents.rs b/meilisearch/src/routes/indexes/documents.rs index 5571b02eb..b15232419 100644 --- a/meilisearch/src/routes/indexes/documents.rs +++ b/meilisearch/src/routes/indexes/documents.rs @@ -613,7 +613,7 @@ pub async fn edit_documents_by_function( .map_err(|err| ResponseError::from_msg(err.message, Code::InvalidDocumentFilter))?; } let task = - KindWithContent::DocumentEdition { index_uid, filter_expr: filter, edition_code: function }; + KindWithContent::DocumentEdition { index_uid, filter_expr: filter, function: function }; let uid = get_task_id(&req, &opt)?; let dry_run = is_dry_run(&req, &opt)?; From 400e6b93ced4dcac3f76203e2262669291b3ed47 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Cl=C3=A9ment=20Renault?= Date: Fri, 10 May 2024 20:08:05 +0200 Subject: [PATCH 11/29] Support user-provided context for documents edition --- index-scheduler/src/batch.rs | 38 +++++++++++++-------- index-scheduler/src/insta_snapshot.rs | 5 +-- meilisearch-types/src/task_view.rs | 6 +++- meilisearch-types/src/tasks.rs | 9 +++-- meilisearch/src/routes/indexes/documents.rs | 15 ++++++-- milli/src/update/index_documents/mod.rs | 10 +++++- 6 files changed, 59 insertions(+), 24 deletions(-) diff --git a/index-scheduler/src/batch.rs b/index-scheduler/src/batch.rs index 04dc49a52..e75d2c60d 100644 --- a/index-scheduler/src/batch.rs +++ b/index-scheduler/src/batch.rs @@ -34,7 +34,7 @@ use meilisearch_types::milli::update::{ use meilisearch_types::milli::vector::parsed_vectors::{ ExplicitVectors, VectorOrArrayOfVectors, RESERVED_VECTORS_FIELD_NAME, }; -use meilisearch_types::milli::{self, Filter}; +use meilisearch_types::milli::{self, Filter, Object}; use meilisearch_types::settings::{apply_settings_to_builder, Settings, Unchecked}; use meilisearch_types::tasks::{Details, IndexSwap, Kind, KindWithContent, Status, Task}; use meilisearch_types::{compression, Index, VERSION_FILE_NAME}; @@ -1411,37 +1411,43 @@ impl IndexScheduler { Ok(tasks) } IndexOperation::DocumentEdition { mut task, .. } => { - let (filter, function) = - if let KindWithContent::DocumentEdition { filter_expr, function, .. } = - &task.kind + let (filter, context, function) = + if let KindWithContent::DocumentEdition { + filter_expr, context, function, .. + } = &task.kind { - (filter_expr, function) + (filter_expr, context, function) } else { unreachable!() }; let edited_documents = edit_documents_by_function( index_wtxn, filter, + context.clone(), function, self.index_mapper.indexer_config(), self.must_stop_processing.clone(), index, ); - let (original_filter, function) = - if let Some(Details::DocumentEdition { original_filter, function, .. }) = - task.details - { - (original_filter, function) - } else { - // In the case of a `documentDeleteByFilter` the details MUST be set - unreachable!(); - }; + let (original_filter, context, function) = if let Some(Details::DocumentEdition { + original_filter, + context, + function, + .. + }) = task.details + { + (original_filter, context, function) + } else { + // In the case of a `documentDeleteByFilter` the details MUST be set + unreachable!(); + }; match edited_documents { Ok(edited_documents) => { task.status = Status::Succeeded; task.details = Some(Details::DocumentEdition { original_filter, + context, function, edited_documents: Some(edited_documents), }); @@ -1450,6 +1456,7 @@ impl IndexScheduler { task.status = Status::Failed; task.details = Some(Details::DocumentEdition { original_filter, + context, function, edited_documents: Some(0), }); @@ -1751,6 +1758,7 @@ fn delete_document_by_filter<'a>( fn edit_documents_by_function<'a>( wtxn: &mut RwTxn<'a>, filter: &Option, + context: Option, code: &str, indexer_config: &IndexerConfig, must_stop_processing: MustStopProcessing, @@ -1781,7 +1789,7 @@ fn edit_documents_by_function<'a>( || must_stop_processing.get(), )?; - let (new_builder, count) = builder.edit_documents(&candidates, code)?; + let (new_builder, count) = builder.edit_documents(&candidates, context, code)?; builder = new_builder; let _ = builder.execute()?; diff --git a/index-scheduler/src/insta_snapshot.rs b/index-scheduler/src/insta_snapshot.rs index b54b43652..5c117fe81 100644 --- a/index-scheduler/src/insta_snapshot.rs +++ b/index-scheduler/src/insta_snapshot.rs @@ -179,10 +179,11 @@ fn snapshot_details(d: &Details) -> String { } Details::DocumentEdition { edited_documents, - function, original_filter, + context, + function, } => { - format!("{{ edited_documents: {edited_documents:?}, function: {function:?}, original_filter: {original_filter:?} }}") + format!("{{ edited_documents: {edited_documents:?}, context: {context:?}, function: {function:?}, original_filter: {original_filter:?} }}") } Details::SettingsUpdate { settings } => { format!("{{ settings: {settings:?} }}") diff --git a/meilisearch-types/src/task_view.rs b/meilisearch-types/src/task_view.rs index a402e470c..05b362816 100644 --- a/meilisearch-types/src/task_view.rs +++ b/meilisearch-types/src/task_view.rs @@ -1,3 +1,4 @@ +use milli::Object; use serde::Serialize; use time::{Duration, OffsetDateTime}; @@ -72,6 +73,8 @@ pub struct DetailsView { #[serde(skip_serializing_if = "Option::is_none")] pub dump_uid: Option>, #[serde(skip_serializing_if = "Option::is_none")] + pub context: Option>, + #[serde(skip_serializing_if = "Option::is_none")] pub function: Option, #[serde(skip_serializing_if = "Option::is_none")] #[serde(flatten)] @@ -90,10 +93,11 @@ impl From
for DetailsView { ..DetailsView::default() } } - Details::DocumentEdition { edited_documents, original_filter, function } => { + Details::DocumentEdition { edited_documents, original_filter, context, function } => { DetailsView { edited_documents: Some(edited_documents), original_filter: Some(original_filter), + context: Some(context), function: Some(function), ..DetailsView::default() } diff --git a/meilisearch-types/src/tasks.rs b/meilisearch-types/src/tasks.rs index 7edaa2eee..37c9bc22b 100644 --- a/meilisearch-types/src/tasks.rs +++ b/meilisearch-types/src/tasks.rs @@ -5,6 +5,7 @@ use std::str::FromStr; use enum_iterator::Sequence; use milli::update::IndexDocumentsMethod; +use milli::Object; use roaring::RoaringBitmap; use serde::{Deserialize, Serialize, Serializer}; use time::{Duration, OffsetDateTime}; @@ -99,6 +100,7 @@ pub enum KindWithContent { DocumentEdition { index_uid: String, filter_expr: Option, + context: Option, function: String, }, DocumentDeletion { @@ -211,10 +213,11 @@ impl KindWithContent { indexed_documents: None, }) } - KindWithContent::DocumentEdition { index_uid: _, function, filter_expr } => { + KindWithContent::DocumentEdition { index_uid: _, filter_expr, context, function } => { Some(Details::DocumentEdition { edited_documents: None, original_filter: filter_expr.as_ref().map(|v| v.to_string()), + context: context.clone(), function: function.clone(), }) } @@ -266,10 +269,11 @@ impl KindWithContent { indexed_documents: Some(0), }) } - KindWithContent::DocumentEdition { index_uid: _, filter_expr, function } => { + KindWithContent::DocumentEdition { index_uid: _, filter_expr, context, function } => { Some(Details::DocumentEdition { edited_documents: Some(0), original_filter: filter_expr.as_ref().map(|v| v.to_string()), + context: context.clone(), function: function.clone(), }) } @@ -531,6 +535,7 @@ pub enum Details { DocumentEdition { edited_documents: Option, original_filter: Option, + context: Option, function: String, }, SettingsUpdate { diff --git a/meilisearch/src/routes/indexes/documents.rs b/meilisearch/src/routes/indexes/documents.rs index b15232419..0a9ce9bfc 100644 --- a/meilisearch/src/routes/indexes/documents.rs +++ b/meilisearch/src/routes/indexes/documents.rs @@ -580,6 +580,8 @@ pub async fn delete_documents_by_filter( pub struct DocumentEditionByFunction { #[deserr(default, error = DeserrJsonError)] filter: Option, + #[deserr(default, error = DeserrJsonError)] + context: Option, #[deserr(error = DeserrJsonError, missing_field_error = DeserrJsonError::missing_document_filter)] function: String, } @@ -595,7 +597,7 @@ pub async fn edit_documents_by_function( debug!(parameters = ?body, "Edit documents by function"); let index_uid = IndexUid::try_from(index_uid.into_inner())?; let index_uid = index_uid.into_inner(); - let DocumentEditionByFunction { filter, function } = body.into_inner(); + let DocumentEditionByFunction { filter, context, function } = body.into_inner(); // analytics.delete_documents(DocumentDeletionKind::PerFilter, &req); @@ -612,8 +614,15 @@ pub async fn edit_documents_by_function( // and whatever was the error, the error code should always be an InvalidDocumentFilter .map_err(|err| ResponseError::from_msg(err.message, Code::InvalidDocumentFilter))?; } - let task = - KindWithContent::DocumentEdition { index_uid, filter_expr: filter, function: function }; + let task = KindWithContent::DocumentEdition { + index_uid, + filter_expr: filter, + context: context.map(|v| match v { + serde_json::Value::Object(m) => m, + _ => panic!("The context must be an Object"), + }), + function, + }; let uid = get_task_id(&req, &opt)?; let dry_run = is_dry_run(&req, &opt)?; diff --git a/milli/src/update/index_documents/mod.rs b/milli/src/update/index_documents/mod.rs index 83e07c722..adbb424b8 100644 --- a/milli/src/update/index_documents/mod.rs +++ b/milli/src/update/index_documents/mod.rs @@ -16,7 +16,7 @@ use grenad::{Merger, MergerBuilder}; use heed::types::Str; use heed::Database; use rand::SeedableRng; -use rhai::{Dynamic, Engine, Scope}; +use rhai::{Dynamic, Engine, OptimizationLevel, Scope}; use roaring::RoaringBitmap; use serde::{Deserialize, Serialize}; use slice_group_by::GroupBy; @@ -177,6 +177,7 @@ where pub fn edit_documents( self, documents: &RoaringBitmap, + context: Option, code: &str, ) -> Result<(Self, StdResult)> { // Early return when there is no document to add @@ -218,6 +219,7 @@ where } let mut engine = Engine::new(); + engine.set_optimization_level(OptimizationLevel::Full); //It is an arbitrary value. We need to let users define this in the settings. engine.set_max_operations(1_000_000); @@ -227,6 +229,11 @@ where let primary_key_id = fields_ids_map.id(primary_key).unwrap(); let mut documents_batch_builder = tempfile::tempfile().map(DocumentsBatchBuilder::new)?; + let context: Dynamic = match context { + Some(context) => serde_json::from_value(context.into()).unwrap(), + None => Dynamic::from(()), + }; + for docid in documents { let (document, document_object, document_id) = match self.index.documents.get(self.wtxn, &docid)? { @@ -242,6 +249,7 @@ where }; let mut scope = Scope::new(); + scope.push_constant_dynamic("context", context.clone()); scope.push("doc", document); let _ = engine.eval_ast_with_scope::(&mut scope, &ast).unwrap(); let new_document = scope.remove("doc").unwrap(); From 33fa17bf12e408c2f8e0fba22b8326f9a48d2b0e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Cl=C3=A9ment=20Renault?= Date: Fri, 10 May 2024 23:26:55 +0200 Subject: [PATCH 12/29] Support deleting documents with functions --- index-scheduler/src/batch.rs | 10 ++++++---- index-scheduler/src/insta_snapshot.rs | 5 ++++- meilisearch-types/src/task_view.rs | 23 ++++++++++++++--------- meilisearch-types/src/tasks.rs | 3 +++ milli/src/update/index_documents/mod.rs | 25 ++++++++++++++++++++----- 5 files changed, 47 insertions(+), 19 deletions(-) diff --git a/index-scheduler/src/batch.rs b/index-scheduler/src/batch.rs index e75d2c60d..d504ef915 100644 --- a/index-scheduler/src/batch.rs +++ b/index-scheduler/src/batch.rs @@ -1420,7 +1420,7 @@ impl IndexScheduler { } else { unreachable!() }; - let edited_documents = edit_documents_by_function( + let result_count = edit_documents_by_function( index_wtxn, filter, context.clone(), @@ -1442,13 +1442,14 @@ impl IndexScheduler { unreachable!(); }; - match edited_documents { - Ok(edited_documents) => { + match result_count { + Ok((deleted_documents, edited_documents)) => { task.status = Status::Succeeded; task.details = Some(Details::DocumentEdition { original_filter, context, function, + deleted_documents: Some(deleted_documents), edited_documents: Some(edited_documents), }); } @@ -1458,6 +1459,7 @@ impl IndexScheduler { original_filter, context, function, + deleted_documents: Some(0), edited_documents: Some(0), }); task.error = Some(e.into()); @@ -1763,7 +1765,7 @@ fn edit_documents_by_function<'a>( indexer_config: &IndexerConfig, must_stop_processing: MustStopProcessing, index: &'a Index, -) -> Result { +) -> Result<(u64, u64)> { let candidates = match filter.as_ref().map(Filter::from_json) { Some(Ok(Some(filter))) => filter.evaluate(wtxn, index).map_err(|err| match err { milli::Error::UserError(milli::UserError::InvalidFilter(_)) => { diff --git a/index-scheduler/src/insta_snapshot.rs b/index-scheduler/src/insta_snapshot.rs index 5c117fe81..c65bb0716 100644 --- a/index-scheduler/src/insta_snapshot.rs +++ b/index-scheduler/src/insta_snapshot.rs @@ -178,12 +178,15 @@ fn snapshot_details(d: &Details) -> String { format!("{{ received_documents: {received_documents}, indexed_documents: {indexed_documents:?} }}") } Details::DocumentEdition { + deleted_documents, edited_documents, original_filter, context, function, } => { - format!("{{ edited_documents: {edited_documents:?}, context: {context:?}, function: {function:?}, original_filter: {original_filter:?} }}") + format!( + "{{ deleted_documents: {deleted_documents:?}, edited_documents: {edited_documents:?}, context: {context:?}, function: {function:?}, original_filter: {original_filter:?} }}" + ) } Details::SettingsUpdate { settings } => { format!("{{ settings: {settings:?} }}") diff --git a/meilisearch-types/src/task_view.rs b/meilisearch-types/src/task_view.rs index 05b362816..3075fa899 100644 --- a/meilisearch-types/src/task_view.rs +++ b/meilisearch-types/src/task_view.rs @@ -93,15 +93,20 @@ impl From
for DetailsView { ..DetailsView::default() } } - Details::DocumentEdition { edited_documents, original_filter, context, function } => { - DetailsView { - edited_documents: Some(edited_documents), - original_filter: Some(original_filter), - context: Some(context), - function: Some(function), - ..DetailsView::default() - } - } + Details::DocumentEdition { + deleted_documents, + edited_documents, + original_filter, + context, + function, + } => DetailsView { + deleted_documents: Some(deleted_documents), + edited_documents: Some(edited_documents), + original_filter: Some(original_filter), + context: Some(context), + function: Some(function), + ..DetailsView::default() + }, Details::SettingsUpdate { mut settings } => { settings.hide_secrets(); DetailsView { settings: Some(settings), ..DetailsView::default() } diff --git a/meilisearch-types/src/tasks.rs b/meilisearch-types/src/tasks.rs index 37c9bc22b..a4aa67991 100644 --- a/meilisearch-types/src/tasks.rs +++ b/meilisearch-types/src/tasks.rs @@ -215,6 +215,7 @@ impl KindWithContent { } KindWithContent::DocumentEdition { index_uid: _, filter_expr, context, function } => { Some(Details::DocumentEdition { + deleted_documents: None, edited_documents: None, original_filter: filter_expr.as_ref().map(|v| v.to_string()), context: context.clone(), @@ -271,6 +272,7 @@ impl KindWithContent { } KindWithContent::DocumentEdition { index_uid: _, filter_expr, context, function } => { Some(Details::DocumentEdition { + deleted_documents: Some(0), edited_documents: Some(0), original_filter: filter_expr.as_ref().map(|v| v.to_string()), context: context.clone(), @@ -533,6 +535,7 @@ pub enum Details { indexed_documents: Option, }, DocumentEdition { + deleted_documents: Option, edited_documents: Option, original_filter: Option, context: Option, diff --git a/milli/src/update/index_documents/mod.rs b/milli/src/update/index_documents/mod.rs index adbb424b8..0ec4b3739 100644 --- a/milli/src/update/index_documents/mod.rs +++ b/milli/src/update/index_documents/mod.rs @@ -179,10 +179,10 @@ where documents: &RoaringBitmap, context: Option, code: &str, - ) -> Result<(Self, StdResult)> { + ) -> Result<(Self, StdResult<(u64, u64), UserError>)> { // Early return when there is no document to add if documents.is_empty() { - return Ok((self, Ok(0))); + return Ok((self, Ok((0, 0)))); } /// Transform every field of a raw obkv store into a Rhai Map. @@ -228,6 +228,7 @@ where let primary_key = self.index.primary_key(self.wtxn)?.unwrap(); let primary_key_id = fields_ids_map.id(primary_key).unwrap(); let mut documents_batch_builder = tempfile::tempfile().map(DocumentsBatchBuilder::new)?; + let mut documents_to_remove = RoaringBitmap::new(); let context: Dynamic = match context { Some(context) => serde_json::from_value(context.into()).unwrap(), @@ -252,8 +253,19 @@ where scope.push_constant_dynamic("context", context.clone()); scope.push("doc", document); let _ = engine.eval_ast_with_scope::(&mut scope, &ast).unwrap(); - let new_document = scope.remove("doc").unwrap(); - let new_document = rhaimap_to_object(new_document); + let new_document = match scope.remove::("doc") { + // If the "doc" variable has been removed from the scope + // or set to (), we effectively delete the document. + Some(doc) if doc.is_unit() => { + documents_to_remove.push(docid); + continue; + } + None => unreachable!(), + Some(document) => match document.try_cast() { + Some(document) => rhaimap_to_object(document), + None => panic!("Why is \"doc\" no longer a Map?"), + }, + }; if document_object != new_document { assert_eq!( @@ -268,7 +280,10 @@ where let file = documents_batch_builder.into_inner()?; let reader = DocumentsBatchReader::from_reader(file)?; - self.add_documents(reader) + let (this, removed) = self.remove_documents_from_db_no_batch(&documents_to_remove)?; + let (this, result) = this.add_documents(reader)?; + + Ok((this, result.map(|added| (removed, added)))) } pub fn with_embedders(mut self, embedders: EmbeddingConfigs) -> Self { From 2eae2015d753b9575d81ff4f53aa61bef154c269 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Cl=C3=A9ment=20Renault?= Date: Sat, 11 May 2024 11:39:58 +0200 Subject: [PATCH 13/29] Support aborting documents edition by function --- milli/src/update/index_documents/mod.rs | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/milli/src/update/index_documents/mod.rs b/milli/src/update/index_documents/mod.rs index 0ec4b3739..d3cf2fd12 100644 --- a/milli/src/update/index_documents/mod.rs +++ b/milli/src/update/index_documents/mod.rs @@ -236,6 +236,10 @@ where }; for docid in documents { + if (self.should_abort)() { + return Err(Error::InternalError(InternalError::AbortedIndexation)); + } + let (document, document_object, document_id) = match self.index.documents.get(self.wtxn, &docid)? { Some(obkv) => { From dfecb25814d2e5731ed6fa533791de14570d17d2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Cl=C3=A9ment=20Renault?= Date: Sat, 11 May 2024 13:52:33 +0200 Subject: [PATCH 14/29] Disable the time package --- milli/Cargo.toml | 1 + 1 file changed, 1 insertion(+) diff --git a/milli/Cargo.toml b/milli/Cargo.toml index 13ad29e77..eff5d4e3f 100644 --- a/milli/Cargo.toml +++ b/milli/Cargo.toml @@ -84,6 +84,7 @@ tracing = "0.1.40" ureq = { version = "2.10.0", features = ["json"] } url = "2.5.2" rhai = { version = "1.18.0", features = ["serde", "no_module", "no_custom_syntax"] } +rhai = { version = "1.18.0", features = ["serde", "no_module", "no_custom_syntax", "no_time"] } [dev-dependencies] mimalloc = { version = "0.1.43", default-features = false } From b67d385cf0da8d3910d192aa33b610dda7603ee7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Cl=C3=A9ment=20Renault?= Date: Sun, 12 May 2024 13:04:01 +0200 Subject: [PATCH 15/29] Parallelize the edition functions --- milli/Cargo.toml | 3 +- milli/src/update/index_documents/mod.rs | 122 ++++++++++--------- milli/src/update/index_documents/parallel.rs | 86 +++++++++++++ 3 files changed, 151 insertions(+), 60 deletions(-) create mode 100644 milli/src/update/index_documents/parallel.rs diff --git a/milli/Cargo.toml b/milli/Cargo.toml index eff5d4e3f..d0513706f 100644 --- a/milli/Cargo.toml +++ b/milli/Cargo.toml @@ -79,12 +79,11 @@ hf-hub = { git = "https://github.com/dureuill/hf-hub.git", branch = "rust_tls", tiktoken-rs = "0.5.9" liquid = "0.26.6" arroy = "0.4.0" +rhai = { version = "1.18.0", features = ["serde", "no_module", "no_custom_syntax", "no_time", "sync"] } rand = "0.8.5" tracing = "0.1.40" ureq = { version = "2.10.0", features = ["json"] } url = "2.5.2" -rhai = { version = "1.18.0", features = ["serde", "no_module", "no_custom_syntax"] } -rhai = { version = "1.18.0", features = ["serde", "no_module", "no_custom_syntax", "no_time"] } [dev-dependencies] mimalloc = { version = "0.1.43", default-features = false } diff --git a/milli/src/update/index_documents/mod.rs b/milli/src/update/index_documents/mod.rs index d3cf2fd12..3ed0d2db9 100644 --- a/milli/src/update/index_documents/mod.rs +++ b/milli/src/update/index_documents/mod.rs @@ -1,6 +1,7 @@ mod enrich; mod extract; mod helpers; +mod parallel; mod transform; mod typed_chunk; @@ -16,6 +17,7 @@ use grenad::{Merger, MergerBuilder}; use heed::types::Str; use heed::Database; use rand::SeedableRng; +use rayon::iter::{ParallelBridge, ParallelIterator}; use rhai::{Dynamic, Engine, OptimizationLevel, Scope}; use roaring::RoaringBitmap; use serde::{Deserialize, Serialize}; @@ -37,11 +39,12 @@ use crate::documents::{obkv_to_object, DocumentsBatchBuilder, DocumentsBatchRead use crate::error::{Error, InternalError, UserError}; use crate::thread_pool_no_abort::ThreadPoolNoAbortBuilder; pub use crate::update::index_documents::helpers::CursorClonableMmap; +use crate::update::index_documents::parallel::ImmutableObkvs; use crate::update::{ IndexerConfig, UpdateIndexingStep, WordPrefixDocids, WordPrefixIntegerDocids, WordsPrefixesFst, }; use crate::vector::EmbeddingConfigs; -use crate::{all_obkv_to_json, CboRoaringBitmapCodec, FieldsIdsMap, Index, Object, Result}; +use crate::{CboRoaringBitmapCodec, FieldsIdsMap, Index, Object, Result}; static MERGED_DATABASE_COUNT: usize = 7; static PREFIX_DATABASE_COUNT: usize = 4; @@ -185,30 +188,6 @@ where return Ok((self, Ok((0, 0)))); } - /// Transform every field of a raw obkv store into a Rhai Map. - pub fn all_obkv_to_rhaimap( - obkv: obkv::KvReaderU16, - fields_ids_map: &FieldsIdsMap, - ) -> Result { - let all_keys = obkv.iter().map(|(k, _v)| k).collect::>(); - all_keys - .iter() - .copied() - .flat_map(|id| obkv.get(id).map(|value| (id, value))) - .map(|(id, value)| { - let name = fields_ids_map.name(id).ok_or( - crate::error::FieldIdMapMissingEntry::FieldId { - field_id: id, - process: "allobkv_to_rhaimap", - }, - )?; - let value = serde_json::from_slice(value) - .map_err(crate::error::InternalError::SerdeJson)?; - Ok((name.into(), value)) - }) - .collect() - } - fn rhaimap_to_object(map: rhai::Map) -> Object { let mut output = Object::new(); for (key, value) in map { @@ -220,13 +199,12 @@ where let mut engine = Engine::new(); engine.set_optimization_level(OptimizationLevel::Full); - //It is an arbitrary value. We need to let users define this in the settings. + // It is an arbitrary value. We need to let users define this in the settings. engine.set_max_operations(1_000_000); let ast = engine.compile(code).unwrap(); let fields_ids_map = self.index.fields_ids_map(self.wtxn)?; let primary_key = self.index.primary_key(self.wtxn)?.unwrap(); - let primary_key_id = fields_ids_map.id(primary_key).unwrap(); let mut documents_batch_builder = tempfile::tempfile().map(DocumentsBatchBuilder::new)?; let mut documents_to_remove = RoaringBitmap::new(); @@ -235,51 +213,79 @@ where None => Dynamic::from(()), }; - for docid in documents { - if (self.should_abort)() { - return Err(Error::InternalError(InternalError::AbortedIndexation)); - } + enum DocumentEdition { + Deleted(crate::DocumentId), + Edited(Object), + Nothing, + } - let (document, document_object, document_id) = - match self.index.documents.get(self.wtxn, &docid)? { - Some(obkv) => { - let document_id_bytes = obkv.get(primary_key_id).unwrap(); - let document_id: serde_json::Value = - serde_json::from_slice(document_id_bytes).unwrap(); - let document = all_obkv_to_rhaimap(obkv, &fields_ids_map)?; - let document_object = all_obkv_to_json(obkv, &fields_ids_map)?; - (document, document_object, document_id) - } - None => panic!("documents must exist"), - }; + let immutable_obkvs = ImmutableObkvs::new( + self.wtxn, + self.index.documents, + fields_ids_map.clone(), + documents.clone(), + )?; + + let processing = documents.into_iter().par_bridge().map(|docid| { + let rhai_document = immutable_obkvs.rhai_map(docid)?.unwrap(); + let json_document = immutable_obkvs.json_map(docid)?.unwrap(); + let document_id = &json_document[primary_key]; let mut scope = Scope::new(); scope.push_constant_dynamic("context", context.clone()); - scope.push("doc", document); + scope.push("doc", rhai_document); let _ = engine.eval_ast_with_scope::(&mut scope, &ast).unwrap(); - let new_document = match scope.remove::("doc") { + + match scope.remove::("doc") { // If the "doc" variable has been removed from the scope // or set to (), we effectively delete the document. Some(doc) if doc.is_unit() => { - documents_to_remove.push(docid); - continue; + return Ok(DocumentEdition::Deleted(docid)); } None => unreachable!(), Some(document) => match document.try_cast() { - Some(document) => rhaimap_to_object(document), + Some(document) => { + let new_document = rhaimap_to_object(document); + if json_document != new_document { + assert_eq!( + Some(document_id), + new_document.get(primary_key), + "you cannot change the document id when editing documents" + ); + return Ok(DocumentEdition::Edited(new_document)); + } + } None => panic!("Why is \"doc\" no longer a Map?"), }, - }; - - if document_object != new_document { - assert_eq!( - Some(&document_id), - new_document.get(primary_key), - "you cannot change the document id when editing documents" - ); - documents_batch_builder.append_json_object(&new_document)?; } - } + + Ok(DocumentEdition::Nothing) as Result<_> + }); + + std::thread::scope(|s| { + let (send, recv) = std::sync::mpsc::sync_channel(100); + s.spawn(move || processing.for_each(|el| drop(send.send(el)))); + + for result in recv { + if (self.should_abort)() { + return Err(Error::InternalError(InternalError::AbortedIndexation)); + } + + match result? { + DocumentEdition::Deleted(docid) => { + documents_to_remove.push(docid); + } + DocumentEdition::Edited(new_document) => { + documents_batch_builder.append_json_object(&new_document)?; + } + DocumentEdition::Nothing => (), + } + } + + Ok(()) + })?; + + drop(immutable_obkvs); let file = documents_batch_builder.into_inner()?; let reader = DocumentsBatchReader::from_reader(file)?; diff --git a/milli/src/update/index_documents/parallel.rs b/milli/src/update/index_documents/parallel.rs new file mode 100644 index 000000000..9769e8ab5 --- /dev/null +++ b/milli/src/update/index_documents/parallel.rs @@ -0,0 +1,86 @@ +use heed::types::Bytes; +use heed::{Database, RoTxn}; +use obkv::KvReaderU16; +use roaring::RoaringBitmap; + +use crate::{all_obkv_to_json, DocumentId, FieldsIdsMap, Object, ObkvCodec, Result, BEU32}; + +pub struct ImmutableObkvs<'t> { + ids: RoaringBitmap, + fields_ids_map: FieldsIdsMap, + slices: Vec<&'t [u8]>, +} + +impl<'t> ImmutableObkvs<'t> { + /// Creates the structure by fetching all the OBKVs + /// and keeping the transaction making the pointers valid. + pub fn new( + rtxn: &'t RoTxn, + documents_database: Database, + fields_ids_map: FieldsIdsMap, + subset: RoaringBitmap, + ) -> heed::Result { + let mut slices = Vec::new(); + let documents_database = documents_database.remap_data_type::(); + for docid in &subset { + let slice = documents_database.get(rtxn, &docid)?.unwrap(); + slices.push(slice); + } + + Ok(ImmutableObkvs { ids: subset, fields_ids_map, slices }) + } + + /// Returns the OBKVs identified by the given ID. + pub fn obkv(&self, docid: DocumentId) -> heed::Result>> { + match self + .ids + .rank(docid) + .checked_sub(1) + .and_then(|offset| self.slices.get(offset as usize)) + { + Some(bytes) => Ok(Some(KvReaderU16::new(bytes))), + None => Ok(None), + } + } + + /// Returns the owned rhai::Map identified by the given ID. + pub fn rhai_map(&self, docid: DocumentId) -> Result> { + let obkv = match self.obkv(docid) { + Ok(Some(obkv)) => obkv, + Ok(None) => return Ok(None), + Err(e) => return Err(e.into()), + }; + + let all_keys = obkv.iter().map(|(k, _v)| k).collect::>(); + let map: Result = all_keys + .iter() + .copied() + .flat_map(|id| obkv.get(id).map(|value| (id, value))) + .map(|(id, value)| { + let name = self.fields_ids_map.name(id).ok_or( + crate::error::FieldIdMapMissingEntry::FieldId { + field_id: id, + process: "allobkv_to_rhaimap", + }, + )?; + let value = serde_json::from_slice(value) + .map_err(crate::error::InternalError::SerdeJson)?; + Ok((name.into(), value)) + }) + .collect(); + + map.map(Some) + } + + pub fn json_map(&self, docid: DocumentId) -> Result> { + let obkv = match self.obkv(docid) { + Ok(Some(obkv)) => obkv, + Ok(None) => return Ok(None), + Err(e) => return Err(e.into()), + }; + + all_obkv_to_json(obkv, &self.fields_ids_map).map(Some) + } +} + +unsafe impl Sync for ImmutableObkvs<'_> {} From 81ec0abad12310f46bf4b3da2ef2d8dedf595a08 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Cl=C3=A9ment=20Renault?= Date: Sun, 12 May 2024 14:45:25 +0200 Subject: [PATCH 16/29] Use the new rayon-par-bridge library --- Cargo.lock | 10 ++++++++++ milli/Cargo.toml | 1 + milli/src/update/index_documents/mod.rs | 11 +++-------- 3 files changed, 14 insertions(+), 8 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 85a4c30ab..9247b9a80 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -3510,6 +3510,7 @@ dependencies = [ "rand", "rand_pcg", "rayon", + "rayon-par-bridge", "rhai", "roaring", "rstar", @@ -4289,6 +4290,15 @@ dependencies = [ "crossbeam-utils", ] +[[package]] +name = "rayon-par-bridge" +version = "0.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "cb6a14d8f65834aca6b0fe4cbbd7a27e639cd3efb1f2a32de9942368f1991de8" +dependencies = [ + "rayon", +] + [[package]] name = "reborrow" version = "0.5.5" diff --git a/milli/Cargo.toml b/milli/Cargo.toml index d0513706f..3c4ee1135 100644 --- a/milli/Cargo.toml +++ b/milli/Cargo.toml @@ -84,6 +84,7 @@ rand = "0.8.5" tracing = "0.1.40" ureq = { version = "2.10.0", features = ["json"] } url = "2.5.2" +rayon-par-bridge = "0.1.0" [dev-dependencies] mimalloc = { version = "0.1.43", default-features = false } diff --git a/milli/src/update/index_documents/mod.rs b/milli/src/update/index_documents/mod.rs index 3ed0d2db9..7994abff3 100644 --- a/milli/src/update/index_documents/mod.rs +++ b/milli/src/update/index_documents/mod.rs @@ -44,7 +44,7 @@ use crate::update::{ IndexerConfig, UpdateIndexingStep, WordPrefixDocids, WordPrefixIntegerDocids, WordsPrefixesFst, }; use crate::vector::EmbeddingConfigs; -use crate::{CboRoaringBitmapCodec, FieldsIdsMap, Index, Object, Result}; +use crate::{CboRoaringBitmapCodec, Index, Object, Result}; static MERGED_DATABASE_COUNT: usize = 7; static PREFIX_DATABASE_COUNT: usize = 4; @@ -262,11 +262,8 @@ where Ok(DocumentEdition::Nothing) as Result<_> }); - std::thread::scope(|s| { - let (send, recv) = std::sync::mpsc::sync_channel(100); - s.spawn(move || processing.for_each(|el| drop(send.send(el)))); - - for result in recv { + rayon_par_bridge::par_bridge(100, processing, |iterator| { + for result in iterator { if (self.should_abort)() { return Err(Error::InternalError(InternalError::AbortedIndexation)); } @@ -285,8 +282,6 @@ where Ok(()) })?; - drop(immutable_obkvs); - let file = documents_batch_builder.into_inner()?; let reader = DocumentsBatchReader::from_reader(file)?; From 862d49e4af7422144a7aebcc17e7c660b5f3bb58 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Cl=C3=A9ment=20Renault?= Date: Tue, 14 May 2024 21:54:35 +0200 Subject: [PATCH 17/29] Editing documents requires the documents.all action (add, get, and del) --- meilisearch/src/routes/indexes/documents.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/meilisearch/src/routes/indexes/documents.rs b/meilisearch/src/routes/indexes/documents.rs index 0a9ce9bfc..57b5ee33b 100644 --- a/meilisearch/src/routes/indexes/documents.rs +++ b/meilisearch/src/routes/indexes/documents.rs @@ -587,7 +587,7 @@ pub struct DocumentEditionByFunction { } pub async fn edit_documents_by_function( - index_scheduler: GuardedData, Data>, + index_scheduler: GuardedData, Data>, index_uid: web::Path, body: AwebJson, req: HttpRequest, From b7b8f564c35ec441401667ccbf34604f4432c094 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Cl=C3=A9ment=20Renault?= Date: Thu, 13 Jun 2024 20:13:36 +0200 Subject: [PATCH 18/29] delete-me: Simply support generating dump --- dump/src/lib.rs | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/dump/src/lib.rs b/dump/src/lib.rs index 4c511b28e..7a8e9f02c 100644 --- a/dump/src/lib.rs +++ b/dump/src/lib.rs @@ -166,7 +166,12 @@ impl From for KindDump { documents_count, allow_index_creation, }, - KindWithContent::DocumentEdition { .. } => todo!(), + KindWithContent::DocumentEdition { .. } => KindDump::DocumentImport { + primary_key: None, + method: IndexDocumentsMethod::UpdateDocuments, + documents_count: 0, + allow_index_creation: false, + }, KindWithContent::DocumentDeletion { documents_ids, .. } => { KindDump::DocumentDeletion { documents_ids } } From f35d6710f344af9cbf5c6580540420026ff2d15b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Cl=C3=A9ment=20Renault?= Date: Thu, 4 Jul 2024 15:14:50 +0200 Subject: [PATCH 19/29] Update rhai to v1.19.0 --- milli/Cargo.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/milli/Cargo.toml b/milli/Cargo.toml index 3c4ee1135..a71d013ff 100644 --- a/milli/Cargo.toml +++ b/milli/Cargo.toml @@ -78,8 +78,8 @@ hf-hub = { git = "https://github.com/dureuill/hf-hub.git", branch = "rust_tls", ] } tiktoken-rs = "0.5.9" liquid = "0.26.6" +rhai = { version = "1.19.0", features = ["serde", "no_module", "no_custom_syntax", "no_time", "sync"] } arroy = "0.4.0" -rhai = { version = "1.18.0", features = ["serde", "no_module", "no_custom_syntax", "no_time", "sync"] } rand = "0.8.5" tracing = "0.1.40" ureq = { version = "2.10.0", features = ["json"] } From bcd0c5f5a418b87a609b41fae55b26d63bd4d154 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Cl=C3=A9ment=20Renault?= Date: Thu, 4 Jul 2024 15:52:10 +0200 Subject: [PATCH 20/29] Support DocumentEdition in dumps --- dump/src/lib.rs | 14 ++++++++------ index-scheduler/src/lib.rs | 8 ++++++++ meilisearch-types/src/tasks.rs | 26 +++++++++++++------------- 3 files changed, 29 insertions(+), 19 deletions(-) diff --git a/dump/src/lib.rs b/dump/src/lib.rs index 7a8e9f02c..722633ec6 100644 --- a/dump/src/lib.rs +++ b/dump/src/lib.rs @@ -104,6 +104,11 @@ pub enum KindDump { DocumentDeletionByFilter { filter: serde_json::Value, }, + DocumentEdition { + filter: Option, + context: Option>, + function: String, + }, Settings { settings: Box>, is_deletion: bool, @@ -166,18 +171,15 @@ impl From for KindDump { documents_count, allow_index_creation, }, - KindWithContent::DocumentEdition { .. } => KindDump::DocumentImport { - primary_key: None, - method: IndexDocumentsMethod::UpdateDocuments, - documents_count: 0, - allow_index_creation: false, - }, KindWithContent::DocumentDeletion { documents_ids, .. } => { KindDump::DocumentDeletion { documents_ids } } KindWithContent::DocumentDeletionByFilter { filter_expr, .. } => { KindDump::DocumentDeletionByFilter { filter: filter_expr } } + KindWithContent::DocumentEdition { filter_expr, context, function, .. } => { + KindDump::DocumentEdition { filter: filter_expr, context, function } + } KindWithContent::DocumentClear { .. } => KindDump::DocumentClear, KindWithContent::SettingsUpdate { new_settings, diff --git a/index-scheduler/src/lib.rs b/index-scheduler/src/lib.rs index 253de0964..da57bfc9b 100644 --- a/index-scheduler/src/lib.rs +++ b/index-scheduler/src/lib.rs @@ -1603,6 +1603,14 @@ impl<'a> Dump<'a> { index_uid: task.index_uid.ok_or(Error::CorruptedDump)?, } } + KindDump::DocumentEdition { filter, context, function } => { + KindWithContent::DocumentEdition { + index_uid: task.index_uid.ok_or(Error::CorruptedDump)?, + filter_expr: filter, + context, + function, + } + } KindDump::DocumentClear => KindWithContent::DocumentClear { index_uid: task.index_uid.ok_or(Error::CorruptedDump)?, }, diff --git a/meilisearch-types/src/tasks.rs b/meilisearch-types/src/tasks.rs index a4aa67991..1dd6d3fbf 100644 --- a/meilisearch-types/src/tasks.rs +++ b/meilisearch-types/src/tasks.rs @@ -97,12 +97,6 @@ pub enum KindWithContent { documents_count: u64, allow_index_creation: bool, }, - DocumentEdition { - index_uid: String, - filter_expr: Option, - context: Option, - function: String, - }, DocumentDeletion { index_uid: String, documents_ids: Vec, @@ -111,6 +105,12 @@ pub enum KindWithContent { index_uid: String, filter_expr: serde_json::Value, }, + DocumentEdition { + index_uid: String, + filter_expr: Option, + context: Option, + function: String, + }, DocumentClear { index_uid: String, }, @@ -534,13 +534,6 @@ pub enum Details { received_documents: u64, indexed_documents: Option, }, - DocumentEdition { - deleted_documents: Option, - edited_documents: Option, - original_filter: Option, - context: Option, - function: String, - }, SettingsUpdate { settings: Box>, }, @@ -555,6 +548,13 @@ pub enum Details { original_filter: String, deleted_documents: Option, }, + DocumentEdition { + deleted_documents: Option, + edited_documents: Option, + original_filter: Option, + context: Option, + function: String, + }, ClearAll { deleted_documents: Option, }, From e7060239697c31e0cf835861bde587f2fda19ddf Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Cl=C3=A9ment=20Renault?= Date: Thu, 4 Jul 2024 16:11:56 +0200 Subject: [PATCH 21/29] Fix some analytics issues --- meilisearch/src/routes/indexes/documents.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/meilisearch/src/routes/indexes/documents.rs b/meilisearch/src/routes/indexes/documents.rs index 57b5ee33b..7403e45cd 100644 --- a/meilisearch/src/routes/indexes/documents.rs +++ b/meilisearch/src/routes/indexes/documents.rs @@ -631,7 +631,7 @@ pub async fn edit_documents_by_function( .await?? .into(); - debug!(returns = ?task, "Delete documents by filter"); + debug!(returns = ?task, "Edit documents by function"); Ok(HttpResponse::Accepted().json(task)) } From aace587dd1967e7b0481ca97519a6707fedd6aac Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Cl=C3=A9ment=20Renault?= Date: Thu, 4 Jul 2024 17:48:03 +0200 Subject: [PATCH 22/29] Create errors for the internal processing ones --- meilisearch-types/src/error.rs | 9 ++++- milli/src/error.rs | 9 +++++ milli/src/update/index_documents/mod.rs | 48 +++++++++++++++---------- 3 files changed, 46 insertions(+), 20 deletions(-) diff --git a/meilisearch-types/src/error.rs b/meilisearch-types/src/error.rs index f529238e4..0640c74b5 100644 --- a/meilisearch-types/src/error.rs +++ b/meilisearch-types/src/error.rs @@ -336,7 +336,8 @@ UnsupportedMediaType , InvalidRequest , UNSUPPORTED_MEDIA // Experimental features VectorEmbeddingError , InvalidRequest , BAD_REQUEST ; -NotFoundSimilarId , InvalidRequest , BAD_REQUEST +NotFoundSimilarId , InvalidRequest , BAD_REQUEST ; +EditDocumentsByFunctionError , InvalidRequest , BAD_REQUEST } impl ErrorCode for JoinError { @@ -407,6 +408,12 @@ impl ErrorCode for milli::Error { } UserError::InvalidEmbedder(_) => Code::InvalidEmbedder, UserError::VectorEmbeddingError(_) => Code::VectorEmbeddingError, + UserError::DocumentEditionCannotModifyPrimaryKey + | UserError::DocumentEditionDocumentMustBeObject + | UserError::DocumentEditionRuntimeError(_) + | UserError::DocumentEditionCompilationError(_) => { + Code::EditDocumentsByFunctionError + } } } } diff --git a/milli/src/error.rs b/milli/src/error.rs index 8e03fde4e..0effb7be7 100644 --- a/milli/src/error.rs +++ b/milli/src/error.rs @@ -5,6 +5,7 @@ use std::{io, str}; use heed::{Error as HeedError, MdbError}; use rayon::ThreadPoolBuildError; +use rhai::EvalAltResult; use serde_json::Value; use thiserror::Error; @@ -259,6 +260,14 @@ only composed of alphanumeric characters (a-z A-Z 0-9), hyphens (-) and undersco InvalidSettingsDimensions { embedder_name: String }, #[error("`.embedders.{embedder_name}.url`: could not parse `{url}`: {inner_error}")] InvalidUrl { embedder_name: String, inner_error: url::ParseError, url: String }, + #[error("Document editions cannot modify a document's primary key")] + DocumentEditionCannotModifyPrimaryKey, + #[error("Document editions must keep documents as objects")] + DocumentEditionDocumentMustBeObject, + #[error("Document edition runtime error encountered while running the function: {0}")] + DocumentEditionRuntimeError(Box), + #[error("Document edition runtime error encountered while compiling the function: {0}")] + DocumentEditionCompilationError(rhai::ParseError), } impl From for Error { diff --git a/milli/src/update/index_documents/mod.rs b/milli/src/update/index_documents/mod.rs index 7994abff3..d19b29852 100644 --- a/milli/src/update/index_documents/mod.rs +++ b/milli/src/update/index_documents/mod.rs @@ -183,7 +183,7 @@ where context: Option, code: &str, ) -> Result<(Self, StdResult<(u64, u64), UserError>)> { - // Early return when there is no document to add + // Early return when there is no document to edit if documents.is_empty() { return Ok((self, Ok((0, 0)))); } @@ -202,14 +202,16 @@ where // It is an arbitrary value. We need to let users define this in the settings. engine.set_max_operations(1_000_000); - let ast = engine.compile(code).unwrap(); + let ast = engine.compile(code).map_err(UserError::DocumentEditionCompilationError)?; let fields_ids_map = self.index.fields_ids_map(self.wtxn)?; let primary_key = self.index.primary_key(self.wtxn)?.unwrap(); let mut documents_batch_builder = tempfile::tempfile().map(DocumentsBatchBuilder::new)?; let mut documents_to_remove = RoaringBitmap::new(); let context: Dynamic = match context { - Some(context) => serde_json::from_value(context.into()).unwrap(), + Some(context) => { + serde_json::from_value(context.into()).map_err(InternalError::SerdeJson)? + } None => Dynamic::from(()), }; @@ -227,6 +229,8 @@ where )?; let processing = documents.into_iter().par_bridge().map(|docid| { + // safety: Both documents *must* exists in the database as + // their IDs comes from the list of documents ids. let rhai_document = immutable_obkvs.rhai_map(docid)?.unwrap(); let json_document = immutable_obkvs.json_map(docid)?.unwrap(); let document_id = &json_document[primary_key]; @@ -234,32 +238,38 @@ where let mut scope = Scope::new(); scope.push_constant_dynamic("context", context.clone()); scope.push("doc", rhai_document); - let _ = engine.eval_ast_with_scope::(&mut scope, &ast).unwrap(); + // That's were the magic happens. We run the user script + // which edits "doc" scope variable reprensenting the document + // and ignore the output and even the type of it, i.e., Dynamic. + let _ = engine + .eval_ast_with_scope::(&mut scope, &ast) + .map_err(UserError::DocumentEditionRuntimeError)?; match scope.remove::("doc") { - // If the "doc" variable has been removed from the scope - // or set to (), we effectively delete the document. - Some(doc) if doc.is_unit() => { - return Ok(DocumentEdition::Deleted(docid)); - } - None => unreachable!(), + // If the "doc" variable has set to (), we effectively delete the document. + Some(doc) if doc.is_unit() => Ok(DocumentEdition::Deleted(docid)), + None => unreachable!("missing doc variable from the Rhai scope"), Some(document) => match document.try_cast() { Some(document) => { let new_document = rhaimap_to_object(document); + // Note: This condition is not perfect. Sometimes it detect changes + // like with floating points numbers and consider updating + // the document even if nothing actually changed. if json_document != new_document { - assert_eq!( - Some(document_id), - new_document.get(primary_key), - "you cannot change the document id when editing documents" - ); - return Ok(DocumentEdition::Edited(new_document)); + if Some(document_id) != new_document.get(primary_key) { + Err(Error::UserError( + UserError::DocumentEditionCannotModifyPrimaryKey, + )) + } else { + Ok(DocumentEdition::Edited(new_document)) + } + } else { + Ok(DocumentEdition::Nothing) } } - None => panic!("Why is \"doc\" no longer a Map?"), + None => Err(Error::UserError(UserError::DocumentEditionDocumentMustBeObject)), }, } - - Ok(DocumentEdition::Nothing) as Result<_> }); rayon_par_bridge::par_bridge(100, processing, |iterator| { From 767553519d4a5b48a76788e69aad09e139f7fd2e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Cl=C3=A9ment=20Renault?= Date: Thu, 4 Jul 2024 17:55:47 +0200 Subject: [PATCH 23/29] Create errors for the HTTP route issues --- meilisearch-types/src/deserr/mod.rs | 1 + meilisearch-types/src/error.rs | 2 ++ meilisearch/src/routes/indexes/documents.rs | 17 +++++++++++------ 3 files changed, 14 insertions(+), 6 deletions(-) diff --git a/meilisearch-types/src/deserr/mod.rs b/meilisearch-types/src/deserr/mod.rs index 1c1b0e987..462b356ab 100644 --- a/meilisearch-types/src/deserr/mod.rs +++ b/meilisearch-types/src/deserr/mod.rs @@ -151,6 +151,7 @@ make_missing_field_convenience_builder!(MissingApiKeyExpiresAt, missing_api_key_ make_missing_field_convenience_builder!(MissingApiKeyIndexes, missing_api_key_indexes); make_missing_field_convenience_builder!(MissingSwapIndexes, missing_swap_indexes); make_missing_field_convenience_builder!(MissingDocumentFilter, missing_document_filter); +make_missing_field_convenience_builder!(MissingDocumentFilter, missing_document_edition_function); make_missing_field_convenience_builder!( MissingFacetSearchFacetName, missing_facet_search_facet_name diff --git a/meilisearch-types/src/error.rs b/meilisearch-types/src/error.rs index 0640c74b5..3e1316955 100644 --- a/meilisearch-types/src/error.rs +++ b/meilisearch-types/src/error.rs @@ -337,6 +337,8 @@ UnsupportedMediaType , InvalidRequest , UNSUPPORTED_MEDIA // Experimental features VectorEmbeddingError , InvalidRequest , BAD_REQUEST ; NotFoundSimilarId , InvalidRequest , BAD_REQUEST ; +InvalidDocumentEditionContext , InvalidRequest , BAD_REQUEST ; +InvalidDocumentEditionFunctionFilter , InvalidRequest , BAD_REQUEST ; EditDocumentsByFunctionError , InvalidRequest , BAD_REQUEST } diff --git a/meilisearch/src/routes/indexes/documents.rs b/meilisearch/src/routes/indexes/documents.rs index 7403e45cd..cf9158743 100644 --- a/meilisearch/src/routes/indexes/documents.rs +++ b/meilisearch/src/routes/indexes/documents.rs @@ -580,9 +580,9 @@ pub async fn delete_documents_by_filter( pub struct DocumentEditionByFunction { #[deserr(default, error = DeserrJsonError)] filter: Option, - #[deserr(default, error = DeserrJsonError)] + #[deserr(default, error = DeserrJsonError)] context: Option, - #[deserr(error = DeserrJsonError, missing_field_error = DeserrJsonError::missing_document_filter)] + #[deserr(error = DeserrJsonError, missing_field_error = DeserrJsonError::missing_document_edition_function)] function: String, } @@ -617,10 +617,15 @@ pub async fn edit_documents_by_function( let task = KindWithContent::DocumentEdition { index_uid, filter_expr: filter, - context: context.map(|v| match v { - serde_json::Value::Object(m) => m, - _ => panic!("The context must be an Object"), - }), + context: match context { + Some(Value::Object(m)) => Some(m), + _ => { + return Err(ResponseError::from_msg( + "The context must be an object".to_string(), + Code::InvalidDocumentEditionContext, + )) + } + }, function, }; From e97600eead680d576c0b247b59ef7cec10c440c5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Cl=C3=A9ment=20Renault?= Date: Mon, 8 Jul 2024 16:30:50 +0200 Subject: [PATCH 24/29] Improve the analytics for the document edition by function --- meilisearch/src/analytics/mock_analytics.rs | 9 +- meilisearch/src/analytics/mod.rs | 12 ++- .../src/analytics/segment_analytics.rs | 92 ++++++++++++++++++- meilisearch/src/routes/indexes/documents.rs | 21 +++-- 4 files changed, 122 insertions(+), 12 deletions(-) diff --git a/meilisearch/src/analytics/mock_analytics.rs b/meilisearch/src/analytics/mock_analytics.rs index 8f2fe0333..e212775a2 100644 --- a/meilisearch/src/analytics/mock_analytics.rs +++ b/meilisearch/src/analytics/mock_analytics.rs @@ -6,7 +6,7 @@ use meilisearch_types::InstanceUid; use serde_json::Value; use super::{find_user_id, Analytics, DocumentDeletionKind, DocumentFetchKind}; -use crate::routes::indexes::documents::UpdateDocumentsQuery; +use crate::routes::indexes::documents::{DocumentEditionByFunction, UpdateDocumentsQuery}; use crate::Opt; pub struct MockAnalytics { @@ -97,6 +97,13 @@ impl Analytics for MockAnalytics { _request: &HttpRequest, ) { } + fn update_documents_by_function( + &self, + _documents_query: &DocumentEditionByFunction, + _index_creation: bool, + _request: &HttpRequest, + ) { + } fn get_fetch_documents(&self, _documents_query: &DocumentFetchKind, _request: &HttpRequest) {} fn post_fetch_documents(&self, _documents_query: &DocumentFetchKind, _request: &HttpRequest) {} } diff --git a/meilisearch/src/analytics/mod.rs b/meilisearch/src/analytics/mod.rs index 6863dc57b..9140e3492 100644 --- a/meilisearch/src/analytics/mod.rs +++ b/meilisearch/src/analytics/mod.rs @@ -13,7 +13,7 @@ use once_cell::sync::Lazy; use platform_dirs::AppDirs; use serde_json::Value; -use crate::routes::indexes::documents::UpdateDocumentsQuery; +use crate::routes::indexes::documents::{DocumentEditionByFunction, UpdateDocumentsQuery}; // if the analytics feature is disabled // the `SegmentAnalytics` point to the mock instead of the real analytics @@ -119,11 +119,19 @@ pub trait Analytics: Sync + Send { // this method should be called to aggregate a add documents request fn delete_documents(&self, kind: DocumentDeletionKind, request: &HttpRequest); - // this method should be called to batch a update documents request + // this method should be called to batch an update documents request fn update_documents( &self, documents_query: &UpdateDocumentsQuery, index_creation: bool, request: &HttpRequest, ); + + // this method should be called to batch an update documents by function request + fn update_documents_by_function( + &self, + documents_query: &DocumentEditionByFunction, + index_creation: bool, + request: &HttpRequest, + ); } diff --git a/meilisearch/src/analytics/segment_analytics.rs b/meilisearch/src/analytics/segment_analytics.rs index 67f437082..405baa057 100644 --- a/meilisearch/src/analytics/segment_analytics.rs +++ b/meilisearch/src/analytics/segment_analytics.rs @@ -30,7 +30,7 @@ use crate::analytics::Analytics; use crate::option::{ default_http_addr, IndexerOpts, LogMode, MaxMemory, MaxThreads, ScheduleSnapshot, }; -use crate::routes::indexes::documents::UpdateDocumentsQuery; +use crate::routes::indexes::documents::{DocumentEditionByFunction, UpdateDocumentsQuery}; use crate::routes::indexes::facet_search::FacetSearchQuery; use crate::routes::{create_all_stats, Stats}; use crate::search::{ @@ -80,6 +80,7 @@ pub enum AnalyticsMsg { AggregateAddDocuments(DocumentsAggregator), AggregateDeleteDocuments(DocumentsDeletionAggregator), AggregateUpdateDocuments(DocumentsAggregator), + AggregateEditDocumentsByFunction(EditDocumentsByFunctionAggregator), AggregateGetFetchDocuments(DocumentsFetchAggregator), AggregatePostFetchDocuments(DocumentsFetchAggregator), } @@ -149,6 +150,7 @@ impl SegmentAnalytics { add_documents_aggregator: DocumentsAggregator::default(), delete_documents_aggregator: DocumentsDeletionAggregator::default(), update_documents_aggregator: DocumentsAggregator::default(), + edit_documents_by_function_aggregator: EditDocumentsByFunctionAggregator::default(), get_fetch_documents_aggregator: DocumentsFetchAggregator::default(), post_fetch_documents_aggregator: DocumentsFetchAggregator::default(), get_similar_aggregator: SimilarAggregator::default(), @@ -229,6 +231,17 @@ impl super::Analytics for SegmentAnalytics { let _ = self.sender.try_send(AnalyticsMsg::AggregateUpdateDocuments(aggregate)); } + fn update_documents_by_function( + &self, + documents_query: &DocumentEditionByFunction, + index_creation: bool, + request: &HttpRequest, + ) { + let aggregate = + EditDocumentsByFunctionAggregator::from_query(documents_query, index_creation, request); + let _ = self.sender.try_send(AnalyticsMsg::AggregateEditDocumentsByFunction(aggregate)); + } + fn get_fetch_documents(&self, documents_query: &DocumentFetchKind, request: &HttpRequest) { let aggregate = DocumentsFetchAggregator::from_query(documents_query, request); let _ = self.sender.try_send(AnalyticsMsg::AggregateGetFetchDocuments(aggregate)); @@ -389,6 +402,7 @@ pub struct Segment { add_documents_aggregator: DocumentsAggregator, delete_documents_aggregator: DocumentsDeletionAggregator, update_documents_aggregator: DocumentsAggregator, + edit_documents_by_function_aggregator: EditDocumentsByFunctionAggregator, get_fetch_documents_aggregator: DocumentsFetchAggregator, post_fetch_documents_aggregator: DocumentsFetchAggregator, get_similar_aggregator: SimilarAggregator, @@ -453,6 +467,7 @@ impl Segment { Some(AnalyticsMsg::AggregateAddDocuments(agreg)) => self.add_documents_aggregator.aggregate(agreg), Some(AnalyticsMsg::AggregateDeleteDocuments(agreg)) => self.delete_documents_aggregator.aggregate(agreg), Some(AnalyticsMsg::AggregateUpdateDocuments(agreg)) => self.update_documents_aggregator.aggregate(agreg), + Some(AnalyticsMsg::AggregateEditDocumentsByFunction(agreg)) => self.edit_documents_by_function_aggregator.aggregate(agreg), Some(AnalyticsMsg::AggregateGetFetchDocuments(agreg)) => self.get_fetch_documents_aggregator.aggregate(agreg), Some(AnalyticsMsg::AggregatePostFetchDocuments(agreg)) => self.post_fetch_documents_aggregator.aggregate(agreg), Some(AnalyticsMsg::AggregateGetSimilar(agreg)) => self.get_similar_aggregator.aggregate(agreg), @@ -508,6 +523,7 @@ impl Segment { add_documents_aggregator, delete_documents_aggregator, update_documents_aggregator, + edit_documents_by_function_aggregator, get_fetch_documents_aggregator, post_fetch_documents_aggregator, get_similar_aggregator, @@ -549,6 +565,11 @@ impl Segment { { let _ = self.batcher.push(update_documents).await; } + if let Some(edit_documents_by_function) = take(edit_documents_by_function_aggregator) + .into_event(user, "Documents Edited By Function") + { + let _ = self.batcher.push(edit_documents_by_function).await; + } if let Some(get_fetch_documents) = take(get_fetch_documents_aggregator).into_event(user, "Documents Fetched GET") { @@ -1465,6 +1486,75 @@ impl DocumentsAggregator { } } +#[derive(Default)] +pub struct EditDocumentsByFunctionAggregator { + timestamp: Option, + + // Set to true if at least one request was filtered + filtered: bool, + // Set to true if at least one request contained a context + with_context: bool, + + // context + user_agents: HashSet, + + index_creation: bool, +} + +impl EditDocumentsByFunctionAggregator { + pub fn from_query( + documents_query: &DocumentEditionByFunction, + index_creation: bool, + request: &HttpRequest, + ) -> Self { + let DocumentEditionByFunction { filter, context, function: _ } = documents_query; + + Self { + timestamp: Some(OffsetDateTime::now_utc()), + user_agents: extract_user_agents(request).into_iter().collect(), + filtered: filter.is_some(), + with_context: context.is_some(), + index_creation, + } + } + + /// Aggregate one [DocumentsAggregator] into another. + pub fn aggregate(&mut self, other: Self) { + let Self { timestamp, user_agents, index_creation, filtered, with_context } = other; + + if self.timestamp.is_none() { + self.timestamp = timestamp; + } + + // we can't create a union because there is no `into_union` method + for user_agent in user_agents { + self.user_agents.insert(user_agent); + } + self.index_creation |= index_creation; + self.filtered |= filtered; + self.with_context |= with_context; + } + + pub fn into_event(self, user: &User, event_name: &str) -> Option { + let Self { timestamp, user_agents, index_creation, filtered, with_context } = self; + + let properties = json!({ + "user-agent": user_agents, + "filtered": filtered, + "with_context": with_context, + "index_creation": index_creation, + }); + + Some(Track { + timestamp, + user: user.clone(), + event: event_name.to_string(), + properties, + ..Default::default() + }) + } +} + #[derive(Default, Serialize)] pub struct DocumentsDeletionAggregator { #[serde(skip)] diff --git a/meilisearch/src/routes/indexes/documents.rs b/meilisearch/src/routes/indexes/documents.rs index cf9158743..3b1dcba22 100644 --- a/meilisearch/src/routes/indexes/documents.rs +++ b/meilisearch/src/routes/indexes/documents.rs @@ -579,28 +579,33 @@ pub async fn delete_documents_by_filter( #[deserr(error = DeserrJsonError, rename_all = camelCase, deny_unknown_fields)] pub struct DocumentEditionByFunction { #[deserr(default, error = DeserrJsonError)] - filter: Option, + pub filter: Option, #[deserr(default, error = DeserrJsonError)] - context: Option, + pub context: Option, #[deserr(error = DeserrJsonError, missing_field_error = DeserrJsonError::missing_document_edition_function)] - function: String, + pub function: String, } pub async fn edit_documents_by_function( index_scheduler: GuardedData, Data>, index_uid: web::Path, - body: AwebJson, + params: AwebJson, req: HttpRequest, opt: web::Data, - _analytics: web::Data, + analytics: web::Data, ) -> Result { - debug!(parameters = ?body, "Edit documents by function"); + debug!(parameters = ?params, "Edit documents by function"); let index_uid = IndexUid::try_from(index_uid.into_inner())?; let index_uid = index_uid.into_inner(); - let DocumentEditionByFunction { filter, context, function } = body.into_inner(); + let params = params.into_inner(); - // analytics.delete_documents(DocumentDeletionKind::PerFilter, &req); + analytics.update_documents_by_function( + ¶ms, + index_scheduler.index(&index_uid).is_err(), + &req, + ); + let DocumentEditionByFunction { filter, context, function } = params; let engine = milli::rhai::Engine::new(); if let Err(e) = engine.compile(&function) { return Err(ResponseError::from_msg(e.to_string(), Code::BadRequest)); From 01144b2c742d46370ef09c92be5334d44b78aec2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Cl=C3=A9ment=20Renault?= Date: Mon, 8 Jul 2024 16:46:53 +0200 Subject: [PATCH 25/29] Make the edit documents by function route experimental --- index-scheduler/src/features.rs | 13 +++++++++++++ meilisearch-types/src/features.rs | 1 + meilisearch/src/routes/features.rs | 15 +++++++++++++-- meilisearch/src/routes/indexes/documents.rs | 5 +++++ 4 files changed, 32 insertions(+), 2 deletions(-) diff --git a/index-scheduler/src/features.rs b/index-scheduler/src/features.rs index ae8e6728a..fbb273e54 100644 --- a/index-scheduler/src/features.rs +++ b/index-scheduler/src/features.rs @@ -68,6 +68,19 @@ impl RoFeatures { .into()) } } + + pub fn check_edit_documents_by_function(&self, disabled_action: &'static str) -> Result<()> { + if self.runtime.edit_documents_by_function { + Ok(()) + } else { + Err(FeatureNotEnabledError { + disabled_action, + feature: "edit documents by function", + issue_link: "https://github.com/orgs/meilisearch/discussions/762", + } + .into()) + } + } } impl FeatureData { diff --git a/meilisearch-types/src/features.rs b/meilisearch-types/src/features.rs index dda9dee51..f15a1c999 100644 --- a/meilisearch-types/src/features.rs +++ b/meilisearch-types/src/features.rs @@ -6,6 +6,7 @@ pub struct RuntimeTogglableFeatures { pub vector_store: bool, pub metrics: bool, pub logs_route: bool, + pub edit_documents_by_function: bool, } #[derive(Default, Debug, Clone, Copy)] diff --git a/meilisearch/src/routes/features.rs b/meilisearch/src/routes/features.rs index 0e02309fa..14aece10f 100644 --- a/meilisearch/src/routes/features.rs +++ b/meilisearch/src/routes/features.rs @@ -47,6 +47,8 @@ pub struct RuntimeTogglableFeatures { pub metrics: Option, #[deserr(default)] pub logs_route: Option, + #[deserr(default)] + pub edit_documents_by_function: Option, } async fn patch_features( @@ -66,13 +68,21 @@ async fn patch_features( vector_store: new_features.0.vector_store.unwrap_or(old_features.vector_store), metrics: new_features.0.metrics.unwrap_or(old_features.metrics), logs_route: new_features.0.logs_route.unwrap_or(old_features.logs_route), + edit_documents_by_function: new_features + .0 + .edit_documents_by_function + .unwrap_or(old_features.edit_documents_by_function), }; // explicitly destructure for analytics rather than using the `Serialize` implementation, because // the it renames to camelCase, which we don't want for analytics. // **Do not** ignore fields with `..` or `_` here, because we want to add them in the future. - let meilisearch_types::features::RuntimeTogglableFeatures { vector_store, metrics, logs_route } = - new_features; + let meilisearch_types::features::RuntimeTogglableFeatures { + vector_store, + metrics, + logs_route, + edit_documents_by_function, + } = new_features; analytics.publish( "Experimental features Updated".to_string(), @@ -80,6 +90,7 @@ async fn patch_features( "vector_store": vector_store, "metrics": metrics, "logs_route": logs_route, + "edit_documents_by_function": edit_documents_by_function, }), Some(&req), ); diff --git a/meilisearch/src/routes/indexes/documents.rs b/meilisearch/src/routes/indexes/documents.rs index 3b1dcba22..9faf8bc67 100644 --- a/meilisearch/src/routes/indexes/documents.rs +++ b/meilisearch/src/routes/indexes/documents.rs @@ -595,6 +595,11 @@ pub async fn edit_documents_by_function( analytics: web::Data, ) -> Result { debug!(parameters = ?params, "Edit documents by function"); + + index_scheduler + .features() + .check_edit_documents_by_function("Using the documents edit route")?; + let index_uid = IndexUid::try_from(index_uid.into_inner())?; let index_uid = index_uid.into_inner(); let params = params.into_inner(); From 94809090a37fb73a2febd697c9808bca16afa3b0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Cl=C3=A9ment=20Renault?= Date: Tue, 9 Jul 2024 11:11:24 +0200 Subject: [PATCH 26/29] Support not specifying a context --- meilisearch/src/routes/indexes/documents.rs | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/meilisearch/src/routes/indexes/documents.rs b/meilisearch/src/routes/indexes/documents.rs index 9faf8bc67..412ac8e47 100644 --- a/meilisearch/src/routes/indexes/documents.rs +++ b/meilisearch/src/routes/indexes/documents.rs @@ -24,7 +24,7 @@ use meilisearch_types::{milli, Document, Index}; use mime::Mime; use once_cell::sync::Lazy; use serde::Deserialize; -use serde_json::Value; +use serde_json::{Map, Value}; use tempfile::tempfile; use tokio::fs::File; use tokio::io::{AsyncSeekExt, AsyncWriteExt, BufWriter}; @@ -629,6 +629,7 @@ pub async fn edit_documents_by_function( filter_expr: filter, context: match context { Some(Value::Object(m)) => Some(m), + None => Some(Map::default()), _ => { return Err(ResponseError::from_msg( "The context must be an object".to_string(), From 487997f6ad94549e87e1f1cc6573dab1ed73b68d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Cl=C3=A9ment=20Renault?= Date: Tue, 9 Jul 2024 11:15:57 +0200 Subject: [PATCH 27/29] Support the new `editDocumentsByFunction` experimental feature --- meilisearch/tests/documents/get_documents.rs | 3 ++- meilisearch/tests/dumps/mod.rs | 9 ++++++--- meilisearch/tests/features/mod.rs | 20 +++++++++++++------- meilisearch/tests/search/hybrid.rs | 6 ++++-- meilisearch/tests/settings/get_settings.rs | 3 ++- meilisearch/tests/similar/mod.rs | 12 ++++++++---- meilisearch/tests/vector/mod.rs | 9 ++++++--- meilisearch/tests/vector/settings.rs | 3 ++- 8 files changed, 43 insertions(+), 22 deletions(-) diff --git a/meilisearch/tests/documents/get_documents.rs b/meilisearch/tests/documents/get_documents.rs index 68065b019..f32adf48d 100644 --- a/meilisearch/tests/documents/get_documents.rs +++ b/meilisearch/tests/documents/get_documents.rs @@ -535,7 +535,8 @@ async fn get_document_with_vectors() { { "vectorStore": true, "metrics": false, - "logsRoute": false + "logsRoute": false, + "editDocumentsByFunction": false } "###); diff --git a/meilisearch/tests/dumps/mod.rs b/meilisearch/tests/dumps/mod.rs index fa402cb41..8c53e661b 100644 --- a/meilisearch/tests/dumps/mod.rs +++ b/meilisearch/tests/dumps/mod.rs @@ -1859,7 +1859,8 @@ async fn import_dump_v6_containing_experimental_features() { { "vectorStore": false, "metrics": false, - "logsRoute": false + "logsRoute": false, + "editDocumentsByFunction": false } "###); @@ -1952,7 +1953,8 @@ async fn generate_and_import_dump_containing_vectors() { { "vectorStore": true, "metrics": false, - "logsRoute": false + "logsRoute": false, + "editDocumentsByFunction": false } "###); let index = server.index("pets"); @@ -2022,7 +2024,8 @@ async fn generate_and_import_dump_containing_vectors() { { "vectorStore": true, "metrics": false, - "logsRoute": false + "logsRoute": false, + "editDocumentsByFunction": false } "###); diff --git a/meilisearch/tests/features/mod.rs b/meilisearch/tests/features/mod.rs index 9548567ff..b90e455c5 100644 --- a/meilisearch/tests/features/mod.rs +++ b/meilisearch/tests/features/mod.rs @@ -20,7 +20,8 @@ async fn experimental_features() { { "vectorStore": false, "metrics": false, - "logsRoute": false + "logsRoute": false, + "editDocumentsByFunction": false } "###); @@ -31,7 +32,8 @@ async fn experimental_features() { { "vectorStore": true, "metrics": false, - "logsRoute": false + "logsRoute": false, + "editDocumentsByFunction": false } "###); @@ -42,7 +44,8 @@ async fn experimental_features() { { "vectorStore": true, "metrics": false, - "logsRoute": false + "logsRoute": false, + "editDocumentsByFunction": false } "###); @@ -54,7 +57,8 @@ async fn experimental_features() { { "vectorStore": true, "metrics": false, - "logsRoute": false + "logsRoute": false, + "editDocumentsByFunction": false } "###); @@ -66,7 +70,8 @@ async fn experimental_features() { { "vectorStore": true, "metrics": false, - "logsRoute": false + "logsRoute": false, + "editDocumentsByFunction": false } "###); } @@ -85,7 +90,8 @@ async fn experimental_feature_metrics() { { "vectorStore": false, "metrics": true, - "logsRoute": false + "logsRoute": false, + "editDocumentsByFunction": false } "###); @@ -140,7 +146,7 @@ async fn errors() { meili_snap::snapshot!(code, @"400 Bad Request"); meili_snap::snapshot!(meili_snap::json_string!(response), @r###" { - "message": "Unknown field `NotAFeature`: expected one of `vectorStore`, `metrics`, `logsRoute`", + "message": "Unknown field `NotAFeature`: expected one of `vectorStore`, `metrics`, `logsRoute`, `editDocumentsByFunction`", "code": "bad_request", "type": "invalid_request", "link": "https://docs.meilisearch.com/errors#bad_request" diff --git a/meilisearch/tests/search/hybrid.rs b/meilisearch/tests/search/hybrid.rs index 02768bf60..1a4e8baab 100644 --- a/meilisearch/tests/search/hybrid.rs +++ b/meilisearch/tests/search/hybrid.rs @@ -18,7 +18,8 @@ async fn index_with_documents_user_provided<'a>( { "vectorStore": true, "metrics": false, - "logsRoute": false + "logsRoute": false, + "editDocumentsByFunction": false } "###); @@ -46,7 +47,8 @@ async fn index_with_documents_hf<'a>(server: &'a Server, documents: &Value) -> I { "vectorStore": true, "metrics": false, - "logsRoute": false + "logsRoute": false, + "editDocumentsByFunction": false } "###); diff --git a/meilisearch/tests/settings/get_settings.rs b/meilisearch/tests/settings/get_settings.rs index 379e0a917..d1fe71140 100644 --- a/meilisearch/tests/settings/get_settings.rs +++ b/meilisearch/tests/settings/get_settings.rs @@ -98,7 +98,8 @@ async fn secrets_are_hidden_in_settings() { { "vectorStore": true, "metrics": false, - "logsRoute": false + "logsRoute": false, + "editDocumentsByFunction": false } "###); diff --git a/meilisearch/tests/similar/mod.rs b/meilisearch/tests/similar/mod.rs index 60a0203ed..edfecf83c 100644 --- a/meilisearch/tests/similar/mod.rs +++ b/meilisearch/tests/similar/mod.rs @@ -55,7 +55,8 @@ async fn basic() { { "vectorStore": true, "metrics": false, - "logsRoute": false + "logsRoute": false, + "editDocumentsByFunction": false } "###); @@ -244,7 +245,8 @@ async fn ranking_score_threshold() { { "vectorStore": true, "metrics": false, - "logsRoute": false + "logsRoute": false, + "editDocumentsByFunction": false } "###); @@ -523,7 +525,8 @@ async fn filter() { { "vectorStore": true, "metrics": false, - "logsRoute": false + "logsRoute": false, + "editDocumentsByFunction": false } "###); @@ -650,7 +653,8 @@ async fn limit_and_offset() { { "vectorStore": true, "metrics": false, - "logsRoute": false + "logsRoute": false, + "editDocumentsByFunction": false } "###); diff --git a/meilisearch/tests/vector/mod.rs b/meilisearch/tests/vector/mod.rs index 0343ab785..21b643c20 100644 --- a/meilisearch/tests/vector/mod.rs +++ b/meilisearch/tests/vector/mod.rs @@ -16,7 +16,8 @@ async fn add_remove_user_provided() { { "vectorStore": true, "metrics": false, - "logsRoute": false + "logsRoute": false, + "editDocumentsByFunction": false } "###); @@ -159,7 +160,8 @@ async fn generate_default_user_provided_documents(server: &Server) -> Index { { "vectorStore": true, "metrics": false, - "logsRoute": false + "logsRoute": false, + "editDocumentsByFunction": false } "###); @@ -516,7 +518,8 @@ async fn add_remove_one_vector_4588() { { "vectorStore": true, "metrics": false, - "logsRoute": false + "logsRoute": false, + "editDocumentsByFunction": false } "###); diff --git a/meilisearch/tests/vector/settings.rs b/meilisearch/tests/vector/settings.rs index e53ceb383..177e070cd 100644 --- a/meilisearch/tests/vector/settings.rs +++ b/meilisearch/tests/vector/settings.rs @@ -14,7 +14,8 @@ async fn update_embedder() { { "vectorStore": true, "metrics": false, - "logsRoute": false + "logsRoute": false, + "editDocumentsByFunction": false } "###); From 837274f8533c4c2017a02515d254b5e9cc69eec1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Cl=C3=A9ment=20Renault?= Date: Tue, 9 Jul 2024 15:50:37 +0200 Subject: [PATCH 28/29] Restrict even more the Rhai engine --- Cargo.lock | 1464 ++++++++++++++--------- milli/src/update/index_documents/mod.rs | 8 + 2 files changed, 877 insertions(+), 595 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 9247b9a80..087b7f87f 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -45,7 +45,7 @@ dependencies = [ "actix-service", "actix-tls", "actix-utils", - "ahash", + "ahash 0.8.11", "base64 0.22.1", "bitflags 2.6.0", "brotli", @@ -99,9 +99,9 @@ dependencies = [ [[package]] name = "actix-rt" -version = "2.9.0" +version = "2.10.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "28f32d40287d3f402ae0028a9d54bef51af15c8769492826a69d28f81893151d" +checksum = "24eda4e2a6e042aa4e55ac438a2ae052d3b5da0ecf83d7411e1a368946925208" dependencies = [ "actix-macros", "futures-core", @@ -150,7 +150,7 @@ dependencies = [ "impl-more", "pin-project-lite", "tokio", - "tokio-rustls", + "tokio-rustls 0.24.1", "tokio-util", "tracing", "webpki-roots 0.25.3", @@ -182,7 +182,7 @@ dependencies = [ "actix-tls", "actix-utils", "actix-web-codegen", - "ahash", + "ahash 0.8.11", "bytes", "bytestring", "cfg-if", @@ -219,18 +219,6 @@ dependencies = [ "syn 2.0.60", ] -[[package]] -name = "actix-web-static-files" -version = "4.0.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "adf6d1ef6d7a60e084f9e0595e2a5234abda14e76c105ecf8e2d0e8800c41a1f" -dependencies = [ - "actix-web", - "derive_more", - "futures-util", - "static-files", -] - [[package]] name = "addr2line" version = "0.20.0" @@ -257,6 +245,17 @@ dependencies = [ "cpufeatures", ] +[[package]] +name = "ahash" +version = "0.7.8" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "891477e0c6a8957309ee5c45a6368af3ae14bb510732d2684ffa19af310920f9" +dependencies = [ + "getrandom", + "once_cell", + "version_check", +] + [[package]] name = "ahash" version = "0.8.11" @@ -273,9 +272,9 @@ dependencies = [ [[package]] name = "aho-corasick" -version = "1.1.2" +version = "1.1.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b2969dcb958b36655471fc61f7e416fa76033bdd4bfed0678d8fee1e2d07a1f0" +checksum = "8e60d3430d3a69478ad0993f19238d2df97c507009a52b3c10addcd7f6bcb916" dependencies = [ "memchr", ] @@ -357,9 +356,9 @@ dependencies = [ [[package]] name = "anyhow" -version = "1.0.82" +version = "1.0.86" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f538837af36e6f6a9be0faa67f9a314f8119e4e4b5867c6ab40ed60360142519" +checksum = "b3d1d046238990b9cf5bcde22a3fb3584ee5cf65fb2765f454ed428c7a0063da" dependencies = [ "backtrace", ] @@ -379,6 +378,12 @@ dependencies = [ "derive_arbitrary", ] +[[package]] +name = "arrayvec" +version = "0.7.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "96d30a06541fbafbc7f82ed10c06164cfbd2c401138f6addd8404629c4b16711" + [[package]] name = "arroy" version = "0.4.0" @@ -389,7 +394,7 @@ dependencies = [ "byteorder", "heed", "log", - "memmap2 0.9.4", + "memmap2", "ordered-float", "rand", "rayon", @@ -398,64 +403,17 @@ dependencies = [ "thiserror", ] -[[package]] -name = "assert-json-diff" -version = "2.0.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "47e4f2b81832e72834d7518d8487a0396a28cc408186a2e8854c0f98011faf12" -dependencies = [ - "serde", - "serde_json", -] - -[[package]] -name = "async-stream" -version = "0.3.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cd56dd203fef61ac097dd65721a419ddccb106b2d2b70ba60a6b529f03961a51" -dependencies = [ - "async-stream-impl", - "futures-core", - "pin-project-lite", -] - -[[package]] -name = "async-stream-impl" -version = "0.3.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "16e62a023e7c117e27523144c5d2459f4397fcc3cab0085af8e2224f643a0193" -dependencies = [ - "proc-macro2", - "quote", - "syn 2.0.60", -] - [[package]] name = "async-trait" -version = "0.1.77" +version = "0.1.81" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c980ee35e870bd1a4d2c8294d4c04d0499e67bca1e4b5cefcc693c2fa00caea9" +checksum = "6e0c28dcc82d7c8ead5cb13beb15405b57b8546e93215673ff8ca0349a028107" dependencies = [ "proc-macro2", "quote", "syn 2.0.60", ] -[[package]] -name = "atomic" -version = "0.5.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c59bdb34bc650a32731b31bd8f0829cc15d24a708ee31559e0bb34f2bc320cba" - -[[package]] -name = "atomic-polyfill" -version = "0.1.11" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e3ff7eb3f316534d83a8a2c3d1674ace8a5a71198eba31e2e2b597833f699b28" -dependencies = [ - "critical-section", -] - [[package]] name = "autocfg" version = "1.2.0" @@ -495,12 +453,6 @@ version = "0.22.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "72b3254f16251a8381aa12e40e3c4d2f0199f8c6508fbecb9d91f575e0fbb8c6" -[[package]] -name = "base64ct" -version = "1.6.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8c3c1a368f70d6cf7302d78f8f7093da241fb8e8807c05cc9e51a125895a6d5b" - [[package]] name = "benchmarks" version = "1.9.0" @@ -546,16 +498,16 @@ dependencies = [ [[package]] name = "bindgen" -version = "0.68.1" +version = "0.69.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "726e4313eb6ec35d2730258ad4e15b547ee75d6afaa1361a922e78e59b7d8078" +checksum = "a00dc851838a2120612785d195287475a3ac45514741da670b735818822129a0" dependencies = [ "bitflags 2.6.0", "cexpr", "clang-sys", + "itertools 0.12.1", "lazy_static", "lazycell", - "peeking_take_while", "proc-macro2", "quote", "regex", @@ -605,6 +557,18 @@ dependencies = [ "serde", ] +[[package]] +name = "bitvec" +version = "1.0.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1bc2832c24239b0141d5674bb9174f9d68a8b5b3f2753311927c172ca46f7e9c" +dependencies = [ + "funty", + "radium", + "tap", + "wyz", +] + [[package]] name = "block-buffer" version = "0.10.4" @@ -614,6 +578,30 @@ dependencies = [ "generic-array", ] +[[package]] +name = "borsh" +version = "1.5.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a6362ed55def622cddc70a4746a68554d7b687713770de539e59a739b249f8ed" +dependencies = [ + "borsh-derive", + "cfg_aliases", +] + +[[package]] +name = "borsh-derive" +version = "1.5.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c3ef8005764f53cd4dca619f5bf64cafd4664dada50ece25e4d81de54c80cc0b" +dependencies = [ + "once_cell", + "proc-macro-crate", + "proc-macro2", + "quote", + "syn 2.0.60", + "syn_derive", +] + [[package]] name = "brotli" version = "6.0.0" @@ -637,9 +625,9 @@ dependencies = [ [[package]] name = "bstr" -version = "1.9.0" +version = "1.9.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c48f0051a4b4c5e0b6d365cd04af53aeaa209e3cc15ec2cdb69e73cc87fbd0dc" +checksum = "05efc5cfd9110c8416e471df0e96702d58690178e206e61b7173706673c93706" dependencies = [ "memchr", "regex-automata", @@ -657,20 +645,43 @@ dependencies = [ [[package]] name = "bumpalo" -version = "3.15.4" +version = "3.16.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7ff69b9dd49fd426c69a0db9fc04dd934cdb6645ff000864d98f7e2af8830eaa" +checksum = "79296716171880943b8470b5f8d03aa55eb2e645a4874bdbb28adb49162e012c" [[package]] name = "byte-unit" -version = "4.0.19" +version = "5.1.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "da78b32057b8fdfc352504708feeba7216dcd65a2c9ab02978cbd288d1279b6c" +checksum = "33ac19bdf0b2665407c39d82dbc937e951e7e2001609f0fb32edd0af45a2d63e" dependencies = [ + "rust_decimal", "serde", "utf8-width", ] +[[package]] +name = "bytecheck" +version = "0.6.12" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "23cdc57ce23ac53c931e88a43d06d070a6fd142f2617be5855eb75efc9beb1c2" +dependencies = [ + "bytecheck_derive", + "ptr_meta", + "simdutf8", +] + +[[package]] +name = "bytecheck_derive" +version = "0.6.12" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3db406d29fbcd95542e92559bed4d8ad92636d1ca8b3b72ede10b4bcc010e659" +dependencies = [ + "proc-macro2", + "quote", + "syn 1.0.109", +] + [[package]] name = "bytecount" version = "0.6.3" @@ -705,9 +716,9 @@ checksum = "1fd0f2584146f6f2ef48085050886acf353beff7305ebd1ae69500e27c67f64b" [[package]] name = "bytes" -version = "1.5.0" +version = "1.6.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a2bd12c1caf447e69cd4528f47f94d203fd2582878ecb9e9465484c4148a8223" +checksum = "514de17de45fdb8dc022b1a7975556c53c86f9f0aa5f534b98977b171857c2c9" [[package]] name = "bytestring" @@ -750,16 +761,16 @@ dependencies = [ [[package]] name = "candle-core" -version = "0.4.1" +version = "0.6.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6f1b20174c1707e20f4cb364a355b449803c03e9b0c9193324623cf9787a4e00" +checksum = "d5b18de020c2729dbf7ac390325312644808b6ba9b7962f1f724e9185b1d53c7" dependencies = [ "byteorder", "candle-kernels", "cudarc", "gemm", "half 2.4.0", - "memmap2 0.9.4", + "memmap2", "num-traits", "num_cpus", "rand", @@ -768,23 +779,23 @@ dependencies = [ "safetensors", "thiserror", "yoke", - "zip", + "zip 1.1.4", ] [[package]] name = "candle-kernels" -version = "0.4.1" +version = "0.6.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5845911a44164ebb73b56a0e23793ba1b583bad102af7400fe4768babc5815b2" +checksum = "8bc0a71be8b2f0950b63fd602a5e10a74a4f94a5fd63059ae455e96163389488" dependencies = [ "bindgen_cuda", ] [[package]] name = "candle-nn" -version = "0.4.1" +version = "0.6.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "66a27533c8edfc915a6459f9850641ef523a829fa1a181c670766c1f752d873a" +checksum = "b006b30f66a0d94fc9cef0ac4de6ce510565f35ae2c6c35ce5d4aacfb0fc8eeb" dependencies = [ "candle-core", "half 2.4.0", @@ -797,13 +808,14 @@ dependencies = [ [[package]] name = "candle-transformers" -version = "0.4.1" +version = "0.6.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b5847699f0643da05e57fc473672566e93dc36d82c1b7eeb970c6154d3434fe1" +checksum = "4f0d4eb6a0d9279d5829b06b2bf3caa117904eefd6dcf879d16e687c4a84034c" dependencies = [ "byteorder", "candle-core", "candle-nn", + "fancy-regex 0.13.0", "num-traits", "rand", "rayon", @@ -838,9 +850,9 @@ dependencies = [ [[package]] name = "cargo_toml" -version = "0.18.0" +version = "0.20.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "802b755090e39835a4b0440fb0bbee0df7495a8b337f63db21e616f7821c7e8c" +checksum = "4895c018bb228aa6b3ba1a0285543fcb4b704734c3fb1f72afaa75aa769500c1" dependencies = [ "serde", "toml", @@ -887,6 +899,12 @@ version = "1.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "baf1de4339761588bc0619e3cbc0120ee582ebb74b53b4efbf79117bd2da40fd" +[[package]] +name = "cfg_aliases" +version = "0.2.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "613afe47fcd5fac7ccf1db93babcb082c5994d996f20b8b159f2ad1658eb5724" + [[package]] name = "change-detection" version = "1.2.0" @@ -899,9 +917,9 @@ dependencies = [ [[package]] name = "charabia" -version = "0.8.11" +version = "0.8.12" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "11a09ae38cfcc153f01576c3f579dfd916e0320f1b474f298c8d680b2dd92eb6" +checksum = "9868a22f10dee80498a8a2b6c641d80bf28ea4495fcf71c2dc4836c2dd23958c" dependencies = [ "aho-corasick", "cow-utils", @@ -973,9 +991,9 @@ dependencies = [ [[package]] name = "clap" -version = "4.4.17" +version = "4.5.9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "80932e03c33999b9235edb8655bc9df3204adc9887c2f95b50cb1deb9fd54253" +checksum = "64acc1846d54c1fe936a78dc189c34e28d3f5afc348403f28ecf53660b9b8462" dependencies = [ "clap_builder", "clap_derive", @@ -983,23 +1001,23 @@ dependencies = [ [[package]] name = "clap_builder" -version = "4.4.17" +version = "4.5.9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d6c0db58c659eef1c73e444d298c27322a1b52f6927d2ad470c0c0f96fa7b8fa" +checksum = "6fb8393d67ba2e7bfaf28a23458e4e2b543cc73a99595511eb207fdb8aede942" dependencies = [ "anstream", "anstyle", "clap_lex", - "strsim 0.10.0", + "strsim 0.11.1", ] [[package]] name = "clap_derive" -version = "4.4.7" +version = "4.5.8" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cf9804afaaf59a91e75b022a30fb7229a7901f60c755489cc61c9b423b836442" +checksum = "2bac35c6dafb060fd4d275d9a4ffae97917c13a6327903a8be2153cd964f7085" dependencies = [ - "heck", + "heck 0.5.0", "proc-macro2", "quote", "syn 2.0.60", @@ -1007,9 +1025,9 @@ dependencies = [ [[package]] name = "clap_lex" -version = "0.6.0" +version = "0.7.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "702fc72eb24e5a1e48ce58027a675bc24edd52096d5397d4aea7c6dd9eca0bd1" +checksum = "4b82cf0babdbd58558212896d1a4272303a57bdb245c2bf1147185fb45640e70" [[package]] name = "color-spantrace" @@ -1075,9 +1093,9 @@ dependencies = [ [[package]] name = "constant_time_eq" -version = "0.1.5" +version = "0.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "245097e9a4535ee1e3e3931fcfcd55a796a44c643e8596ff6566d68f09b87bbc" +checksum = "f7144d30dcf0fafbce74250a3963025d8d52177934239851c917d29f1df280c2" [[package]] name = "convert_case" @@ -1105,16 +1123,6 @@ dependencies = [ "version_check", ] -[[package]] -name = "core-foundation" -version = "0.9.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "194a7a9e6de53fa55116934067c844d9d749312f75c6f6d0980e8c252f8c2146" -dependencies = [ - "core-foundation-sys", - "libc", -] - [[package]] name = "core-foundation-sys" version = "0.8.4" @@ -1137,10 +1145,25 @@ dependencies = [ ] [[package]] -name = "crc32fast" -version = "1.4.0" +name = "crc" +version = "3.2.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b3855a8a784b474f333699ef2bbca9db2c4a1f6d9088a90a2d25b1eb53111eaa" +checksum = "69e6e4d7b33a94f0991c26729976b10ebde1d34c3ee82408fb536164fa10d636" +dependencies = [ + "crc-catalog", +] + +[[package]] +name = "crc-catalog" +version = "2.4.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "19d374276b40fb8bbdee95aef7c7fa6b5316ec764510eb64b8dd0e2ed0d7e7f5" + +[[package]] +name = "crc32fast" +version = "1.4.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a97769d94ddab943e4510d138150169a2758b5ef3eb191a9ee688de3e23ef7b3" dependencies = [ "cfg-if", ] @@ -1181,12 +1204,6 @@ dependencies = [ "itertools 0.10.5", ] -[[package]] -name = "critical-section" -version = "1.1.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6548a0ad5d2549e111e1f6a11a6c2e2d00ce6a3dafe22948d67c2b443f775e52" - [[package]] name = "crossbeam" version = "0.8.4" @@ -1202,9 +1219,9 @@ dependencies = [ [[package]] name = "crossbeam-channel" -version = "0.5.11" +version = "0.5.13" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "176dc175b78f56c0f321911d9c8eb2b77a78a4860b9c19db83835fea1a46649b" +checksum = "33480d6946193aa8033910124896ca395333cae7e2d1113d1fef6c3272217df2" dependencies = [ "crossbeam-utils", ] @@ -1239,9 +1256,9 @@ dependencies = [ [[package]] name = "crossbeam-utils" -version = "0.8.19" +version = "0.8.20" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "248e3bacc7dc6baa3b21e405ee045c3047101a49145e7e9eca583ab4c2ca5345" +checksum = "22ec99545bb0ed0ea7bb9b8e1e9122ea386ff8a48c0922e43f36d45ab09e0e80" [[package]] name = "crunchy" @@ -1282,11 +1299,12 @@ dependencies = [ [[package]] name = "cudarc" -version = "0.10.0" +version = "0.11.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9395df0cab995685664e79cc35ad6302bf08fb9c5d82301875a183affe1278b1" +checksum = "56ee2a3fbbd981e1c7ea73cc2af136e754eb22d17436de37155227ee4dbe0cf4" dependencies = [ "half 2.4.0", + "libloading", ] [[package]] @@ -1368,6 +1386,12 @@ dependencies = [ "uuid", ] +[[package]] +name = "deflate64" +version = "0.1.8" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "83ace6c86376be0b6cdcf3fb41882e81d94b31587573d1cfa9d01cd06bba210d" + [[package]] name = "deranged" version = "0.3.11" @@ -1398,15 +1422,6 @@ dependencies = [ "derive_builder_macro 0.12.0", ] -[[package]] -name = "derive_builder" -version = "0.13.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8f59169f400d8087f238c5c0c7db6a28af18681717f3b623227d92f397e938c7" -dependencies = [ - "derive_builder_macro 0.13.1", -] - [[package]] name = "derive_builder" version = "0.20.0" @@ -1428,18 +1443,6 @@ dependencies = [ "syn 1.0.109", ] -[[package]] -name = "derive_builder_core" -version = "0.13.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a4ec317cc3e7ef0928b0ca6e4a634a4d6c001672ae210438cf114a83e56b018d" -dependencies = [ - "darling 0.14.4", - "proc-macro2", - "quote", - "syn 1.0.109", -] - [[package]] name = "derive_builder_core" version = "0.20.0" @@ -1462,16 +1465,6 @@ dependencies = [ "syn 1.0.109", ] -[[package]] -name = "derive_builder_macro" -version = "0.13.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "870368c3fb35b8031abb378861d4460f573b92238ec2152c927a21f77e3e0127" -dependencies = [ - "derive_builder_core 0.13.1", - "syn 1.0.109", -] - [[package]] name = "derive_builder_macro" version = "0.20.0" @@ -1497,9 +1490,9 @@ dependencies = [ [[package]] name = "deserr" -version = "0.6.1" +version = "0.6.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3418e814bb893a61b25a60db71dccab7cb70035d94ffe58c9b4a70387ac42083" +checksum = "bfe971a2a48625fda3198032f35de60939828c4aed47d76715c21698801b985c" dependencies = [ "actix-http", "actix-utils", @@ -1509,14 +1502,14 @@ dependencies = [ "serde-cs", "serde_json", "serde_urlencoded", - "strsim 0.10.0", + "strsim 0.11.1", ] [[package]] name = "deserr-internal" -version = "0.7.0" +version = "0.6.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9cadd9624c995ecbd6d6c81ec0804fbbb335e3acba5326a06067ccd33295a37e" +checksum = "aae89f00c97a75940185084a826c0aace055774ad57a58211625606449ea0bd8" dependencies = [ "convert_case 0.6.0", "proc-macro2", @@ -1526,9 +1519,9 @@ dependencies = [ [[package]] name = "deunicode" -version = "1.4.2" +version = "1.6.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3ae2a35373c5c74340b79ae6780b498b2b183915ec5dacf263aac5a099bf485a" +checksum = "339544cc9e2c4dc3fc7149fd630c5f22263a4fdf18a98afd0075784968b5cf00" [[package]] name = "digest" @@ -1583,6 +1576,17 @@ dependencies = [ "winapi", ] +[[package]] +name = "displaydoc" +version = "0.2.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "97369cbbc041bc366949bc74d34658d6cda5621039731c6310521892a3a20ae0" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.60", +] + [[package]] name = "doc-comment" version = "0.3.3" @@ -1605,10 +1609,9 @@ dependencies = [ "anyhow", "big_s", "flate2", - "http 0.2.11", + "http 1.1.0", "maplit", "meili-snap", - "meilisearch-auth", "meilisearch-types", "once_cell", "regex", @@ -1635,9 +1638,9 @@ dependencies = [ [[package]] name = "either" -version = "1.10.0" +version = "1.13.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "11157ac094ffbdde99aa67b23417ebdd801842852b500e395a45a9c0aac03e4a" +checksum = "60b1af1c220855b6ceac025d3f6ecdd2b7c4894bfe9cd9bda4fbb4bc7c0d4cf0" dependencies = [ "serde", ] @@ -1736,7 +1739,7 @@ version = "0.6.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "5ffccbb6966c05b32ef8fbac435df276c4ae4d3dc55a8cd0eb9745e6c12f546a" dependencies = [ - "heck", + "heck 0.4.1", "proc-macro2", "quote", "syn 2.0.60", @@ -1744,18 +1747,18 @@ dependencies = [ [[package]] name = "enum-iterator" -version = "1.5.0" +version = "2.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9fd242f399be1da0a5354aa462d57b4ab2b4ee0683cc552f7c007d2d12d36e94" +checksum = "c280b9e6b3ae19e152d8e31cf47f18389781e119d4013a2a2bb0180e5facc635" dependencies = [ "enum-iterator-derive", ] [[package]] name = "enum-iterator-derive" -version = "1.3.0" +version = "1.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "03cdc46ec28bd728e67540c528013c6a10eb69a02eb31078a1bda695438cbfb8" +checksum = "a1ab991c1362ac86c61ab6f556cff143daa22e5a15e4e189df818b2fd19fe65b" dependencies = [ "proc-macro2", "quote", @@ -1794,40 +1797,27 @@ dependencies = [ "regex", ] +[[package]] +name = "fancy-regex" +version = "0.13.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "531e46835a22af56d1e3b66f04844bed63158bc094a628bec1d321d9b4c44bf2" +dependencies = [ + "bit-set", + "regex-automata", + "regex-syntax", +] + [[package]] name = "fastrand" -version = "2.0.1" +version = "2.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "25cbce373ec4653f1a01a31e8a5e5ec0c622dc27ff9c4e6606eefef5cbbed4a5" - -[[package]] -name = "faux" -version = "0.1.10" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "14b55a7f424e532314115b5cdc6d9711b15ac453bfe0dcfa212baebc5efacd60" -dependencies = [ - "faux_macros", - "paste", -] - -[[package]] -name = "faux_macros" -version = "0.1.10" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d15473d7f83b54a44826907af16ae5727eaacaf6e53b51474016d3efd9aa35d5" -dependencies = [ - "darling 0.20.9", - "proc-macro2", - "quote", - "syn 2.0.60", - "uuid", -] +checksum = "9fc0510504f03c51ada170672ac806f1f105a88aa97a5281117e1ddc3368e51a" [[package]] name = "file-store" version = "1.9.0" dependencies = [ - "faux", "tempfile", "thiserror", "tracing", @@ -1858,9 +1848,9 @@ dependencies = [ [[package]] name = "flate2" -version = "1.0.28" +version = "1.0.30" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "46303f565772937ffe1d394a4fac6f411c6013172fadde9dcdb1e147a086940e" +checksum = "5f54427cfd1c7829e2a139fcefea601bf088ebca651d2bf53ebc600eac295dae" dependencies = [ "crc32fast", "miniz_oxide", @@ -1895,6 +1885,12 @@ version = "0.4.7" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "7ab85b9b05e3978cc9a9cf8fea7f01b494e1a09ed3037e16ba39edc7a29eb61a" +[[package]] +name = "funty" +version = "2.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e6d5a32815ae3f33302d95fdcb2ce17862f8c65363dcfd29360480ba1001fc9c" + [[package]] name = "futures" version = "0.3.30" @@ -2008,14 +2004,15 @@ dependencies = [ [[package]] name = "fxprof-processed-profile" -version = "0.6.0" +version = "0.7.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "27d12c0aed7f1e24276a241aadc4cb8ea9f83000f34bc062b7cc2d51e3b0fabd" +checksum = "ce20bbb48248608ba4908b45fe36e17e40f56f8c6bb385ecf5d3c4a1e8b05a22" dependencies = [ "bitflags 2.6.0", "debugid", "fxhash", "serde", + "serde_derive", "serde_json", ] @@ -2186,9 +2183,9 @@ checksum = "b6c80984affa11d98d1b88b66ac8853f143217b399d3c74116778ff8fdb4ed2e" [[package]] name = "git2" -version = "0.18.2" +version = "0.19.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1b3ba52851e73b46a4c3df1d89343741112003f0f6f13beb0dfac9e457c3fdcd" +checksum = "b903b73e45dc0c6c596f2d37eccece7c1c8bb6e4407b001096387c63d0d93724" dependencies = [ "bitflags 2.6.0", "libc", @@ -2205,9 +2202,9 @@ checksum = "d2fabcfbdc87f4758337ca535fb41a6d701b65693ce38287d856d1674551ec9b" [[package]] name = "grenad" -version = "0.4.6" +version = "0.4.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c297f45167e6d543eb728e12ff284283e4ba2182a25c6cdcec883fda3316c7e7" +checksum = "350d89047298d3b1b40050acd11ab76e487b854a104b760ebc5a7f375093de77" dependencies = [ "bytemuck", "byteorder", @@ -2256,33 +2253,39 @@ dependencies = [ [[package]] name = "hash32" -version = "0.2.1" +version = "0.3.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b0c35f58762feb77d74ebe43bdbc3210f09be9fe6742234d573bacc26ed92b67" +checksum = "47d60b12902ba28e2730cd37e95b8c9223af2808df9e902d4df49588d1470606" dependencies = [ "byteorder", ] +[[package]] +name = "hashbrown" +version = "0.12.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8a9ee70c43aaf417c914396645a0fa852624801b24ebb7ae78fe8272889ac888" +dependencies = [ + "ahash 0.7.8", +] + [[package]] name = "hashbrown" version = "0.14.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "290f1a1d9242c78d09ce40a5e87e7554ee637af1351968159f4952f028f75604" dependencies = [ - "ahash", + "ahash 0.8.11", "allocator-api2", ] [[package]] name = "heapless" -version = "0.7.16" +version = "0.8.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "db04bc24a18b9ea980628ecf00e6c0264f3c1426dac36c00cb49b6fbad8b0743" +checksum = "0bfb9eb618601c89945a70e254898da93b13be0388091d42117462b265bb3fad" dependencies = [ - "atomic-polyfill", "hash32", - "rustc_version", - "spin", "stable_deref_trait", ] @@ -2292,6 +2295,12 @@ version = "0.4.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "95505c38b4572b2d910cecb0281560f54b440a19336cbbcb27bf6ce6adc6f5a8" +[[package]] +name = "heck" +version = "0.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2304e00983f87ffb38b55b444b5e3b60a884b5d30c0fca7d82fe33449bbe55ea" + [[package]] name = "heed" version = "0.20.3" @@ -2305,7 +2314,7 @@ dependencies = [ "libc", "lmdb-master-sys", "once_cell", - "page_size 0.6.0", + "page_size", "synchronoise", "url", ] @@ -2347,7 +2356,7 @@ version = "0.3.2" source = "git+https://github.com/dureuill/hf-hub.git?branch=rust_tls#88d4f11cb9fa079f2912bacb96f5080b16825ce8" dependencies = [ "dirs", - "http 1.0.0", + "http 1.1.0", "indicatif", "log", "rand", @@ -2379,9 +2388,9 @@ dependencies = [ [[package]] name = "http" -version = "1.0.0" +version = "1.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b32afd38673a8016f7c9ae69e5af41a58f81b1d31689040f2f1959594ce194ea" +checksum = "21b9ddb458710bc376481b842f5da65cdf31522de232c1ca8146abce2a358258" dependencies = [ "bytes", "fnv", @@ -2390,12 +2399,24 @@ dependencies = [ [[package]] name = "http-body" -version = "0.4.5" +version = "1.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d5f38f16d184e36f2408a55281cd658ecbd3ca05cce6d6510a176eca393e26d1" +checksum = "1cac85db508abc24a2e48553ba12a996e87244a0395ce011e62b37158745d643" dependencies = [ "bytes", - "http 0.2.11", + "http 1.1.0", +] + +[[package]] +name = "http-body-util" +version = "0.1.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "793429d76616a256bcb62c2a2ec2bed781c8307e797e2598c50010f2bee2544f" +dependencies = [ + "bytes", + "futures-util", + "http 1.1.0", + "http-body", "pin-project-lite", ] @@ -2413,40 +2434,59 @@ checksum = "c4a1e36c821dbe04574f602848a19f742f4fb3c98d40449f11bcad18d6b17421" [[package]] name = "hyper" -version = "0.14.27" +version = "1.4.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ffb1cfd654a8219eaef89881fdb3bb3b1cdc5fa75ded05d6933b2b382e395468" +checksum = "50dfd22e0e76d0f662d429a5f80fcaf3855009297eab6a0a9f8543834744ba05" dependencies = [ "bytes", "futures-channel", - "futures-core", "futures-util", - "h2", - "http 0.2.11", + "http 1.1.0", "http-body", "httparse", - "httpdate", "itoa", "pin-project-lite", - "socket2 0.4.9", + "smallvec", "tokio", - "tower-service", - "tracing", "want", ] [[package]] name = "hyper-rustls" -version = "0.24.1" +version = "0.27.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8d78e1e73ec14cf7375674f74d7dde185c8206fd9dea6fb6295e8a98098aaa97" +checksum = "5ee4be2c948921a1a5320b629c4193916ed787a7f7f293fd3f7f5a6c9de74155" dependencies = [ "futures-util", - "http 0.2.11", + "http 1.1.0", "hyper", - "rustls 0.21.12", + "hyper-util", + "rustls 0.23.11", + "rustls-pki-types", "tokio", - "tokio-rustls", + "tokio-rustls 0.26.0", + "tower-service", + "webpki-roots 0.26.1", +] + +[[package]] +name = "hyper-util" +version = "0.1.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3ab92f4f49ee4fb4f997c784b7a2e0fa70050211e0b6a287f898c3c9785ca956" +dependencies = [ + "bytes", + "futures-channel", + "futures-util", + "http 1.1.0", + "http-body", + "hyper", + "pin-project-lite", + "socket2 0.5.5", + "tokio", + "tower", + "tower-service", + "tracing", ] [[package]] @@ -2481,7 +2521,7 @@ dependencies = [ "bincode", "crossbeam", "csv", - "derive_builder 0.12.0", + "derive_builder 0.20.0", "dump", "enum-iterator", "file-store", @@ -2491,7 +2531,7 @@ dependencies = [ "meili-snap", "meilisearch-auth", "meilisearch-types", - "page_size 0.5.0", + "page_size", "rayon", "roaring", "serde", @@ -2512,7 +2552,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "168fb715dda47215e360912c096649d23d58bf392ac62f73919e831745e40f26" dependencies = [ "equivalent", - "hashbrown", + "hashbrown 0.14.3", "serde", ] @@ -2540,9 +2580,9 @@ dependencies = [ [[package]] name = "insta" -version = "1.34.0" +version = "1.39.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5d64600be34b2fcfc267740a243fa7744441bb4947a619ac4e5bb6507f35fbfc" +checksum = "810ae6042d48e2c9e9215043563a58a80b877bc863228a74cf10c49d4620a6f5" dependencies = [ "console", "lazy_static", @@ -2551,7 +2591,6 @@ dependencies = [ "pest_derive", "serde", "similar", - "yaml-rust", ] [[package]] @@ -2563,17 +2602,6 @@ dependencies = [ "cfg-if", ] -[[package]] -name = "io-lifetimes" -version = "1.0.11" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "eae7b9aee968036d54dce06cebaefd919e4472e753296daccd6d344e3e2df0c2" -dependencies = [ - "hermit-abi", - "libc", - "windows-sys 0.48.0", -] - [[package]] name = "ipnet" version = "2.8.0" @@ -2582,9 +2610,9 @@ checksum = "28b29a3cd74f0f4598934efe3aeba42bae0eb4680554128851ebbecb02af14e6" [[package]] name = "irg-kvariants" -version = "0.1.0" +version = "0.1.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c73214298363629cf9dbfc93b426808865ee3c121029778cb31b1284104fdf78" +checksum = "ef2af7c331f2536964a32b78a7d2e0963d78b42f4a76323b16cc7d94b1ddce26" dependencies = [ "csv", "once_cell", @@ -2593,12 +2621,12 @@ dependencies = [ [[package]] name = "is-terminal" -version = "0.4.10" +version = "0.4.12" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0bad00257d07be169d870ab665980b06cdb366d792ad690bf2e76876dc503455" +checksum = "f23ff5ef2b80d608d61efee834934d862cd92461afc0560dedf493e4c033738b" dependencies = [ "hermit-abi", - "rustix 0.38.31", + "libc", "windows-sys 0.52.0", ] @@ -2629,6 +2657,15 @@ dependencies = [ "either", ] +[[package]] +name = "itertools" +version = "0.13.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "413ee7dfc52ee1a4949ceeb7dbc8a33f2d6c088194d9f922fb8318faf1f01186" +dependencies = [ + "either", +] + [[package]] name = "itoa" version = "1.0.11" @@ -2637,13 +2674,13 @@ checksum = "49f1f14873335454500d59611f1cf4a4b0f786f9ac11f4312a78e4cf2566695b" [[package]] name = "jieba-rs" -version = "0.6.8" +version = "0.7.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "93f0c1347cd3ac8d7c6e3a2dc33ac496d365cf09fc0831aa61111e1a6738983e" +checksum = "c1e2b0210dc78b49337af9e49d7ae41a39dceac6e5985613f1cf7763e2f76a25" dependencies = [ "cedarwood", + "derive_builder 0.20.0", "fxhash", - "hashbrown", "lazy_static", "phf", "phf_codegen", @@ -2678,9 +2715,9 @@ dependencies = [ [[package]] name = "jsonwebtoken" -version = "9.2.0" +version = "9.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5c7ea04a7c5c055c175f189b6dc6ba036fd62306b58c66c9f6389036c503a3f4" +checksum = "b9ae10193d25051e74945f1ea2d0b42e03cc3b890f7e4cc5faa44997d808193f" dependencies = [ "base64 0.21.7", "js-sys", @@ -2718,9 +2755,9 @@ checksum = "d4345964bb142484797b161f473a503a434de77149dd8c7427788c6e13379388" [[package]] name = "lazy_static" -version = "1.4.0" +version = "1.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e2abad23fbc42b3700f2f279844dc832adb2b2eb069b2df918f455c4e18cc646" +checksum = "bbd2bcb4c963f2ddae06a2efc7e9f3591312473c50c6685e1f298068316e66fe" [[package]] name = "lazycell" @@ -2745,9 +2782,9 @@ checksum = "97b3888a4aecf77e811145cadf6eef5901f4782c53886191b2f693f24761847c" [[package]] name = "libgit2-sys" -version = "0.16.2+1.7.2" +version = "0.17.0+1.8.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ee4126d8b4ee5c9d9ea891dd875cfdc1e9d0950437179104b183d7d8a74d24e8" +checksum = "10472326a8a6477c3c20a64547b0059e4b0d086869eee31e6d7da728a8eb7224" dependencies = [ "cc", "libc", @@ -2757,12 +2794,12 @@ dependencies = [ [[package]] name = "libloading" -version = "0.8.1" +version = "0.8.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c571b676ddfc9a8c12f1f3d3085a7b163966a8fd8098a90640953ce5f6170161" +checksum = "e310b3a6b5907f99202fcdb4960ff45b93735d7c7d96b760fcff8db2dc0e103d" dependencies = [ "cfg-if", - "windows-sys 0.48.0", + "windows-targets 0.52.4", ] [[package]] @@ -2773,9 +2810,9 @@ checksum = "4ec2a862134d2a7d32d7983ddcdd1c4923530833c9f2ea1a44fc5fa473989058" [[package]] name = "libmimalloc-sys" -version = "0.1.35" +version = "0.1.39" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3979b5c37ece694f1f5e51e7ecc871fdb0f517ed04ee45f88d15d6d553cb9664" +checksum = "23aa6811d3bd4deb8a84dde645f943476d13b248d818edcf8ce0b2f37f036b44" dependencies = [ "cc", "libc", @@ -2783,9 +2820,9 @@ dependencies = [ [[package]] name = "libproc" -version = "0.14.2" +version = "0.14.8" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "229004ebba9d1d5caf41623f1523b6d52abb47d9f6ab87f7e6fc992e3b854aef" +checksum = "ae9ea4b75e1a81675429dafe43441df1caea70081e82246a8cccf514884a88bb" dependencies = [ "bindgen", "errno", @@ -2806,9 +2843,9 @@ dependencies = [ [[package]] name = "lindera" -version = "0.31.0" +version = "0.32.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "dcd4fa369654517f72c10b24adf03ad4ce69d19facb79c3cb3cf9b4580ac352f" +checksum = "c6cbc1aad631a7da0a7e9bc4b8669fa92ac9ca8eeb7b35a807376dd3034443ff" dependencies = [ "lindera-analyzer", "lindera-core", @@ -2819,9 +2856,9 @@ dependencies = [ [[package]] name = "lindera-analyzer" -version = "0.31.0" +version = "0.32.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c2cba7fe275cb8ec4c594cfee9cc39e48b71e02a089457d52f3e70dc146a8133" +checksum = "74508ffbb24e36905d1718b261460e378a748029b07bcd7e06f0d18500b8194c" dependencies = [ "anyhow", "bincode", @@ -2848,10 +2885,23 @@ dependencies = [ ] [[package]] -name = "lindera-cc-cedict" -version = "0.31.0" +name = "lindera-assets" +version = "0.32.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "240adf9faba3f09ad16557aefcd316dd00ebb940ac94334a629660d772f118c1" +checksum = "6a677c371ecb3bd02b751be306ea09876cd47cf426303ad5f10a3fd6f9a4ded6" +dependencies = [ + "encoding", + "flate2", + "lindera-core", + "tar", + "ureq", +] + +[[package]] +name = "lindera-cc-cedict" +version = "0.32.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c35944000d05a177e981f037b5f0805f283b32f05a0c35713003bef136ca8cb4" dependencies = [ "bincode", "byteorder", @@ -2863,9 +2913,9 @@ dependencies = [ [[package]] name = "lindera-cc-cedict-builder" -version = "0.31.0" +version = "0.32.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f12241f9e74babe708a0b9441d9f3fa67cb29fd01257918f30ffd480ca568820" +checksum = "85b8f642bc9c9130682569975772a17336c6aab26d11fc0f823f3e663167ace6" dependencies = [ "anyhow", "lindera-core", @@ -2875,9 +2925,9 @@ dependencies = [ [[package]] name = "lindera-compress" -version = "0.31.0" +version = "0.32.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "50f9f7a858d70ff9e4383cbd507ca9e98c8faf0319e08c10df4c30cb58c9ca6c" +checksum = "a7825d8d63592aa5727d67bd209170ac82df56c369533efbf0ddbac277bb68ec" dependencies = [ "anyhow", "flate2", @@ -2886,9 +2936,9 @@ dependencies = [ [[package]] name = "lindera-core" -version = "0.31.0" +version = "0.32.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7f09810ab98ce2a084d788ac38fbb7b31697f34bc47c61de0d880320a674bd15" +checksum = "0c28191456debc98af6aa5f7db77872471983e9fa2a737b1c232b6ef543aed62" dependencies = [ "anyhow", "bincode", @@ -2903,9 +2953,9 @@ dependencies = [ [[package]] name = "lindera-decompress" -version = "0.31.0" +version = "0.32.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d53400c9b2dd6b45f82d9fa5b5efe079f3acaf6ce609dba8d42c8a76baaa2b12" +checksum = "4788a1ead2f63f3fc2888109272921dedd86a87b7d0bf05e9daab46600daac51" dependencies = [ "anyhow", "flate2", @@ -2914,9 +2964,9 @@ dependencies = [ [[package]] name = "lindera-dictionary" -version = "0.31.0" +version = "0.32.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2053d064a515839250438b8dfa6cf445e2b97633232ded34a54f267e945d196e" +checksum = "bdf5f91725e32b9a21b1656baa7030766c9bafc4de4b4ddeb8ffdde7224dd2f6" dependencies = [ "anyhow", "bincode", @@ -2939,9 +2989,9 @@ dependencies = [ [[package]] name = "lindera-dictionary-builder" -version = "0.31.0" +version = "0.32.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "14f486924055f8bedcc5877572e4dc91fbc10370862430ac2e5f7f0d671a18c8" +checksum = "e41f00ba7ac541b0ffd8c30e7a73f2dd197546cc5780462ec4f2e4782945a780" dependencies = [ "anyhow", "bincode", @@ -2961,9 +3011,9 @@ dependencies = [ [[package]] name = "lindera-filter" -version = "0.31.0" +version = "0.32.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bb3904fc279f0297f6fd6210435adab1f8c82ba84eba8635407c791af51c0d8a" +checksum = "273d27e01e1377e2647314a4a5b9bdca4b52a867b319069ebae8c10191146eca" dependencies = [ "anyhow", "csv", @@ -2986,9 +3036,9 @@ dependencies = [ [[package]] name = "lindera-ipadic" -version = "0.31.0" +version = "0.32.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4aa3ef2f1f6838b0fa2e2fca2896242bb83bc877c1760cdb6fa23449ab95d664" +checksum = "b97a52ff0af5acb700093badaf7078051ab9ffd9071859724445a60193995f1f" dependencies = [ "bincode", "byteorder", @@ -3000,9 +3050,9 @@ dependencies = [ [[package]] name = "lindera-ipadic-builder" -version = "0.31.0" +version = "0.32.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a41287db18eadb58d73a04d49778d41c161549fbbbe155d4338976b7b8541c7d" +checksum = "bf5031c52686128db13f774b2c5a8abfd52b4cc1f904041d8411aa19d630ce4d" dependencies = [ "anyhow", "lindera-core", @@ -3012,9 +3062,9 @@ dependencies = [ [[package]] name = "lindera-ipadic-neologd" -version = "0.31.0" +version = "0.32.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "49382256f245078400bf7e72663f9eb30afcd9ed54cd46f29d7db1be529678e1" +checksum = "d6b36764b27b169aa11d24888141f206a6c246a5b195c1e67127485bac512fb6" dependencies = [ "bincode", "byteorder", @@ -3026,9 +3076,9 @@ dependencies = [ [[package]] name = "lindera-ipadic-neologd-builder" -version = "0.31.0" +version = "0.32.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5ae9cfd2fda68ef526ef0c7b50c5d4d5582a4daa6ecd0cea9e2b0b62564a2a5d" +checksum = "abf36e40ace904741efdd883ed5c4dba6425f65156a0fb5d3f73a386335950dc" dependencies = [ "anyhow", "lindera-core", @@ -3038,27 +3088,24 @@ dependencies = [ [[package]] name = "lindera-ko-dic" -version = "0.31.0" +version = "0.32.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7f86d03a863f3ae1d269e7b7d4dd2cce9385a53463479bafc5d7aa48719f36db" +checksum = "4c92a1a3564b531953f0238cbcea392f2905f7b27b449978cf9e702a80e1086d" dependencies = [ "bincode", "byteorder", - "encoding", - "flate2", + "lindera-assets", "lindera-core", "lindera-decompress", "lindera-ko-dic-builder", "once_cell", - "tar", - "ureq", ] [[package]] name = "lindera-ko-dic-builder" -version = "0.31.0" +version = "0.32.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bd0f44f2e56358c5879dfb5e7f76cc6ba7853ec31082c4e3f8fb65fb2d849c51" +checksum = "9f2c60425abc1548570c2568858f74a1f042105ecd89faa39c651b4315350fd9" dependencies = [ "anyhow", "lindera-core", @@ -3068,9 +3115,9 @@ dependencies = [ [[package]] name = "lindera-tokenizer" -version = "0.31.0" +version = "0.32.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7c5182735cdc2832ac757b31e8a5b150a3514357a30efe3dec212f8dcb06ba14" +checksum = "903e558981bcb6f59870aa7d6b4bcb09e8f7db778886a6a70f67fd74c9fa2ca3" dependencies = [ "bincode", "lindera-core", @@ -3082,27 +3129,24 @@ dependencies = [ [[package]] name = "lindera-unidic" -version = "0.31.0" +version = "0.32.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6c63da104728dd1cf14bfa564753cbfa996f6078ed2e23e31475bd1d639fc597" +checksum = "d227c3ce9cbd905f865c46c65a0470fd04e89b71104d7f92baa71a212ffe1d4b" dependencies = [ "bincode", "byteorder", - "encoding", - "flate2", + "lindera-assets", "lindera-core", "lindera-decompress", "lindera-unidic-builder", "once_cell", - "tar", - "ureq", ] [[package]] name = "lindera-unidic-builder" -version = "0.31.0" +version = "0.32.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "04acecbc068dac21766a1b7ed1f2608b6f250d10b4f8bff67abc2a00437a0974" +checksum = "99e2c50015c242e02c451acb6748667ac6fd1d3d667cd7db48cd89e2f2d2377e" dependencies = [ "anyhow", "lindera-core", @@ -3116,12 +3160,6 @@ version = "0.5.6" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "0717cef1bc8b636c6e1c1bbdefc09e6322da8a9321966e8928ef80d20f7f770f" -[[package]] -name = "linux-raw-sys" -version = "0.1.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f051f77a7c8e6957c0696eac88f26b0117e54f52d3fc682ab19397a8812846a4" - [[package]] name = "linux-raw-sys" version = "0.4.12" @@ -3130,9 +3168,9 @@ checksum = "c4cd1a83af159aa67994778be9070f0ae1bd732942279cabb14f86f986a21456" [[package]] name = "liquid" -version = "0.26.4" +version = "0.26.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "69f68ae1011499ae2ef879f631891f21c78e309755f4a5e483c4a8f12e10b609" +checksum = "10929f201279ba14da3297b957dcda1e0bf7a6f3bb5115688be684aa8864e9cc" dependencies = [ "doc-comment", "liquid-core", @@ -3143,12 +3181,12 @@ dependencies = [ [[package]] name = "liquid-core" -version = "0.26.4" +version = "0.26.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "79e0724dfcaad5cfb7965ea0f178ca0870b8d7315178f4a7179f5696f7f04d5f" +checksum = "3aef4b2160791f456eb880c990a97746f693746f92302ef5f1d06111cf14b768" dependencies = [ "anymap2", - "itertools 0.10.5", + "itertools 0.12.1", "kstring", "liquid-derive", "num-traits", @@ -3161,9 +3199,9 @@ dependencies = [ [[package]] name = "liquid-derive" -version = "0.26.4" +version = "0.26.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fc2fb41a9bb4257a3803154bdf7e2df7d45197d1941c9b1a90ad815231630721" +checksum = "915f6d0a2963a27cd5205c1902f32ddfe3bc035816afd268cf88c0fc0f8d287e" dependencies = [ "proc-macro2", "quote", @@ -3172,11 +3210,11 @@ dependencies = [ [[package]] name = "liquid-lib" -version = "0.26.4" +version = "0.26.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e2a17e273a6fb1fb6268f7a5867ddfd0bd4683c7e19b51084f3d567fad4348c0" +checksum = "73f48fc446873f74d869582f5c4b8cbf3248c93395e410a67af5809b3731e44a" dependencies = [ - "itertools 0.10.5", + "itertools 0.12.1", "liquid-core", "once_cell", "percent-encoding", @@ -3187,9 +3225,9 @@ dependencies = [ [[package]] name = "litemap" -version = "0.7.2" +version = "0.7.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f9d642685b028806386b2b6e75685faadd3eb65a85fff7df711ce18446a422da" +checksum = "643cb0b8d4fcc284004d5fd0d67ccf61dfffadb7f75e1e71bc420f4688a3a704" [[package]] name = "lmdb-master-sys" @@ -3230,12 +3268,28 @@ dependencies = [ "scopeguard", ] +[[package]] +name = "lockfree-object-pool" +version = "0.1.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9374ef4228402d4b7e403e5838cb880d9ee663314b0a900d5a6aabf0c213552e" + [[package]] name = "log" version = "0.4.21" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "90ed8c1e510134f979dbc4f070f87d4313098b704861a105fe34231c70a3901c" +[[package]] +name = "lzma-rs" +version = "0.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "297e814c836ae64db86b36cf2a557ba54368d03f6afcd7d947c266692f71115e" +dependencies = [ + "byteorder", + "crc", +] + [[package]] name = "macro_rules_attribute" version = "0.2.0" @@ -3294,10 +3348,7 @@ dependencies = [ "actix-rt", "actix-utils", "actix-web", - "actix-web-static-files", "anyhow", - "assert-json-diff", - "async-stream", "async-trait", "brotli", "bstr", @@ -3316,12 +3367,11 @@ dependencies = [ "futures", "futures-util", "hex", - "http 0.2.11", "index-scheduler", "indexmap", "insta", "is-terminal", - "itertools 0.11.0", + "itertools 0.13.0", "jsonwebtoken", "lazy_static", "manifest-dir-macros", @@ -3345,14 +3395,14 @@ dependencies = [ "regex", "reqwest", "rustls 0.21.12", - "rustls-pemfile", + "rustls-pemfile 1.0.4", "segment", "serde", "serde_json", "serde_urlencoded", "sha-1", "sha2", - "siphasher 1.0.0", + "siphasher 1.0.1", "slice-group-by", "static-files", "sysinfo", @@ -3363,7 +3413,6 @@ dependencies = [ "thiserror", "time", "tokio", - "tokio-stream", "toml", "tracing", "tracing-actix-web", @@ -3372,16 +3421,15 @@ dependencies = [ "url", "urlencoding", "uuid", - "walkdir", "yaup", - "zip", + "zip 2.1.3", ] [[package]] name = "meilisearch-auth" version = "1.9.0" dependencies = [ - "base64 0.21.7", + "base64 0.22.1", "enum-iterator", "hmac", "maplit", @@ -3412,7 +3460,7 @@ dependencies = [ "fst", "insta", "meili-snap", - "memmap2 0.7.1", + "memmap2", "milli", "roaring", "serde", @@ -3442,18 +3490,9 @@ dependencies = [ [[package]] name = "memchr" -version = "2.7.1" +version = "2.7.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "523dc4f511e55ab87b694dc30d0f820d60906ef06413f93d4d7a1385599cc149" - -[[package]] -name = "memmap2" -version = "0.7.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f49388d20533534cd19360ad3d6a7dadc885944aa802ba3995040c5ec11288c6" -dependencies = [ - "libc", -] +checksum = "78ca9ab1a0babb1e7d5695e3530886289c18cf2f87ec19a575a0abdce112e3a3" [[package]] name = "memmap2" @@ -3495,20 +3534,19 @@ dependencies = [ "hf-hub", "indexmap", "insta", - "itertools 0.11.0", + "itertools 0.13.0", "json-depth-checker", "levenshtein_automata", "liquid", "maplit", "md5", "meili-snap", - "memmap2 0.7.1", + "memmap2", "mimalloc", "obkv", "once_cell", "ordered-float", "rand", - "rand_pcg", "rayon", "rayon-par-bridge", "rhai", @@ -3533,9 +3571,9 @@ dependencies = [ [[package]] name = "mimalloc" -version = "0.1.39" +version = "0.1.43" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fa01922b5ea280a911e323e4d2fd24b7fe5cc4042e0d2cda3c40775cdc4bdc9c" +checksum = "68914350ae34959d83f732418d51e2427a794055d0b9529f48259ac07af65633" dependencies = [ "libmimalloc-sys", ] @@ -3707,6 +3745,27 @@ dependencies = [ "libc", ] +[[package]] +name = "num_enum" +version = "0.7.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "02339744ee7253741199f897151b38e72257d13802d4ee837285cc2990a90845" +dependencies = [ + "num_enum_derive", +] + +[[package]] +name = "num_enum_derive" +version = "0.7.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "681030a937600a36906c185595136d26abfebb4aa9c65701cefcaf8578bb982b" +dependencies = [ + "proc-macro-crate", + "proc-macro2", + "quote", + "syn 2.0.60", +] + [[package]] name = "num_threads" version = "0.1.7" @@ -3733,9 +3792,9 @@ dependencies = [ [[package]] name = "obkv" -version = "0.2.1" +version = "0.2.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6c459142426056c639ff88d053ebaaaeca0ee1411c94362892398ef4ccd81080" +checksum = "a2e27bcfe835a379d32352112f6b8dbae2d99d16a5fff42abe6e5ba5386c1e5a" [[package]] name = "once_cell" @@ -3779,9 +3838,9 @@ checksum = "04744f49eae99ab78e0d5c0b603ab218f515ea8cfe5a456d7629ad883a3b6e7d" [[package]] name = "ordered-float" -version = "4.2.0" +version = "4.2.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a76df7075c7d4d01fdcb46c912dd17fba5b60c78ea480b475f2b6ab6f666584e" +checksum = "19ff2cf528c6c03d9ed653d6c4ce1dc0582dc4af309790ad92f07c1cd551b0be" dependencies = [ "num-traits", ] @@ -3798,16 +3857,6 @@ version = "3.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "c1b04fb49957986fdce4d6ee7a65027d55d4b6d2265e5848bbb507b58ccfdb6f" -[[package]] -name = "page_size" -version = "0.5.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1b7663cbd190cfd818d08efa8497f6cd383076688c49a391ef7c0d03cd12b561" -dependencies = [ - "libc", - "winapi", -] - [[package]] name = "page_size" version = "0.6.0" @@ -3820,9 +3869,9 @@ dependencies = [ [[package]] name = "parking_lot" -version = "0.12.1" +version = "0.12.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3742b2c103b9f06bc9fff0a37ff4912935851bee6d36f3c02bcc755bcfec228f" +checksum = "f1bf18183cf54e8d6059647fc3063646a1801cf30896933ec2311622cc4b9a27" dependencies = [ "lock_api", "parking_lot_core", @@ -3841,17 +3890,6 @@ dependencies = [ "windows-targets 0.48.1", ] -[[package]] -name = "password-hash" -version = "0.4.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7676374caaee8a325c9e7a2ae557f216c5563a171d6997b0ef8a65af35147700" -dependencies = [ - "base64ct", - "rand_core", - "subtle", -] - [[package]] name = "paste" version = "1.0.14" @@ -3875,22 +3913,14 @@ checksum = "498a099351efa4becc6a19c72aa9270598e8fd274ca47052e37455241c88b696" [[package]] name = "pbkdf2" -version = "0.11.0" +version = "0.12.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "83a0692ec44e4cf1ef28ca317f14f8f07da2d95ec3fa01f86e4467b725e60917" +checksum = "f8ed6a7761f76e3b9f92dfb0a60a6a6477c61024b775147ff0973a02653abaf2" dependencies = [ "digest", "hmac", - "password-hash", - "sha2", ] -[[package]] -name = "peeking_take_while" -version = "0.1.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "19b17cddbe7ec3f8bc800887bab5e717348c95ea2ca0b1bf0837fb964dc67099" - [[package]] name = "pem" version = "3.0.3" @@ -4033,9 +4063,9 @@ dependencies = [ [[package]] name = "pin-project-lite" -version = "0.2.13" +version = "0.2.14" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8afb450f006bf6385ca15ef45d71d2288452bc3683ce2e2cacc0d18e4be60b58" +checksum = "bda66fc9667c18cb2758a2ac84d1167245054bcf85d5d1aaa6923f45801bdd02" [[package]] name = "pin-utils" @@ -4110,6 +4140,15 @@ version = "0.2.17" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "5b40af805b3121feab8a3c29f04d8ad262fa8e0561883e7653e024ae4479e6de" +[[package]] +name = "proc-macro-crate" +version = "3.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6d37c51ca738a55da99dc0c4a34860fd675453b8b36209178c2249bb13651284" +dependencies = [ + "toml_edit 0.21.0", +] + [[package]] name = "proc-macro-error" version = "1.0.4" @@ -4145,22 +4184,32 @@ dependencies = [ [[package]] name = "procfs" -version = "0.14.2" +version = "0.16.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b1de8dacb0873f77e6aefc6d71e044761fcc68060290f5b1089fcdf84626bb69" +checksum = "731e0d9356b0c25f16f33b5be79b1c57b562f141ebfcdb0ad8ac2c13a24293b4" dependencies = [ - "bitflags 1.3.2", - "byteorder", + "bitflags 2.6.0", "hex", "lazy_static", - "rustix 0.36.16", + "procfs-core", + "rustix", +] + +[[package]] +name = "procfs-core" +version = "0.16.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2d3554923a69f4ce04c4a754260c338f505ce22642d3830e049a399fc2059a29" +dependencies = [ + "bitflags 2.6.0", + "hex", ] [[package]] name = "prometheus" -version = "0.13.3" +version = "0.13.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "449811d15fbdf5ceb5c1144416066429cf82316e2ec8ce0c1f6f8a02e7bbcf8c" +checksum = "3d33c28a30771f7f96db69893f78b857f7450d7e0237e9c8fc6427a81bae7ed1" dependencies = [ "cfg-if", "fnv", @@ -4179,6 +4228,26 @@ version = "2.28.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "106dd99e98437432fed6519dedecfade6a06a73bb7b2a1e019fdd2bee5778d94" +[[package]] +name = "ptr_meta" +version = "0.1.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0738ccf7ea06b608c10564b31debd4f5bc5e197fc8bfe088f68ae5ce81e7a4f1" +dependencies = [ + "ptr_meta_derive", +] + +[[package]] +name = "ptr_meta_derive" +version = "0.1.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "16b845dbfca988fa33db069c0e230574d15a3088f147a87b64c7589eb662c9ac" +dependencies = [ + "proc-macro2", + "quote", + "syn 1.0.109", +] + [[package]] name = "pulp" version = "0.18.9" @@ -4191,6 +4260,53 @@ dependencies = [ "reborrow", ] +[[package]] +name = "quinn" +version = "0.11.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e4ceeeeabace7857413798eb1ffa1e9c905a9946a57d81fb69b4b71c4d8eb3ad" +dependencies = [ + "bytes", + "pin-project-lite", + "quinn-proto", + "quinn-udp", + "rustc-hash", + "rustls 0.23.11", + "thiserror", + "tokio", + "tracing", +] + +[[package]] +name = "quinn-proto" +version = "0.11.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ddf517c03a109db8100448a4be38d498df8a210a99fe0e1b9eaf39e78c640efe" +dependencies = [ + "bytes", + "rand", + "ring", + "rustc-hash", + "rustls 0.23.11", + "slab", + "thiserror", + "tinyvec", + "tracing", +] + +[[package]] +name = "quinn-udp" +version = "0.5.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9096629c45860fc7fb143e125eb826b5e721e10be3263160c7d60ca832cf8c46" +dependencies = [ + "libc", + "once_cell", + "socket2 0.5.5", + "tracing", + "windows-sys 0.52.0", +] + [[package]] name = "quote" version = "1.0.36" @@ -4200,6 +4316,12 @@ dependencies = [ "proc-macro2", ] +[[package]] +name = "radium" +version = "0.7.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "dc33ff2d4973d518d823d61aa239014831e521c75da58e3df4840d3f47749d09" + [[package]] name = "rand" version = "0.8.5" @@ -4240,16 +4362,6 @@ dependencies = [ "rand", ] -[[package]] -name = "rand_pcg" -version = "0.3.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "59cad018caf63deb318e5a4586d99a24424a364f40f1e5778c29aca23f4fc73e" -dependencies = [ - "rand_core", - "serde", -] - [[package]] name = "raw-cpuid" version = "10.7.0" @@ -4336,9 +4448,9 @@ dependencies = [ [[package]] name = "regex" -version = "1.10.4" +version = "1.10.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c117dbdfde9c8308975b6a18d71f3f385c89461f7b3fb054288ecf2a2058ba4c" +checksum = "b91213439dad192326a0d7c6ee3955910425f441d7038e0d6933b0aec5c4517f" dependencies = [ "aho-corasick", "memchr", @@ -4370,21 +4482,31 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "c08c74e62047bb2de4ff487b251e4a92e24f48745648451635cec7d591162d9f" [[package]] -name = "reqwest" -version = "0.11.23" +name = "rend" +version = "0.4.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "37b1ae8d9ac08420c66222fb9096fc5de435c3c48542bc5336c51892cffafb41" +checksum = "71fe3824f5629716b1589be05dacd749f6aa084c87e00e016714a8cdfccc997c" dependencies = [ - "base64 0.21.7", + "bytecheck", +] + +[[package]] +name = "reqwest" +version = "0.12.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c7d6d2a27d57148378eb5e111173f4276ad26340ecc5c49a4a2152167a2d6a37" +dependencies = [ + "base64 0.22.1", "bytes", - "encoding_rs", + "futures-channel", "futures-core", "futures-util", - "h2", - "http 0.2.11", + "http 1.1.0", "http-body", + "http-body-util", "hyper", "hyper-rustls", + "hyper-util", "ipnet", "js-sys", "log", @@ -4392,14 +4514,16 @@ dependencies = [ "once_cell", "percent-encoding", "pin-project-lite", - "rustls 0.21.12", - "rustls-pemfile", + "quinn", + "rustls 0.23.11", + "rustls-pemfile 2.1.2", + "rustls-pki-types", "serde", "serde_json", "serde_urlencoded", - "system-configuration", + "sync_wrapper", "tokio", - "tokio-rustls", + "tokio-rustls 0.26.0", "tokio-util", "tower-service", "url", @@ -4407,7 +4531,7 @@ dependencies = [ "wasm-bindgen-futures", "wasm-streams", "web-sys", - "webpki-roots 0.25.3", + "webpki-roots 0.26.1", "winreg", ] @@ -4417,7 +4541,7 @@ version = "1.19.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "61797318be89b1a268a018a92a7657096d83f3ecb31418b9e9c16dcbb043b702" dependencies = [ - "ahash", + "ahash 0.8.11", "bitflags 2.6.0", "instant", "num-traits", @@ -4455,6 +4579,35 @@ dependencies = [ "windows-sys 0.52.0", ] +[[package]] +name = "rkyv" +version = "0.7.44" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5cba464629b3394fc4dbc6f940ff8f5b4ff5c7aef40f29166fd4ad12acbc99c0" +dependencies = [ + "bitvec", + "bytecheck", + "bytes", + "hashbrown 0.12.3", + "ptr_meta", + "rend", + "rkyv_derive", + "seahash", + "tinyvec", + "uuid", +] + +[[package]] +name = "rkyv_derive" +version = "0.7.44" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a7dddfff8de25e6f62b9d64e6e432bf1c6736c57d20323e15ee10435fbda7c65" +dependencies = [ + "proc-macro2", + "quote", + "syn 1.0.109", +] + [[package]] name = "roaring" version = "0.10.6" @@ -4468,9 +4621,9 @@ dependencies = [ [[package]] name = "rstar" -version = "0.11.0" +version = "0.12.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "73111312eb7a2287d229f06c00ff35b51ddee180f017ab6dec1f69d62ac098d6" +checksum = "133315eb94c7b1e8d0cb097e5a710d850263372fd028fff18969de708afc7008" dependencies = [ "heapless", "num-traits", @@ -4478,6 +4631,22 @@ dependencies = [ "smallvec", ] +[[package]] +name = "rust_decimal" +version = "1.35.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1790d1c4c0ca81211399e0e0af16333276f375209e71a37b67698a373db5b47a" +dependencies = [ + "arrayvec", + "borsh", + "bytes", + "num-traits", + "rand", + "rkyv", + "serde", + "serde_json", +] + [[package]] name = "rustc-demangle" version = "0.1.23" @@ -4499,20 +4668,6 @@ dependencies = [ "semver", ] -[[package]] -name = "rustix" -version = "0.36.16" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6da3636faa25820d8648e0e31c5d519bbb01f72fdf57131f0f5f7da5fed36eab" -dependencies = [ - "bitflags 1.3.2", - "errno", - "io-lifetimes", - "libc", - "linux-raw-sys 0.1.4", - "windows-sys 0.45.0", -] - [[package]] name = "rustix" version = "0.38.31" @@ -4522,7 +4677,7 @@ dependencies = [ "bitflags 2.6.0", "errno", "libc", - "linux-raw-sys 0.4.12", + "linux-raw-sys", "windows-sys 0.52.0", ] @@ -4540,14 +4695,15 @@ dependencies = [ [[package]] name = "rustls" -version = "0.22.4" +version = "0.23.11" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bf4ef73721ac7bcd79b2b315da7779d8fc09718c6b3d2d1b2d94850eb8c18432" +checksum = "4828ea528154ae444e5a642dbb7d5623354030dc9822b83fd9bb79683c7399d0" dependencies = [ "log", + "once_cell", "ring", "rustls-pki-types", - "rustls-webpki 0.102.2", + "rustls-webpki 0.102.5", "subtle", "zeroize", ] @@ -4562,10 +4718,20 @@ dependencies = [ ] [[package]] -name = "rustls-pki-types" -version = "1.4.1" +name = "rustls-pemfile" +version = "2.1.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ecd36cc4259e3e4514335c4a138c6b43171a8d61d8f5c9348f9fc7529416f247" +checksum = "29993a25686778eb88d4189742cd713c9bce943bc54251a33509dc63cbacf73d" +dependencies = [ + "base64 0.22.1", + "rustls-pki-types", +] + +[[package]] +name = "rustls-pki-types" +version = "1.7.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "976295e77ce332211c0d24d92c0e83e50f5c5f046d11082cea19f3df13a3562d" [[package]] name = "rustls-webpki" @@ -4579,9 +4745,9 @@ dependencies = [ [[package]] name = "rustls-webpki" -version = "0.102.2" +version = "0.102.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "faaa0a62740bedb9b2ef5afa303da42764c012f743917351dc9a237ea1663610" +checksum = "f9a6fccd794a42c2c105b513a2f62bc3fd8f3ba57a4593677ceb0bd035164d78" dependencies = [ "ring", "rustls-pki-types", @@ -4590,9 +4756,9 @@ dependencies = [ [[package]] name = "rustversion" -version = "1.0.14" +version = "1.0.17" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7ffc183a10b4478d04cbbbfc96d0873219d962dd5accaff2ffbd4ceb7df837f4" +checksum = "955d28af4278de8121b7ebeb796b6a45735dc01436d898801014aced2773a3d6" [[package]] name = "ryu" @@ -4636,10 +4802,16 @@ dependencies = [ ] [[package]] -name = "segment" -version = "0.2.3" +name = "seahash" +version = "4.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "12485833e00457a6bbba60397d3f19362751a0caefe27f6755fff1a2be4fd601" +checksum = "1c107b6f4780854c8b126e228ea8869f4d7b71260f962fefb57b996b8959ba6b" + +[[package]] +name = "segment" +version = "0.2.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5bdca318192c89bb31bffa2ef8e9e9898bc80f15a78db2fdd41cd051f1b41d01" dependencies = [ "async-trait", "reqwest", @@ -4666,9 +4838,9 @@ checksum = "a3f0bf26fd526d2a95683cd0f87bf103b8539e2ca1ef48ce002d67aad59aa0b4" [[package]] name = "serde" -version = "1.0.203" +version = "1.0.204" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7253ab4de971e72fb7be983802300c30b5a7f0c2e56fab8abfc6a214307c0094" +checksum = "bc76f558e0cbb2a839d37354c575f1dc3fdc6546b5be373ba43d95f231bf7c12" dependencies = [ "serde_derive", ] @@ -4684,9 +4856,9 @@ dependencies = [ [[package]] name = "serde_derive" -version = "1.0.203" +version = "1.0.204" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "500cbc0ebeb6f46627f50f3f5811ccf6bf00643be300b4c3eabc0ef55dc5b5ba" +checksum = "e0cd7e117be63d3c3678776753929474f3b04a43a080c744d6b0ae2a8c28e222" dependencies = [ "proc-macro2", "quote", @@ -4716,9 +4888,9 @@ dependencies = [ [[package]] name = "serde_spanned" -version = "0.6.5" +version = "0.6.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "eb3622f419d1296904700073ea6cc23ad690adbd66f13ea683df73298736f0c1" +checksum = "79e674e01f999af37c49f70a6ede167a8a60b2503e56c5599532a65baa5969a0" dependencies = [ "serde", ] @@ -4792,6 +4964,18 @@ dependencies = [ "libc", ] +[[package]] +name = "simd-adler32" +version = "0.3.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d66dc143e6b11c1eddc06d5c423cfc97062865baf299914ab64caa38182078fe" + +[[package]] +name = "simdutf8" +version = "0.1.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f27f6278552951f1f2b8cf9da965d10969b2efdea95a6ec47987ab46edfe263a" + [[package]] name = "similar" version = "2.2.1" @@ -4818,9 +5002,9 @@ checksum = "38b58827f4464d87d377d175e90bf58eb00fd8716ff0a62f80356b5e61555d0d" [[package]] name = "siphasher" -version = "1.0.0" +version = "1.0.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "54ac45299ccbd390721be55b412d41931911f654fa99e2cb8bfb57184b2061fe" +checksum = "56199f7ddabf13fe5074ce809e7d3f42b42ae711800501b5b16ea82ad029c39d" [[package]] name = "slab" @@ -4849,9 +5033,9 @@ dependencies = [ [[package]] name = "smallvec" -version = "1.12.0" +version = "1.13.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2593d31f82ead8df961d8bd23a64c2ccf2eb5dd34b0a34bfb4dd54011c72009e" +checksum = "3c5e1a9a646d36c3599cd173a41282daf47c44583ad367b8e6837255952e5c67" dependencies = [ "serde", ] @@ -4904,9 +5088,6 @@ name = "spin" version = "0.9.8" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "6980e8d7511241f8acf4aebddbb1ff938df5eebe98691418c4468d0b72a96a67" -dependencies = [ - "lock_api", -] [[package]] name = "spm_precompiled" @@ -4928,9 +5109,9 @@ checksum = "a8f112729512f8e442d81f95a8a7ddf2b7c6b8a1a6f509a95864142b30cab2d3" [[package]] name = "static-files" -version = "0.2.3" +version = "0.2.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "64712ea1e3e140010e1d9605872ba205afa2ab5bd38191cc6ebd248ae1f6a06b" +checksum = "4e8590e848e1c53be9258210bcd4a8f4118e08988f03a4e2d63b62e4ad9f7ced" dependencies = [ "change-detection", "mime_guess", @@ -4970,7 +5151,7 @@ version = "0.26.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "c6cf59daf282c0a494ba14fd21610a0325f9f90ec9d1231dea26bcb1d696c946" dependencies = [ - "heck", + "heck 0.4.1", "proc-macro2", "quote", "rustversion", @@ -5005,6 +5186,24 @@ dependencies = [ "unicode-ident", ] +[[package]] +name = "syn_derive" +version = "0.1.8" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1329189c02ff984e9736652b1631330da25eaa6bc639089ed4915d25446cbe7b" +dependencies = [ + "proc-macro-error", + "proc-macro2", + "quote", + "syn 2.0.60", +] + +[[package]] +name = "sync_wrapper" +version = "1.0.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a7065abeca94b6a8a577f9bd45aa0867a2238b74e8eb67cf10d492bc39351394" + [[package]] name = "synchronoise" version = "1.0.1" @@ -5041,9 +5240,9 @@ dependencies = [ [[package]] name = "sysinfo" -version = "0.30.5" +version = "0.30.13" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1fb4f3438c8f6389c864e61221cbc97e9bca98b4daf39a5beb7bea660f528bb2" +checksum = "0a5b4ddaee55fb2bea2bf0e5000747e5f5c0de765e5a5ff87f4cd106439f4bb3" dependencies = [ "cfg-if", "core-foundation-sys", @@ -5055,31 +5254,16 @@ dependencies = [ ] [[package]] -name = "system-configuration" -version = "0.5.1" +name = "tap" +version = "1.0.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ba3a3adc5c275d719af8cb4272ea1c4a6d668a777f37e115f6d11ddbc1c8e0e7" -dependencies = [ - "bitflags 1.3.2", - "core-foundation", - "system-configuration-sys", -] - -[[package]] -name = "system-configuration-sys" -version = "0.5.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a75fb188eb626b924683e3b95e3a48e63551fcfb51949de2f06a9d91dbee93c9" -dependencies = [ - "core-foundation-sys", - "libc", -] +checksum = "55937e1799185b12863d447f42597ed69d9928686b8d88a1df17376a097d8369" [[package]] name = "tar" -version = "0.4.40" +version = "0.4.41" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b16afcea1f22891c49a00c751c7b63b2233284064f11a200fc624137c51e2ddb" +checksum = "cb797dad5fb5b76fcf519e702f4a589483b5ef06567f160c392832c1f5e44909" dependencies = [ "filetime", "libc", @@ -5103,7 +5287,7 @@ checksum = "85b77fafb263dd9d05cbeac119526425676db3784113aa9295c88498cbf8bff1" dependencies = [ "cfg-if", "fastrand", - "rustix 0.38.31", + "rustix", "windows-sys 0.52.0", ] @@ -5157,14 +5341,14 @@ dependencies = [ [[package]] name = "tiktoken-rs" -version = "0.5.8" +version = "0.5.9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "40894b788eb28bbb7e36bdc8b7b1b1488b9c93fa3730f315ab965330c94c0842" +checksum = "c314e7ce51440f9e8f5a497394682a57b7c323d0f4d0a6b1b13c429056e0e234" dependencies = [ "anyhow", "base64 0.21.7", "bstr", - "fancy-regex", + "fancy-regex 0.12.0", "lazy_static", "parking_lot", "rustc-hash", @@ -5172,9 +5356,9 @@ dependencies = [ [[package]] name = "time" -version = "0.3.34" +version = "0.3.36" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c8248b6521bb14bc45b4067159b9b6ad792e2d6d754d6c41fb50e29fefe38749" +checksum = "5dfd88e563464686c916c7e46e623e520ddc6d79fa6641390f2e3fa86e83e885" dependencies = [ "deranged", "itoa", @@ -5195,9 +5379,9 @@ checksum = "ef927ca75afb808a4d64dd374f00a2adf8d0fcff8e7b184af886c3c87ec4a3f3" [[package]] name = "time-macros" -version = "0.2.17" +version = "0.2.18" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7ba3a3ef41e6672a2f0f001392bb5dcd3ff0a9992d618ca761a11c3121547774" +checksum = "3f252a68540fde3a3877aeea552b832b40ab9a69e318efd078774a01ddee1ccf" dependencies = [ "num-conv", "time-core", @@ -5269,9 +5453,9 @@ dependencies = [ [[package]] name = "tokio" -version = "1.35.1" +version = "1.38.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c89b4efa943be685f629b149f53829423f8f5531ea21249408e8e2f8671ec104" +checksum = "ba4f4a02a7a80d6f274636f0aa95c7e383b912d41fe721a31f29e29698585a4a" dependencies = [ "backtrace", "bytes", @@ -5288,9 +5472,9 @@ dependencies = [ [[package]] name = "tokio-macros" -version = "2.2.0" +version = "2.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5b8a1e28f2deaa14e508979454cb3a223b10b938b45af148bc0986de36f1923b" +checksum = "5f5ae998a069d4b5aba8ee9dad856af7d520c3699e6159b185c2acd48155d39a" dependencies = [ "proc-macro2", "quote", @@ -5308,47 +5492,46 @@ dependencies = [ ] [[package]] -name = "tokio-stream" -version = "0.1.14" +name = "tokio-rustls" +version = "0.26.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "397c988d37662c7dda6d2208364a706264bf3d6138b11d436cbac0ad38832842" +checksum = "0c7bc40d0e5a97695bb96e27995cd3a08538541b0a846f65bba7a359f36700d4" dependencies = [ - "futures-core", - "pin-project-lite", + "rustls 0.23.11", + "rustls-pki-types", "tokio", ] [[package]] name = "tokio-util" -version = "0.7.8" +version = "0.7.11" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "806fe8c2c87eccc8b3267cbae29ed3ab2d0bd37fca70ab622e46aaa9375ddb7d" +checksum = "9cf6b47b3771c49ac75ad09a6162f53ad4b8088b76ac60e8ec1455b31a189fe1" dependencies = [ "bytes", "futures-core", "futures-sink", "pin-project-lite", "tokio", - "tracing", ] [[package]] name = "toml" -version = "0.8.8" +version = "0.8.14" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a1a195ec8c9da26928f773888e0742ca3ca1040c6cd859c919c9f59c1954ab35" +checksum = "6f49eb2ab21d2f26bd6db7bf383edc527a7ebaee412d17af4d40fdccd442f335" dependencies = [ "serde", "serde_spanned", "toml_datetime", - "toml_edit", + "toml_edit 0.22.15", ] [[package]] name = "toml_datetime" -version = "0.6.5" +version = "0.6.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3550f4e9685620ac18a50ed434eb3aec30db8ba93b0287467bca5826ea25baf1" +checksum = "4badfd56924ae69bcc9039335b2e017639ce3f9b001c393c1b2d1ef846ce2cbf" dependencies = [ "serde", ] @@ -5358,14 +5541,46 @@ name = "toml_edit" version = "0.21.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "d34d383cd00a163b4a5b85053df514d45bc330f6de7737edfe0a93311d1eaa03" +dependencies = [ + "indexmap", + "toml_datetime", + "winnow 0.5.40", +] + +[[package]] +name = "toml_edit" +version = "0.22.15" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d59a3a72298453f564e2b111fa896f8d07fabb36f51f06d7e875fc5e0b5a3ef1" dependencies = [ "indexmap", "serde", "serde_spanned", "toml_datetime", - "winnow", + "winnow 0.6.13", ] +[[package]] +name = "tower" +version = "0.4.13" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b8fa9be0de6cf49e536ce1851f987bd21a43b771b09473c3549a6c853db37c1c" +dependencies = [ + "futures-core", + "futures-util", + "pin-project", + "pin-project-lite", + "tokio", + "tower-layer", + "tower-service", +] + +[[package]] +name = "tower-layer" +version = "0.3.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c20c8dbed6283a09604c3e69b4b7eeb54e298b8a600d4d5ecb5ad39de609f1d0" + [[package]] name = "tower-service" version = "0.3.2" @@ -5502,9 +5717,9 @@ checksum = "ed646292ffc8188ef8ea4d1e0e0150fb15a5c2e12ad9b8fc191ae7a8a7f3c4b9" [[package]] name = "unescaper" -version = "0.1.3" +version = "0.1.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d8f0f68e58d297ba8b22b8b5a96a87b863ba6bb46aaf51e19a4b02c5a6dd5b7f" +checksum = "c878a167baa8afd137494101a688ef8c67125089ff2249284bd2b5f9bfedb815" dependencies = [ "thiserror", ] @@ -5580,17 +5795,16 @@ checksum = "8ecb6da28b8a351d773b68d5825ac39017e680750f980f3a1a85cd8dd28a47c1" [[package]] name = "ureq" -version = "2.9.7" +version = "2.10.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d11a831e3c0b56e438a28308e7c810799e3c118417f342d30ecec080105395cd" +checksum = "72139d247e5f97a3eff96229a7ae85ead5328a39efe76f8bf5a06313d505b6ea" dependencies = [ "base64 0.22.1", "flate2", "log", "once_cell", - "rustls 0.22.4", + "rustls 0.23.11", "rustls-pki-types", - "rustls-webpki 0.102.2", "serde", "serde_json", "socks", @@ -5630,11 +5844,10 @@ checksum = "711b9620af191e0cdc7468a8d14e709c3dcdb115b36f838e601583af800a370a" [[package]] name = "uuid" -version = "1.7.0" +version = "1.10.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f00cc9702ca12d3c81455259621e676d0f7251cec66a21e98fe2e9a37db93b2a" +checksum = "81dfa00651efa65069b0b6b651f4aaa31ba9e3c3ce0137aaad053604ee7e0314" dependencies = [ - "atomic", "getrandom", "serde", ] @@ -5653,25 +5866,24 @@ checksum = "accd4ea62f7bb7a82fe23066fb0957d48ef677f6eeb8215f372f52e48bb32426" [[package]] name = "vergen" -version = "9.0.0-beta.2" +version = "9.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "107dc53b443fe8cc380798abb75ad6b7038281165109afea1f1b28bb47047ed5" +checksum = "c32e7318e93a9ac53693b6caccfb05ff22e04a44c7cf8a279051f24c09da286f" dependencies = [ "anyhow", - "derive_builder 0.13.1", - "getset", + "derive_builder 0.20.0", "rustversion", "vergen-lib", ] [[package]] name = "vergen-git2" -version = "1.0.0-beta.2" +version = "1.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8875c5d71074bb67118774e3d795ab6fe77c3ae3161cb54e19104cabc49487f1" +checksum = "a62c52cd2b2b8b7ec75fc20111b3022ac3ff83e4fc14b9497cfcfd39c54f9c67" dependencies = [ "anyhow", - "derive_builder 0.13.1", + "derive_builder 0.20.0", "git2", "rustversion", "time", @@ -5681,12 +5893,12 @@ dependencies = [ [[package]] name = "vergen-lib" -version = "0.1.2" +version = "0.1.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "26ebfba72ba904559f25f41ea1512335b5a46459084258cea0857549d9645187" +checksum = "e06bee42361e43b60f363bad49d63798d0f42fb1768091812270eca00c784720" dependencies = [ "anyhow", - "derive_builder 0.13.1", + "derive_builder 0.20.0", "getset", "rustversion", ] @@ -5801,9 +6013,9 @@ checksum = "af190c94f2773fdb3729c55b007a722abb5384da03bc0986df4c289bf5567e96" [[package]] name = "wasm-streams" -version = "0.3.0" +version = "0.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b4609d447824375f43e1ffbc051b50ad8f4b3ae8219680c94452ea05eb240ac7" +checksum = "b65dc4c90b63b118468cf747d8bf3566c1913ef60be765b5730ead9e0a3ba129" dependencies = [ "futures-util", "js-sys", @@ -5843,7 +6055,7 @@ version = "0.16.4" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "471d1c1645d361eb782a1650b1786a8fb58dd625e681a04c09f5ff7c8764a7b0" dependencies = [ - "hashbrown", + "hashbrown 0.14.3", "once_cell", ] @@ -6105,22 +6317,42 @@ dependencies = [ ] [[package]] -name = "winreg" -version = "0.50.0" +name = "winnow" +version = "0.6.13" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "524e57b2c537c0f9b1e69f1965311ec12182b4122e45035b1508cd24d2adadb1" +checksum = "59b5e5f6c299a3c7890b876a2a587f3115162487e704907d9b6cd29473052ba1" +dependencies = [ + "memchr", +] + +[[package]] +name = "winreg" +version = "0.52.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a277a57398d4bfa075df44f501a17cfdf8542d224f0d36095a2adc7aee4ef0a5" dependencies = [ "cfg-if", "windows-sys 0.48.0", ] [[package]] -name = "xattr" -version = "1.0.1" +name = "wyz" +version = "0.5.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f4686009f71ff3e5c4dbcf1a282d0a44db3f021ba69350cd42086b3e5f1c6985" +checksum = "05f360fc0b24296329c78fda852a1e9ae82de9cf7b27dae4b7f62f118f77b9ed" +dependencies = [ + "tap", +] + +[[package]] +name = "xattr" +version = "1.3.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8da84f1a25939b27f6820d92aed108f83ff920fdf11a7b19366c27c4cda81d4f" dependencies = [ "libc", + "linux-raw-sys", + "rustix", ] [[package]] @@ -6152,15 +6384,6 @@ version = "0.5.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "aed111bd9e48a802518765906cbdadf0b45afb72b9c81ab049a3b86252adffdd" -[[package]] -name = "yaml-rust" -version = "0.4.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "56c1936c4cc7a1c9ab21a1ebb602eb942ba868cbd44a99cb7cdc5892335e1c85" -dependencies = [ - "linked-hash-map", -] - [[package]] name = "yaup" version = "0.3.1" @@ -6239,55 +6462,106 @@ dependencies = [ [[package]] name = "zeroize" -version = "1.7.0" +version = "1.8.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "525b4ec142c6b68a2d10f01f7bbf6755599ca3f81ea53b8431b7dd348f5fdb2d" +checksum = "ced3678a2879b30306d323f4542626697a464a97c0a07c9aebf7ebca65cd4dde" +dependencies = [ + "zeroize_derive", +] + +[[package]] +name = "zeroize_derive" +version = "1.4.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ce36e65b0d2999d2aafac989fb249189a141aee1f53c612c1f37d72631959f69" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.60", +] [[package]] name = "zerovec" -version = "0.10.1" +version = "0.10.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "eff4439ae91fb5c72b8abc12f3f2dbf51bd27e6eadb9f8a5bc8898dddb0e27ea" +checksum = "aa2b893d79df23bfb12d5461018d408ea19dfafe76c2c7ef6d4eba614f8ff079" dependencies = [ "zerofrom", ] [[package]] name = "zip" -version = "0.6.6" +version = "1.1.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "760394e246e4c28189f19d488c058bf16f564016aefac5d32bb1f3b51d5e9261" +checksum = "9cc23c04387f4da0374be4533ad1208cbb091d5c11d070dfef13676ad6497164" +dependencies = [ + "arbitrary", + "crc32fast", + "crossbeam-utils", + "displaydoc", + "indexmap", + "num_enum", + "thiserror", +] + +[[package]] +name = "zip" +version = "2.1.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "775a2b471036342aa69bc5a602bc889cb0a06cda00477d0c69566757d5553d39" dependencies = [ "aes", - "byteorder", + "arbitrary", "bzip2", "constant_time_eq", "crc32fast", "crossbeam-utils", + "deflate64", + "displaydoc", "flate2", "hmac", + "indexmap", + "lzma-rs", + "memchr", "pbkdf2", + "rand", "sha1", + "thiserror", "time", + "zeroize", + "zopfli", "zstd", ] [[package]] -name = "zstd" -version = "0.11.2+zstd.1.5.2" +name = "zopfli" +version = "0.8.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "20cc960326ece64f010d2d2107537f26dc589a6573a316bd5b1dba685fa5fde4" +checksum = "e5019f391bac5cf252e93bbcc53d039ffd62c7bfb7c150414d61369afe57e946" +dependencies = [ + "bumpalo", + "crc32fast", + "lockfree-object-pool", + "log", + "once_cell", + "simd-adler32", +] + +[[package]] +name = "zstd" +version = "0.13.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "fcf2b778a664581e31e389454a7072dab1647606d44f7feea22cd5abb9c9f3f9" dependencies = [ "zstd-safe", ] [[package]] name = "zstd-safe" -version = "5.0.2+zstd.1.5.2" +version = "7.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1d2a5585e04f9eea4b2a3d1eca508c4dee9592a89ef6f450c11719da0726f4db" +checksum = "fa556e971e7b568dc775c136fc9de8c779b1c2fc3a63defaafadffdbd3181afa" dependencies = [ - "libc", "zstd-sys", ] diff --git a/milli/src/update/index_documents/mod.rs b/milli/src/update/index_documents/mod.rs index d19b29852..0baf63bb1 100644 --- a/milli/src/update/index_documents/mod.rs +++ b/milli/src/update/index_documents/mod.rs @@ -197,10 +197,18 @@ where output } + // Setup the security and limits of the Engine let mut engine = Engine::new(); engine.set_optimization_level(OptimizationLevel::Full); + engine.set_max_call_levels(1000); // It is an arbitrary value. We need to let users define this in the settings. engine.set_max_operations(1_000_000); + engine.set_max_variables(1000); + engine.set_max_functions(30); + engine.set_max_expr_depths(100, 1000); + engine.set_max_string_size(1024 * 1024 * 1024); // 1 GiB + engine.set_max_array_size(10_000); + engine.set_max_map_size(10_000); let ast = engine.compile(code).map_err(UserError::DocumentEditionCompilationError)?; let fields_ids_map = self.index.fields_ids_map(self.wtxn)?; From 6e80364c509585db637e2dccd64d0ea5e575baeb Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Cl=C3=A9ment=20Renault?= Date: Thu, 11 Jul 2024 11:00:27 +0200 Subject: [PATCH 29/29] Apply review comments --- meilisearch-types/src/deserr/mod.rs | 5 ++++- meilisearch-types/src/error.rs | 1 + meilisearch/src/routes/indexes/documents.rs | 4 ++-- milli/src/update/index_documents/mod.rs | 10 ++++++---- milli/src/update/index_documents/parallel.rs | 2 +- 5 files changed, 14 insertions(+), 8 deletions(-) diff --git a/meilisearch-types/src/deserr/mod.rs b/meilisearch-types/src/deserr/mod.rs index 462b356ab..87ca342d7 100644 --- a/meilisearch-types/src/deserr/mod.rs +++ b/meilisearch-types/src/deserr/mod.rs @@ -151,11 +151,14 @@ make_missing_field_convenience_builder!(MissingApiKeyExpiresAt, missing_api_key_ make_missing_field_convenience_builder!(MissingApiKeyIndexes, missing_api_key_indexes); make_missing_field_convenience_builder!(MissingSwapIndexes, missing_swap_indexes); make_missing_field_convenience_builder!(MissingDocumentFilter, missing_document_filter); -make_missing_field_convenience_builder!(MissingDocumentFilter, missing_document_edition_function); make_missing_field_convenience_builder!( MissingFacetSearchFacetName, missing_facet_search_facet_name ); +make_missing_field_convenience_builder!( + MissingDocumentEditionFunction, + missing_document_edition_function +); // Integrate a sub-error into a [`DeserrError`] by taking its error message but using // the default error code (C) from `Self` diff --git a/meilisearch-types/src/error.rs b/meilisearch-types/src/error.rs index 3e1316955..092d852ac 100644 --- a/meilisearch-types/src/error.rs +++ b/meilisearch-types/src/error.rs @@ -224,6 +224,7 @@ InvalidDocumentCsvDelimiter , InvalidRequest , BAD_REQUEST ; InvalidDocumentFields , InvalidRequest , BAD_REQUEST ; InvalidDocumentRetrieveVectors , InvalidRequest , BAD_REQUEST ; MissingDocumentFilter , InvalidRequest , BAD_REQUEST ; +MissingDocumentEditionFunction , InvalidRequest , BAD_REQUEST ; InvalidDocumentFilter , InvalidRequest , BAD_REQUEST ; InvalidDocumentGeoField , InvalidRequest , BAD_REQUEST ; InvalidVectorDimensions , InvalidRequest , BAD_REQUEST ; diff --git a/meilisearch/src/routes/indexes/documents.rs b/meilisearch/src/routes/indexes/documents.rs index 412ac8e47..20c0aed07 100644 --- a/meilisearch/src/routes/indexes/documents.rs +++ b/meilisearch/src/routes/indexes/documents.rs @@ -24,7 +24,7 @@ use meilisearch_types::{milli, Document, Index}; use mime::Mime; use once_cell::sync::Lazy; use serde::Deserialize; -use serde_json::{Map, Value}; +use serde_json::Value; use tempfile::tempfile; use tokio::fs::File; use tokio::io::{AsyncSeekExt, AsyncWriteExt, BufWriter}; @@ -629,7 +629,7 @@ pub async fn edit_documents_by_function( filter_expr: filter, context: match context { Some(Value::Object(m)) => Some(m), - None => Some(Map::default()), + None => None, _ => { return Err(ResponseError::from_msg( "The context must be an object".to_string(), diff --git a/milli/src/update/index_documents/mod.rs b/milli/src/update/index_documents/mod.rs index 0baf63bb1..271d4037c 100644 --- a/milli/src/update/index_documents/mod.rs +++ b/milli/src/update/index_documents/mod.rs @@ -216,11 +216,11 @@ where let mut documents_batch_builder = tempfile::tempfile().map(DocumentsBatchBuilder::new)?; let mut documents_to_remove = RoaringBitmap::new(); - let context: Dynamic = match context { + let context: Option = match context { Some(context) => { - serde_json::from_value(context.into()).map_err(InternalError::SerdeJson)? + Some(serde_json::from_value(context.into()).map_err(InternalError::SerdeJson)?) } - None => Dynamic::from(()), + None => None, }; enum DocumentEdition { @@ -244,7 +244,9 @@ where let document_id = &json_document[primary_key]; let mut scope = Scope::new(); - scope.push_constant_dynamic("context", context.clone()); + if let Some(context) = context.as_ref().cloned() { + scope.push_constant_dynamic("context", context.clone()); + } scope.push("doc", rhai_document); // That's were the magic happens. We run the user script // which edits "doc" scope variable reprensenting the document diff --git a/milli/src/update/index_documents/parallel.rs b/milli/src/update/index_documents/parallel.rs index 9769e8ab5..52e72a378 100644 --- a/milli/src/update/index_documents/parallel.rs +++ b/milli/src/update/index_documents/parallel.rs @@ -60,7 +60,7 @@ impl<'t> ImmutableObkvs<'t> { let name = self.fields_ids_map.name(id).ok_or( crate::error::FieldIdMapMissingEntry::FieldId { field_id: id, - process: "allobkv_to_rhaimap", + process: "all_obkv_to_rhaimap", }, )?; let value = serde_json::from_slice(value)