File tree 2 files changed +31
-12
lines changed
2 files changed +31
-12
lines changed Original file line number Diff line number Diff line change @@ -519,7 +519,7 @@ impl<'gctx> PackageSet<'gctx> {
519
519
target_data,
520
520
force_all_targets,
521
521
) ;
522
- for ( pkg_id, _dep ) in filtered_deps {
522
+ for ( pkg_id, deps ) in filtered_deps {
523
523
collect_used_deps (
524
524
used,
525
525
resolve,
@@ -529,6 +529,24 @@ impl<'gctx> PackageSet<'gctx> {
529
529
target_data,
530
530
force_all_targets,
531
531
) ?;
532
+ let artifact_kinds = deps. iter ( ) . filter_map ( |dep| {
533
+ Some (
534
+ dep. artifact ( ) ?
535
+ . target ( ) ?
536
+ . to_resolved_compile_kind ( * requested_kinds. iter ( ) . next ( ) . unwrap ( ) ) ,
537
+ )
538
+ } ) ;
539
+ for artifact_kind in artifact_kinds {
540
+ collect_used_deps (
541
+ used,
542
+ resolve,
543
+ pkg_id,
544
+ has_dev_units,
545
+ artifact_kind,
546
+ target_data,
547
+ force_all_targets,
548
+ ) ?;
549
+ }
532
550
}
533
551
Ok ( ( ) )
534
552
}
Original file line number Diff line number Diff line change @@ -1646,16 +1646,17 @@ fn dep_of_artifact_dep_same_target_specified() {
1646
1646
. with_status ( 0 )
1647
1647
. run ( ) ;
1648
1648
1649
- // TODO This command currently fails due to a bug in cargo but it should be fixed so that it succeeds in the future.
1650
1649
p. cargo ( "tree -Z bindeps" )
1651
1650
. masquerade_as_nightly_cargo ( & [ "bindeps" ] )
1652
- . with_stderr_data (
1651
+ . with_stdout_data (
1653
1652
r#"...
1654
- no entry found for key
1653
+ foo v0.1.0 ([ROOT]/foo)
1654
+ └── bar v0.1.0 ([ROOT]/foo/bar)
1655
+ └── baz v0.1.0 ([ROOT]/foo/baz)
1655
1656
...
1656
1657
"# ,
1657
1658
)
1658
- . with_status ( 101 )
1659
+ . with_status ( 0 )
1659
1660
. run ( ) ;
1660
1661
}
1661
1662
@@ -1827,17 +1828,17 @@ fn proc_macro_in_artifact_dep() {
1827
1828
1828
1829
p. cargo ( "check -Z bindeps" )
1829
1830
. masquerade_as_nightly_cargo ( & [ "bindeps" ] )
1830
- . with_stderr_data ( str![ [ r#"
1831
+ . with_stderr_data (
1832
+ r#"...
1831
1833
[UPDATING] `dummy-registry` index
1832
1834
[LOCKING] 2 packages to latest compatible versions
1833
1835
[DOWNLOADING] crates ...
1834
- [DOWNLOADED] bin-uses-pm v1.0.0 (registry `dummy-registry`)
1835
- [DOWNLOADING] crates ...
1836
- thread 'main' panicked at src/cargo/core/compiler/unit_dependencies.rs:1035:33:
1837
- expected pm v1.0.0 to be downloaded
1838
- [NOTE] run with `RUST_BACKTRACE=1` environment variable to display a backtrace
1836
+ [ERROR] failed to download from `[ROOTURL]/dl/pm/1.0.0/download`
1839
1837
1840
- "# ] ] )
1838
+ Caused by:
1839
+ [37] Could not read a file:// file (Couldn't open file [ROOT]/dl/pm/1.0.0/download)
1840
+ "# ,
1841
+ )
1841
1842
. with_status ( 101 )
1842
1843
. run ( ) ;
1843
1844
}
You can’t perform that action at this time.
0 commit comments