Repository navigation
io: implement dirCreateDirPath and dirCreateDirPathOpen - #381
Conversation
|
Warning Rate limit exceeded
You’ve run out of usage credits. Purchase more in the billing tab. ⌛ How to resolve this issue?After the wait time has elapsed, a review can be triggered using the We recommend that you space out your commits to avoid hitting the rate limit. 🚦 How do rate limits work?CodeRabbit enforces hourly rate limits for each developer per organization. Our paid plans have higher rate limits than the trial, open-source and free plans. In all cases, we re-allow further reviews after a brief timeout. Please see our FAQ for further information. 📝 WalkthroughWalkthroughImplements nested directory creation with component-by-component iteration, backtracking retry on file-not-found, and validation that existing components are directories. Adds a path-stat helper, wires create-and-open to create missing paths on demand, updates two unimplemented panic messages, and adds tests for both flows. ChangesNested Directory Creation
Estimated code review effort🎯 2 (Simple) | ⏱️ ~12 minutes The changes are focused and mechanical: a straightforward stat helper, iterative directory creation with clear error handling, a thin wrapper for create-and-open, two panic-message tweaks, and two focused tests. No complex logic branches or edge cases beyond the stated backtrack-and-retry loop. Poem
🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches🧪 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 |
Creates nested directory paths by iterating from the target back to existing ancestors, then forward creating each component. Follows the same algorithm as std.Io.Threaded. Includes tests for both functions.
74d2c20 to
dd22eda
Compare
|
@claude fix the windows test |
|
Claude finished @lalinsky's task in 36m 16s —— View job I've identified and fixed the Windows test failure. Root cause: Fix: After copying the sub-path into the joined buffer, convert any // in pathToWide, after memcpy of path_wide into joined:
for (joined[dir_path.len + 1 ..][0..path_wide.len]) |*c| {
if (c.* == '/') c.* = '\\';
}Results:
The fix is committed locally. Waiting for push approval. |
Windows paths with \\?\ prefix don't auto-translate forward slashes, causing INVALID_NAME errors. Use Io.Dir.path.sep_str for portable paths.
Summary
dirCreateDirPathto create nested directory pathsdirCreateDirPathOpento create and open nested pathsprocessExecutableOpenandprogressParentFileas unsupportedDetails
The implementation follows std.Io.Threaded's algorithm: iterate from the target path back to existing ancestors, then forward creating each component.
Test plan
createDirPathandcreateDirPathOpen