Commit graph

332 commits

Author SHA1 Message Date
github-actions[bot]
166bd05906
release: binstalk v0.8.0 (#787)
chore: Release

Co-authored-by: github-actions <github-actions@github.com>
Co-authored-by: Jiahao XU <Jiahao_XU@outlook.com>
2023-02-11 00:54:27 +11:00
github-actions[bot]
b8d9a4d649
release: binstalk-manifests v0.3.0 (#785)
chore: Release

Co-authored-by: github-actions <github-actions@github.com>
2023-02-10 23:55:41 +11:00
figsoda
ff753f06f2
Make disabling static and rustls features possible (#782)
Default features were turned on for binstalk and the `static` and `pkg-config` features of cargo-binstall didn't do anything
2023-02-10 14:01:51 +11:00
dependabot[bot]
d34ad5ad1f
Bump tokio from 1.24.2 to 1.25.0 (#749) 2023-01-30 02:20:04 +00:00
dependabot[bot]
719b20aadd
Bump clap from 4.1.3 to 4.1.4 (#742) 2023-01-25 16:57:09 +11:00
Jiahao XU
eb95c5b799
Minor optimization for bin and binstalk (#646)
* Refactor `logging`: Extract `report_err`
* Optimize `get_default_pkg_url_template`: Return iter instead of `Vec`
   to avoid heap allocation.
* Refactor `GhCrateMeta::find`: Rm `launch_baseline_find_tasks`
* Optimize `GhCrateMeta::find`: Avoid cloning `Cow<'_, str>`
* Improve `report_err` output: Print newline after msg

Signed-off-by: Jiahao XU <Jiahao_XU@outlook.com>
2023-01-25 01:58:07 +13:00
Jiahao XU
283163bbda
Enable feature zstd-thin by default (#741)
Signed-off-by: Jiahao XU <Jiahao_XU@outlook.com>
2023-01-24 23:48:12 +11:00
dependabot[bot]
9a2b4c9ab1
Bump clap from 4.1.1 to 4.1.3 (#735)
Bumps [clap](https://github.com/clap-rs/clap) from 4.1.1 to 4.1.3.
- [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/clap_complete-v4.1.1...v4.1.3)

---
updated-dependencies:
- dependency-name: clap
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-01-24 12:56:44 +11:00
dependabot[bot]
493d2778fe
Bump tokio from 1.24.1 to 1.24.2 (#727)
Bumps [tokio](https://github.com/tokio-rs/tokio) from 1.24.1 to 1.24.2.
- [Release notes](https://github.com/tokio-rs/tokio/releases)
- [Commits](https://github.com/tokio-rs/tokio/commits)

---
updated-dependencies:
- dependency-name: tokio
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-01-18 01:23:26 +00:00
github-actions[bot]
46a035699e
release: cargo-binstall v0.19.3 (#721)
chore: Release

Co-authored-by: github-actions <github-actions@github.com>
2023-01-17 22:47:38 +11:00
github-actions[bot]
42b858927b
release: binstalk v0.7.1 (#720)
chore: Release

Co-authored-by: github-actions <github-actions@github.com>
2023-01-17 19:36:35 +11:00
github-actions[bot]
c2b1c243ea
release: cargo-binstall v0.19.2 (#707)
chore: Release

Co-authored-by: github-actions <github-actions@github.com>
2023-01-16 15:39:07 +11:00
dependabot[bot]
bc6ac734b4
Bump clap from 4.0.32 to 4.1.1 (#710)
Bumps [clap](https://github.com/clap-rs/clap) from 4.0.32 to 4.1.1.
- [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/v4.0.32...v4.1.1)

---
updated-dependencies:
- dependency-name: clap
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-01-16 13:54:52 +11:00
github-actions[bot]
850ad63df9
release: cargo-binstall v0.19.1 (#698)
chore: Release

Co-authored-by: github-actions <github-actions@github.com>
2023-01-12 17:16:40 +11:00
Jiahao XU
1be25f81b5
Fix FileLock for .crates.toml not dropped (#697)
* Fix `FileLock` for `.crates.toml` not dropped

Signed-off-by: Jiahao XU <Jiahao_XU@outlook.com>

* Rm unneccessary ret type annotation for the closure

Signed-off-by: Jiahao XU <Jiahao_XU@outlook.com>

* Add regression test

Signed-off-by: Jiahao XU <Jiahao_XU@outlook.com>

Signed-off-by: Jiahao XU <Jiahao_XU@outlook.com>
2023-01-12 18:45:36 +13:00
github-actions[bot]
ea28e5e1e4
release: cargo-binstall v0.19.0 (#688)
chore: Release

Co-authored-by: github-actions <github-actions@github.com>
2023-01-12 10:22:31 +11:00
github-actions[bot]
1b0e9292ae
release: binstalk v0.7.0 (#690)
chore: Release

Co-authored-by: github-actions <github-actions@github.com>
2023-01-11 00:49:45 +00:00
github-actions[bot]
24c15e57e9
release: binstalk-manifests v0.2.0 (#684)
chore: Release

Co-authored-by: github-actions <github-actions@github.com>
2023-01-10 23:48:36 +00:00
dependabot[bot]
4ebf7cb421
Bump tokio from 1.23.0 to 1.24.1 (#658)
* Bump tokio from 1.23.0 to 1.24.1

Bumps [tokio](https://github.com/tokio-rs/tokio) from 1.23.0 to 1.24.1.
- [Release notes](https://github.com/tokio-rs/tokio/releases)
- [Commits](https://github.com/tokio-rs/tokio/compare/tokio-1.23.0...tokio-1.24.1)

---
updated-dependencies:
- dependency-name: tokio
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>

* Don't reuse build cache

* fix index cache

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Félix Saparelli <felix@passcod.name>
2023-01-09 20:39:39 +11:00
dependabot[bot]
e5d4c13d1b
Bump mimalloc from 0.1.32 to 0.1.34 (#670)
Bumps [mimalloc](https://github.com/purpleprotocol/mimalloc_rust) from 0.1.32 to 0.1.34.
- [Release notes](https://github.com/purpleprotocol/mimalloc_rust/releases)
- [Commits](https://github.com/purpleprotocol/mimalloc_rust/compare/v0.1.32...v0.1.34)

---
updated-dependencies:
- dependency-name: mimalloc
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-01-09 03:19:08 +00:00
Félix Saparelli
aea9df602c
Migrate CI and builds to Just, add "full" builds (#660) 2023-01-08 16:27:36 +11:00
Jiahao XU
49f60d37fe
Fix #588 race cond updating .crates.toml (#645)
Fixed #588

* Add new dep fs-lock v0.1.0 to crates/bin
* Refactor: Impl new type `Manifests` in crates/bin
   for managing manifests.
* Fix #588 race cond updating `.crates.toml`

Signed-off-by: Jiahao XU <Jiahao_XU@outlook.com>
2023-01-04 01:01:02 +00:00
dependabot[bot]
1ab979cde8
Bump once_cell from 1.16.0 to 1.17.0 (#640)
Bumps [once_cell](https://github.com/matklad/once_cell) from 1.16.0 to 1.17.0.
- [Release notes](https://github.com/matklad/once_cell/releases)
- [Changelog](https://github.com/matklad/once_cell/blob/master/CHANGELOG.md)
- [Commits](https://github.com/matklad/once_cell/compare/v1.16.0...v1.17.0)

---
updated-dependencies:
- dependency-name: once_cell
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2022-12-30 01:31:30 +00:00
Jiahao XU
6bdb26930e
Refactor, improvements and bugfix for resolution and installation process (#619)
* Refactor: Extract new mod `ops::resolve::resolution`
* Refactor: Extract new type `ResolutionFetch`
* Refactor: Extract new type `ResolutionSource`
* Improve `Resolution::print`: Provides more details on which crate
   is the resolution for.
* Make `Resolution::print` a pub fn
* Refactor: Extract new fn `ResolutionFetch::install`
* Refactor: Extract new async fn `ResolutionSource::install`
* Optimize `ResolutionSource::install` avoiding `OsStr::to_string_lossy`.
* Add new dep command-group v2.0.0 to binstalk with feat with-tokio
* Fix `ResolutionSource::install`: Use `AsyncCommandGroup::group_spawn`
   instead of `tokio::process::Command::spawn` to ensure all the processes
   spanwed by the `cargo` process can be terminated with one signal sent to
   the `cargo` process.
* Fix printing resolution: Make sure they are printed without interleaving
* Refactor `entry::install_crates`
* Improve dry-run output for `ResolutionSource::install`
* Refactor: Extract new fn `ResolutionFetch::print`
* Refactor: Extract new fn `ResolutionSource::print`
* Optimize `Resolution`: Box unit variant `Fetch`
* Improve formatting of `tokio::process::Command`
   Prints out sth like `cargo install ...` instead of the `Debug::fmt`.
* Improve dry-run output

Signed-off-by: Jiahao XU <Jiahao_XU@outlook.com>
2022-12-28 00:18:07 +00:00
Jiahao XU
cdff92aa3c
Fix reinstalling crates after removed by cargo-uninstall (#628)
Honor `.crates.toml` only since `cargo-uninstall` can only update
`.crates.toml`, not binstall's own manifest.

Fixed #625

Signed-off-by: Jiahao XU <Jiahao_XU@outlook.com>
2022-12-24 05:04:51 +00:00
dependabot[bot]
76e89f7b30
Bump clap from 4.0.30 to 4.0.32 (#624)
Bumps [clap](https://github.com/clap-rs/clap) from 4.0.30 to 4.0.32.
- [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/v4.0.30...v4.0.32)

---
updated-dependencies:
- dependency-name: clap
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2022-12-23 01:20:07 +00:00
dependabot[bot]
b5ca794ce9
Bump clap from 4.0.29 to 4.0.30 (#620) 2022-12-22 12:41:08 +11:00
dependabot[bot]
7714d42b60
Bump semver from 1.0.14 to 1.0.16 (#614) 2022-12-19 05:51:35 +00:00
dependabot[bot]
b102d5a5f0
Update supports-color requirement from 1.3.1 to 2.0.0 in /crates/bin (#611) 2022-12-19 14:21:58 +11:00
github-actions[bot]
628fd336e7
release: cargo-binstall v0.18.1 (#608)
chore: Release

Co-authored-by: github-actions <github-actions@github.com>
2022-12-14 11:37:48 +11:00
github-actions[bot]
09bc8e7bb8
release: cargo-binstall v0.18.0 (#606)
chore: Release

Co-authored-by: github-actions <github-actions@github.com>
2022-12-13 00:58:06 +11:00
github-actions[bot]
b35e7bd43c
release: binstalk v0.6.0 (#605)
chore: Release

Co-authored-by: github-actions <github-actions@github.com>
2022-12-12 08:57:40 +00:00
github-actions[bot]
2595bbabfb
release: binstalk-manifests v0.1.1 (#603)
chore: Release

Co-authored-by: github-actions <github-actions@github.com>
2022-12-12 07:42:36 +00:00
dependabot[bot]
23cfb61ec8
Bump embed-resource from 1.7.4 to 1.8.0 (#598)
Bumps [embed-resource](https://github.com/nabijaczleweli/rust-embed-resource) from 1.7.4 to 1.8.0.
- [Release notes](https://github.com/nabijaczleweli/rust-embed-resource/releases)
- [Commits](https://github.com/nabijaczleweli/rust-embed-resource/compare/v1.7.4...v1.8.0)

---
updated-dependencies:
- dependency-name: embed-resource
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2022-12-12 02:05:29 +00:00
dependabot[bot]
fa78517712
Bump tokio from 1.22.0 to 1.23.0 (#593)
Bumps [tokio](https://github.com/tokio-rs/tokio) from 1.22.0 to 1.23.0.
- [Release notes](https://github.com/tokio-rs/tokio/releases)
- [Commits](https://github.com/tokio-rs/tokio/compare/tokio-1.22.0...tokio-1.23.0)

---
updated-dependencies:
- dependency-name: tokio
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2022-12-12 01:33:53 +00:00
Jiahao XU
39f175be04
Feature: Check for installed crates in cargo_install_v1_manifest (#582)
* Add & Impl new fn `CratesToml::collect_into_crates_versions`
   to iterate over crates listed in cargo_crates_v1, accessing their names
   and versions.
* Re-export `CompactString`, `Version` & `Url` in binstalk-manifests
   for convenience
* Fix `CratesToml::load_from_path`: Wrap `File` in `FileLock::new_shared`
   to avoid concurrent write while reading the file.
* Filter out installed crates in cargo_install_v1_metadata
* Make match in `filter_out_installed_crates` more explicit
* Add new test `cargo_crates_v1::test::test_loading`
* Optimize `CratesToml`: Use `Vec` instead of `BTreeMap`
  since we cannot simply call `BTreeMap::get` to find an entry for a crate
  anyway.
  This also accidentally fixed the CI.
* Impl new API `CratesToml::remove`
* Fix`CratesToml::append_to_path` by removing previous records of
   the crates that are just updated.

Signed-off-by: Jiahao XU <Jiahao_XU@outlook.com>
2022-12-03 15:25:41 +00:00
Jiahao XU
a69db83aa6
Fix error reporting in main and move all arg validation into fn args::parse (#585)
* Fix reporting parsing error from `args::parse`
   Report it in `args::parse` by using `Args::command().error(...).exit()`
   instead of returning `BinstallError`.
* Rm unused variant `BinstallError::OverrideOptionUsedWithMultiInstall`
* Refactor: Move `strategies` validation into `args::parse`
* Rm unused variant `BinstallError::InvalidStrategies`
* Add new unit test `args::test::verify_cli`

Signed-off-by: Jiahao XU <Jiahao_XU@outlook.com>
2022-12-03 11:57:50 +00:00
Jiahao XU
b564b8ac4e
Fix logging: Print error and continue on failure to flush logs (#584)
instead of exiting the entire process.

Signed-off-by: Jiahao XU <Jiahao_XU@outlook.com>
2022-12-04 00:15:15 +13:00
dependabot[bot]
99548b1e50
Bump clap from 4.0.27 to 4.0.29 (#577)
Bumps [clap](https://github.com/clap-rs/clap) from 4.0.27 to 4.0.29.
- [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/v4.0.27...v4.0.29)

---
updated-dependencies:
- dependency-name: clap
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2022-11-30 01:35:11 +00:00
Jiahao XU
d63e001d6f
Fix panic in ui::confirm on I/O error (#576)
Signed-off-by: Jiahao XU <Jiahao_XU@outlook.com>
2022-11-29 05:53:45 +00:00
Jiahao XU
d64710d3a6
Fix crates/bin/build.rs: Rerun build.rs if manifest.rc and windows.manifest changed (#575)
Signed-off-by: Jiahao XU <Jiahao_XU@outlook.com>
2022-11-29 18:31:59 +13:00
Jiahao XU
6785d3ef82
Fix msrv: Bump to v1.65.0 (#574)
- bin and binstalk uses new let-else lang feature
 - dep zstd of binstalk-downloader just bumped its msrv to v1.64.0

Signed-off-by: Jiahao XU <Jiahao_XU@outlook.com>
2022-11-29 17:18:28 +13:00
dependabot[bot]
4b018cf90a
Bump clap from 4.0.26 to 4.0.27 (#571)
Bumps [clap](https://github.com/clap-rs/clap) from 4.0.26 to 4.0.27.
- [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/v4.0.26...v4.0.27)

---
updated-dependencies:
- dependency-name: clap
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2022-11-25 01:39:18 +00:00
dependabot[bot]
f71c3606f8
Bump miette from 5.4.1 to 5.5.0 (#565)
Bumps [miette](https://github.com/zkat/miette) from 5.4.1 to 5.5.0.
- [Release notes](https://github.com/zkat/miette/releases)
- [Changelog](https://github.com/zkat/miette/blob/main/CHANGELOG.md)
- [Commits](https://github.com/zkat/miette/compare/miette-derive-v5.4.1...miette-derive-v5.5.0)

---
updated-dependencies:
- dependency-name: miette
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2022-11-24 12:46:34 +00:00
github-actions[bot]
7544fde813
release: cargo-binstall v0.17.0 (#562)
chore: Release

Co-authored-by: github-actions <github-actions@github.com>
2022-11-23 01:18:44 +11:00
github-actions[bot]
5172bd46a0
release: binstalk v0.5.0 (#561)
chore: Release

Co-authored-by: github-actions <github-actions@github.com>
Co-authored-by: Jiahao XU <Jiahao_XU@outlook.com>
2022-11-22 11:24:54 +00:00
github-actions[bot]
0084254c8c
release: binstalk-manifests v0.1.0 (#558)
chore: Release

Co-authored-by: github-actions <github-actions@github.com>
2022-11-22 10:36:10 +00:00
Jiahao XU
73751c4437
Set version of newly created crates to v0.0.0 (#556)
so that release-pr can operate on them and increase minor version for a
new release.

Signed-off-by: Jiahao XU <Jiahao_XU@outlook.com>
2022-11-22 08:52:27 +00:00
Jiahao XU
bd3f1d598c
Enable feature thin of dep zstd for any target built natively (#480)
* Add new feature `binstalk-downloader/zstd-thin`
* Add new feature `binstalk/zstd-thin`
* Add new feature `binstalk/zstd-thin`
* Enable feature zstd-thin for targets built natively

Signed-off-by: Jiahao XU <Jiahao_XU@outlook.com>
2022-11-22 06:52:41 +00:00
dependabot[bot]
1821469342
Bump tokio from 1.21.2 to 1.22.0 (#548)
Bumps [tokio](https://github.com/tokio-rs/tokio) from 1.21.2 to 1.22.0.
- [Release notes](https://github.com/tokio-rs/tokio/releases)
- [Commits](https://github.com/tokio-rs/tokio/compare/tokio-1.21.2...tokio-1.22.0)

---
updated-dependencies:
- dependency-name: tokio
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2022-11-21 02:19:14 +00:00