File tree Expand file tree Collapse file tree 2 files changed +31
-13
lines changed Expand file tree Collapse file tree 2 files changed +31
-13
lines changed Original file line number Diff line number Diff line change @@ -519,7 +519,7 @@ impl<'gctx> PackageSet<'gctx> {
519519 target_data,
520520 force_all_targets,
521521 ) ;
522- for ( pkg_id, _dep ) in filtered_deps {
522+ for ( pkg_id, deps ) in filtered_deps {
523523 collect_used_deps (
524524 used,
525525 resolve,
@@ -529,6 +529,24 @@ impl<'gctx> PackageSet<'gctx> {
529529 target_data,
530530 force_all_targets,
531531 ) ?;
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+ }
532550 }
533551 Ok ( ( ) )
534552 }
Original file line number Diff line number Diff line change @@ -1646,16 +1646,16 @@ fn dep_of_artifact_dep_same_target_specified() {
16461646 . with_status ( 0 )
16471647 . run ( ) ;
16481648
1649- // TODO This command currently fails due to a bug in cargo but it should be fixed so that it succeeds in the future.
16501649 p. cargo ( "tree -Z bindeps" )
16511650 . masquerade_as_nightly_cargo ( & [ "bindeps" ] )
1652- . with_stderr_data (
1651+ . with_stdout_data (
16531652 r#"...
1654- no entry found for key
1655- ...
1653+ foo v0.1.0 ([ROOT]/foo)
1654+ └── bar v0.1.0 ([ROOT]/foo/bar)
1655+ └── baz v0.1.0 ([ROOT]/foo/baz)
16561656"# ,
16571657 )
1658- . with_status ( 101 )
1658+ . with_status ( 0 )
16591659 . run ( ) ;
16601660}
16611661
@@ -1827,17 +1827,17 @@ fn proc_macro_in_artifact_dep() {
18271827
18281828 p. cargo ( "check -Z bindeps" )
18291829 . masquerade_as_nightly_cargo ( & [ "bindeps" ] )
1830- . with_stderr_data ( str![ [ r#"
1830+ . with_stderr_data (
1831+ r#"...
18311832[UPDATING] `dummy-registry` index
18321833[LOCKING] 2 packages to latest compatible versions
18331834[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
1835+ [ERROR] failed to download from `[ROOTURL]/dl/pm/1.0.0/download`
18391836
1840- "# ] ] )
1837+ Caused by:
1838+ [37] Could[..]t read a file:// file (Couldn't open file [ROOT]/dl/pm/1.0.0/download)
1839+ "# ,
1840+ )
18411841 . with_status ( 101 )
18421842 . run ( ) ;
18431843}
You can’t perform that action at this time.
0 commit comments