pub fn resolve(
asset_ref: &AssetRef<'_>,
anchor: &Path,
) -> Result<PathBuf, String>Expand description
Resolve an @-prefixed asset path to an absolute filesystem path.
anchor is the directory the project-root walk starts from — the
caller’s choice depends on context:
- VM runtime: pass the thread-local source dir
(
source_root_path()), which always reflects the file currently executing. - LSP / preflight: pass the calling source file’s parent, so the project root is derived from the file under analysis.
In every case the project root is derived from the call site, not the user’s cwd, so an imported pipeline resolves prompts the same way regardless of who called it.