Skip to main content

Module input

Module input 

Source
Expand description

Salsa inputs.

Structs§

FileText
Immortal per-file text input. One per unique URI ever seen. Holds the raw source text and the optional K2 on-disk cache seed.
SourceFile
Tracked struct representing one active workspace file. Produced by workspace_files; salsa GC’s it (and all downstream memos) when the file is removed from the workspace. Identity fields: uri + text_input (both stable per unique URI).
Workspace
Workspace-level input: the set of active (non-deleted) files. Each entry is (uri_arc, FileText_handle) — sorted by uri for stable ordering. Only changed when files are added or removed, not on text edits.

Functions§

find_source_file
O(log N) lookup of a single SourceFile by URI string.
workspace_files
Produce SourceFile tracked structs for all active workspace files. Salsa GC removes SourceFile entities (and cascades to parsed_doc, file_index, symbol_map, parse_error_count) when they are absent from this function’s output.