WIP: arm64 windows CI leg - #2
Conversation
josh-proxy and the josh / josh-filter CLIs do not build on Windows: unix-only code is compiled unconditionally (issue josh-project#2235). Nothing here changes unix behavior. - josh-gix-ext: add component_bytes, the portable form of the path-component conversion used to match git tree entry names. On unix an OsStr is already bytes; on Windows tree names are conventionally UTF-8, so the UTF-8 encoding is the equivalent, and a component that is not valid Unicode panics rather than silently matching something else. josh-gix-ext, josh-search and josh-core all used std::os::unix::ffi::OsStrExt::as_bytes for this. (rustc suggests std::os::windows::prelude::OsStrExt here, which is not equivalent: that trait yields UTF-16 code units, not bytes.) josh-search gains josh-gix-ext as a dependency; it was already in its build graph via josh-core and in its dev-dependencies. - josh-core: write .gitmodules with LF on every platform. gix-config writes the platform's newline, and the result becomes a blob, so the same filter applied to the same input produced different objects on Windows than elsewhere. - josh-rpc: gate the tokio_fd module behind cfg(unix). It wraps raw fds with libc for the SSH shell; josh-proxy itself only uses josh_rpc::calls, which is plain serde types. This is the first compile error (E0433). - josh-proxy: split serve_namespace cfg(unix)/cfg(not(unix)). SSH serving passes git stdio through unix sockets created by josh-ssh-shell, so non-unix builds return an "unsupported on this platform" error from that endpoint instead of failing to compile. HTTP serving is unaffected. - josh-proxy: install hooks portably. Symlink on unix (unchanged), sh shim on Windows, where symlinking needs elevated privileges. Hook mode is dispatched by argv[0], which a shim cannot fake for a native executable, so the shim names the hook in JOSH_PROXY_HOOK, read once and only on Windows. The shim runs an absolute, quoted path: git runs hooks with GIT_DIR as the working directory. The hooks directory is created with fs::create_dir_all rather than shelling out to mkdir, which is not an executable on Windows. - josh-proxy: bind the listener dual-stack, in make_listener. A bare [::] socket accepts IPv4 on Linux (bindv6only defaults off) but is v6-only on Windows: the proxy starts, logs its address and looks healthy while every client dialing 127.0.0.1 is refused. - josh-cli: refuse `josh compose` on Windows, where podman is not supported, rather than inventing a uid/gid for it. - josh-cli: build valid file:// URLs from local paths with dunce::canonicalize. std's returns an extended-length path, which git rejects inside a file:// URL — issue josh-project#2288. - Two tests are gated to unix: one identifies a ref file by inode, and one builds a ref path containing a reserved Windows device name, which Windows cannot represent at all. Adds a Windows CI job in its own workflow, leaving rust.yml untouched. It builds the supported binaries, runs the unit tests of the crates that build there with nextest, and runs functional tests against the built binaries: tests/windows/cli.sh drives the CLI against a local repository, and tests/windows/proxy.sh drives josh-proxy through a filtered clone, a pinned-SHA fetch, a reverse-filter push and reuse of its cache across a restart, with relative and space-laden cache paths as separate cases. josh-proxy needs an http upstream, so tests/windows/serve-git.ps1 hosts git http-backend behind HttpListener; the job installs nothing that Windows does not ship. Adds docs/src/contributing/windows.md: setup, build, and the limitations. Everything above passes on Windows x86-64 and ARM64, and on macOS and Linux. Change: windows-support Assisted-By: anthropic/claude-fable-5 Assisted-By: anthropic/claude-opus-5
Assisted-By: anthropic/claude-opus-5
Reviewer's GuideAdds a proof-of-concept ARM64 Windows CI leg alongside the existing x86-64 leg, using a matrix of Windows runners and configuring clang-cl for ARM64 C dependencies that are incompatible with MSVC assembly. File-Level Changes
Tips and commandsInteracting with Sourcery
Customizing Your ExperienceAccess your dashboard to:
Getting Help
|
|
Important Review skippedAuto reviews are disabled on base/target branches other than the default branch. Please check the settings in the CodeRabbit UI or the ⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Pro Plus Run ID: You can disable this status message by setting the Use the checkbox below for a quick retry:
Comment |
Assisted-By: anthropic/claude-opus-5
661cf34 to
b2dbb1d
Compare
|
Proven; folded into josh-project#2512. |
User description
Proving an ARM64 Windows CI leg in the fork before offering it upstream. Not for merge as-is.
Generated description
Below is a concise technical summary of the changes proposed in this PR:
Expand the Windows GitHub Actions job to validate both x86-64 and ARM64 runners. Configure
clang-clfor ARM64 C dependencies soaws-lc-sysassembles correctly while remaining ABI-compatible with the MSVC-linked Rust build.Modified files (1)
Latest Contributors(1)
clang-cldiscovery, fallback installation, and environment variables for ARM64 native dependency builds.Modified files (1)
Latest Contributors(1)
Summary by Sourcery
Add an ARM64 Windows CI leg while preserving existing x86-64 validation.
New Features:
Enhancements:
CI: