Skip to content

Commit 594c487

Browse files
committed
Plumb resolution through to eval config and output
1 parent 731eb41 commit 594c487

File tree

17 files changed

+507
-621
lines changed

17 files changed

+507
-621
lines changed

crates/pcb-zen-core/src/lang/eval.rs

Lines changed: 330 additions & 52 deletions
Large diffs are not rendered by default.

crates/pcb-zen-core/src/lang/file.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ pub(crate) fn file_globals(builder: &mut GlobalsBuilder) {
3535

3636
// Resolve the path using the load resolver
3737
let resolved_path = eval_context
38-
.get_load_resolver()
38+
.get_config()
3939
.resolve_path(&path, current_file)
4040
.map_err(|e| anyhow::anyhow!("Failed to resolve file path '{}': {}", path, e))?;
4141

@@ -89,7 +89,7 @@ pub(crate) fn file_globals(builder: &mut GlobalsBuilder) {
8989

9090
// Use the load resolver to resolve the LoadSpec to an absolute path
9191
let resolved_path = eval_context
92-
.get_load_resolver()
92+
.get_config()
9393
.resolve_spec(&load_spec, current_file)
9494
.map_err(|e| anyhow::anyhow!("Failed to resolve path '{}': {}", path, e))?;
9595

crates/pcb-zen-core/src/lang/spice_model.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -176,7 +176,7 @@ where
176176
.ok_or_else(|| starlark::Error::new_other(anyhow!("No source path available")))?;
177177

178178
let resolved_path = eval_ctx
179-
.get_load_resolver()
179+
.get_config()
180180
.resolve_path(&path, std::path::Path::new(&current_file))
181181
.map_err(|e| {
182182
starlark::Error::new_other(anyhow!("Failed to resolve spice model path: {}", e))

crates/pcb-zen-core/src/lang/symbol.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -232,7 +232,7 @@ impl<'v> SymbolValue {
232232
.ok_or_else(|| starlark::Error::new_other(anyhow!("No source path available")))?;
233233

234234
let resolved_path = eval_ctx
235-
.get_load_resolver()
235+
.get_config()
236236
.resolve_path(&library_path, std::path::Path::new(&current_file))
237237
.map_err(|e| {
238238
starlark::Error::new_other(anyhow!("Failed to resolve library path: {}", e))

0 commit comments

Comments
 (0)