bump dependencies

This commit is contained in:
mpostma 2021-09-08 12:34:56 +02:00
parent 6e59da26d4
commit 0f7625e29a
11 changed files with 407 additions and 431 deletions

703
Cargo.lock generated

File diff suppressed because it is too large Load Diff

View File

@ -5,4 +5,4 @@ authors = ["marin <postma.marin@protonmail.com>"]
edition = "2018" edition = "2018"
[dependencies] [dependencies]
actix-http = "=3.0.0-beta.6" actix-http = "=3.0.0-beta.10"

View File

@ -11,81 +11,79 @@ name = "meilisearch"
path = "src/main.rs" path = "src/main.rs"
[build-dependencies] [build-dependencies]
actix-web-static-files = { git = "https://github.com/MarinPostma/actix-web-static-files.git", rev = "6db8c3e", optional = true } actix-web-static-files = { git = "https://github.com/MarinPostma/actix-web-static-files.git", rev = "39d8006", optional = true }
anyhow = { version = "*", optional = true } anyhow = { version = "1.0.43", optional = true }
cargo_toml = { version = "0.9.0", optional = true } cargo_toml = { version = "0.9", optional = true }
hex = { version = "0.4.3", optional = true } hex = { version = "0.4.3", optional = true }
reqwest = { version = "0.11.3", features = ["blocking", "rustls-tls"], default-features = false, optional = true } reqwest = { version = "0.11.4", features = ["blocking", "rustls-tls"], default-features = false, optional = true }
sha-1 = { version = "0.9.4", optional = true } sha-1 = { version = "0.9.8", optional = true }
tempfile = { version = "3.1.0", optional = true } tempfile = { version = "3.2.0", optional = true }
vergen = { version = "5.1.15", default-features = false, features = ["git"] } vergen = { version = "5.1.15", default-features = false, features = ["git"] }
zip = { version = "0.5.12", optional = true } zip = { version = "0.5.13", optional = true }
[dependencies] [dependencies]
actix-cors = { git = "https://github.com/MarinPostma/actix-extras.git", rev = "2dac1a4"} actix-cors = { git = "https://github.com/MarinPostma/actix-extras.git", rev = "963ac94d" }
actix-http = { version = "=3.0.0-beta.6" } actix-web = { version = "4.0.0-beta.9", features = ["rustls"] }
actix-service = "2.0.0" actix-web-static-files = { git = "https://github.com/MarinPostma/actix-web-static-files.git", rev = "39d8006", optional = true }
actix-web = { version = "=4.0.0-beta.6", features = ["rustls"] } anyhow = "1.0.43"
actix-web-static-files = { git = "https://github.com/MarinPostma/actix-web-static-files.git", rev = "6db8c3e", optional = true } async-stream = "0.3.2"
anyhow = "1.0.36" async-trait = "0.1.51"
async-stream = "0.3.0" arc-swap = "1.3.2"
async-trait = "0.1.42" byte-unit = { version = "4.0.12", default-features = false, features = ["std"] }
arc-swap = "1.2.0" bytes = "1.1.0"
byte-unit = { version = "4.0.9", default-features = false, features = ["std"] }
bytes = "0.6.0"
chrono = { version = "0.4.19", features = ["serde"] } chrono = { version = "0.4.19", features = ["serde"] }
crossbeam-channel = "0.5.0" crossbeam-channel = "0.5.1"
either = "1.6.1" either = "1.6.1"
env_logger = "0.8.2" env_logger = "0.9.0"
flate2 = "1.0.19" flate2 = "1.0.21"
fst = "0.4.5" fst = "0.4.7"
futures = "0.3.7" futures = "0.3.17"
futures-util = "0.3.8" futures-util = "0.3.17"
heed = { git = "https://github.com/Kerollmops/heed", tag = "v0.12.1" } heed = { git = "https://github.com/Kerollmops/heed", tag = "v0.12.1" }
http = "0.2.1" http = "0.2.4"
indexmap = { version = "1.3.2", features = ["serde-1"] } indexmap = { version = "1.7.0", features = ["serde-1"] }
itertools = "0.10.0" itertools = "0.10.1"
log = "0.4.8" log = "0.4.14"
main_error = "0.1.0" main_error = "0.1.1"
meilisearch-error = { path = "../meilisearch-error" } meilisearch-error = { path = "../meilisearch-error" }
meilisearch-tokenizer = { git = "https://github.com/meilisearch/tokenizer.git", tag = "v0.2.5" } meilisearch-tokenizer = { git = "https://github.com/meilisearch/tokenizer.git", tag = "v0.2.5" }
memmap = "0.7.0" memmap = "0.7.0"
milli = { git = "https://github.com/meilisearch/milli.git", tag = "v0.13.1" } milli = { git = "https://github.com/meilisearch/milli.git", tag = "v0.13.1" }
mime = "0.3.16" mime = "0.3.16"
num_cpus = "1.13.0" num_cpus = "1.13.0"
once_cell = "1.5.2" once_cell = "1.8.0"
parking_lot = "0.11.1" parking_lot = "0.11.2"
rand = "0.7.3" rand = "0.8.4"
rayon = "1.5.0" rayon = "1.5.1"
regex = "1.4.2" regex = "1.5.4"
rustls = "0.19" rustls = "0.19.1"
serde = { version = "1.0", features = ["derive"] } serde = { version = "1.0.130", features = ["derive"] }
serde_json = { version = "1.0.59", features = ["preserve_order"] } serde_json = { version = "1.0.67", features = ["preserve_order"] }
sha2 = "0.9.1" sha2 = "0.9.6"
siphasher = "0.3.2" siphasher = "0.3.7"
slice-group-by = "0.2.6" slice-group-by = "0.2.6"
structopt = "0.3.20" structopt = "0.3.23"
tar = "0.4.29" tar = "0.4.37"
tempfile = "3.1.0" tempfile = "3.2.0"
thiserror = "1.0.24" thiserror = "1.0.28"
tokio = { version = "1", features = ["full"] } tokio = { version = "1.11.0", features = ["full"] }
uuid = { version = "0.8.2", features = ["serde"] } uuid = { version = "0.8.2", features = ["serde"] }
walkdir = "2.3.2" walkdir = "2.3.2"
obkv = "0.2.0" obkv = "0.2.0"
pin-project = "1.0.7" pin-project = "1.0.8"
whoami = { version = "1.1.2", optional = true } whoami = { version = "1.1.3", optional = true }
reqwest = { version = "0.11.3", features = ["json", "rustls-tls"], default-features = false, optional = true } reqwest = { version = "0.11.4", features = ["json", "rustls-tls"], default-features = false, optional = true }
serdeval = "0.1.0" serdeval = "0.1.0"
sysinfo = "0.20.0" sysinfo = "0.20.2"
[dev-dependencies] [dev-dependencies]
actix-rt = "2.1.0" actix-rt = "2.2.0"
assert-json-diff = { branch = "master", git = "https://github.com/qdequele/assert-json-diff" } assert-json-diff = { branch = "master", git = "https://github.com/qdequele/assert-json-diff" }
mockall = "0.9.1" mockall = "0.10.2"
paste = "1.0.5" paste = "1.0.5"
serde_url_params = "0.2.1" serde_url_params = "0.2.1"
tempdir = "0.3.7" tempdir = "0.3.7"
urlencoding = "1.1.1" urlencoding = "2.1.0"
[features] [features]
mini-dashboard = [ mini-dashboard = [

View File

@ -3,8 +3,8 @@ use std::fmt;
use actix_web as aweb; use actix_web as aweb;
use actix_web::body::Body; use actix_web::body::Body;
use actix_web::dev::BaseHttpResponseBuilder;
use actix_web::http::StatusCode; use actix_web::http::StatusCode;
use actix_web::HttpResponseBuilder;
use aweb::error::{JsonPayloadError, QueryPayloadError}; use aweb::error::{JsonPayloadError, QueryPayloadError};
use meilisearch_error::{Code, ErrorCode}; use meilisearch_error::{Code, ErrorCode};
use milli::UserError; use milli::UserError;
@ -43,9 +43,9 @@ where
} }
impl aweb::error::ResponseError for ResponseError { impl aweb::error::ResponseError for ResponseError {
fn error_response(&self) -> aweb::BaseHttpResponse<Body> { fn error_response(&self) -> aweb::HttpResponse<Body> {
let json = serde_json::to_vec(self).unwrap(); let json = serde_json::to_vec(self).unwrap();
BaseHttpResponseBuilder::new(self.status_code()) HttpResponseBuilder::new(self.status_code())
.content_type("application/json") .content_type("application/json")
.body(json) .body(json)
} }
@ -134,7 +134,7 @@ impl ErrorCode for PayloadError {
fn error_code(&self) -> Code { fn error_code(&self) -> Code {
match self { match self {
PayloadError::Json(err) => match err { PayloadError::Json(err) => match err {
JsonPayloadError::Overflow => Code::PayloadTooLarge, JsonPayloadError::Overflow { .. } => Code::PayloadTooLarge,
JsonPayloadError::ContentType => Code::UnsupportedMediaType, JsonPayloadError::ContentType => Code::UnsupportedMediaType,
JsonPayloadError::Payload(aweb::error::PayloadError::Overflow) => { JsonPayloadError::Payload(aweb::error::PayloadError::Overflow) => {
Code::PayloadTooLarge Code::PayloadTooLarge

View File

@ -145,7 +145,7 @@ impl<P: Policy + 'static, D: 'static + Clone> FromRequest for GuardedData<P, D>
fn from_request( fn from_request(
req: &actix_web::HttpRequest, req: &actix_web::HttpRequest,
_payload: &mut actix_http::Payload, _payload: &mut actix_web::dev::Payload,
) -> Self::Future { ) -> Self::Future {
match req.app_data::<Self::Config>() { match req.app_data::<Self::Config>() {
Some(config) => match config { Some(config) => match config {

View File

@ -1,7 +1,7 @@
use std::pin::Pin; use std::pin::Pin;
use std::task::{Context, Poll}; use std::task::{Context, Poll};
use actix_http::error::PayloadError; use actix_web::error::PayloadError;
use actix_web::{dev, web, FromRequest, HttpRequest}; use actix_web::{dev, web, FromRequest, HttpRequest};
use futures::future::{ready, Ready}; use futures::future::{ready, Ready};
use futures::Stream; use futures::Stream;

View File

@ -151,7 +151,7 @@ mod test {
#[actix_rt::test] #[actix_rt::test]
async fn test_normal() { async fn test_normal() {
let mut rng = rand::thread_rng(); let mut rng = rand::thread_rng();
let uuids_num: usize = rng.gen_range(5, 10); let uuids_num: usize = rng.gen_range(5..10);
let uuids = (0..uuids_num) let uuids = (0..uuids_num)
.map(|_| Uuid::new_v4()) .map(|_| Uuid::new_v4())
.collect::<HashSet<_>>(); .collect::<HashSet<_>>();

View File

@ -53,7 +53,7 @@ impl ErrorCode for UpdateActorError {
UpdateActorError::FatalUpdateStoreError => Code::Internal, UpdateActorError::FatalUpdateStoreError => Code::Internal,
UpdateActorError::InvalidPayload(_) => Code::BadRequest, UpdateActorError::InvalidPayload(_) => Code::BadRequest,
UpdateActorError::PayloadError(error) => match error { UpdateActorError::PayloadError(error) => match error {
actix_http::error::PayloadError::Overflow => Code::PayloadTooLarge, actix_web::error::PayloadError::Overflow => Code::PayloadTooLarge,
_ => Code::Internal, _ => Code::Internal,
}, },
} }

View File

@ -1,6 +1,6 @@
use std::{collections::HashSet, path::PathBuf}; use std::{collections::HashSet, path::PathBuf};
use actix_http::error::PayloadError; use actix_web::error::PayloadError;
use tokio::sync::mpsc; use tokio::sync::mpsc;
use uuid::Uuid; use uuid::Uuid;

View File

@ -43,18 +43,15 @@ pub mod data;
pub mod error; pub mod error;
#[macro_use] #[macro_use]
pub mod extractors; pub mod extractors;
#[cfg(all(not(debug_assertions), feature = "analytics"))]
pub mod analytics;
pub mod helpers; pub mod helpers;
mod index; mod index;
mod index_controller; mod index_controller;
pub mod option; pub mod option;
pub mod routes; pub mod routes;
#[cfg(all(not(debug_assertions), feature = "analytics"))]
pub mod analytics;
use crate::extractors::authentication::AuthConfig;
pub use self::data::Data; pub use self::data::Data;
use crate::extractors::authentication::AuthConfig;
pub use option::Opt; pub use option::Opt;
use actix_web::web; use actix_web::web;
@ -65,7 +62,7 @@ use extractors::payload::PayloadConfig;
pub fn configure_data(config: &mut web::ServiceConfig, data: Data) { pub fn configure_data(config: &mut web::ServiceConfig, data: Data) {
let http_payload_size_limit = data.http_payload_size_limit(); let http_payload_size_limit = data.http_payload_size_limit();
config config
.data(data.clone()) .app_data(web::Data::new(data.clone()))
.app_data(data) .app_data(data)
.app_data( .app_data(
web::JsonConfig::default() web::JsonConfig::default()

View File

@ -46,7 +46,7 @@ impl Server {
/// Returns a view to an index. There is no guarantee that the index exists. /// Returns a view to an index. There is no guarantee that the index exists.
pub fn index(&self, uid: impl AsRef<str>) -> Index<'_> { pub fn index(&self, uid: impl AsRef<str>) -> Index<'_> {
Index { Index {
uid: encode(uid.as_ref()), uid: encode(uid.as_ref()).to_string(),
service: &self.service, service: &self.service,
} }
} }