Skip to content

Commit

Permalink
Upgrade zip to 1.0 (#117)
Browse files Browse the repository at this point in the history
* Upgrade zip to 1.0

* Clean up dependencies

* Remove duplicates

* Fix lints

---------

Co-authored-by: Jake Shadle <jake.shadle@embark-studios.com>
messense and Jake-Shadle authored May 6, 2024
1 parent 2f44365 commit 8f7fa9f
Showing 6 changed files with 260 additions and 202 deletions.
379 changes: 219 additions & 160 deletions Cargo.lock

Large diffs are not rendered by default.

16 changes: 5 additions & 11 deletions Cargo.toml
Original file line number Diff line number Diff line change
@@ -22,7 +22,7 @@ exclude = [
[features]
# By default we use rustls for TLS
default = ["rustls-tls"]
rustls-tls = ["ureq/tls", "rustls"]
rustls-tls = ["ureq/tls"]
# If this feature is enabled we instead use the native TLS implementation for the
# target platform
native-tls = ["ureq/native-tls", "native-tls-crate/vendored"]
@@ -33,16 +33,12 @@ anyhow = "1.0"
# Network/file buffers
bytes = "1.0"
# CAB files are used in conjunction with MSI files for SDK packages
cab = "0.5"
cab = "0.6"
# Nicer to use utf-8 paths
camino = "1.0"
# Easy CLI tables
cli-table = { version = "0.4", default-features = false }
crossbeam-channel = "0.5"
# GZIP/Deflate
flate2 = { version = "1.0", default-features = false, features = [
"rust_backend",
] }
# Pretty progress bars
indicatif = "0.17"
# Decoding of MSI installer packages
@@ -56,9 +52,6 @@ regex = "1.0"
ureq = { version = "2.4", default-features = false, features = ["gzip"] }
memchr = "2.6"
native-tls-crate = { package = "native-tls", version = "0.2", optional = true }
# CA Cert for HTTP requests
rustls = { version = "0.22", optional = true }
rustls-pemfile = { version = "1.0.3", optional = true }
# SHA-256 verification
sha2 = "0.10"
# Deserialization
@@ -69,7 +62,8 @@ serde_json = "1.0"
clap = { version = "4.0", features = ["derive", "env", "wrap_help"] }
# Easy management of temp files
tempfile = "3.1"
toml = "0.8"
# We need to pin it to not get duplicates due to zip -> num_enum -> proc-macro-crate -> (WHY!?!?) toml_edit
toml = "=0.8.9"
# Tracing logs
tracing = { version = "0.1", default-features = false, features = [
"attributes",
@@ -87,7 +81,7 @@ twox-hash = "1.6"
versions = "6.2"
walkdir = "2.3"
# Unpacking of VSIX "packages"
zip = { version = "0.6", default-features = false, features = ["deflate"] }
zip = { version = "1.0", default-features = false, features = ["deflate"] }

[target.'cfg(all(target_env = "musl", target_arch = "x86_64"))'.dependencies]
# Faster allocator for musl builds
1 change: 0 additions & 1 deletion deny.toml
Original file line number Diff line number Diff line change
@@ -38,7 +38,6 @@ license-files = [{ path = "LICENSE", hash = 0xbd0eed23 }]
multiple-versions = "deny"
deny = []
skip = [
{ crate = "bitflags@1.3.2", reason = "native-tls -> security-framework :(" },
{ crate = "regex-syntax@0.6.29", reason = "tracing-subscriber depends on 2 different versions :(" },
{ crate = "regex-automata@0.1.10", reason = "tracing-subscriber depends on 2 different versions :(" },
]
20 changes: 11 additions & 9 deletions src/main.rs
Original file line number Diff line number Diff line change
@@ -42,19 +42,21 @@ pub struct SplatOptions {
/// libraries that are generally uninteresting to keep for most usage
#[arg(long)]
include_debug_symbols: bool,
/// By default, symlinks are added to both the CRT and WindowsSDK to
/// address casing issues in general usage. For example, if you are
/// compiling C/C++ code that does `#include <windows.h>`, it will break
/// on a case-sensitive file system, as the actual path in the WindowsSDK
/// is `Windows.h`. This also applies even if the C/C++ you are compiling
/// uses correct casing for all CRT/SDK includes, as the internal headers
/// also use incorrect casing in most cases.
/// By default, symlinks are added to both the CRT and `WindowsSDK` to
/// address casing issues in general usage.
///
/// For example, if you are compiling C/C++ code that does
/// `#include <windows.h>`, it will break on a case-sensitive file system,
/// as the actual path in the `WindowsSDK` is `Windows.h`. This also applies
/// even if the C/C++ you are compiling uses correct casing for all CRT/SDK
/// includes, as the internal headers also use incorrect casing in most cases.
#[arg(long)]
disable_symlinks: bool,
/// By default, we convert the MS specific `x64`, `arm`, and `arm64`
/// target architectures to the more canonical `x86_64`, `aarch`, and
/// `aarch64` of LLVM etc when creating directories/names. Passing this
/// flag will preserve the MS names for those targets.
/// `aarch64` of LLVM etc when creating directories/names.
///
/// Passing this flag will preserve the MS names for those targets.
#[arg(long)]
preserve_ms_arch_notation: bool,
}
22 changes: 12 additions & 10 deletions tests/snapshots/xwin-minimize.snap
Original file line number Diff line number Diff line change
@@ -23,19 +23,22 @@ Options:
libraries that are generally uninteresting to keep for most usage

--disable-symlinks
By default, symlinks are added to both the CRT and WindowsSDK to
address casing issues in general usage. For example, if you are
compiling C/C++ code that does `#include <windows.h>`, it will break
on a case-sensitive file system, as the actual path in the WindowsSDK
is `Windows.h`. This also applies even if the C/C++ you are compiling
uses correct casing for all CRT/SDK includes, as the internal headers
also use incorrect casing in most cases
By default, symlinks are added to both the CRT and `WindowsSDK` to
address casing issues in general usage.

For example, if you are compiling C/C++ code that does `#include
<windows.h>`, it will break on a case-sensitive file system, as the
actual path in the `WindowsSDK` is `Windows.h`. This also applies even
if the C/C++ you are compiling uses correct casing for all CRT/SDK
includes, as the internal headers also use incorrect casing in most
cases.
--preserve-ms-arch-notation
By default, we convert the MS specific `x64`, `arm`, and `arm64`
target architectures to the more canonical `x86_64`, `aarch`, and
`aarch64` of LLVM etc when creating directories/names. Passing this
flag will preserve the MS names for those targets
`aarch64` of LLVM etc when creating directories/names.
Passing this flag will preserve the MS names for those targets.
--map <MAP>
The path of the filter file that is generated. Defaults to
@@ -71,4 +74,3 @@ Options:
-V, --version
Print version
24 changes: 13 additions & 11 deletions tests/snapshots/xwin-splat.snap
Original file line number Diff line number Diff line change
@@ -17,19 +17,22 @@ Options:
libraries that are generally uninteresting to keep for most usage

--disable-symlinks
By default, symlinks are added to both the CRT and WindowsSDK to
address casing issues in general usage. For example, if you are
compiling C/C++ code that does `#include <windows.h>`, it will break
on a case-sensitive file system, as the actual path in the WindowsSDK
is `Windows.h`. This also applies even if the C/C++ you are compiling
uses correct casing for all CRT/SDK includes, as the internal headers
also use incorrect casing in most cases
By default, symlinks are added to both the CRT and `WindowsSDK` to
address casing issues in general usage.

For example, if you are compiling C/C++ code that does `#include
<windows.h>`, it will break on a case-sensitive file system, as the
actual path in the `WindowsSDK` is `Windows.h`. This also applies even
if the C/C++ you are compiling uses correct casing for all CRT/SDK
includes, as the internal headers also use incorrect casing in most
cases.
--preserve-ms-arch-notation
By default, we convert the MS specific `x64`, `arm`, and `arm64`
target architectures to the more canonical `x86_64`, `aarch`, and
`aarch64` of LLVM etc when creating directories/names. Passing this
flag will preserve the MS names for those targets
`aarch64` of LLVM etc when creating directories/names.
Passing this flag will preserve the MS names for those targets.
--output <OUTPUT>
The root output directory. Defaults to `./.xwin-cache/splat` if not
@@ -45,8 +48,7 @@ Options:
increases overall time and disk usage
-h, --help
Print help
Print help (see a summary with '-h')
-V, --version
Print version

0 comments on commit 8f7fa9f

Please sign in to comment.