Fix Windows compilation: cfg-gate unix permissions in json_filter tests#81
Merged
Fix Windows compilation: cfg-gate unix permissions in json_filter tests#81
Conversation
pampa's json_filter tests used std::os::unix::fs::PermissionsExt unconditionally, preventing test compilation on Windows. Extract a make_executable() helper that is a no-op on non-unix platforms — Python scripts don't need execute permission on Windows.
Remind AI assistants to cfg-gate platform-specific APIs and handle path separators and line endings correctly across Windows/macOS/Linux.
AdaWorldAPI
pushed a commit
to AdaWorldAPI/q2
that referenced
this pull request
Mar 25, 2026
…latest commits Cherry-picked 4 commits from quarto-dev/q2 main: - 14e2999 PR quarto-dev#79: Fix HMAC actor ID from first change in project creation (shikokuchuo) — pre-generate documentId, resolve HMAC actor before document creation, remove actorId React state from App - 9b96c55 Update hub-client changelog through 2026-03-23 (shikokuchuo) - d44e0f3 PR quarto-dev#81: Fix Windows compilation — cfg-gate unix permissions in json_filter tests (cderv) — extract make_executable() helper with platform-specific impls, add cross-platform rules for Claude Code - bb5764a Add browser document storage for offline document editing (vezwork) — enables offline editing with browser-local persistence https://claude.ai/code/session_01LSbSrej6WdKum1zCxEHE8z
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
pampa/src/json_filter.rsusesstd::os::unix::fs::PermissionsExtandset_mode()unconditionally, preventing test compilation on Windows.Fix
Extract a
make_executable()helper with#[cfg(unix)]and#[cfg(not(unix))]variants. On Windows, Python scripts don't need execute permission — they're invoked via the interpreter.Also adds
.claude/rules/cross-platform.mdto catch this pattern going forward.