dependabot[bot]
28415f7927
Bump tokio-util from 0.7.6 to 0.7.7 ( #797 )
...
Bumps [tokio-util](https://github.com/tokio-rs/tokio ) from 0.7.6 to 0.7.7.
- [Release notes](https://github.com/tokio-rs/tokio/releases )
- [Commits](https://github.com/tokio-rs/tokio/compare/tokio-util-0.7.6...tokio-util-0.7.7 )
---
updated-dependencies:
- dependency-name: tokio-util
dependency-type: direct:production
update-type: version-update:semver-patch
...
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-02-13 17:14:15 +11:00
Jiahao XU
7c15dd2052
Revert "Read log_level
from env CARGO_BINSTALL_LOG_LEVEL
if arg not present" ( #796 )
...
This reverts commit e84228ba01
.
2023-02-13 15:31:15 +11:00
Jiahao XU
04113e9dd9
Rm NOVERSION_FILENAMES
"{ name }{ archive-suffix }" ( #795 )
...
which does not contain `target`, hence it might report the binary being
available for any target we specified.
Signed-off-by: Jiahao XU <Jiahao_XU@outlook.com>
2023-02-13 13:44:24 +11:00
Jiahao XU
87686cb2f7
Feature: Better retry policy in binstalk-downloader
( #794 )
...
Fixed #779 #791
- Retry request on timeout
- Retry for `StatusCode::{REQUEST_TIMEOUT, GATEWAY_TIMEOUT}`
- Add `DEFAULT_RETRY_DURATION_FOR_RATE_LIMIT` for 503/429
if 503/429 does not give us a header or give us an invalid header on
when to retry, we would default to
`DEFAULT_RETRY_DURATION_FOR_RATE_LIMIT`.
- Fix `Client::get_redirected_final_url`: Retry using `GET` on status code 400..405 + 410
- Rename remote_exists => remote_gettable & support fallback to GET
if HEAD fails due to status code 400..405 + 410.
- Improve `Client::get_stream`: Include url & method in the err of the stream returned
Signed-off-by: Jiahao XU <Jiahao_XU@outlook.com>
2023-02-13 13:43:48 +11:00
github-actions[bot]
1b2fb08bcb
release: cargo-binstall v0.20.1 ( #793 )
...
chore: Release
Co-authored-by: github-actions <github-actions@github.com>
2023-02-12 15:46:27 +11:00
Jiahao XU
e84228ba01
Read log_level
from env CARGO_BINSTALL_LOG_LEVEL
if arg not present ( #790 )
...
* Enable feature "env" on dep clap in bin
* Read log_level from env `CARGO_BINSTALL_LOG_LEVEL` if arg not present
Signed-off-by: Jiahao XU <Jiahao_XU@outlook.com>
2023-02-11 14:59:38 +11:00
github-actions[bot]
b408a1a9dd
release: cargo-binstall v0.20.0 ( #788 )
...
chore: Release
Co-authored-by: github-actions <github-actions@github.com>
2023-02-11 00:56:03 +11:00
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]
e03f9e0445
release: binstalk-downloader v0.3.3 ( #786 )
...
chore: Release
Co-authored-by: github-actions <github-actions@github.com>
Co-authored-by: Jiahao XU <Jiahao_XU@outlook.com>
2023-02-11 00:53:59 +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
github-actions[bot]
1a4f98085c
release: binstalk-types v0.2.1 ( #784 )
...
chore: Release
Co-authored-by: github-actions <github-actions@github.com>
2023-02-10 23:06:23 +11:00
dependabot[bot]
c92f9ab115
Bump tokio-util from 0.7.4 to 0.7.5 ( #783 )
...
Bumps [tokio-util](https://github.com/tokio-rs/tokio ) from 0.7.4 to 0.7.5.
- [Release notes](https://github.com/tokio-rs/tokio/releases )
- [Commits](https://github.com/tokio-rs/tokio/compare/tokio-util-0.7.4...tokio-util-0.7.5 )
---
updated-dependencies:
- dependency-name: tokio-util
dependency-type: direct:production
update-type: version-update:semver-patch
...
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-02-10 14:02:19 +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
Jiahao XU
d9dd611b9e
Improve fmt::Display
impl for all Error types ( #781 )
...
Signed-off-by: Jiahao XU <Jiahao_XU@outlook.com>
2023-02-10 14:01:22 +11:00
dependabot[bot]
9d9b72c768
Bump toml_edit from 0.19.2 to 0.19.3 ( #773 )
...
Bumps [toml_edit](https://github.com/ordian/toml_edit ) from 0.19.2 to 0.19.3.
- [Release notes](https://github.com/ordian/toml_edit/releases )
- [Commits](https://github.com/ordian/toml_edit/compare/v0.19.2...v0.19.3 )
---
updated-dependencies:
- dependency-name: toml_edit
dependency-type: direct:production
update-type: version-update:semver-patch
...
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-02-09 13:46:01 +11:00
dependabot[bot]
c76014018b
Bump serde_json from 1.0.92 to 1.0.93 ( #778 )
...
Bumps [serde_json](https://github.com/serde-rs/json ) from 1.0.92 to 1.0.93.
- [Release notes](https://github.com/serde-rs/json/releases )
- [Commits](https://github.com/serde-rs/json/compare/v1.0.92...v1.0.93 )
---
updated-dependencies:
- dependency-name: serde_json
dependency-type: direct:production
update-type: version-update:semver-patch
...
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-02-09 12:53:00 +11:00
dependabot[bot]
98c9f86192
Bump toml_edit from 0.19.1 to 0.19.2 ( #772 )
2023-02-07 02:19:42 +00:00
dependabot[bot]
1c863d829f
Bump serde_json from 1.0.91 to 1.0.92 ( #771 )
2023-02-06 02:49:33 +00:00
dependabot[bot]
cb56770fac
Bump cargo_toml from 0.14.0 to 0.15.1 ( #770 )
2023-02-06 02:40:03 +00:00
Jiahao XU
a13c01b769
Replace dep futures-util with helpers::FuturesResolver
( #765 )
...
futures-util has too many dependencies and it contains a lot of code of
which we only use `futures_util::stream::{FuturesUnordered, StreamExt}`.
We don't even need most of the functionalities in `FuturesUnordered` as
we just need the output of first future that either returns `Err(_)` or
`Ok(Some(_))`.
So we replace it with ou own homebrew solution (~80 loc) and it's easier
to use.
Signed-off-by: Jiahao XU <Jiahao_XU@outlook.com>
2023-02-05 16:26:25 +11:00
Jiahao XU
833684b095
Replace dep futures-util
with futures-lite
in binstalk-downloader ( #764 )
...
`futures-util` has too many dependencies and it contains a lot of code
of which we only use a tiny bit of them.
Signed-off-by: Jiahao XU <Jiahao_XU@outlook.com>
2023-02-04 16:05:03 +11:00
Félix Saparelli
6bc1fb4983
Fix #728 : fallback to copy when symlinking on windows ( #763 )
...
* Fix #728 : fallback to copy when symlinking on windows
* Signature hmm?
* Squash warnings on windows
* Just don’t use generics here
2023-02-04 14:14:08 +13:00
Jiahao XU
f2fc37eea5
Fix "Too many "Too Many Requests" log" ( #761 )
...
Fixed #747
- Add dep compact_str v0.6.1 to binstalk-downloader
- Impl new type `DelayRequest`
- Handle 503/429 with wait duration > `MAX_RETRY_DURATION` by simply taking the min
- Fix `Client::send_request_inner`: Ensure 503/429 get propagated to other requests
even if the current requests reach its maximum retry and decides to
simply return an error.
Signed-off-by: Jiahao XU <Jiahao_XU@outlook.com>
2023-02-04 11:14:53 +11:00
Jiahao XU
e510511487
Improve GhCrateMeta
: Detect cases where pkg-fmt is not specified ( #757 )
...
* Fix fmt of mod `<GhCrateMeta as Fetcher>::find`
* Add new variant `BinstallError::InvalidPkgFmt`
* Impl new fn `PkgFmt::guess_pkg_format`
* Improve `GhCrateMeta`: Detect cases where `pkg-fmt` is not specified
but `pkg-url` also does not contain format, archive-format or
archive-suffix which is required for automatically deducing the pkg-fmt.
In these cases, we would call `PkgFmt::guess_pkg_format` to try out best
to figure out the pkg-fmt, otherwise we just return an error.
Signed-off-by: Jiahao XU <Jiahao_XU@outlook.com>
2023-02-04 10:47:57 +13:00
dependabot[bot]
b05548440d
Bump zstd from 0.12.2+zstd.1.5.2 to 0.12.3+zstd.1.5.2 ( #756 )
2023-02-01 02:13:58 +00:00
dependabot[bot]
7dc07ad23c
Bump bytes from 1.3.0 to 1.4.0 ( #754 )
2023-02-01 01:43:33 +00:00
dependabot[bot]
68f3eb81d4
Bump fs4 from 0.6.2 to 0.6.3 ( #755 )
2023-02-01 01:40:45 +00:00
dependabot[bot]
28449c21f4
Bump toml_edit from 0.19.0 to 0.19.1 ( #753 )
2023-01-31 01:41:22 +00:00
dependabot[bot]
84621d54a5
Bump async-trait from 0.1.63 to 0.1.64 ( #752 )
2023-01-31 01:39:31 +00:00
dependabot[bot]
aa89f0073d
Bump futures-util from 0.3.25 to 0.3.26 ( #751 )
...
Bumps [futures-util](https://github.com/rust-lang/futures-rs ) from 0.3.25 to 0.3.26.
- [Release notes](https://github.com/rust-lang/futures-rs/releases )
- [Changelog](https://github.com/rust-lang/futures-rs/blob/master/CHANGELOG.md )
- [Commits](https://github.com/rust-lang/futures-rs/compare/0.3.25...0.3.26 )
---
updated-dependencies:
- dependency-name: futures-util
dependency-type: direct:production
update-type: version-update:semver-patch
...
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-01-31 12:36:22 +11:00
dependabot[bot]
1ad5d4657f
Bump toml_edit from 0.18.0 to 0.19.0 ( #748 )
2023-01-30 02:37:41 +00: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]
d36acbb4e6
Bump either from 1.8.0 to 1.8.1 ( #743 )
...
Bumps [either](https://github.com/bluss/either ) from 1.8.0 to 1.8.1.
- [Release notes](https://github.com/bluss/either/releases )
- [Commits](https://github.com/bluss/either/compare/1.8.0...1.8.1 )
---
updated-dependencies:
- dependency-name: either
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-27 01:23:22 +00:00
Jiahao XU
270bf08a24
Optimize use of tinytemplate
( #647 )
...
* Optimize `GhCrateMeta::find`: Cache compiled template `pkg_url`
* Optimize `collect_bin_files`: Cache compiled template `bin_dir`
* Refactor: Improve readability of `gh_crate_meta`
* Optimize `GhCrateMeta::launch_baseline_find_tasks`: Dedup urls before checking
* Optimize `BinFile::new`: Avoid one heap alloc when creating `dest`
* Improve `warn!` msg in `GhCrateMeta::launch_baseline_find_tasks`
Signed-off-by: Jiahao XU <Jiahao_XU@outlook.com>
2023-01-26 17:33:49 +13: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
Jiahao XU
9047d99c1a
Fix unused import in binstalk-manifests ( #740 )
...
Signed-off-by: Jiahao XU <Jiahao_XU@outlook.com>
2023-01-24 23:47:50 +11:00
Jiahao XU
152ea8376b
Switch from toml back to toml_edit ( #738 )
...
Since now toml simply uses toml_edit, there is no reason to continue
using it as it merely increase compilation time and bloat.
Instead, we switch to toml_edit v0.18.0 with feature serde enabled.
This also remove the `CratesTomlParseError::TomlParseNonUtf8` variant
intorduced in #736 .
Signed-off-by: Jiahao XU <Jiahao_XU@outlook.com>
2023-01-24 16:27:34 +13:00
dependabot[bot]
425c6c2509
Bump toml from 0.5.11 to 0.6.0 ( #736 )
...
* Bump toml from 0.5.11 to 0.6.0
Bumps [toml](https://github.com/toml-rs/toml ) from 0.5.11 to 0.6.0.
- [Release notes](https://github.com/toml-rs/toml/releases )
- [Commits](https://github.com/toml-rs/toml/compare/toml-v0.5.11...toml-v0.6.0 )
---
updated-dependencies:
- dependency-name: toml
dependency-type: direct:production
update-type: version-update:semver-minor
...
Signed-off-by: dependabot[bot] <support@github.com>
* Fix use of `toml` v0.6
* Optimize `CratesTomlParseError`: Box variant `TomlParse`
Since now `toml:🇩🇪 :Error` is a wrapper of `toml_edit::TomlError`,
which is at least 3 * `size_of::<Vec<_>>()`.
Signed-off-by: dependabot[bot] <support@github.com>
Signed-off-by: Jiahao XU <Jiahao_XU@outlook.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Jiahao XU <Jiahao_XU@outlook.com>
2023-01-24 02:51:29 +00: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]
e22d319825
Bump toml from 0.5.10 to 0.5.11 ( #734 )
...
Bumps [toml](https://github.com/toml-rs/toml ) from 0.5.10 to 0.5.11.
- [Release notes](https://github.com/toml-rs/toml/releases )
- [Commits](https://github.com/toml-rs/toml/compare/toml-v0.5.10...toml-v0.5.11 )
---
updated-dependencies:
- dependency-name: toml
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-23 04:50:58 +00:00
dependabot[bot]
5bd6a50d70
Bump async-trait from 0.1.61 to 0.1.63 ( #733 )
...
Bumps [async-trait](https://github.com/dtolnay/async-trait ) from 0.1.61 to 0.1.63.
- [Release notes](https://github.com/dtolnay/async-trait/releases )
- [Commits](https://github.com/dtolnay/async-trait/compare/0.1.61...0.1.63 )
---
updated-dependencies:
- dependency-name: async-trait
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-23 15:37:35 +11:00
dependabot[bot]
7857856f78
Bump reqwest from 0.11.13 to 0.11.14 ( #732 )
...
Bumps [reqwest](https://github.com/seanmonstar/reqwest ) from 0.11.13 to 0.11.14.
- [Release notes](https://github.com/seanmonstar/reqwest/releases )
- [Changelog](https://github.com/seanmonstar/reqwest/blob/master/CHANGELOG.md )
- [Commits](https://github.com/seanmonstar/reqwest/compare/v0.11.13...v0.11.14 )
---
updated-dependencies:
- dependency-name: reqwest
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-20 01:28:21 +00: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
Jiahao XU
ab4da7f059
Fix self-update on windows ( #712 )
...
Fixed #702
* Add new dep windows v0.44.0 for windows only
* Add regression test for #702
* Impl `win::replace_file`
* Use `ReplaceFileW` on windows if `fs::rename` in `fs::atomic_install` fails
* Improve logging and err messages
* Add more regression tests
* Make `BinFile::install_link` atomic: Do not remove file if dst exists
* Fallback to `ReplaceFileW` in `fs::atomic_symlink_file`
* Refactor: Extract new fn `fs::persist`
* Use `fs::persist` instead of `TempFile::persist` in `fs::atomic_install`, which fallbacks to `ReplaceFileW` on windows
Signed-off-by: Jiahao XU <Jiahao_XU@outlook.com>
Co-authored-by: Félix Saparelli <felix@passcod.name>
2023-01-17 18:05:07 +11:00
github-actions[bot]
a60ae7ef6c
release: binstalk-downloader v0.3.2 ( #715 )
...
Co-authored-by: github-actions <github-actions@github.com>
2023-01-17 14:42:26 +13:00
Félix Saparelli
c1332c0d2d
Revert "Bump async_zip from 0.0.9 to 0.0.10" ( #714 )
2023-01-17 13:08:25 +13:00