Jiahao XU
a1d7a7c117
Refactor: Extract new mod jobserver_client.rs
...
Signed-off-by: Jiahao XU <Jiahao_XU@outlook.com>
2022-07-20 17:37:23 +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
Jiahao XU
921774b8f9
Refactor: Extract new mod binstall
...
Signed-off-by: Jiahao XU <Jiahao_XU@outlook.com>
2022-07-20 17:26:24 +10:00
Jiahao XU
3a30e870b0
Merge pull request #216 from NobodyXu/feature/batch-installation
...
Feature: Implement batch installation
2022-07-20 17:18:35 +10:00
Jiahao XU
3b82e9e375
Rm unnecessary clone
in install_from_package
...
Signed-off-by: Jiahao XU <Jiahao_XU@outlook.com>
2022-07-20 17:04:26 +10:00
Jiahao XU
1eedae1ee2
Rm unused param temp_dir
from install_from_package
...
Signed-off-by: Jiahao XU <Jiahao_XU@outlook.com>
2022-07-20 16:59:23 +10:00
Jiahao XU
1ebd4bdb75
Refactor: Reduce params of install_from_package
...
Signed-off-by: Jiahao XU <Jiahao_XU@outlook.com>
2022-07-20 16:58:12 +10:00
Jiahao XU
5bdffd9178
Refactor: Impl Source::cratesio_registry
...
Makes initializing `metafiles::CrateVersionSource` more readable and
improves performance since the parsing is now cached.
Signed-off-by: Jiahao XU <Jiahao_XU@outlook.com>
2022-07-20 16:48:34 +10:00
Jiahao XU
3961dbb84a
Add new dep once_cell
v1.13.0
...
Signed-off-by: Jiahao XU <Jiahao_XU@outlook.com>
2022-07-20 16:43:02 +10:00
Jiahao XU
67ca36a0b5
Fix jobserver_client
: Create it as early as possible
...
Signed-off-by: Jiahao XU <Jiahao_XU@outlook.com>
2022-07-19 12:15:00 +10:00
Jiahao XU
2bf7640729
Optimize: Avoid double spawn
if no_confirm
...
Signed-off-by: Jiahao XU <Jiahao_XU@outlook.com>
2022-07-19 12:06:16 +10:00
Jiahao XU
de7ecad32c
Optimize: Avoid creation of Arc<str>
for target
...
in `entry`
Signed-off-by: Jiahao XU <Jiahao_XU@outlook.com>
2022-07-19 12:02:09 +10:00
Jiahao XU
758dab7d4f
Optimize DesiredTargets
: Avoid mem alloc on clone
...
Signed-off-by: Jiahao XU <Jiahao_XU@outlook.com>
2022-07-19 11:59:10 +10:00
Jiahao XU
d58f340a45
Test batch installtion in run_tests_unix.sh
...
Signed-off-by: Jiahao XU <Jiahao_XU@outlook.com>
2022-07-19 00:45:15 +10:00
Jiahao XU
b026462018
Refactor: Simplify struct Resolution
...
Signed-off-by: Jiahao XU <Jiahao_XU@outlook.com>
2022-07-19 00:43:17 +10:00
Jiahao XU
c6281d8ea0
Fix opts.no_cleanup
behavior
...
Signed-off-by: Jiahao XU <Jiahao_XU@outlook.com>
2022-07-19 00:39:27 +10:00
Jiahao XU
b223990bb1
Simplify helpers::await_task
API
...
Signed-off-by: Jiahao XU <Jiahao_XU@outlook.com>
2022-07-19 00:35:48 +10:00
Jiahao XU
072253ebae
Improve comment in create_jobserver_client
...
Signed-off-by: Jiahao XU <Jiahao_XU@outlook.com>
2022-07-19 00:32:56 +10:00
Jiahao XU
fb0a6a5514
Use jobserver to limit parallism of cargo-install
...
Since we execute multiple `cargo-install` concurrently, we must use
jobserver to limit the parallism so that they won't spawn too much
processes/threads to overload the system.
Signed-off-by: Jiahao XU <Jiahao_XU@outlook.com>
2022-07-18 21:12:58 +10:00
Jiahao XU
c67c59b3ca
Impl new fn helpers::create_jobserver_client
...
Signed-off-by: Jiahao XU <Jiahao_XU@outlook.com>
2022-07-18 21:04:36 +10:00
Jiahao XU
8cc085b1b6
Add new dep jobserver v0.1.24
...
Signed-off-by: Jiahao XU <Jiahao_XU@outlook.com>
2022-07-18 20:46:44 +10:00
Jiahao XU
9552e0e8ed
Add comment to entry
to improve readbility
...
Signed-off-by: Jiahao XU <Jiahao_XU@outlook.com>
2022-07-18 17:31:29 +10:00
Jiahao XU
79ec122647
Refactor entry
: Avoid Arc::clone
...
Signed-off-by: Jiahao XU <Jiahao_XU@outlook.com>
2022-07-18 17:26:16 +10:00
Jiahao XU
119192f8ee
Refactor main.rs
: Print resolution in resolve
...
This simplified `entry`.
Signed-off-by: Jiahao XU <Jiahao_XU@outlook.com>
2022-07-18 17:21:35 +10:00
Jiahao XU
bcb46cd736
Optimize main.rs
: Avoid frequent Box::clone
...
Signed-off-by: Jiahao XU <Jiahao_XU@outlook.com>
2022-07-18 17:17:56 +10:00
Jiahao XU
c66d8154eb
Print out resolution
in optimized path
...
where confirmation isn't required.
Signed-off-by: Jiahao XU <Jiahao_XU@outlook.com>
2022-07-18 17:13:06 +10:00
Jiahao XU
f0fb7da99b
Refactor main.rs
: Extract fn Resolution::print
...
Signed-off-by: Jiahao XU <Jiahao_XU@outlook.com>
2022-07-18 17:11:27 +10:00
Jiahao XU
90059c11cf
Optimize: Launch install
immediately if confirmation is not required
...
Signed-off-by: Jiahao XU <Jiahao_XU@outlook.com>
2022-07-18 17:09:29 +10:00
Jiahao XU
8ca85382af
Refactor: Avoid repeated heap alloc of temp_dir
...
Signed-off-by: Jiahao XU <Jiahao_XU@outlook.com>
2022-07-18 17:00:18 +10:00
Jiahao XU
d514219ee4
Refactor main.rs
: Extract new fn install
...
Signed-off-by: Jiahao XU <Jiahao_XU@outlook.com>
2022-07-18 16:58:04 +10:00
Jiahao XU
40a872dbe3
Avoid Box::clone
for targets
...
Signed-off-by: Jiahao XU <Jiahao_XU@outlook.com>
2022-07-18 16:54:45 +10:00
Jiahao XU
7f11b74f5e
Support new feature batch installation!
...
Signed-off-by: Jiahao XU <Jiahao_XU@outlook.com>
2022-07-18 16:46:51 +10:00
Jiahao XU
5e7aab7373
Impl helpers::await_task
: Handle JoinError
...
Signed-off-by: Jiahao XU <Jiahao_XU@outlook.com>
2022-07-18 16:46:21 +10:00
Jiahao XU
730f7d6c15
Refactor main.rs
: Simplify install_from_source
...
Rm arg `opts`
Signed-off-by: Jiahao XU <Jiahao_XU@outlook.com>
2022-07-18 16:21:03 +10:00
Jiahao XU
d6db552db1
Refactor main.rs
: Extract new fn resolve
...
prepare for the new feature batch installation.
Signed-off-by: Jiahao XU <Jiahao_XU@outlook.com>
2022-07-18 16:16:50 +10:00
Jiahao XU
409f31f0bf
derive(Clone)
for CrateName
...
Signed-off-by: Jiahao XU <Jiahao_XU@outlook.com>
2022-07-18 16:07:47 +10:00
Jiahao XU
9e1f873bb5
derive(Clone)
for DesiredTargets
...
Signed-off-by: Jiahao XU <Jiahao_XU@outlook.com>
2022-07-18 16:05:37 +10:00
Jiahao XU
6de30afd01
Merge pull request #214 from ryankurte/dependabot/cargo/serde-1.0.139
...
Bump serde from 1.0.138 to 1.0.139
2022-07-18 15:07:48 +10:00
Jiahao XU
83e90fe229
Merge pull request #215 from ryankurte/dependabot/cargo/clap-3.2.12
...
Bump clap from 3.2.8 to 3.2.12
2022-07-18 15:06:43 +10:00
Jiahao XU
2065f2e63c
Merge pull request #213 from ryankurte/dependabot/cargo/tokio-1.20.0
...
Bump tokio from 1.19.2 to 1.20.0
2022-07-18 15:05:58 +10:00
dependabot[bot]
ee855264f7
Bump clap from 3.2.8 to 3.2.12
...
Bumps [clap](https://github.com/clap-rs/clap ) from 3.2.8 to 3.2.12.
- [Release notes](https://github.com/clap-rs/clap/releases )
- [Changelog](https://github.com/clap-rs/clap/blob/master/CHANGELOG.md )
- [Commits](https://github.com/clap-rs/clap/compare/v3.2.8...v3.2.12 )
---
updated-dependencies:
- dependency-name: clap
dependency-type: direct:production
update-type: version-update:semver-patch
...
Signed-off-by: dependabot[bot] <support@github.com>
2022-07-18 01:30:33 +00:00
dependabot[bot]
d9b30705dc
Bump serde from 1.0.138 to 1.0.139
...
Bumps [serde](https://github.com/serde-rs/serde ) from 1.0.138 to 1.0.139.
- [Release notes](https://github.com/serde-rs/serde/releases )
- [Commits](https://github.com/serde-rs/serde/compare/v1.0.138...v1.0.139 )
---
updated-dependencies:
- dependency-name: serde
dependency-type: direct:production
update-type: version-update:semver-patch
...
Signed-off-by: dependabot[bot] <support@github.com>
2022-07-18 01:30:24 +00:00
dependabot[bot]
4ae7f31de4
Bump tokio from 1.19.2 to 1.20.0
...
Bumps [tokio](https://github.com/tokio-rs/tokio ) from 1.19.2 to 1.20.0.
- [Release notes](https://github.com/tokio-rs/tokio/releases )
- [Commits](https://github.com/tokio-rs/tokio/compare/tokio-1.19.2...tokio-1.20.0 )
---
updated-dependencies:
- dependency-name: tokio
dependency-type: direct:production
update-type: version-update:semver-minor
...
Signed-off-by: dependabot[bot] <support@github.com>
2022-07-18 01:30:13 +00:00
Jiahao XU
66ef2277e0
Merge pull request #212 from NobodyXu/speedup-ci
...
Speedup CI: Build cargo-binstall in debug mode for PR
2022-07-14 22:29:47 +10:00
Jiahao XU
9f914a3c84
Fix integration test: Copy from debug
for PR
...
Signed-off-by: Jiahao XU <Jiahao_XU@outlook.com>
2022-07-14 21:41:32 +10:00
Jiahao XU
2936f2c3f1
Build cargo-binstall in debug mode for PR
...
Signed-off-by: Jiahao XU <Jiahao_XU@outlook.com>
2022-07-14 21:32:59 +10:00
Jiahao XU
a672f00575
Merge pull request #210 from NobodyXu/feature/crate-version
...
Feature: Support specifing versions via `crate_name@req`
2022-07-12 19:09:50 +10:00
Jiahao XU
aecc474f29
Rm unused BinstallError::VersionWarning
...
Signed-off-by: Jiahao XU <Jiahao_XU@outlook.com>
2022-07-12 18:34:20 +10:00
Jiahao XU
c87941211c
Treat 1.2.3
as =1.2.3
to match cargo-install
...
Signed-off-by: Jiahao XU <Jiahao_XU@outlook.com>
2022-07-12 18:33:31 +10:00