Skip to main content

build_batch_standard_json_input_with_cache

Function build_batch_standard_json_input_with_cache 

Source
pub fn build_batch_standard_json_input_with_cache(
    source_files: &[PathBuf],
    remappings: &[String],
    config: &FoundryConfig,
    content_cache: Option<&HashMap<DocumentUri, (i32, String)>>,
) -> Value
Expand description

Build a batch standard-json input for solc.

When content_cache is provided, files whose URI string appears as a key are included with "content" (in-memory source). Files not in the cache fall back to "urls" (solc reads from disk).

This allows the re-index after a rename to feed solc the updated import paths from our text_cache without requiring the editor to have flushed them to disk yet.