diff options
Diffstat (limited to 'src/librustpkg')
| -rw-r--r-- | src/librustpkg/conditions.rs | 16 | ||||
| -rw-r--r-- | src/librustpkg/crate.rs | 2 | ||||
| -rw-r--r-- | src/librustpkg/lib.rs | 18 | ||||
| -rw-r--r-- | src/librustpkg/package_source.rs | 5 | ||||
| -rw-r--r-- | src/librustpkg/path_util.rs | 2 | ||||
| -rw-r--r-- | src/librustpkg/search.rs | 29 | ||||
| -rw-r--r-- | src/librustpkg/target.rs | 1 | ||||
| -rw-r--r-- | src/librustpkg/util.rs | 2 | ||||
| -rw-r--r-- | src/librustpkg/workspace.rs | 4 |
9 files changed, 9 insertions, 70 deletions
diff --git a/src/librustpkg/conditions.rs b/src/librustpkg/conditions.rs index 02817fd91e5..023bba15f97 100644 --- a/src/librustpkg/conditions.rs +++ b/src/librustpkg/conditions.rs @@ -20,22 +20,10 @@ condition! { } condition! { - pub bad_stat: (Path, ~str) -> FileStat; -} - -condition! { - pub bad_kind: (~str) -> (); -} - -condition! { pub nonexistent_package: (PkgId, ~str) -> Path; } condition! { - pub copy_failed: (Path, Path) -> (); -} - -condition! { pub missing_pkg_files: (PkgId) -> (); } @@ -44,10 +32,6 @@ condition! { } condition! { - pub no_rust_path: (~str) -> Path; -} - -condition! { pub failed_to_create_temp_dir: (~str) -> Path; } diff --git a/src/librustpkg/crate.rs b/src/librustpkg/crate.rs index f75c5347d71..345638386b2 100644 --- a/src/librustpkg/crate.rs +++ b/src/librustpkg/crate.rs @@ -8,6 +8,8 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. +#[allow(dead_code)]; + use std::path::Path; use std::vec; diff --git a/src/librustpkg/lib.rs b/src/librustpkg/lib.rs index 8c696b2b844..7801742bc91 100644 --- a/src/librustpkg/lib.rs +++ b/src/librustpkg/lib.rs @@ -63,10 +63,9 @@ mod crate; pub mod exit_codes; mod installed_packages; mod messages; -mod package_id; -mod package_source; +pub mod package_id; +pub mod package_source; mod path_util; -mod search; mod sha1; mod source_control; mod target; @@ -189,10 +188,6 @@ impl<'self> PkgScript<'self> { (cfgs, output.status) } } - - fn hash(&self) -> ~str { - self.id.hash() - } } pub trait CtxMethods { @@ -924,12 +919,3 @@ pub fn main_args(args: &[~str]) -> int { if result.is_err() { return COPY_FAILED_CODE; } return 0; } - -fn declare_package_script_dependency(prep: &mut workcache::Prep, pkg_src: &PkgSrc) { - match pkg_src.package_script_option() { - // FIXME (#9639): This needs to handle non-utf8 paths - Some(ref p) => prep.declare_input("file", p.as_str().unwrap(), - workcache_support::digest_file_with_date(p)), - None => () - } -} diff --git a/src/librustpkg/package_source.rs b/src/librustpkg/package_source.rs index b89d4f55258..4865003cb5e 100644 --- a/src/librustpkg/package_source.rs +++ b/src/librustpkg/package_source.rs @@ -321,11 +321,6 @@ impl PkgSrc { } } - /// True if the given path's stem is self's pkg ID's stem - fn stem_matches(&self, p: &Path) -> bool { - p.filestem().map_default(false, |p| { p == self.id.short_name.as_bytes() }) - } - pub fn push_crate(cs: &mut ~[Crate], prefix: uint, p: &Path) { let mut it = p.components().peekable(); if prefix > 0 { diff --git a/src/librustpkg/path_util.rs b/src/librustpkg/path_util.rs index 9d5b5e91fe2..4b5e1ce8727 100644 --- a/src/librustpkg/path_util.rs +++ b/src/librustpkg/path_util.rs @@ -10,6 +10,8 @@ // rustpkg utilities having to do with paths and directories +#[allow(dead_code)]; + pub use package_id::PkgId; pub use target::{OutputType, Main, Lib, Test, Bench, Target, Build, Install}; pub use version::{Version, NoVersion, split_version_general, try_parsing_version}; diff --git a/src/librustpkg/search.rs b/src/librustpkg/search.rs deleted file mode 100644 index aec4e95f8e2..00000000000 --- a/src/librustpkg/search.rs +++ /dev/null @@ -1,29 +0,0 @@ -// Copyright 2013 The Rust Project Developers. See the COPYRIGHT -// file at the top-level directory of this distribution and at -// http://rust-lang.org/COPYRIGHT. -// -// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or -// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license -// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your -// option. This file may not be copied, modified, or distributed -// except according to those terms. - -use path_util::{installed_library_in_workspace, rust_path}; -use version::Version; - -/// If some workspace `p` in the RUST_PATH contains a package matching short_name, -/// return Some(p) (returns the first one of there are multiple matches.) Return -/// None if there's no such path. -/// FIXME #8711: This ignores the desired version. -pub fn find_installed_library_in_rust_path(pkg_path: &Path, _version: &Version) -> Option<Path> { - let rp = rust_path(); - debug!("find_installed_library_in_rust_path: looking for path {}", - pkg_path.display()); - for p in rp.iter() { - match installed_library_in_workspace(pkg_path, p) { - Some(path) => return Some(path), - None => () - } - } - None -} diff --git a/src/librustpkg/target.rs b/src/librustpkg/target.rs index 9863fd0a89e..73c305be798 100644 --- a/src/librustpkg/target.rs +++ b/src/librustpkg/target.rs @@ -79,6 +79,7 @@ fn file_is(p: &Path, stem: &str) -> bool { } } +#[allow(dead_code)] pub fn lib_name_of(p: &Path) -> Path { p.join("lib.rs") } diff --git a/src/librustpkg/util.rs b/src/librustpkg/util.rs index e5c14336a19..3f6d5b55066 100644 --- a/src/librustpkg/util.rs +++ b/src/librustpkg/util.rs @@ -8,6 +8,8 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. +#[allow(dead_code)]; + use std::libc; use std::os; use std::io; diff --git a/src/librustpkg/workspace.rs b/src/librustpkg/workspace.rs index 22d673333e9..95fc6677272 100644 --- a/src/librustpkg/workspace.rs +++ b/src/librustpkg/workspace.rs @@ -54,10 +54,6 @@ pub fn pkg_parent_workspaces(cx: &Context, pkgid: &PkgId) -> ~[Path] { } } -pub fn is_workspace(p: &Path) -> bool { - p.join("src").is_dir() -} - /// Construct a workspace and package-ID name based on the current directory. /// This gets used when rustpkg gets invoked without a package-ID argument. pub fn cwd_to_workspace() -> Option<(Path, PkgId)> { |
