Skip to content

Commit

Permalink
Merge pull request #1739 from HerringtonDarkholme/fix-workspace-deps
Browse files Browse the repository at this point in the history
fix: preserve workspace inherited dependencies when building binary
  • Loading branch information
messense authored Aug 17, 2023
2 parents 4c3d5c2 + c85faa1 commit 698e7cb
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions src/source_distribution.rs
Original file line number Diff line number Diff line change
Expand Up @@ -294,6 +294,13 @@ fn rewrite_dependencies_path(
// Cargo.toml contains relative paths, and we're already in LOCAL_DEPENDENCIES_FOLDER
toml_edit::value(format!("../{dep_name}"))
};
if workspace_inherit {
// Remove workspace inheritance now that we converted it into a path dependency
dep_table[&dep_name]
.as_table_like_mut()
.unwrap()
.remove("workspace");
}
rewritten = true;
}
}
Expand Down

0 comments on commit 698e7cb

Please sign in to comment.