Skip to content

Commit

Permalink
chore: update dependencies and apply recent once_cell feature renamings
Browse files Browse the repository at this point in the history
rust-lang/rust#98165 landed in the latest Rust
nightly version, which made Dependabot CI runs to fail. Try to get
builds working again by updating the references to the old names
accordingly.

While at it, let's also do some minor dependency version bumps.
AlexTMjugador committed Jun 20, 2022

Verified

This commit was signed with the committer’s verified signature.
janicduplessis Janic Duplessis
1 parent 25e5153 commit b9246d5
Showing 7 changed files with 27 additions and 27 deletions.
32 changes: 16 additions & 16 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions packages/packsquash/Cargo.toml
Original file line number Diff line number Diff line change
@@ -18,7 +18,7 @@ thiserror = "1.0.31"
ahash = "0.7.6"

num_cpus = "1.13.1"
sysinfo = { version = "0.24.4", default-features = false }
sysinfo = { version = "0.24.5", default-features = false }
walkdir = "2.3.2"

tokio = { version = "1.19.2", default-features = false, features = ["rt-multi-thread", "macros", "io-util", "fs", "sync", "parking_lot"] }
@@ -34,7 +34,7 @@ jsonpath_lib = "0.3.0"

spng = { version = "0.2.0-alpha.2", default-features = false }
png = "0.17.5"
rgb = "0.8.32"
rgb = "0.8.33"
imagequant = { version = "4.0.0", default-features = false }
oxipng = { version = "5.0.1", default-features = false, features = ["zopfli"] }

2 changes: 1 addition & 1 deletion packages/packsquash/src/pack_file/json_file/debloater.rs
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
//! Implements a debloater (i.e. unused key or value remover) for JSON files.
use std::{cell::Cell, lazy::OnceCell};
use std::cell::{Cell, OnceCell};

use jsonpath_lib::SelectorMut;
use serde_json::Value;
4 changes: 2 additions & 2 deletions packages/packsquash/src/pack_file/legacy_lang_file.rs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
use std::lazy::SyncLazy;
use std::sync::LazyLock;

use ahash::AHashSet;
use futures::{future, StreamExt};
@@ -19,7 +19,7 @@ use super::{OptimizedBytesChunk, PackFile, PackFileConstructor};
mod tests;

/// A regular expression that matches plausible Java format specifiers, used in format strings.
static FORMAT_SPECIFIER_REGEX: SyncLazy<Regex> = SyncLazy::new(|| {
static FORMAT_SPECIFIER_REGEX: LazyLock<Regex> = LazyLock::new(|| {
// The format specifier follows this syntax
// (from https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/util/Formatter.html#summary):
// %[argument_index$][flags][width][.precision]conversion
6 changes: 3 additions & 3 deletions packages/packsquash/src/squash_zip.rs
Original file line number Diff line number Diff line change
@@ -4,10 +4,10 @@ use std::{
borrow::Cow,
collections::hash_map::Entry,
io::{self, ErrorKind, Read, SeekFrom},
lazy::SyncLazy,
num::TryFromIntError,
path::Path,
string::FromUtf8Error,
sync::LazyLock,
time::SystemTime
};

@@ -191,8 +191,8 @@ struct MutableSquashZipState<F: AsyncRead + AsyncSeek + Unpin> {

/// The system time sanitizer that SquashZip will use for sanitizing and
/// desanitizing dates to and from ZIP files, respectively.
static SYSTEM_TIME_SANITIZER: SyncLazy<SystemTimeSanitizer<Aes128>> =
SyncLazy::new(SystemTimeSanitizer::new);
static SYSTEM_TIME_SANITIZER: LazyLock<SystemTimeSanitizer<Aes128>> =
LazyLock::new(SystemTimeSanitizer::new);

impl<F: AsyncRead + AsyncSeek + Unpin> SquashZip<F> {
/// Creates a new instance of this struct, that may leverage the
4 changes: 2 additions & 2 deletions packages/packsquash/src/squash_zip/system_id.rs
Original file line number Diff line number Diff line change
@@ -15,7 +15,7 @@
// https://docs.rs/crate/machine-uid/0.2.0
// https://github.com/tilda/rust-hwid

use std::{cmp::Ordering, env, lazy::SyncOnceCell};
use std::{cmp::Ordering, env, sync::OnceLock};

use tokio::task;
use uuid::Uuid;
@@ -104,7 +104,7 @@ impl Eq for SystemId {}

/// The cell that will be used to memoize the result of computing the system ID, so
/// it's done only once in the lifetime of the process.
static SYSTEM_ID: SyncOnceCell<SystemId> = SyncOnceCell::new();
static SYSTEM_ID: OnceLock<SystemId> = OnceLock::new();

/// Returns the system ID, calculating it if that was not done yet.
///
2 changes: 1 addition & 1 deletion packages/packsquash_cli/Cargo.toml
Original file line number Diff line number Diff line change
@@ -30,7 +30,7 @@ winapi-util = "0.1.5"

[build-dependencies]
vergen = { version = "7.2.1", default-features = false, features = ["cargo", "git"] }
time = { version = "0.3.9", default-features = false, features = ["std"] }
time = { version = "0.3.10", default-features = false, features = ["std"] }

[target.'cfg(windows)'.build-dependencies]
winres = "0.1.12"

1 comment on commit b9246d5

@github-actions
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

PackSquash library quick benchmarks

Benchmark suite Current: b9246d5 Previous: 25e5153 Ratio
tiny_benches_wall_time/empty_pack 15633822 ns/iter (± 1281737) 11062780 ns/iter (± 614810) 1.41
small_benches_wall_time/aylas_khron_micro_pack 886748961 ns/iter (± 7001939) 718878236 ns/iter (± 8208731) 1.23
small_benches_wall_time/jilchu_chronos_micro_pack 15938590979 ns/iter (± 70397125) 13454882747 ns/iter (± 32847793) 1.18
small_benches_wall_time/aiamded_breadstick_micro_pack 2446273787 ns/iter (± 23345565) 2206662268 ns/iter (± 28992872) 1.11

This comment was automatically generated by workflow using github-action-benchmark.

Please sign in to comment.