From 508bd5e84441987026adb5697aa8db50f5fe71b2 Mon Sep 17 00:00:00 2001 From: branchseer Date: Tue, 26 Aug 2025 11:41:30 +0800 Subject: [PATCH 1/5] enable CI on Windows and Linux --- .github/workflows/ci.yml | 17 +++++++++++------ fspy/mise.toml | 26 -------------------------- mise.toml | 5 +++++ 3 files changed, 16 insertions(+), 32 deletions(-) delete mode 100644 fspy/mise.toml create mode 100644 mise.toml diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 3f937baa95..000ccc2c7a 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -35,15 +35,22 @@ jobs: fail-fast: false matrix: include: - # - os: ubuntu-latest - # target: x86_64-unknown-linux-gnu - # - os: windows-latest - # target: x86_64-pc-windows-msvc + - os: ubuntu-latest + target: x86_64-unknown-linux-gnu + - os: windows-latest + target: x86_64-pc-windows-msvc - os: blaze/macos-latest target: aarch64-apple-darwin runs-on: ${{ matrix.os }} + defaults: + run: + shell: bash steps: - uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2 + - name: Install mise + run: curl https://mise.run/bash | sh + - name: Install mise Tools + run: mise trust --yes && mise install --yes - name: Setup Rust uses: dtolnay/rust-toolchain@4305c38b25d97ef35a8ad1f985ccf2d2242004f2 # stable env: @@ -54,8 +61,6 @@ jobs: with: save-if: ${{ github.ref_name == 'main' }} shared-key: ${{ matrix.os }}-${{ matrix.target }} - - run: rustup target add x86_64-unknown-linux-musl - if: matrix.os == 'ubuntu-latest' - run: cargo check --all-targets --all-features - run: cargo test diff --git a/fspy/mise.toml b/fspy/mise.toml deleted file mode 100644 index 2d374d2bd3..0000000000 --- a/fspy/mise.toml +++ /dev/null @@ -1,26 +0,0 @@ -[tools] -node = "22.18.0" -# cargo-binstall = "1.14.1" -"npm:corepack" = "0.34.0" - -[settings] -idiomatic_version_file_enable_tools = [] - -[tasks.clone] -run = [ - 'cd {{arg(name="dir")}} || git init {{arg(name="dir")}}', - 'cd {{arg(name="dir")}} && git remote add origin {{arg(name="url")}} || git remote set-url origin {{arg(name="url")}}', - 'cd {{arg(name="dir")}} && git fetch --depth=1 origin {{arg(name="sha")}} && git reset --hard {{arg(name="sha")}}', -] - -[tasks.clone-e2e-repos] -run = [ - "mise clone crates/fspy_e2e/repos/outline https://github.com/outline/outline c2f84466dfcfd40fedcab4bff2ec6dd9fb2938eb", -] - -[tasks.prepare-e2e-repos] -env = { COREPACK_ENABLE_DOWNLOAD_PROMPT = "0" } -dir = "crates/fspy_e2e/repos/outline" -run = [ - "yarn", -] diff --git a/mise.toml b/mise.toml new file mode 100644 index 0000000000..362c01a265 --- /dev/null +++ b/mise.toml @@ -0,0 +1,5 @@ +[settings] +idiomatic_version_file_enable_tools = [] + +[tools] +node = "22.18.0" From 3ef3fb3e2b793eb5d08ea7707e141bf93c166751 Mon Sep 17 00:00:00 2001 From: LongYinan Date: Tue, 26 Aug 2025 12:11:14 +0800 Subject: [PATCH 2/5] tempory remove mise --- .github/workflows/ci.yml | 7 ------- 1 file changed, 7 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 000ccc2c7a..e986ffc3ed 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -42,15 +42,8 @@ jobs: - os: blaze/macos-latest target: aarch64-apple-darwin runs-on: ${{ matrix.os }} - defaults: - run: - shell: bash steps: - uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2 - - name: Install mise - run: curl https://mise.run/bash | sh - - name: Install mise Tools - run: mise trust --yes && mise install --yes - name: Setup Rust uses: dtolnay/rust-toolchain@4305c38b25d97ef35a8ad1f985ccf2d2242004f2 # stable env: From aaca1bfebc4d629b726fe6205c1cc56411e4270f Mon Sep 17 00:00:00 2001 From: LongYinan Date: Tue, 26 Aug 2025 12:18:21 +0800 Subject: [PATCH 3/5] try fix --- crates/fspy_preload_windows/src/windows/detours/nt.rs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/crates/fspy_preload_windows/src/windows/detours/nt.rs b/crates/fspy_preload_windows/src/windows/detours/nt.rs index 35594ed538..f02778bc77 100644 --- a/crates/fspy_preload_windows/src/windows/detours/nt.rs +++ b/crates/fspy_preload_windows/src/windows/detours/nt.rs @@ -14,7 +14,7 @@ use winapi::{ minwindef::{BOOL, DWORD, HFILE, MAX_PATH, UINT}, ntdef::{ BOOLEAN, HANDLE, LPCSTR, LPCWSTR, NTSTATUS, PHANDLE, PLARGE_INTEGER, - POBJECT_ATTRIBUTES, PUNYCODE_STRING, PVOID, ULONG, UNICODE_STRING, + POBJECT_ATTRIBUTES, PUNICODE_STRING, PVOID, ULONG, UNICODE_STRING, }, }, um::winnt::{ACCESS_MASK, GENERIC_READ}, @@ -307,7 +307,7 @@ static DETOUR_NT_QUERY_DIRECTORY_FILE: Detour< length: ULONG, file_information_class: FILE_INFORMATION_CLASS, return_single_entry: BOOLEAN, - file_name: PUNYCODE_STRING, + file_name: PUNICODE_STRING, restart_scan: BOOLEAN, ) -> NTSTATUS, > = unsafe { @@ -322,7 +322,7 @@ static DETOUR_NT_QUERY_DIRECTORY_FILE: Detour< length: ULONG, file_information_class: FILE_INFORMATION_CLASS, return_single_entry: BOOLEAN, - file_name: PUNYCODE_STRING, + file_name: PUNICODE_STRING, restart_scan: BOOLEAN, ) -> NTSTATUS { unsafe { handle_open(AccessMode::ReadDir, file_handle) }; From 1757333197ca61d22554ba73df52f6b4c0ef0121 Mon Sep 17 00:00:00 2001 From: LongYinan Date: Tue, 26 Aug 2025 12:26:08 +0800 Subject: [PATCH 4/5] typos and condition --- .typos.toml | 1 + crates/vite_error/src/lib.rs | 2 ++ 2 files changed, 3 insertions(+) diff --git a/.typos.toml b/.typos.toml index 372dc95292..eab17385e6 100644 --- a/.typos.toml +++ b/.typos.toml @@ -1,2 +1,3 @@ [default.extend-words] ratatui = "ratatui" +PUNICODE = "PUNICODE" diff --git a/crates/vite_error/src/lib.rs b/crates/vite_error/src/lib.rs index 1910b6e943..33873d007d 100644 --- a/crates/vite_error/src/lib.rs +++ b/crates/vite_error/src/lib.rs @@ -28,6 +28,7 @@ pub enum Error { #[error(transparent)] JoinPathsError(#[from] std::env::JoinPathsError), + #[cfg(unix)] #[error(transparent)] NixError(#[from] nix::Error), @@ -37,6 +38,7 @@ pub enum Error { #[error("Env value is not valid unicode: {key} = {value:?}")] EnvValueIsNotValidUnicode { key: String, value: OsString }, + #[cfg(unix)] #[error("Unsupported file type: {0:?}")] UnsupportedFileType(nix::dir::Type), From e1980d8eea9cbe36fcbf1d37156cbefe2def1b38 Mon Sep 17 00:00:00 2001 From: LongYinan Date: Tue, 26 Aug 2025 12:34:03 +0800 Subject: [PATCH 5/5] disable windows --- .github/workflows/ci.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index e986ffc3ed..8c25eddcee 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -37,8 +37,8 @@ jobs: include: - os: ubuntu-latest target: x86_64-unknown-linux-gnu - - os: windows-latest - target: x86_64-pc-windows-msvc + # - os: windows-latest + # target: x86_64-pc-windows-msvc - os: blaze/macos-latest target: aarch64-apple-darwin runs-on: ${{ matrix.os }}