diff --git a/lib/Cargo.toml b/lib/Cargo.toml index c6bc72913..f675ee7b5 100644 --- a/lib/Cargo.toml +++ b/lib/Cargo.toml @@ -53,8 +53,4 @@ test-case = "2.2.2" testutils = { path = "testutils" } [features] -default = ["legacy_protobuf"] vendored-openssl = ["git2/vendored-openssl"] -# Enable upgrade of repositories created with storage backends based on -# Protobuf format (from before we switched to Thrift) -legacy_protobuf = [] diff --git a/lib/src/lib.rs b/lib/src/lib.rs index 9e33a1408..4e72926b2 100644 --- a/lib/src/lib.rs +++ b/lib/src/lib.rs @@ -37,7 +37,6 @@ pub mod nightly_shims; pub mod op_heads_store; pub mod op_store; pub mod operation; -#[cfg(feature = "legacy_protobuf")] mod proto_op_store; pub mod protos; pub mod refs; diff --git a/lib/src/simple_op_store.rs b/lib/src/simple_op_store.rs index 84cf86186..8f5d1c46b 100644 --- a/lib/src/simple_op_store.rs +++ b/lib/src/simple_op_store.rs @@ -31,7 +31,6 @@ use crate::op_store::{ BranchTarget, OpStore, OpStoreError, OpStoreResult, Operation, OperationId, OperationMetadata, RefTarget, View, ViewId, WorkspaceId, }; -#[cfg(feature = "legacy_protobuf")] use crate::proto_op_store::ProtoOpStore; use crate::simple_op_store_model; @@ -60,7 +59,6 @@ pub struct SimpleOpStore { delegate: ThriftOpStore, } -#[cfg(feature = "legacy_protobuf")] fn upgrade_to_thrift(store_path: PathBuf) -> std::io::Result<()> { println!("Upgrading operation log to Thrift format..."); let proto_store = ProtoOpStore::load(store_path.clone()); @@ -170,13 +168,11 @@ fn upgrade_to_thrift(store_path: PathBuf) -> std::io::Result<()> { impl SimpleOpStore { pub fn init(store_path: PathBuf) -> Self { - #[cfg(feature = "legacy_protobuf")] fs::write(store_path.join("thrift_store"), "").unwrap(); let delegate = ThriftOpStore::init(store_path); SimpleOpStore { delegate } } - #[cfg(feature = "legacy_protobuf")] pub fn load(store_path: PathBuf) -> Self { if !store_path.join("thrift_store").exists() { upgrade_to_thrift(store_path.clone()) @@ -185,12 +181,6 @@ impl SimpleOpStore { let delegate = ThriftOpStore::load(store_path); SimpleOpStore { delegate } } - - #[cfg(not(feature = "legacy_protobuf"))] - pub fn load(store_path: PathBuf) -> Self { - let delegate = ThriftOpStore::load(store_path); - SimpleOpStore { delegate } - } } fn not_found_to_store_error(err: std::io::Error) -> OpStoreError {