Jiahao XU
93f15ea1c4
Ignore README.md and SUPPORT.md in workflow "ci" ( #812 )
...
Signed-off-by: Jiahao XU <Jiahao_XU@outlook.com>
2023-02-16 11:58:16 +13:00
Jiahao XU
45ce841342
Adjust feature flags enabled on CI ( #809 )
...
Enable feature `pkg-config` and `log_release_max_level_debug` for debug
build and enable feature `static`, `trust-dns` and
`log_release_max_level_debug` for release build.
Signed-off-by: Jiahao XU <Jiahao_XU@outlook.com>
2023-02-16 11:57:58 +13:00
Jiahao XU
9c6ab5991e
Enable icf=safe & use rust-lld for targets other than win ( #805 )
...
Signed-off-by: Jiahao XU <Jiahao_XU@outlook.com>
2023-02-15 20:24:17 +13:00
Jiahao XU
89b920a876
Inc default interval in --rate-limit
to 10ms ( #804 )
...
Signed-off-by: Jiahao XU <Jiahao_XU@outlook.com>
2023-02-15 19:07:25 +13:00
Jiahao XU
9874dca454
Fix bin names in .crates.toml
on win ( #802 )
...
`bins::BinFile::new` does not include `binary_ext` in the
`BinFile::base_name`.
Also add regression e2e-test.
Fixed #801
Signed-off-by: Jiahao XU <Jiahao_XU@outlook.com>
2023-02-15 17:24:50 +13:00
dependabot[bot]
30f7722131
Bump once_cell from 1.17.0 to 1.17.1 ( #803 )
2023-02-15 02:39:44 +00:00
Jiahao XU
1e49460ac7
Fix use of StreamReadable
: Ensure no empty Bytes
( #799 )
...
which would cause the `StreamReadable` to return eof even if the
underlying stream is still open and has not sent EOF yet.
Fixed #777
Signed-off-by: Jiahao XU <Jiahao_XU@outlook.com>
2023-02-15 12:01:14 +11:00
Jiahao XU
9635e05d6c
Support adding root cert via env CARGO_HTTP_CAINFO
, SSL_CERT_{FILE, PATH}
( #774 )
...
* Support for custom root cert in `binstalk_downloader::remote::Client`
* Support adding root cert via env `CARGO_HTTP_CAINFO`, `SSL_CERT_{FILE, PATH}`
Signed-off-by: Jiahao XU <Jiahao_XU@outlook.com>
2023-02-15 11:33:59 +13:00
Jiahao XU
647f02bb59
Use cargo-zigbuild
for cross compilation ( #767 )
...
* Disable link arg `-lgcc` for musl builds when `cargo-zigbuild` is used
Signed-off-by: Jiahao XU <Jiahao_XU@outlook.com>
2023-02-15 11:19:59 +13:00
Jiahao XU
3fffe39635
Document environment variable BINSTALL_LOG_LEVEL
( #798 )
...
Signed-off-by: Jiahao XU <Jiahao_XU@outlook.com>
2023-02-13 06:26:16 +00:00
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
015bd2e47a
Update transitive deps ( #768 )
...
Signed-off-by: Jiahao XU <Jiahao_XU@outlook.com>
2023-02-12 15:33:28 +11:00
Jiahao XU
f46de3714a
Add step to relase-build to make sure it's runnable ( #792 )
...
Signed-off-by: Jiahao XU <Jiahao_XU@outlook.com>
2023-02-12 14:48:28 +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
Jiahao XU
5c02581569
Disable backtrace support from miette in release/CI build ( #744 )
...
Signed-off-by: Jiahao XU <Jiahao_XU@outlook.com>
2023-02-03 20:38:10 +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