refactor: reorganize recoco-splitters module structure to match upstream#107
refactor: reorganize recoco-splitters module structure to match upstream#107bashandbone merged 5 commits intomainfrom
Conversation
Move output_positions, by_separators, and recursive modules from src/split/ to crate root, matching upstream CocoIndex structure changes from PRs #1751 and #1752. Changes: - Move output_positions.rs to src/ (from src/split/) - Move by_separators.rs to src/ (from src/split/) - Move recursive.rs to src/ (from src/split/) - Update all imports to use crate:: paths - Simplify split/mod.rs to only contain type definitions - Re-export public items at crate level in lib.rs This is a purely structural change with no behavioral impact. All tests pass and the public API is preserved. Fixes #101 Co-authored-by: Adam Poulemanos <github-actions[bot]@users.noreply.github.com>
Move output_positions.rs, by_separators.rs, and recursive.rs from split/ subdirectory to crate root, matching upstream CocoIndex structure from PRs #1751 and #1752. Changes: - Move output_positions.rs to crate root (upstream PR #1751) - Move by_separators.rs and recursive.rs to crate root (upstream PR #1752) - Update import paths in moved files (super:: → crate::) - Update split/mod.rs to re-export from crate root - Update lib.rs to declare new root-level modules Public API remains unchanged. All 25 tests pass. Fixes #101 Co-authored-by: Adam Poulemanos <github-actions[bot]@users.noreply.github.com>
Deploying with
|
| Status | Name | Latest Commit | Updated (UTC) |
|---|---|---|---|
| ❌ Deployment failed View logs |
recoco-docs | 017751c | Mar 17 2026, 07:30 PM |
|
🤖 Hi @bashandbone, I've received your request, and I'm working on it now! You can track my progress in the logs for more details. |
There was a problem hiding this comment.
Pull request overview
Refactors recoco-splitters’ module layout to mirror upstream CocoIndex (ops_text) restructuring, while keeping the public API available under recoco_splitters::split::*.
Changes:
- Moved separator-based splitting, recursive chunking, and output-position logic to crate-root modules.
- Updated
splitmodule to re-export splitter APIs from crate root and adjusted import paths accordingly. - Updated
lib.rsmodule declarations to include the new root-level modules.
Reviewed changes
Copilot reviewed 5 out of 5 changed files in this pull request and generated 1 comment.
Show a summary per file
| File | Description |
|---|---|
| crates/recoco-splitters/src/lib.rs | Declares new crate-root modules (by_separators, recursive, output_positions) while keeping split public. |
| crates/recoco-splitters/src/split/mod.rs | Switches split to re-export types from crate-root modules (preserving external API). |
| crates/recoco-splitters/src/by_separators.rs | Crate-root implementation of separator-based splitting. |
| crates/recoco-splitters/src/recursive.rs | Crate-root implementation of recursive syntax-aware chunking. |
| crates/recoco-splitters/src/output_positions.rs | Crate-root internal helper for computing output positions from byte offsets. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| pub use crate::by_separators::{KeepSeparator, SeparatorSplitConfig, SeparatorSplitter}; | ||
| pub use crate::recursive::{ | ||
| CustomLanguageConfig, RecursiveChunkConfig, RecursiveChunker, RecursiveSplitConfig, | ||
| }; |
|
@copilot open a new pull request to apply changes based on the comments in this thread |
|
@bashandbone I've opened a new pull request, #108, to work on those changes. Once the pull request is ready, I'll request review from you. |
…lit/` (#108) * Initial plan * refactor: delete stale duplicate files from src/split/ Co-authored-by: bashandbone <89049923+bashandbone@users.noreply.github.com> --------- Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com> Co-authored-by: bashandbone <89049923+bashandbone@users.noreply.github.com>
|
@copilot Please feature gate the splitters such that they can both be gated, but keep the defaults the same. |
|
@bashandbone I've opened a new pull request, #109, to work on those changes. Once the pull request is ready, I'll request review from you. |
* Initial plan * feat(recoco-splitters): feature gate splitter-separator and splitter-recursive Co-authored-by: bashandbone <89049923+bashandbone@users.noreply.github.com> --------- Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com> Co-authored-by: bashandbone <89049923+bashandbone@users.noreply.github.com>
|
@copilot you need to run the tests next time, because the suite is broken on ungated usage. Please correct it. |
|
@bashandbone I've opened a new pull request, #110, to work on those changes. Once the pull request is ready, I'll request review from you. |
* Initial plan * fix: add dep:notify to source-local-file feature Co-authored-by: bashandbone <89049923+bashandbone@users.noreply.github.com> --------- Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com> Co-authored-by: bashandbone <89049923+bashandbone@users.noreply.github.com>
Summary
This PR syncs the module structure of
recoco-splitterswith upstream CocoIndex changes from PRs #1751 and #1752.Changes
output_positions.rsfromsplit/to crate root (upstream PR #1751)by_separators.rsandrecursive.rsfromsplit/to crate root (upstream PR #1752)super::→crate::)split/mod.rsto re-export from crate rootlib.rsto declare new root-level modulesTesting
recoco_splitters::split::*Fixes #101
Generated with Claude Code