Replace plugins_dylib_path with host_deps_output.
authorLucas Kolstad <lkolstad@uw.edu>
Thu, 31 Aug 2017 00:59:23 +0000 (17:59 -0700)
committerLucas Kolstad <lkolstad@uw.edu>
Thu, 31 Aug 2017 00:59:23 +0000 (17:59 -0700)
The plugins_dylib_path field on Compilation is removed because it is
identical to host_deps_output, it is only used in one easily replaced
location, and because host_deps_output is a more general name that
includes its new usage location in cargo_test.rs as well while better
matching the corresponding deps_output field.

Also de-indents erroneously indented lines in a test case.

src/cargo/ops/cargo_rustc/compilation.rs
src/cargo/ops/cargo_rustc/context.rs
tests/test.rs

index 2f5c4855353d6267827ce4193a5fd0f1bf312abe..c853290c7565b44bd5bce13525c12981e4691ffb 100644 (file)
@@ -35,10 +35,6 @@ pub struct Compilation<'cfg> {
     /// Output directory for the rust host dependencies.
     pub host_deps_output: PathBuf,
 
-    /// Library search path for compiler plugins and build scripts
-    /// which have dynamic dependencies.
-    pub plugins_dylib_path: PathBuf,
-
     /// The path to rustc's own libstd
     pub host_dylib_path: Option<PathBuf>,
 
@@ -69,7 +65,6 @@ impl<'cfg> Compilation<'cfg> {
             root_output: PathBuf::from("/"),
             deps_output: PathBuf::from("/"),
             host_deps_output: PathBuf::from("/"),
-            plugins_dylib_path: PathBuf::from("/"),
             host_dylib_path: None,
             target_dylib_path: None,
             tests: Vec::new(),
@@ -129,7 +124,7 @@ impl<'cfg> Compilation<'cfg> {
                 -> CargoResult<ProcessBuilder> {
 
         let mut search_path = if is_host {
-            let mut search_path = vec![self.plugins_dylib_path.clone()];
+            let mut search_path = vec![self.host_deps_output.clone()];
             search_path.extend(self.host_dylib_path.clone());
             search_path
         } else {
index 0d34df739efb9845a0293be53e4da71c7e840181..906a5155a9335980286eb9e1f25c26ee298506b2 100755 (executable)
@@ -175,7 +175,6 @@ impl<'a, 'cfg> Context<'a, 'cfg> {
             None => {}
         }
 
-        self.compilation.plugins_dylib_path = self.host.deps().to_path_buf();
         self.compilation.host_deps_output = self.host.deps().to_path_buf();
 
         let layout = self.target.as_ref().unwrap_or(&self.host);
index 40642db91ccf6a5339b508dfa67eea4765c7cefa..310ba9768a4b388eae37dd6b2f63be5cae467202 100644 (file)
@@ -2828,8 +2828,8 @@ fn find_dependency_of_proc_macro_dependency_with_target() {
                 "".parse().unwrap()
             }
         "#);
-        Package::new("dep_of_proc_macro_dep", "0.1.0").publish();
-        workspace.build();
+    Package::new("dep_of_proc_macro_dep", "0.1.0").publish();
+    workspace.build();
     assert_that(workspace.cargo("test").arg("--all").arg("--target").arg(rustc_host()),
                 execs().with_status(0));
 }