You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Windows: app typecheck fails with core.symlinks=false #64088
With core.symlinks=false, git checks out packages/app/src/custom-elements.d.ts as a text file containing the link target. cd packages/app && bun run typecheck then fails:
src/custom-elements.d.ts(1,1): error TS1128: Declaration or statement expected.
src/custom-elements.d.ts(1,2): error TS1128: Declaration or statement expected.
The file is a symlink (git mode 120000) to packages/ui/src/custom-elements.d.ts. TypeScript parses the target path as code.
This still reproduces on dev at 33aefad13c54cd0276e46eb862f67365bce8c770. With the same commit and core.symlinks=true, the package typecheck passes. This is the only TypeScript symlink left on dev; the other symlinks are assets.
Plugins
None.
OpenCode version
dev at 33aefad13c54cd0276e46eb862f67365bce8c770 (2.2.7).
Steps to reproduce
On Windows, clone the repo with core.symlinks=false.
bun install
cd packages/app && bun run typecheck
Screenshot
Not applicable; the output is the two errors above.
Thanks for the clear report. I reproduced this on the latest dev (d432a06). packages/app/src/custom-elements.d.ts is the same symlink there as at 33aefad.
Steps (on Linux, where core.symlinks=false behaves the same as the Windows default), with Bun 1.4.4:
Run bun install, then git config core.symlinks false.
Check the file out again: it becomes a regular file whose only content is ../../ui/src/custom-elements.d.ts.
Run cd packages/app && bun run typecheck. It fails with the same two errors:
src/custom-elements.d.ts(1,1): error TS1128: Declaration or statement expected.
src/custom-elements.d.ts(1,2): error TS1128: Declaration or statement expected.
With core.symlinks=true, the same command reports no type errors in 2,407 files.
The script below runs both cases. Your PR #63570 proposes a fix, and earlier reports of the same cause are #13397 and #25564.
Reproduction script (repro.sh)
#!/usr/bin/env bash# Reproduces #64088: packages/app typecheck fails when git checks out# symlinks as plain text files (core.symlinks=false, the Windows default).# Run from an opencode checkout (default: /workspace/repo) after `bun install`.set -u
echo"bun: $(bun --version)"
REPO="${1:-/workspace/repo}"cd"$REPO"
F=packages/app/src/custom-elements.d.ts
echo"commit: $(git rev-parse HEAD)"echo"index entry: $(git ls-files -s $F)"run_typecheck() {
(cd packages/app && bun run typecheck 2>&1| grep -E "custom-elements|error"| head -5;echo"exit: ${PIPESTATUS[0]}")
}
echo"== core.symlinks=false =="
git config core.symlinks false
rm -f "$F"&& git checkout -- "$F"echo"file type: $(stat -c %F "$F")";echo"content: $(cat "$F")"
run_typecheck
echo"== core.symlinks=true =="
git config core.symlinks true
rm -f "$F"&& git checkout -- "$F"echo"file type: $(stat -c %F "$F")"
run_typecheck
git config --unset core.symlinks
Activity
opencodejr commentedon Nov 15, 2026
Thanks for the clear report. I reproduced this on the latest
dev(d432a06).packages/app/src/custom-elements.d.tsis the same symlink there as at33aefad.Steps (on Linux, where
core.symlinks=falsebehaves the same as the Windows default), with Bun 1.4.4:bun install, thengit config core.symlinks false.../../ui/src/custom-elements.d.ts.cd packages/app && bun run typecheck. It fails with the same two errors:core.symlinks=true, the same command reports no type errors in 2,407 files.The script below runs both cases. Your PR #63570 proposes a fix, and earlier reports of the same cause are #13397 and #25564.
Reproduction script (repro.sh)
Run it:
bash repro.sh