Skip to content

Commit ea7eb5c

Browse files
committed
drop CBOR index support & migration
1 parent c088458 commit ea7eb5c

File tree

7 files changed

+52
-462
lines changed

7 files changed

+52
-462
lines changed

Diff for: .cargo/audit.toml

-3
Original file line numberDiff line numberDiff line change
@@ -3,9 +3,6 @@ ignore = [
33
"RUSTSEC-2020-0036", # failure is officially deprecated/unmaintained
44
# https://github.com/rust-lang/docs.rs/issues/1014
55

6-
"RUSTSEC-2021-0127", # serde_cbor is unmaintained
7-
# https://github.com/rust-lang/docs.rs/issues/1568
8-
96
"RUSTSEC-2023-0018", # rustwide -> remove_dir_all,TOCTOU / Race Condition
107
# https://github.com/rust-lang/docs.rs/issues/2074
118
]

Diff for: Cargo.lock

+8-29
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Diff for: Cargo.toml

-2
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,6 @@ string_cache = "0.8.0"
6868
postgres-types = { version = "0.2", features = ["derive"] }
6969
zip = {version = "0.6.2", default-features = false, features = ["bzip2"]}
7070
bzip2 = "0.4.4"
71-
serde_cbor = "0.11.1"
7271
getrandom = "0.2.1"
7372
itertools = { version = "0.11.0", optional = true}
7473
rusqlite = { version = "0.29.0", features = ["bundled"] }
@@ -87,7 +86,6 @@ uuid = "1.1.2"
8786
# Data serialization and deserialization
8887
serde = { version = "1.0", features = ["derive"] }
8988
serde_json = "1.0"
90-
memmap2 = "0.5.0"
9189

9290
# axum dependencies
9391
axum = { version = "0.6.1", features = ["headers"]}

Diff for: src/bin/cratesfyi.rs

+2-9
Original file line numberDiff line numberDiff line change
@@ -15,8 +15,8 @@ use docs_rs::utils::{
1515
remove_crate_priority, set_crate_priority, ConfigName,
1616
};
1717
use docs_rs::{
18-
migrate_old_archive_indexes, start_background_metrics_webserver, start_web_server, BuildQueue,
19-
Config, Context, Index, InstanceMetrics, PackageKind, RustwideBuilder, ServiceMetrics, Storage,
18+
start_background_metrics_webserver, start_web_server, BuildQueue, Config, Context, Index,
19+
InstanceMetrics, PackageKind, RustwideBuilder, ServiceMetrics, Storage,
2020
};
2121
use humantime::Duration;
2222
use once_cell::sync::OnceCell;
@@ -482,9 +482,6 @@ enum DatabaseSubcommand {
482482
/// Backfill GitHub/Gitlab stats for crates.
483483
BackfillRepositoryStats,
484484

485-
/// migrate the old CBOR archive index files to SQLIte
486-
MigrateArchiveIndex,
487-
488485
/// Updates info for a crate from the registry's API
489486
UpdateCrateRegistryFields {
490487
#[arg(name = "CRATE")]
@@ -536,10 +533,6 @@ impl DatabaseSubcommand {
536533
ctx.repository_stats_updater()?.update_all_crates()?;
537534
}
538535

539-
Self::MigrateArchiveIndex => {
540-
migrate_old_archive_indexes(&*ctx.storage()?, &mut *ctx.conn()?)?;
541-
}
542-
543536
Self::BackfillRepositoryStats => {
544537
ctx.repository_stats_updater()?.backfill_repositories()?;
545538
}

Diff for: src/lib.rs

-1
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,6 @@ pub use self::docbuilder::PackageKind;
99
pub use self::docbuilder::RustwideBuilder;
1010
pub use self::index::Index;
1111
pub use self::metrics::{InstanceMetrics, ServiceMetrics};
12-
pub use self::storage::migrate_old_archive_indexes;
1312
pub use self::storage::Storage;
1413
pub use self::web::{start_background_metrics_webserver, start_web_server};
1514

0 commit comments

Comments
 (0)