Commit graph

24 commits

Author SHA1 Message Date
Jiahao XU
a271e695a5
Ignore if package already up-to-date
Signed-off-by: Jiahao XU <Jiahao_XU@outlook.com>
2022-08-08 19:18:30 +10:00
Jiahao XU
065f62a625
Use VersionReq for Options::version_req and update usage of
`CrateName` in `binstall::install`

Signed-off-by: Jiahao XU <Jiahao_XU@outlook.com>
2022-08-08 18:05:59 +10:00
Jiahao XU
34f714c64f
Pass --force to cargo-install
Signed-off-by: Jiahao XU <Jiahao_XU@outlook.com>
2022-08-08 18:05:58 +10:00
Jiahao XU
9cb8df1d48
Fix passing --quiet to cargo-install
Signed-off-by: Jiahao XU <Jiahao_XU@outlook.com>
2022-08-05 15:45:46 +10:00
Jiahao XU
b6a539735d
Pass -q to cargo-install if log_level is set to off
Signed-off-by: Jiahao XU <Jiahao_XU@outlook.com>
2022-08-04 23:21:29 +10:00
Jiahao XU
3d28549fd6
Apply clippy suggestions in binstall::install
Signed-off-by: Jiahao XU <Jiahao_XU@outlook.com>
2022-08-04 23:18:00 +10:00
Jiahao XU
346bb8ee67
Fix binstall::resolve (#266) 2022-08-04 11:12:06 +12:00
Jiahao XU
b7cfa0aa64
Use CompactString for field Resolution::Fetch::version
Signed-off-by: Jiahao XU <Jiahao_XU@outlook.com>
2022-08-02 22:21:45 +10:00
Jiahao XU
d430c077d4
Use CompactString for fields of CrateName
Since most of the time, they are shorter than 24 bytes.

Signed-off-by: Jiahao XU <Jiahao_XU@outlook.com>
2022-08-02 22:17:11 +10:00
Félix Saparelli
47fd7c14a6
Add -V, clean up errors and help text (#259)
Co-authored-by: Jiahao XU <Jiahao_XU@outlook.com>
2022-07-30 17:26:52 +12:00
Jiahao XU
98556cb2af
Add field MetaData::other for forward compatibility
Signed-off-by: Jiahao XU <Jiahao_XU@outlook.com>
2022-07-28 19:24:14 +10:00
Jiahao XU
2f27a5fd93
Refactor: Use binstall_v1::MetaData in mod binstall
Signed-off-by: Jiahao XU <Jiahao_XU@outlook.com>
2022-07-27 19:44:16 +10:00
Jiahao XU
92f4d0af95
Fix metafile updating: Update them in entry only
to avoid race condition.

Signed-off-by: Jiahao XU <Jiahao_XU@outlook.com>
2022-07-22 17:58:29 +10:00
Jiahao XU
adbc587f3b
Merge pull request #222 from NobodyXu/refactor
Refactor: Make appending to metafiles easier and fix their err handling
2022-07-22 11:29:12 +10:00
Jiahao XU
a3fcc298ab
Avoid CrateVersionSource::clone for insertion in metafiles
Signed-off-by: Jiahao XU <Jiahao_XU@outlook.com>
2022-07-22 01:38:44 +10:00
Jiahao XU
1e725a9ffe
Refactor: Extract Crates2Json::append{_to_path}
Signed-off-by: Jiahao XU <Jiahao_XU@outlook.com>
2022-07-21 19:58:23 +10:00
Jiahao XU
31d9716d28
Refactor: Extract CratesToml::append{_to_path}
Signed-off-by: Jiahao XU <Jiahao_XU@outlook.com>
2022-07-21 19:50:23 +10:00
Jiahao XU
6a95bb07e0
Add field desired_targets to binstall::Options
Signed-off-by: Jiahao XU <Jiahao_XU@outlook.com>
2022-07-21 15:05:12 +10:00
Jiahao XU
aa88dce215
Add field cli_overrides to binstall::Options
Signed-off-by: Jiahao XU <Jiahao_XU@outlook.com>
2022-07-21 15:00:01 +10:00
Jiahao XU
f09004b5b7
Optimize: Share crates_io_api::AsyncClient
So that the connection pool and the rate limit will be shared.

Signed-off-by: Jiahao XU <Jiahao_XU@outlook.com>
2022-07-21 14:50:51 +10:00
Jiahao XU
6180e9ec3e
Add comment in fn resolve
Signed-off-by: Jiahao XU <Jiahao_XU@outlook.com>
2022-07-21 13:00:58 +10:00
Jiahao XU
3981400ebb
Create new type LazyJobserverClient
and use it to replace `jobserver::Client`.

Signed-off-by: Jiahao XU <Jiahao_XU@outlook.com>
2022-07-20 17:54:17 +10:00
Jiahao XU
2490cd5a84
Refactor: Extract new mod binstall/install.rs
Signed-off-by: Jiahao XU <Jiahao_XU@outlook.com>
2022-07-20 17:30:34 +10:00
Jiahao XU
5e35604012
Refactor: Extract new mod binstall/resolve.rs
Signed-off-by: Jiahao XU <Jiahao_XU@outlook.com>
2022-07-20 17:28:53 +10:00