Commit graph

26 commits

Author SHA1 Message Date
dependabot[bot]
b645cc6286
Bump serde from 1.0.158 to 1.0.159 (#959) 2023-03-29 23:12:31 +11: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
dependabot[bot]
6a9827e66f
Bump serde from 1.0.156 to 1.0.157 (#926) 2023-03-20 04:02:13 +00: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]
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
github-actions[bot]
45045041a4
release: binstalk-types v0.3.0 (#887)
chore: Release

Co-authored-by: github-actions <github-actions@github.com>
2023-03-12 08:18:34 +00:00
dependabot[bot]
cfbdf1181f
Bump serde from 1.0.153 to 1.0.154 (#874) 2023-03-09 02:35:50 +00:00
dependabot[bot]
f5c30c2f8c
Bump serde from 1.0.152 to 1.0.153 (#873) 2023-03-08 02:37:38 +00:00
dependabot[bot]
8f50bab0d8
Bump compact_str from 0.6.1 to 0.7.0 (#825)
Bumps [compact_str](https://github.com/ParkMyCar/compact_str) from 0.6.1 to 0.7.0.
- [Release notes](https://github.com/ParkMyCar/compact_str/releases)
- [Changelog](https://github.com/ParkMyCar/compact_str/blob/main/CHANGELOG.md)
- [Commits](https://github.com/ParkMyCar/compact_str/commits)

---
updated-dependencies:
- dependency-name: compact_str
  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-02-22 17:55:18 +11:00
dependabot[bot]
30f7722131
Bump once_cell from 1.17.0 to 1.17.1 (#803) 2023-02-15 02:39:44 +00: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
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
github-actions[bot]
3d79401d81
release: binstalk-types v0.2.0 (#685)
chore: Release

Co-authored-by: github-actions <github-actions@github.com>
2023-01-11 10:29:31 +11: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
dependabot[bot]
c022cd9b0c
Bump serde from 1.0.151 to 1.0.152 (#633)
Bumps [serde](https://github.com/serde-rs/serde) from 1.0.151 to 1.0.152.
- [Release notes](https://github.com/serde-rs/serde/releases)
- [Commits](https://github.com/serde-rs/serde/compare/v1.0.151...v1.0.152)

---
updated-dependencies:
- dependency-name: serde
  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-28 02:30:38 +00:00
Jiahao XU
fef8bb6774
Optimize binstalk-{manifest, types} (#610)
* Add new dep maybe-owned v0.3.4 to binstalk-types with features serde
* Re-export maybe_owned in binstalk-types
* Optimize `CrateSource::url`: Use `MaybeOwned<'static, Url>`
   to avoid cloning in `CrateSource::cratesio_registry`
* Optimize `Source`: Use `MaybeOwned<'static, Url>`
   to avoid cloning in `Source::cratesio_registry` and
   `impl From<&CrateSource> for Source`.
* Optimize `Source`: Add lifetime `<'a>` to avoid cloning
   in `impl<'a> From<&'a CrateSource> for Source<'a>`
* Optimize `CratesToml::append_to_path`: Avoid cloning
   caused by `CrateVersionSource::from` by manually `format!` name, version
   and source into string.
* Add new dep beef v0.5.2 to binstalk-manifests with features impl_serde
* Optimize `CratesToml::append_to_path`: Eliminate `metadata.bins.clone()` by using `Cow`
* Replace dep toml_edit with toml v0.5.10 in binstalk-manifests
   to speed up compilation and reduce bloat.
   
   Previously we switch to toml_edit because it is unmaintained, but now
   with it moved into toml-rs/toml as a workspace, it is now under active
   maintenance again, thus we switch back to it.

Signed-off-by: Jiahao XU <Jiahao_XU@outlook.com>
2022-12-21 06:07:04 +00: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]
daf52a475a
Bump serde from 1.0.150 to 1.0.151 (#616) 2022-12-19 05:12:15 +00:00
dependabot[bot]
058208bae9
Bump serde from 1.0.149 to 1.0.150 (#597)
Bumps [serde](https://github.com/serde-rs/serde) from 1.0.149 to 1.0.150.
- [Release notes](https://github.com/serde-rs/serde/releases)
- [Commits](https://github.com/serde-rs/serde/compare/v1.0.149...v1.0.150)

---
updated-dependencies:
- dependency-name: serde
  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-12 02:40:53 +00:00
dependabot[bot]
97c5857e58
Bump serde from 1.0.148 to 1.0.149 (#592)
Bumps [serde](https://github.com/serde-rs/serde) from 1.0.148 to 1.0.149.
- [Release notes](https://github.com/serde-rs/serde/releases)
- [Commits](https://github.com/serde-rs/serde/compare/v1.0.148...v1.0.149)

---
updated-dependencies:
- dependency-name: serde
  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-12 00:59:27 +00:00
dependabot[bot]
30cc94b5bc
Bump serde from 1.0.147 to 1.0.148 (#572)
Bumps [serde](https://github.com/serde-rs/serde) from 1.0.147 to 1.0.148.
- [Release notes](https://github.com/serde-rs/serde/releases)
- [Commits](https://github.com/serde-rs/serde/compare/v1.0.147...v1.0.148)

---
updated-dependencies:
- dependency-name: serde
  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-29 13:39:33 +11:00
github-actions[bot]
6fd3044c12
release: binstalk-types v0.1.0 (#557)
chore: Release

Co-authored-by: github-actions <github-actions@github.com>
2022-11-22 09:21:27 +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
822e7094e5
Upgrade dependencies (#554)
- bytes v1.2.1 => v1.3.0
 - serde_json v1.0.88 => v1.0.89
 - compact_str v0.6.0 => v0.6.1

Signed-off-by: Jiahao XU <Jiahao_XU@outlook.com>
2022-11-22 07:39:58 +00:00
Jiahao XU
d9cc3ce219
Refactor: Extract new crate binstalk-types plus other misc refactor and optimization (#535)
* Refactor: Extract new crate binstalk-types
* Optimize: Rm field `CrateInfo::other`
   which also removes dep serde-tuple-vec-map and serde-json from
   binstalk-types.
   
   This also makes `CrateInfo` easier to use, more generic and can be used
   over any `Serializer`, not just `serde_json::Value`.
* Mark all errors in `binstalk-manifests` as non_exhaustive
* Reduce size of `CvsParseError` by using `Box<str>`
   instead of `String` for variant `UnknownSourceType`.
* Reduce size of `CratesTomlParseError` to 16 bytes on 64bit platform
   by boxing variants `TomlWrite` and `CvsParse` as these two fields are
   significantly larger than other variants.
* Unify import style in mod `binstall_crates_v1`
* Replace dep binstalk-manifests with binstalk-types in binstalk-downloader
   to reduce its transitive dependencies and enables binstalk-downloader to
   be built in parallel to binstak-manifests.
* Replace dep binstalk-manifests with binstalk-types in binstalk
   to reduce transitive dependencies and enables binstalk to be built in
   parallel to binstalk-manifests.
   
   This is benefitial because binstalk-manifests pulls in toml_edit, which
   could takes up to 15s to be built on M1 (7-9s for codegen).
* Add dep binstalk-manifests to crates/bin
* Update dependabot and GHA release-pr

Signed-off-by: Jiahao XU <Jiahao_XU@outlook.com>
2022-11-17 13:46:27 +13:00