Skip to content

Commit

Permalink
fix missed assets for dev target
Browse files Browse the repository at this point in the history
  • Loading branch information
boozook committed Jun 9, 2024
1 parent 41498f1 commit 464e6b8
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
8 changes: 4 additions & 4 deletions cargo/src/assets/plan.rs
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,7 @@ pub mod proto {
pub targets: BTreeMap<MultiKey, Vec<usize>>,
}

#[derive(Debug, Hash, PartialEq, PartialOrd, Eq, Ord)]
#[derive(Debug, Clone, Copy, Hash, PartialEq, PartialOrd, Eq, Ord)]
pub struct Key {
pub id: PackageId,
pub dev: bool,
Expand Down Expand Up @@ -209,8 +209,8 @@ pub mod proto {

let env = env(dep.package_id(), crate_root)?;

// dep_key is dev only if this it a primary target (root unit) and dev is requested:
let with_dev = root_is_dev && dep.package_id() == root.package_id();

let dep_key = Key::from(dep).with_dev(with_dev);


Expand Down Expand Up @@ -275,9 +275,9 @@ pub mod proto {
// else just build a plan
plan_for(&mut plans, &mut indices, dep_key, false)?;

// TODO: it must be norm+dev assets, if dev needed - `with_dev`
// also for dev targets if needed
if with_dev {
log::warn!(" TODO: WITH DEV")
plan_for(&mut plans, &mut indices, dep_key, true)?;
}
}
}
Expand Down
4 changes: 2 additions & 2 deletions support/build/src/metadata/source.rs
Original file line number Diff line number Diff line change
Expand Up @@ -112,13 +112,13 @@ pub trait PackageSource {
if let Some(man) = root.example(target) {
Some(base.override_with_extra(man).into_owned())
} else {
log::debug!("target not found: {}", target);
log::debug!("dev-target override not found for {target:?}");
None
}
} else if let Some(man) = root.bin(target) {
Some(base.override_with_extra(man).into_owned())
} else {
log::debug!("target not found: {}", target);
log::debug!("target override not found for {target:?}");
None
}
} else {
Expand Down

0 comments on commit 464e6b8

Please sign in to comment.