features: FeatureMap,
checksum: Option<String>,
links: Option<InternedString>,
+ namespaced_features: bool,
}
impl Summary {
dependencies: Vec<Dependency>,
features: BTreeMap<String, Vec<String>>,
links: Option<String>,
+ namespaced_features: bool,
) -> CargoResult<Summary> {
for dep in dependencies.iter() {
if features.get(&*dep.name()).is_some() {
features: feature_map,
checksum: None,
links: links.map(|l| InternedString::new(&l)),
+ namespaced_features,
}),
})
}
pub fn links(&self) -> Option<InternedString> {
self.inner.links
}
+ pub fn namespaced_features(&self) -> bool {
+ self.inner.namespaced_features
+ }
pub fn override_id(mut self, id: PackageId) -> Summary {
Rc::make_mut(&mut self.inner).package_id = id;
let deps = deps.into_iter()
.map(|dep| dep.into_dep(&self.source_id))
.collect::<CargoResult<Vec<_>>>()?;
- let summary = Summary::new(pkgid, deps, features, links)?;
+ let summary = Summary::new(pkgid, deps, features, links, false)?;
let summary = summary.set_checksum(cksum.clone());
if self.hashes.contains_key(&name[..]) {
self.hashes.get_mut(&name[..]).unwrap().insert(vers, cksum);
}
}
let mut registry = MyRegistry(registry);
- let summary = Summary::new(pkg.clone(), deps, BTreeMap::new(), None).unwrap();
+ let summary = Summary::new(pkg.clone(), deps, BTreeMap::new(), None, false).unwrap();
let method = Method::Everything;
let resolve = resolver::resolve(
&[(summary, method)],
let pkgid = $pkgid.to_pkgid();
let link = if pkgid.name().ends_with("-sys") {Some(pkgid.name().to_string())} else {None};
- Summary::new(pkgid, d, BTreeMap::new(), link).unwrap()
+ Summary::new(pkgid, d, BTreeMap::new(), link, false).unwrap()
});
($pkgid:expr) => ({
let pkgid = $pkgid.to_pkgid();
let link = if pkgid.name().ends_with("-sys") {Some(pkgid.name().to_string())} else {None};
- Summary::new(pkgid, Vec::new(), BTreeMap::new(), link).unwrap()
+ Summary::new(pkgid, Vec::new(), BTreeMap::new(), link, false).unwrap()
})
}
} else {
None
};
- Summary::new(pkg_id(name), Vec::new(), BTreeMap::new(), link).unwrap()
+ Summary::new(pkg_id(name), Vec::new(), BTreeMap::new(), link, false).unwrap()
}
fn pkg_id(name: &str) -> PackageId {
} else {
None
};
- Summary::new(pkg_id_loc(name, loc), Vec::new(), BTreeMap::new(), link).unwrap()
+ Summary::new(
+ pkg_id_loc(name, loc),
+ Vec::new(),
+ BTreeMap::new(),
+ link,
+ false,
+ ).unwrap()
}
fn dep(name: &str) -> Dependency {