Skip to content

Fix Windows compilation: cfg-gate unix permissions in json_filter tests#81

Merged
cderv merged 3 commits intomainfrom
fix/pampa-unix-permissions-windows
Mar 24, 2026
Merged

Fix Windows compilation: cfg-gate unix permissions in json_filter tests#81
cderv merged 3 commits intomainfrom
fix/pampa-unix-permissions-windows

Conversation

@cderv
Copy link
Collaborator

@cderv cderv commented Mar 24, 2026

pampa/src/json_filter.rs uses std::os::unix::fs::PermissionsExt and set_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.md to catch this pattern going forward.

cderv added 3 commits March 23, 2026 16:55
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.
@cderv cderv merged commit d44e0f3 into main Mar 24, 2026
4 checks passed
@cderv cderv deleted the fix/pampa-unix-permissions-windows branch March 24, 2026 00:13
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
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant