Skip to content

Commit a02c14b

Browse files
authored
feat: switch solar_project to use cache (#11481)
1 parent 6eccd50 commit a02c14b

File tree

3 files changed

+25
-23
lines changed

3 files changed

+25
-23
lines changed

Cargo.lock

Lines changed: 19 additions & 20 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Cargo.toml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -113,6 +113,7 @@ solar-ast.opt-level = 3
113113
solar-data-structures.opt-level = 3
114114
solar-interface.opt-level = 3
115115
solar-parse.opt-level = 3
116+
solar-sema.opt-level = 3
116117

117118
# EVM.
118119
alloy-dyn-abi.opt-level = 3
@@ -204,7 +205,7 @@ foundry-linking = { path = "crates/linking" }
204205

205206
# solc & compilation utilities
206207
foundry-block-explorers = { version = "0.21.0", default-features = false }
207-
foundry-compilers = { version = "0.19.0", default-features = false }
208+
foundry-compilers = { version = "0.19.1", default-features = false }
208209
foundry-fork-db = "0.18"
209210
solang-parser = { version = "=0.3.9", package = "foundry-solang-parser" }
210211
solar = { package = "solar-compiler", version = "=0.1.6", default-features = false }

crates/config/src/lib.rs

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -957,9 +957,11 @@ impl Config {
957957
self.create_project(false, true)
958958
}
959959

960-
/// Same as [`Self::ephemeral_project()`] but configures the project to not emit any artifacts.
960+
/// A cached, in-memory project that does not request any artifacts.
961+
///
962+
/// Use this when you just want the source graph or the Solar compiler context.
961963
pub fn solar_project(&self) -> Result<Project<MultiCompiler>, SolcError> {
962-
let mut project = self.ephemeral_project()?;
964+
let mut project = self.project()?;
963965
project.update_output_selection(|selection| {
964966
*selection = OutputSelection::common_output_selection([]);
965967
});

0 commit comments

Comments
 (0)