Skip to content

Commit

Permalink
support for path dependencies outside root package
Browse files Browse the repository at this point in the history
  • Loading branch information
RogueMacro committed Sep 21, 2022
1 parent 6c74fcb commit 3066250
Showing 1 changed file with 12 additions and 1 deletion.
13 changes: 12 additions & 1 deletion src/ops/make.rs
Original file line number Diff line number Diff line change
Expand Up @@ -384,7 +384,7 @@ fn connect(
ws_package_folder,
true,
)?
} else {
} else if std::fs::canonicalize(pkg_path.1)?.starts_with(&dep_path) {
// We are a package inside a package
connect(
name,
Expand All @@ -395,6 +395,17 @@ fn connect(
ws_package_folder,
true,
)?
} else {
// Dependency is an external package outside our root package
connect(
name,
None,
(&pkg_path.0.join(&local.path), &dep_path),
pkgs,
ws,
ws_package_folder,
true,
)?
};

proj.dependencies.insert(dep_ident, String::from("*"));
Expand Down

0 comments on commit 3066250

Please sign in to comment.