From c85faa115a9d8fac196c3108012758cd1ca216fc Mon Sep 17 00:00:00 2001 From: HerringtonDarkholme <2883231+HerringtonDarkholme@users.noreply.github.com> Date: Wed, 16 Aug 2023 20:31:44 -0700 Subject: [PATCH] fix: preserve workspace inherited dependencies when building binary fix #1738 --- src/source_distribution.rs | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/src/source_distribution.rs b/src/source_distribution.rs index f0672f578..6617c5482 100644 --- a/src/source_distribution.rs +++ b/src/source_distribution.rs @@ -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; } }