From ff0aee87e225af7bd8554437cf6860dad6a83810 Mon Sep 17 00:00:00 2001 From: Sebastian Zivota Date: Wed, 22 May 2024 14:11:51 +0200 Subject: [PATCH] deps: Update zip to 1.3 (#839) --- Cargo.lock | 77 ++++++++++++++++++++++---- symbolic-debuginfo/Cargo.toml | 2 +- symbolic-debuginfo/src/sourcebundle.rs | 6 +- 3 files changed, 70 insertions(+), 15 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index ccd2a6de..396e1308 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -131,6 +131,15 @@ dependencies = [ "regex", ] +[[package]] +name = "arbitrary" +version = "1.3.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7d5a26814d8dcb93b0e5a0ff3c6d80a8843bafb21b39e8e18a6f05471870e110" +dependencies = [ + "derive_arbitrary", +] + [[package]] name = "arrayvec" version = "0.7.4" @@ -257,15 +266,9 @@ dependencies = [ [[package]] name = "bumpalo" -version = "3.15.4" +version = "3.16.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7ff69b9dd49fd426c69a0db9fc04dd934cdb6645ff000864d98f7e2af8830eaa" - -[[package]] -name = "byteorder" -version = "1.5.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1fd0f2584146f6f2ef48085050886acf353beff7305ebd1ae69500e27c67f64b" +checksum = "79296716171880943b8470b5f8d03aa55eb2e645a4874bdbb28adb49162e012c" [[package]] name = "bytes" @@ -538,6 +541,28 @@ dependencies = [ "powerfmt", ] +[[package]] +name = "derive_arbitrary" +version = "1.3.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "67e77553c4162a157adbf834ebae5b415acbecbeafc7a74b0e886657506a7611" +dependencies = [ + "proc-macro2", + "quote", + "syn", +] + +[[package]] +name = "displaydoc" +version = "0.2.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "487585f4d0c6655fe74905e2504d8ad6908e4db67f744eb140876906c2f3175d" +dependencies = [ + "proc-macro2", + "quote", + "syn", +] + [[package]] name = "dmsort" version = "1.0.2" @@ -964,6 +989,12 @@ dependencies = [ "scopeguard", ] +[[package]] +name = "lockfree-object-pool" +version = "0.1.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9374ef4228402d4b7e403e5838cb880d9ee663314b0a900d5a6aabf0c213552e" + [[package]] name = "log" version = "0.4.21" @@ -1793,6 +1824,12 @@ dependencies = [ "outref", ] +[[package]] +name = "simd-adler32" +version = "0.3.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d66dc143e6b11c1eddc06d5c423cfc97062865baf299914ab64caa38182078fe" + [[package]] name = "similar" version = "2.5.0" @@ -2867,12 +2904,30 @@ dependencies = [ [[package]] name = "zip" -version = "0.6.6" +version = "1.3.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "760394e246e4c28189f19d488c058bf16f564016aefac5d32bb1f3b51d5e9261" +checksum = "1b7a5a9285bd4ee13bdeb3f8a4917eb46557e53f270c783849db8bef37b0ad00" dependencies = [ - "byteorder", + "arbitrary", "crc32fast", "crossbeam-utils", + "displaydoc", "flate2", + "indexmap", + "thiserror", + "zopfli", +] + +[[package]] +name = "zopfli" +version = "0.8.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e5019f391bac5cf252e93bbcc53d039ffd62c7bfb7c150414d61369afe57e946" +dependencies = [ + "bumpalo", + "crc32fast", + "lockfree-object-pool", + "log", + "once_cell", + "simd-adler32", ] diff --git a/symbolic-debuginfo/Cargo.toml b/symbolic-debuginfo/Cargo.toml index be96ad40..a9f4d17b 100644 --- a/symbolic-debuginfo/Cargo.toml +++ b/symbolic-debuginfo/Cargo.toml @@ -103,7 +103,7 @@ symbolic-common = { version = "12.8.0", path = "../symbolic-common" } symbolic-ppdb = { version = "12.8.0", path = "../symbolic-ppdb", optional = true } thiserror = "1.0.39" wasmparser = { version = "0.202.0", optional = true } -zip = { version = "0.6.4", optional = true, default-features = false, features = ["deflate"] } +zip = { version = "1.3.1", optional = true, default-features = false, features = ["deflate"] } [dev-dependencies] criterion = { version = "0.5.1", features = ["html_reports"] } diff --git a/symbolic-debuginfo/src/sourcebundle.rs b/symbolic-debuginfo/src/sourcebundle.rs index a47ce52c..ebddd50e 100644 --- a/symbolic-debuginfo/src/sourcebundle.rs +++ b/symbolic-debuginfo/src/sourcebundle.rs @@ -55,7 +55,7 @@ use parking_lot::Mutex; use regex::Regex; use serde::{Deserialize, Deserializer, Serialize}; use thiserror::Error; -use zip::{write::FileOptions, ZipWriter}; +use zip::{write::SimpleFileOptions, ZipWriter}; use symbolic_common::{Arch, AsSelf, CodeId, DebugId, SourceLinkMappings}; @@ -1072,14 +1072,14 @@ where collect_il2cpp: bool, } -fn default_file_options() -> FileOptions { +fn default_file_options() -> SimpleFileOptions { // TODO: should we maybe acknowledge that its the year 2023 and switch to zstd eventually? // Though it obviously needs to be supported across the whole platform, // which does not seem to be the case for Python? // Depending on `zip` crate feature flags, it might default to the current time. // Using an explicit `DateTime::default` gives us a deterministic `1980-01-01T00:00:00`. - FileOptions::default().last_modified_time(zip::DateTime::default()) + SimpleFileOptions::default().last_modified_time(zip::DateTime::default()) } impl SourceBundleWriter