3
24
Fork
You've already forked krabby
0

Deduplicate sourcing work #11

Open
opened 2025年12月08日 00:31:39 +01:00 by bal-e · 0 comments
Owner
Copy link

The sourcer can be directed to read the same file multiple times; it is also prone to infinite loops when scanning directories.

Some kind of concurrent hash table (e.g. via papaya) should be introduced into GlobalSourcer for deduplicating files and detecting loops; it should be accessible by path, and deduplicated by (st_dev_major, st_dev_minor, st_ino). This should be used for catching directory loops. If a file has been sourced before, future requests for it should return the existing contents (and a unique ID for caller-side deduplication). The token buffer cannot be cached at this level because it is edition-dependent.

The sourcer can be directed to read the same file multiple times; it is also prone to infinite loops when scanning directories. Some kind of concurrent hash table (e.g. via `papaya`) should be introduced into `GlobalSourcer` for deduplicating files and detecting loops; it should be accessible by path, and deduplicated by `(st_dev_major, st_dev_minor, st_ino)`. This should be used for catching directory loops. If a file has been sourced before, future requests for it should return the existing contents (and a unique ID for caller-side deduplication). The token buffer cannot be cached at this level because it is edition-dependent.
Sign in to join this conversation.
No Branch/Tag specified
main
decl-macros
diagnostics
query
nameres
type-ir
scalar-lexer
No results found.
Milestone
Clear milestone
No items
No milestone
Projects
Clear projects
No items
No project
Assignees
Clear assignees
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
bal-e/krabby#11
Reference in a new issue
bal-e/krabby
No description provided.
Delete branch "%!s()"

Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?