@@ -12,14 +12,18 @@ use std::{
1212use anyhow:: { bail, Context , Result } ;
1313use futures_util:: TryStreamExt ;
1414use indexmap:: { IndexMap , IndexSet } ;
15- use petgraph:: { graph:: NodeIndex , Direction } ;
15+ use petgraph:: {
16+ acyclic:: Acyclic ,
17+ graph:: { DiGraph , NodeIndex } ,
18+ Direction ,
19+ } ;
1620use semver:: { Comparator , Op , Version , VersionReq } ;
1721use tokio:: io:: { AsyncRead , AsyncReadExt } ;
1822use wasm_pkg_client:: {
1923 caching:: { CachingClient , FileCache } ,
2024 Client , Config , ContentDigest , Error as WasmPkgError , PackageRef , Release , VersionInfo ,
2125} ;
22- use wasm_pkg_common:: { package:: PackageSpec , registry :: DependencyGraph } ;
26+ use wasm_pkg_common:: package:: PackageSpec ;
2327use wit_component:: DecodedWasm ;
2428use wit_parser:: { PackageId , PackageName , Resolve , UnresolvedPackageGroup , WorldId } ;
2529
@@ -840,6 +844,9 @@ fn visit<'a>(
840844 Ok ( ( ) )
841845}
842846
847+ /// Graph of publishable packages with the [`petgraph::Direction`] edges describing the dependency direction.
848+ pub ( crate ) type DependencyGraph < N > = Acyclic < DiGraph < N , petgraph:: Direction > > ;
849+
843850/// Mapping of [`PackageRef`]s to the respective index inside the dependency graph.
844851pub type LocalPackageIndex = HashMap < PackageRef , ( NodeIndex , PathBuf ) > ;
845852
0 commit comments