Skip to content

[codex] make path resolution and build cross-platform#66

Closed
eyshoit-commits wants to merge 2 commits into
iHildy:mainfrom
eyshoit-commits:codex/cross-platform-paths-build
Closed

[codex] make path resolution and build cross-platform#66
eyshoit-commits wants to merge 2 commits into
iHildy:mainfrom
eyshoit-commits:codex/cross-platform-paths-build

Conversation

@eyshoit-commits

Copy link
Copy Markdown

What changed

  • resolve paths with path.win32 or path.posix according to the simulated target platform
  • apply the same platform-aware joining to Turso credential and session database paths
  • replace the shell-specific build command with a portable Node build script

Why

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 build
  • npm test (79 tests)
  • npm run lint
  • npx tsc --noEmit -p tsconfig.json
  • Bun import smoke test against dist/index.js

@gemini-code-assist gemini-code-assist Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

Comment thread src/sync/paths.ts
Comment thread src/sync/paths.ts
Comment thread src/sync/paths.ts Outdated
Co-authored-by: gemini-code-assist[bot] <176961590+gemini-code-assist[bot]@users.noreply.github.com>
@eyshoit-commits eyshoit-commits marked this pull request as ready for review July 8, 2026 20:23
@eyshoit-commits

Copy link
Copy Markdown
Author

Closing because this work was intended to be integrated into eyshoit-commits/opencode instead of changing the upstream project.

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