Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Lookup inherited build- and dev-dependencies in dependencies #1261

Merged
merged 2 commits into from
Nov 11, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion src/source_distribution.rs
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ fn rewrite_cargo_toml(
if let Some(table) = data.get_mut(dep_category).and_then(|x| x.as_table_mut()) {
let workspace_deps = workspace_manifest
.get("workspace")
.and_then(|x| x.get(dep_category))
.and_then(|x| x.get("dependencies"))
.and_then(|x| x.as_table_like());
let dep_names: Vec<_> = table.iter().map(|(key, _)| key.to_string()).collect();
for dep_name in dep_names {
Expand Down
6 changes: 6 additions & 0 deletions test-crates/workspace-inheritance/python/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,12 @@ workspace = true
optional = true
features = ["extra_traits"]

[build-dependencies]
cfg-if.workspace = true

[dev-dependencies]
cfg-if.workspace = true

[dependencies.cfg-if]
workspace = true
optional = true
Expand Down