MCPcopy Create free account
hub / github.com/dylan-sutton-chavez/edge-python / resolve

Method resolve

compiler/src/main/resolver.rs:16–27  ·  view source on GitHub ↗
(&mut self, spec: &str)

Source from the content-addressed store, hash-verified

14
15impl Resolver for WasmHostResolver {
16 fn resolve(&mut self, spec: &str) -> Result<Resolved, String> {
17 if !spec.contains('/') {
18 let dir = self.dir.clone();
19 return self.resolve_bare(spec, &dir);
20 }
21 let canonical = if spec.contains("://") || spec.starts_with('/') {
22 spec.to_string()
23 } else {
24 join_relative(&self.dir, spec)
25 };
26 self.resolve_canonical(&canonical)
27 }
28
29 fn fetch_bytes(&mut self,spec: &str,expected_hash: Option<[u8; 32]>) -> Result<Vec<u8>, String> {
30 let mut len: u32 = 0;

Callers

nothing calls this directly

Calls 4

join_relativeFunction · 0.85
containsMethod · 0.45
resolve_bareMethod · 0.45
resolve_canonicalMethod · 0.45

Tested by

no test coverage detected