mirror of
https://github.com/AppFlowy-IO/AppFlowy.git
synced 2024-08-30 18:12:39 +00:00
This reverts commit c1006c18c3
.
This commit is contained in:
@ -14,7 +14,7 @@ bytes.workspace = true
|
||||
anyhow.workspace = true
|
||||
thiserror = "1.0"
|
||||
validator = "0.16.0"
|
||||
tokio = { workspace = true, features = ["sync", "rt"] }
|
||||
tokio = { workspace = true, features = ["sync"]}
|
||||
|
||||
fancy-regex = { version = "0.11.0" }
|
||||
lib-dispatch = { workspace = true, optional = true }
|
||||
@ -32,23 +32,16 @@ collab-document = { version = "0.1.0", optional = true }
|
||||
collab-plugins = { version = "0.1.0", optional = true }
|
||||
collab-folder = { version = "0.1.0", optional = true }
|
||||
client-api = { version = "0.1.0", optional = true }
|
||||
tantivy = { version = "0.21.1", optional = true }
|
||||
|
||||
|
||||
[features]
|
||||
impl_from_dispatch_error = ["lib-dispatch"]
|
||||
impl_from_serde = []
|
||||
impl_from_reqwest = ["reqwest"]
|
||||
impl_from_collab_persistence = ["collab-plugins"]
|
||||
impl_from_collab_document = [
|
||||
"collab-document",
|
||||
"impl_from_reqwest",
|
||||
"collab-plugins",
|
||||
]
|
||||
impl_from_collab_document = ["collab-document", "impl_from_reqwest", "collab-plugins"]
|
||||
impl_from_collab_folder = ["collab-folder"]
|
||||
impl_from_collab_database = ["collab-database"]
|
||||
impl_from_collab_database= ["collab-database"]
|
||||
impl_from_url = ["url"]
|
||||
impl_from_tantivy = ["tantivy"]
|
||||
|
||||
impl_from_sqlite = ["flowy-sqlite", "r2d2"]
|
||||
impl_from_appflowy_cloud = ["client-api"]
|
||||
@ -57,4 +50,6 @@ tauri_ts = ["flowy-codegen/ts"]
|
||||
web_ts = ["flowy-codegen/ts"]
|
||||
|
||||
[build-dependencies]
|
||||
flowy-codegen = { workspace = true, features = ["proto_gen"] }
|
||||
flowy-codegen = { workspace = true, features = [
|
||||
"proto_gen",
|
||||
] }
|
||||
|
@ -260,23 +260,11 @@ pub enum ErrorCode {
|
||||
#[error("Cloud request payload too large")]
|
||||
CloudRequestPayloadTooLarge = 90,
|
||||
|
||||
#[error("IndexWriter failed to commit")]
|
||||
IndexWriterFailedCommit = 91,
|
||||
|
||||
#[error("Failed to open Index directory")]
|
||||
FailedToOpenIndexDir = 92,
|
||||
|
||||
#[error("Failed to parse query")]
|
||||
FailedToParseQuery = 93,
|
||||
|
||||
#[error("FolderIndexManager or its dependencies are unavailable")]
|
||||
FolderIndexManagerUnavailable = 94,
|
||||
|
||||
#[error("Workspace limit exceeded")]
|
||||
WorkspaceLimitExeceeded = 95,
|
||||
WorkspaceLimitExeceeded = 91,
|
||||
|
||||
#[error("Workspace member limit exceeded")]
|
||||
WorkspaceMemberLimitExeceeded = 96,
|
||||
WorkspaceMemberLimitExeceeded = 92,
|
||||
}
|
||||
|
||||
impl ErrorCode {
|
||||
|
@ -113,10 +113,6 @@ impl FlowyError {
|
||||
static_flowy_error!(server_error, ErrorCode::InternalServerError);
|
||||
static_flowy_error!(not_support, ErrorCode::NotSupportYet);
|
||||
static_flowy_error!(local_version_not_support, ErrorCode::LocalVersionNotSupport);
|
||||
static_flowy_error!(
|
||||
folder_index_manager_unavailable,
|
||||
ErrorCode::FolderIndexManagerUnavailable
|
||||
);
|
||||
}
|
||||
|
||||
impl std::convert::From<ErrorCode> for FlowyError {
|
||||
|
@ -24,6 +24,3 @@ mod cloud;
|
||||
|
||||
#[cfg(feature = "impl_from_url")]
|
||||
mod url;
|
||||
|
||||
#[cfg(feature = "impl_from_tantivy")]
|
||||
mod tantivy;
|
||||
|
@ -1,21 +0,0 @@
|
||||
use tantivy::{directory::error::OpenDirectoryError, query::QueryParserError, TantivyError};
|
||||
|
||||
use crate::{ErrorCode, FlowyError};
|
||||
|
||||
impl std::convert::From<TantivyError> for FlowyError {
|
||||
fn from(error: TantivyError) -> Self {
|
||||
FlowyError::new(ErrorCode::IndexWriterFailedCommit, error)
|
||||
}
|
||||
}
|
||||
|
||||
impl std::convert::From<OpenDirectoryError> for FlowyError {
|
||||
fn from(error: OpenDirectoryError) -> Self {
|
||||
FlowyError::new(ErrorCode::FailedToOpenIndexDir, error)
|
||||
}
|
||||
}
|
||||
|
||||
impl std::convert::From<QueryParserError> for FlowyError {
|
||||
fn from(error: QueryParserError) -> Self {
|
||||
FlowyError::new(ErrorCode::FailedToParseQuery, error)
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user