serayuzgur / crates

crates is an extension aims to help people to manage their dependencies for rust (crates.io & TOML).
https://marketplace.visualstudio.com/items?itemName=serayuzgur.crates
MIT License
238 stars 36 forks source link

Use sparse index #204

Closed BarbossHack closed 1 year ago

BarbossHack commented 1 year ago

fixes #197

serayuzgur commented 1 year ago

Please create an new file under api like sparse-index-server.ts and implement logic under it. We should bind it to a configuration which one to use. For example if server adress is empty extension can use sparse implementation.

simonsan commented 1 year ago

I agree, I think it would be good to keep both implementations and switch depending on the users' setting. Like that, serayuzgur can still implement their use case, while most other people would use the sparse index.

BarbossHack commented 1 year ago

Please create an new file under api like sparse-index-server.ts and implement logic under it. We should bind it to a configuration which one to use. For example if server adress is empty extension can use sparse implementation.

I've pushed new changes, following your advice :

serayuzgur commented 1 year ago

StatusBar now display the current indexServerURL domain name @BarbossHack Isn't it too verbose

BarbossHack commented 1 year ago

Isn't it too verbose

Before it was Fetching crates.io, now it's Fetching index.crates.io by default, and else (for example) Fetching api.crates-vsc.space, it should be ok imho. But we could also change it to Fetching index

simonsan commented 1 year ago

StatusBar now display the current indexServerURL domain name @BarbossHack Isn't it too verbose

As a user, I like the addition, and don't find it verbose. It should be limited to the third-level.second-level.top-level domains, though.

serayuzgur commented 1 year ago

@BarbossHack thanks , i will test it and publish .

BarbossHack commented 1 year ago

I've pushed changes, to fix https://github.com/serayuzgur/crates/issues/202 for sparse-index fetching (see toLowerCase in sparse-index-server.ts)

CAD97 commented 1 year ago

Is there an expected timeline for releasing this?

serayuzgur commented 1 year ago

@CAD97 Just published 0.6.2