Commit graph

226 commits

Author SHA1 Message Date
dependabot[bot]
f1bfe23672
Bump cargo_toml from 0.15.2 to 0.15.3 (#1116)
Bumps [cargo_toml](https://gitlab.com/crates.rs/cargo_toml) from 0.15.2 to 0.15.3.
- [Commits](https://gitlab.com/crates.rs/cargo_toml/compare/v0.15.2...v0.15.3)

---
updated-dependencies:
- dependency-name: cargo_toml
  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-06-02 04:40:31 +00:00
dependabot[bot]
e789064289
Bump once_cell from 1.17.1 to 1.17.2 (#1106)
Bumps [once_cell](https://github.com/matklad/once_cell) from 1.17.1 to 1.17.2.
- [Changelog](https://github.com/matklad/once_cell/blob/master/CHANGELOG.md)
- [Commits](https://github.com/matklad/once_cell/compare/v1.17.1...v1.17.2)

---
updated-dependencies:
- dependency-name: once_cell
  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-05-30 04:06:18 +00:00
dependabot[bot]
b23598ed85
Bump tokio from 1.28.1 to 1.28.2 (#1100)
Bumps [tokio](https://github.com/tokio-rs/tokio) from 1.28.1 to 1.28.2.
- [Release notes](https://github.com/tokio-rs/tokio/releases)
- [Commits](https://github.com/tokio-rs/tokio/compare/tokio-1.28.1...tokio-1.28.2)

---
updated-dependencies:
- dependency-name: tokio
  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-05-29 03:02:20 +00:00
github-actions[bot]
39748ecadf
release: binstalk-downloader v0.5.1 (#1095)
chore: Release

Co-authored-by: github-actions <github-actions@github.com>
2023-05-26 16:06:51 +00:00
github-actions[bot]
47dbc99555
release: binstalk v0.12.1 (#1096)
chore: Release

Co-authored-by: github-actions <github-actions@github.com>
2023-05-26 15:47:43 +00:00
Jiahao XU
e96477a116
Optimize fetch_crate_cratesio for exact version (#1089)
If `version_req` requests a specific version instead of a range, then
there is no need to pull all versions available from
https://crates.io/api/v1/crates

Signed-off-by: Jiahao XU <Jiahao_XU@outlook.com>
2023-05-25 12:56:31 +00:00
Jiahao XU
f8255b1b81
dep: Downgrade tracing from v0.1.38 => v0.1.37 due to yanking (#1085)
Fixed #1019

Signed-off-by: Jiahao XU <Jiahao_XU@outlook.com>
2023-05-24 14:27:05 +00:00
dependabot[bot]
f2ac44757a
Bump miette from 5.8.0 to 5.9.0 (#1071)
Bumps [miette](https://github.com/zkat/miette) from 5.8.0 to 5.9.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.8.0...miette-derive-v5.9.0)

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

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-05-19 02:45:22 +00:00
dependabot[bot]
9a7445a88f
Bump serde from 1.0.162 to 1.0.163 (#1048)
Bumps [serde](https://github.com/serde-rs/serde) from 1.0.162 to 1.0.163.
- [Release notes](https://github.com/serde-rs/serde/releases)
- [Commits](https://github.com/serde-rs/serde/compare/v1.0.162...v1.0.163)

---
updated-dependencies:
- dependency-name: serde
  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-05-12 03:55:08 +00:00
dependabot[bot]
62c59beca6
Bump tokio from 1.28.0 to 1.28.1 (#1042)
Bumps [tokio](https://github.com/tokio-rs/tokio) from 1.28.0 to 1.28.1.
- [Release notes](https://github.com/tokio-rs/tokio/releases)
- [Commits](https://github.com/tokio-rs/tokio/compare/tokio-1.28.0...tokio-1.28.1)

---
updated-dependencies:
- dependency-name: tokio
  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-05-11 13:37:55 +10:00
dependabot[bot]
cb906ae0bf
Bump serde from 1.0.160 to 1.0.162 (#1032)
Bumps [serde](https://github.com/serde-rs/serde) from 1.0.160 to 1.0.162.
- [Release notes](https://github.com/serde-rs/serde/releases)
- [Commits](https://github.com/serde-rs/serde/compare/v1.0.160...1.0.162)

---
updated-dependencies:
- dependency-name: serde
  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-05-05 15:05:53 +10:00
github-actions[bot]
8cc1430ca6
release: binstalk v0.12.0 (#1013)
chore: Release

Co-authored-by: github-actions <github-actions@github.com>
2023-04-26 19:57:57 +10:00
github-actions[bot]
f683b4075d
release: binstalk-downloader v0.5.0 (#1011)
chore: Release

Co-authored-by: github-actions <github-actions@github.com>
2023-04-26 18:44:23 +10:00
github-actions[bot]
1a94a36311
release: leon-macros v1.0.0 (#1009)
chore: Release

Co-authored-by: github-actions <github-actions@github.com>
2023-04-26 18:05:14 +10:00
github-actions[bot]
5b0268c768
release: binstalk-types v0.4.0 (#1008)
chore: Release

Co-authored-by: github-actions <github-actions@github.com>
2023-04-26 17:31:21 +10:00
github-actions[bot]
613aae2b1e
release: leon v2.0.0 (#1007)
chore: Release

Co-authored-by: github-actions <github-actions@github.com>
2023-04-26 17:30:24 +10:00
dependabot[bot]
e4d88310ed
Bump tracing from 0.1.37 to 0.1.38 (#1005) 2023-04-26 04:39:51 +00:00
dependabot[bot]
a47ca44100
Bump tokio from 1.27.0 to 1.28.0 (#1001) 2023-04-26 04:09:29 +00:00
dependabot[bot]
bb68d67df1
Bump home from 0.5.4 to 0.5.5 (#1003)
Bumps [home](https://github.com/rust-lang/cargo) from 0.5.4 to 0.5.5.
- [Release notes](https://github.com/rust-lang/cargo/releases)
- [Changelog](https://github.com/rust-lang/cargo/blob/master/CHANGELOG.md)
- [Commits](https://github.com/rust-lang/cargo/compare/home-0.5.4...home-0.5.5)

---
updated-dependencies:
- dependency-name: home
  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-04-26 13:28:27 +10:00
Jiahao XU
0261d12d9d
Support subcrate in repo (#991)
Fixed #838

 - Add new key `subcrate` for rendering `pkg-url`
 - Add new release paths in GitHub, GitLab & SourceForge using key `subcrate` for auto-detection
 - Add subcrate detection for GitHub and GitLab
 - Add `debug!` when using gh api token in `GhApiClient::new`
 - Add subcrate testing to `e2e-tests/subcrate.sh`
 - Bump cargo-release to 0.24.9 in e2e-tests/live.sh
   to fix test failure on MacOS without libssl installed in `/usr/local/`.
 - Optimize GhCrateMeta: Detect subcrate and repo-host in `Data::get_repo_info`
    to cache the result and avoid duplicate works, this also makes the code
    more ergonomic by removing the need to some `unwrap()` plus making it
    more efficient since we don't need to clone the url just to modify it.
 - Add instrument to `Data::get_repo_info`
 - Fix `shellcheck` err in `e2e-tests/*.sh`

Signed-off-by: Jiahao XU <Jiahao_XU@outlook.com>
2023-04-24 19:41:20 +10:00
dependabot[bot]
913ec83918
Bump miette from 5.7.0 to 5.8.0 (#993)
Bumps [miette](https://github.com/zkat/miette) from 5.7.0 to 5.8.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.7.0...miette-derive-v5.8.0)

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

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-04-19 13:46:25 +10:00
Jiahao XU
5683ca2476
Add new crate leon-macros that provide template! with identical syntax as runtime parsing (#946)
`leon_macros::template!` can parse template at compile-time.
It accepts a utf-8 string literal and uses `leon` internally to parse it, then generate code that evaluates to `Template<'static>`.

 - Exclude fuzz from crate leon when publishing
 - Impl fn-like proc-macro `leon_macros::template!`
 - Add dep `leon-macros` to binstalk
 - Use `leon_macros::template!` in `binstalk::fetchers::gh_crate_meta::hosting`
 - Add doc for `leon-macros` in `leon`
 - Improve `std::fmt::Display` impl for `leon::ParseError`
 - Fixed broken infra link in leon

Signed-off-by: Jiahao XU <Jiahao_XU@outlook.com>
2023-04-17 14:50:58 +10:00
dependabot[bot]
345c14d7ba
Bump jobslot from 0.2.10 to 0.2.11 (#989)
Bumps [jobslot](https://github.com/cargo-bins/jobslot) from 0.2.10 to 0.2.11.
- [Release notes](https://github.com/cargo-bins/jobslot/releases)
- [Commits](https://github.com/cargo-bins/jobslot/compare/v0.2.10...v0.2.11)

---
updated-dependencies:
- dependency-name: jobslot
  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-04-17 12:43:48 +10:00
dependabot[bot]
067af4ea25
Bump serde from 1.0.159 to 1.0.160 (#985)
Bumps [serde](https://github.com/serde-rs/serde) from 1.0.159 to 1.0.160.
- [Release notes](https://github.com/serde-rs/serde/releases)
- [Commits](https://github.com/serde-rs/serde/compare/v1.0.159...v1.0.160)

---
updated-dependencies:
- dependency-name: serde
  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-04-12 13:35:00 +10:00
dependabot[bot]
363dbc650a
Bump miette from 5.6.0 to 5.7.0 (#973) 2023-04-03 03:06:19 +00:00
dependabot[bot]
d7441e4675
Bump windows from 0.47.0 to 0.48.0 (#974) 2023-04-03 02:49:53 +00:00
dependabot[bot]
10e350af8d
Bump windows from 0.46.0 to 0.47.0 (#964) 2023-03-30 03:29:23 +00:00
dependabot[bot]
f46b0eab18
Bump tempfile from 3.4.0 to 3.5.0 (#967) 2023-03-30 02:49:38 +00:00
dependabot[bot]
b645cc6286
Bump serde from 1.0.158 to 1.0.159 (#959) 2023-03-29 23:12:31 +11:00
dependabot[bot]
96482c9dab
Bump tokio from 1.26.0 to 1.27.0 (#953)
Bumps [tokio](https://github.com/tokio-rs/tokio) from 1.26.0 to 1.27.0.
- [Release notes](https://github.com/tokio-rs/tokio/releases)
- [Commits](https://github.com/tokio-rs/tokio/compare/tokio-1.26.0...tokio-1.27.0)

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

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-03-28 16:45:36 +11:00
dependabot[bot]
f1d6731e7a
Bump async-trait from 0.1.67 to 0.1.68 (#950) 2023-03-27 02:44:29 +00:00
Jiahao XU
a27d5aebf6
Use leon for template in binstalk & detect malformed pkg-url/pkg-fmt early (#933)
Fixed #851

* Add new dep leon to crate binstalk
* Add new variant `BinstallError::Template{Parse, Render}Error`
* Use `leon::Template` in mod `bins`
* Use `leon::Template` in mod `fetchers::gh_crate_meta`
* Refactor mod `bins`: Rm unused associated fn & fields from `Context`
* Simplify unit testing in mod `fetchers::gh_crate_meta`
* Rm soft-deprecated field `fetchers::gh_crate_meta::Context::format`
  and change the `match` to resolve `archive` => `self.archive_format`.
* Make macro_rules `leon::template!` far easier to use
* Construct `leon::Template<'_>` as constant in `gh_crate_meta::hosting`
* Simplify `leon::Values` trait
   Change its method `get_value` signature to
   
   ```rust
       fn get_value(&self, key: &str) -> Option<Cow<'_, str>>;
   ```
   
   Now, `ValuesFn` also accepts non-`'static` function, but now
   `leon::Values` is only implemented for `&ValuesFn<F>` now.
   
   This makes it a little bit more cumbersome to use but I think it's a
   reasonable drawback.
* Rm `Send` bound req from `ValuesFn`
* Impl new fn `leon::Template::cast`
   for casting `Template<'s>` to `Template<'t>` where `'s: 't`
* Rename `leon::Template::has_keys` => `has_any_of_keys`
* Make checking whether format related keys are present more robust
* Optimize `GhCrateMeta::launch_baseline_find_tasks`: Skip checking all fmt ext
   if none of the format related keys ("format", "archive-format",
   "archive-suffix") are present.
* Only ret `.exe` in `PkgFmt::extensions` on windows
   by adding a new param `is_windows: bool`
* Improve debug msg in `GhCrateMeta::fetch_and_extract`
* Add warnings to `GhCrateMeta::find`
* Rm dep tinytemplate
* `impl<'s, 'rhs: 's> ops::AddAssign<&Template<'rhs>> for Template<'s>`
* `impl<'s, 'rhs: 's> ops::AddAssign<Template<'rhs>> for Template<'s>`
* `impl<'s, 'item: 's> ops::AddAssign<Item<'item>> for Template<'s>`
* `impl<'s, 'item: 's> ops::AddAssign<&Item<'item>> for Template<'s>`
* `impl<'s, 'rhs: 's> ops::Add<Template<'rhs>> for Template<'s>` (improved existing `Add` impl)
* `impl<'s, 'rhs: 's> ops::Add<&Template<'rhs>> for Template<'s>`
* `impl<'s, 'item: 's> ops::Add<Item<'item>> for Template<'s>`
* `impl<'s, 'item: 's> ops::Add<&Item<'item>> for Template<'s>`

Signed-off-by: Jiahao XU <Jiahao_XU@outlook.com>
Co-authored-by: Félix Saparelli <felix@passcod.name>
2023-03-26 16:11:10 +11:00
github-actions[bot]
b43d0c9dfe
release: binstalk v0.11.0 (#940)
chore: Release

Co-authored-by: github-actions <github-actions@github.com>
2023-03-23 00:12:42 +11:00
github-actions[bot]
e58a79846f
release: binstalk-downloader v0.4.2 (#939)
chore: Release

Co-authored-by: github-actions <github-actions@github.com>
2023-03-22 23:27:01 +11:00
github-actions[bot]
0291259fa5
release: detect-targets v0.1.7 (#937)
chore: Release

Co-authored-by: github-actions <github-actions@github.com>
2023-03-22 22:23:15 +11:00
dependabot[bot]
6a9827e66f
Bump serde from 1.0.156 to 1.0.157 (#926) 2023-03-20 04:02:13 +00:00
dependabot[bot]
dd4595e6a4
Bump thiserror from 1.0.39 to 1.0.40 (#928) 2023-03-20 03:35:45 +00:00
dependabot[bot]
30c1e6af8f
Bump async-trait from 0.1.66 to 0.1.67 (#924) 2023-03-20 02:48:52 +00:00
Jiahao XU
f28c05b0ee
Fix QuickInstall report bug for target universal2-apple-darwin (#921)
This bug was reintroduced by #919 and it was fixed by #918

Signed-off-by: Jiahao XU <Jiahao_XU@outlook.com>
2023-03-18 22:35:48 +13:00
Jiahao XU
cc78ff3b90
Fix fetcher::QuickInstallstats report sending (#918)
Fixed https://github.com/cargo-bins/cargo-quickinstall/issues/195

 - Fix `fetchers::QuickInstall`: Stop sending stats for `universal-apple-darwin`
   since quickinstall only supports targets officially supports by rust.
 - Only send stats report to quickinstall if the `Fetcher::find` is `.await`ed on
   
   This prevents stats report to be sent for cases where the `QuickInstall` fetcher
   is actually unused, e.g. resolved to `GhCrateMeta` or other `QuickInstall` fetcher
   with different target.
   
   This also reduces amount of http requests created in background.

Signed-off-by: Jiahao XU <Jiahao_XU@outlook.com>
2023-03-17 21:05:19 +11:00
dependabot[bot]
3e830c9fad
Bump serde from 1.0.155 to 1.0.156 (#912)
Bumps [serde](https://github.com/serde-rs/serde) from 1.0.155 to 1.0.156.
- [Release notes](https://github.com/serde-rs/serde/releases)
- [Commits](https://github.com/serde-rs/serde/compare/v1.0.155...v1.0.156)

---
updated-dependencies:
- dependency-name: serde
  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-03-15 15:56:30 +11:00
dependabot[bot]
ca7b489663
Bump miette from 5.5.0 to 5.6.0 (#913)
Bumps [miette](https://github.com/zkat/miette) from 5.5.0 to 5.6.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.5.0...miette-derive-v5.6.0)

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

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-03-15 15:56:07 +11:00
github-actions[bot]
63443e88b1
release: binstalk v0.10.0 (#909)
chore: Release

Co-authored-by: github-actions <github-actions@github.com>
2023-03-14 18:31:20 +11:00
Jiahao XU
d118fa8fdb
Obey crates.io crawler policy: Only make one request per sec (#908)
Fixed https://github.com/taiki-e/install-action/issues/89

Signed-off-by: Jiahao XU <Jiahao_XU@outlook.com>
2023-03-14 17:11:22 +11:00
dependabot[bot]
6df38f1f11
Bump windows from 0.44.0 to 0.46.0 (#905) 2023-03-14 02:32:36 +00:00
github-actions[bot]
57182fae70
release: binstalk v0.9.1 (#903)
chore: Release

Co-authored-by: github-actions <github-actions@github.com>
2023-03-13 23:01:05 +11:00
github-actions[bot]
5e4e047493
release: binstalk-downloader v0.4.1 (#902)
chore: Release

Co-authored-by: github-actions <github-actions@github.com>
2023-03-13 10:41:06 +00:00
Jiahao XU
89a47cbec9
Fix extract_tar_based_stream: Normalize path before adding them to ExtractedFiles (#901)
Signed-off-by: Jiahao XU <Jiahao_XU@outlook.com>
2023-03-13 21:27:50 +11:00
dependabot[bot]
fce7141bec
Bump semver from 1.0.16 to 1.0.17 (#895) 2023-03-13 03:13:07 +00:00
dependabot[bot]
45952446d6
Bump serde from 1.0.154 to 1.0.155 (#894) 2023-03-13 02:40:10 +00:00