[codex] make path resolution and build cross-platform#66
[codex] make path resolution and build cross-platform#66eyshoit-commits wants to merge 2 commits into
Conversation
There was a problem hiding this comment.
Code Review
This pull request replaces the shell-based build command with a Node.js build script (scripts/build.mjs) and refactors path resolution in src/sync/paths.ts and src/sync/turso.ts to dynamically use platform-specific path APIs (path.win32 or path.posix) instead of the host's default path module. The review feedback highlights a potential bug in pathForLocations where simulating a different platform during tests can result in incorrect path API selection, suggesting that the platform be explicitly passed and returned. Additionally, the feedback recommends supporting both ~/ and ~\\ prefixes when expanding home directories to properly handle Windows paths.
Important
The consumer version of Gemini Code Assist on GitHub is being sunset. Starting June 18, 2026, new organization installations will be blocked, and all code review activity will officially cease on July 17, 2026.
For more details on the timeline and next steps, please review the Help Documentation.
Co-authored-by: gemini-code-assist[bot] <176961590+gemini-code-assist[bot]@users.noreply.github.com>
|
Closing because this work was intended to be integrated into eyshoit-commits/opencode instead of changing the upstream project. |
What changed
path.win32orpath.posixaccording to the simulated target platformWhy
Path resolution previously used the host OS semantics even when resolving locations for another platform. The build script also depended on Unix-only shell commands, preventing Windows builds.
Impact
Linux and Windows paths are now deterministic and cross-platform builds work without Unix shell utilities.
Validation
npm run buildnpm test(79 tests)npm run lintnpx tsc --noEmit -p tsconfig.jsondist/index.js