-
Notifications
You must be signed in to change notification settings - Fork 3.5k
fix(glob): preserve directory name case in glob walker #25008
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
WalkthroughReplaced lowercase-key-based name/type retrieval with direct DirEntry access in glob walker to preserve original case and use entry.kind for file type. Added regression tests exercising bun run --filter with mixed-case and path-filtered workspaces and a Glob case-preservation check. Changes
Suggested reviewers
Pre-merge checks✅ Passed checks (4 passed)
📜 Recent review detailsConfiguration used: Path: .coderabbit.yaml Review profile: ASSERTIVE Plan: Pro Disabled knowledge base sources:
📒 Files selected for processing (2)
🧰 Additional context used🧠 Learnings (13)📚 Learning: 2025-10-19T02:44:46.354ZApplied to files:
📚 Learning: 2025-10-26T01:32:04.844ZApplied to files:
📚 Learning: 2025-11-14T16:07:01.064ZApplied to files:
📚 Learning: 2025-10-18T23:43:42.502ZApplied to files:
📚 Learning: 2025-10-19T02:52:37.412ZApplied to files:
📚 Learning: 2025-09-12T18:16:50.754ZApplied to files:
📚 Learning: 2025-10-25T17:20:19.041ZApplied to files:
📚 Learning: 2025-11-06T00:58:23.965ZApplied to files:
📚 Learning: 2025-11-07T17:28:51.204ZApplied to files:
📚 Learning: 2025-11-08T04:06:33.198ZApplied to files:
📚 Learning: 2025-10-01T22:13:08.081ZApplied to files:
📚 Learning: 2025-10-08T13:48:02.430ZApplied to files:
📚 Learning: 2025-11-11T22:55:08.547ZApplied to files:
🧬 Code graph analysis (1)test/regression/issue/11295.test.ts (2)
🔇 Additional comments (2)
Comment |
Fixes #11295 The glob walker's DirEntryAccessor was using the lowercase map key instead of the case-preserved filename stored in the Entry. This caused ENOENT errors when trying to open directories with mixed-case names like "BuildIconList" because it would try to open "buildiconlist". The fix uses entry.base() to get the original case-preserved name instead of the lowercase key used for case-insensitive lookups. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <[email protected]>
31d1992 to
3f3aa2a
Compare
Summary
Fixes #11295
The glob walker's
DirEntryAccessorwas using the lowercase map key instead of the case-preserved filename stored in the Entry. This caused ENOENT errors when trying to open directories with mixed-case names likeBuildIconListbecause it would try to openbuildiconlist.Root Cause
In
src/fs.zig, theDirEntry.EntryMapstores entries with lowercase keys for case-insensitive lookups:But the Entry also stores the original case-preserved name in
base_. The glob walker was incorrectly using the map key (key_ptr.*) instead ofentry.base().The Fix
Changed
DirEntryAccessor.DirIter.next()to useentry.base()instead ofkey_ptr.*:Test plan
test/regression/issue/11295.test.tsbun bd test test/regression/issue/11295.test.tsUSE_SYSTEM_BUN=1 bun test test/regression/issue/11295.test.ts🤖 Generated with Claude Code