Skip to content

Commit 347b52c

Browse files
committed
Use tame-index
1 parent 427d792 commit 347b52c

7 files changed

Lines changed: 838 additions & 675 deletions

File tree

.github/workflows/ci.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,7 @@ jobs:
3737
fail-fast: ${{ github.event_name == 'merge_group' }}
3838
matrix:
3939
environment: [ubuntu-latest, macos-latest, windows-latest]
40+
index: [crates-index, tame-index]
4041

4142
runs-on: ${{ matrix.environment }}
4243

Cargo.lock

Lines changed: 1 addition & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Cargo.toml

Lines changed: 9 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -12,18 +12,19 @@ anyhow = { version = "1.0", features = ["backtrace"] }
1212
cargo_metadata = "0.23"
1313
chrono = "0.4"
1414
clap = { version = "4.5", features = ["cargo", "derive", "wrap_help"] }
15-
crates-index = { version = "3.12", features = ["git-https-reqwest"] }
15+
crates-index = { version = "3.12", features = ["git-https-reqwest"], optional = true }
1616
crates_io_api = "0.12.0"
1717
curl = "0.4"
1818
elaborate = "0.2"
1919
env_logger = "0.11"
20-
home = "0.5"
20+
home = { version = "0.5", optional = true }
2121
log = "0.4"
2222
regex = "1.12"
2323
remain = "0.2"
2424
serde = "1.0"
2525
serde_json = "1.0"
2626
sha1_smol = { version = "1.0", features = ["std"] }
27+
tame-index = { version = "0.26", features = ["sparse"], optional = true }
2728
tempfile = "3.26"
2829
termcolor = "1.4"
2930
toml = "0.9"
@@ -55,15 +56,19 @@ tokio = "1.50"
5556
elaborate = "0.2"
5657

5758
[features]
58-
default = ["on-disk-cache", "lock-index"]
59+
default = ["on-disk-cache", "crates-index"]
5960
on-disk-cache = []
60-
lock-index = ["libc", "windows-sys"]
61+
crates-index = ["dep:crates-index", "dep:home", "libc", "windows-sys"]
62+
tame-index = ["dep:tame-index", "reqwest/blocking"]
6163
__mock_github = []
6264
__real_github = []
6365

6466
# smoelius: Old feature that was renamed.
6567
cache-repositories = ["on-disk-cache"]
6668

69+
# smoelius: Old feature that was renamed.
70+
lock-index = ["crates-index"]
71+
6772
# smoelius: Old feature that is no longer used.
6873
ei = []
6974

build.rs

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,12 @@ fn main() {
1313
#[cfg(all(feature = "cache-repositories", not(feature = "on-disk-cache")))]
1414
println!("cargo:warning=Feature `cache-repositories` has been renamed to `on-disk-cache`");
1515

16+
#[cfg(all(feature = "crates-index", feature = "tame-index"))]
17+
println!(
18+
"cargo:warning=Both `crates-index` and `tame-index` features are enabled; using \
19+
`tame-index`"
20+
);
21+
1622
let out_dir = var_wc("OUT_DIR").unwrap();
1723
let path_buf = PathBuf::from(out_dir).join("after_help.rs");
1824
let contents = format!(

0 commit comments

Comments
 (0)