Skip to content

[upstream-sync] LocalFile source: ignore errors and warn in list() for resilient directory listing (upstream PR #1753) #102

@github-actions

Description

@github-actions

Upstream Change Summary

Type: bug-fix / improvement
Difficulty: Easy
Recommendation: Adopt

Upstream changed the list() method for the LocalFile source to ignore all errors during directory listing and emit warnings instead of propagating errors. Previously, a single unreadable file or permission error could abort the entire listing. This makes the source more resilient when processing directories with mixed permissions.

Upstream References

Relevant Upstream Files / Areas

  • rust/cocoindex/src/ops/sources/local_file.rslist() method error handling

Recoco Considerations

  • Maps to crates/recoco-core/src/ops/sources/local_file.rs (or equivalent path)
  • Feature-gated behind source-local-file — no new feature gates needed
  • This change is purely in error handling logic, no API surface changes
  • Recoco uses the same local_file source implementation; this fix is directly applicable
  • Consider whether tracing/log crate integration aligns with recoco's logging approach (recoco may use tracing — ensure warnings use tracing::warn! not log::warn!)

Integration Notes

Simple and safe to adopt. Check that the list() function signature and surrounding code in recoco's local_file source matches the upstream before applying the patch. Related to filesystem watch support (issue #97) — both touch the same source file.

Metadata

Metadata

Assignees

No one assigned

    Labels

    claudeCreated or actioned by Claude AIupstream-syncIssues for syncing updates with our upstream (cocoindex-io/cocoindex)

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions