fix: discover transitive skills under pnpm's isolated linker#154
Conversation
📝 WalkthroughWalkthroughThis PR fixes transitive skill discovery in pnpm's isolated linker by using each package's filesystem identity ( Changespnpm Isolated Linker Fix
Estimated code review effort🎯 3 (Moderate) | ⏱️ ~20 minutes Possibly related issues
Poem
🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches📝 Generate docstrings
🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
|
View your CI Pipeline Execution ↗ for commit 03b4539
☁️ Nx Cloud last updated this comment at |
|
View your CI Pipeline Execution ↗ for commit 03b4539
☁️ Nx Cloud last updated this comment at |
commit: |
Problem
Under pnpm's isolated linker, skills from a transitive dep of a skill-bearing direct dep weren't discovered. In the repro,
@tanstack/react-start(direct, ships skills) depends on@tanstack/start-client-coreand@tanstack/start-server-core(both ship skills) — neither surfaced inintent list, andintent loadfor them failed. The tell:@tanstack/router-corewas found, because its parents ship no skills.Root cause
The walk dedups on realpath but visited the parent via its symlink path first. Resolving deps from that symlink dir fails (the
.pnpmstore isn't in its ancestor chain), so the transitive cores were skipped. The parent's realpath was then recorded inwalkVisited, so the later real-path visit that would resolve correctly was deduped away. A package's skills were hidden because its parent ships skills.Fix
Resolve each package's deps from its realpath (already the
walkVisitedkey) instead of the symlink path. One-call change inwalkDeps.scanForIntentssignature preserved.import()/require()of discovered code.Closes #153
Summary by CodeRabbit