From 08f6a702ee293376f19a3d2c34031e335c53a1ec Mon Sep 17 00:00:00 2001 From: Pavel Ivanov Date: Tue, 17 Dec 2024 22:55:52 +0100 Subject: [PATCH 1/3] build: fixed unused import warning in fsmon.rs (#599) --- src/fsmon.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/fsmon.rs b/src/fsmon.rs index 8be733d2..bd3f83d2 100644 --- a/src/fsmon.rs +++ b/src/fsmon.rs @@ -1,5 +1,5 @@ // std imports -use std::{path::PathBuf, time::Duration}; +use std::path::PathBuf; // local imports use crate::error::Result; @@ -89,7 +89,7 @@ mod imp { #[cfg(target_os = "macos")] mod imp { - use std::collections::HashSet; + use std::{collections::HashSet, time::Duration}; use kqueue::{EventData, EventFilter, FilterFlag, Ident, Vnode, Watcher}; use notify::event::{CreateKind, DataChange, MetadataKind, ModifyKind, RemoveKind, RenameMode}; From 382a23e8d9bf33d5f611718bc582d20e6f362b23 Mon Sep 17 00:00:00 2001 From: Pavel Ivanov Date: Tue, 17 Dec 2024 23:10:08 +0100 Subject: [PATCH 2/3] feat: added windows arm64 build (#601) Cherry-pick of * feat: added windows arm64 build (#598) * fix: fixed asset name for windows arm64 build (#600) --- .github/workflows/publish.yml | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml index 5996d0dd..a66d7ddb 100644 --- a/.github/workflows/publish.yml +++ b/.github/workflows/publish.yml @@ -24,6 +24,7 @@ jobs: - macos-arm - macos-universal - windows-x86 + - windows-arm include: - name: linux-x86-gnu os: ubuntu-latest @@ -85,6 +86,13 @@ jobs: target: x86_64-pc-windows-msvc archiver: 7z asset: hl-windows.zip + - name: windows-arm + os: windows-latest + family: windows + arch: aarch64 + target: aarch64-pc-windows-msvc + archiver: 7z + asset: hl-windows-arm64.zip steps: - uses: actions/checkout@v4 From 5313e7c4123b8cf03b12ccf9c9cc8fe02f309e85 Mon Sep 17 00:00:00 2001 From: Pavel Ivanov Date: Tue, 17 Dec 2024 23:37:45 +0100 Subject: [PATCH 3/3] fix: fixed wildcard handling on windows (#602) --- Cargo.lock | 18 +++++++++++++++++- Cargo.toml | 3 ++- src/cli.rs | 2 +- src/main.rs | 2 +- 4 files changed, 21 insertions(+), 4 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 72754b02..837028b9 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -794,6 +794,12 @@ dependencies = [ "wasi", ] +[[package]] +name = "glob" +version = "0.3.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d2fabcfbdc87f4758337ca535fb41a6d701b65693ce38287d856d1674551ec9b" + [[package]] name = "half" version = "2.4.1" @@ -874,7 +880,7 @@ checksum = "7f24254aa9a54b5c858eaee2f5bccdb46aaf0e486a595ed5fd8f86ba55232a70" [[package]] name = "hl" -version = "0.29.10" +version = "0.29.11" dependencies = [ "bincode", "byte-strings", @@ -930,6 +936,7 @@ dependencies = [ "thiserror", "titlecase", "toml", + "wild", "wildflower", "wildmatch", "winapi-util", @@ -2008,6 +2015,15 @@ dependencies = [ "wasm-bindgen", ] +[[package]] +name = "wild" +version = "2.2.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a3131afc8c575281e1e80f36ed6a092aa502c08b18ed7524e86fbbb12bb410e1" +dependencies = [ + "glob", +] + [[package]] name = "wildflower" version = "0.3.0" diff --git a/Cargo.toml b/Cargo.toml index 35a600a0..51af8cfc 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -4,7 +4,7 @@ members = [".", "crate/encstr"] [workspace.package] repository = "https://github.com/pamburus/hl" authors = ["Pavel Ivanov "] -version = "0.29.10" +version = "0.29.11" edition = "2021" license = "MIT" @@ -76,6 +76,7 @@ strum = { version = "0", features = ["derive"] } thiserror = "1" titlecase = "3" toml = "0" +wild = "2" wildflower = { git = "https://github.com/cassaundra/wildflower.git" } winapi-util = { version = "0" } wyhash = "0" diff --git a/src/cli.rs b/src/cli.rs index 03452e24..8310dbbd 100644 --- a/src/cli.rs +++ b/src/cli.rs @@ -43,7 +43,7 @@ impl BootstrapOpt { } pub fn args() -> Vec { - let mut args = std::env::args(); + let mut args = wild::args(); let Some(first) = args.next() else { return vec![]; }; diff --git a/src/main.rs b/src/main.rs index e5efef64..bfd024ee 100644 --- a/src/main.rs +++ b/src/main.rs @@ -34,7 +34,7 @@ fn run() -> Result<()> { let settings = config::load(cli::BootstrapOpt::parse().args.config.as_deref())?; config::global::initialize(settings.clone()); - let opt = cli::Opt::parse(); + let opt = cli::Opt::parse_from(wild::args()); if opt.help { return cli::Opt::command().print_help().map_err(Error::Io); }