Fix libraries paths following upstream

This commit is contained in:
Yuki Okushi 2020-07-29 12:20:51 +09:00
parent 0d79ba656c
commit 769ac7cc91
No known key found for this signature in database
GPG Key ID: B0986C85C0E2DAA1

View File

@ -46,7 +46,7 @@ pub fn resolve_std<'cfg>(
let patches = to_patch
.iter()
.map(|&name| {
let source_path = SourceId::for_path(&src_path.join("src").join("tools").join(name))?;
let source_path = SourceId::for_path(&src_path.join("library").join(name))?;
let dep = Dependency::parse_no_deprecated(name, None, source_path)?;
Ok(dep)
})
@ -55,10 +55,10 @@ pub fn resolve_std<'cfg>(
let mut patch = HashMap::new();
patch.insert(crates_io_url, patches);
let members = vec![
String::from("src/libstd"),
String::from("src/libcore"),
String::from("src/liballoc"),
String::from("src/libtest"),
String::from("library/std"),
String::from("library/core"),
String::from("library/alloc"),
String::from("library/test"),
];
let ws_config = crate::core::WorkspaceConfig::Root(crate::core::WorkspaceRootConfig::new(
&src_path,
@ -85,7 +85,7 @@ pub fn resolve_std<'cfg>(
// other crates need to alter their features, this should be fine, for
// now. Perhaps in the future features will be decoupled from the resolver
// and it will be easier to control feature selection.
let current_manifest = src_path.join("src/libtest/Cargo.toml");
let current_manifest = src_path.join("library/test/Cargo.toml");
// TODO: Consider doing something to enforce --locked? Or to prevent the
// lock file from being written, such as setting ephemeral.
let mut std_ws = Workspace::new_virtual(src_path, current_manifest, virtual_manifest, config)?;