Move semver to std and finish rustpkg
This commit is contained in:
parent
2192d11cd1
commit
b10dc1af06
@ -169,8 +169,6 @@ pub mod reflect;
|
||||
pub mod condition;
|
||||
pub mod logging;
|
||||
pub mod util;
|
||||
pub mod semver;
|
||||
|
||||
|
||||
/* Reexported core operators */
|
||||
|
||||
|
@ -33,7 +33,7 @@ use send_map::linear::LinearMap;
|
||||
use rustc::metadata::filesearch;
|
||||
use rustc::driver::{driver, session};
|
||||
use syntax::{ast, attr, codemap, diagnostic, parse, visit};
|
||||
use semver::Version;
|
||||
use std::semver;
|
||||
|
||||
mod usage;
|
||||
mod util;
|
||||
@ -43,7 +43,7 @@ use util::Package;
|
||||
struct PackageScript {
|
||||
id: ~str,
|
||||
name: ~str,
|
||||
vers: Version,
|
||||
vers: semver::Version,
|
||||
crates: ~[~str],
|
||||
deps: ~[(~str, Option<~str>)],
|
||||
input: driver::input,
|
||||
@ -222,8 +222,7 @@ impl PackageScript {
|
||||
}
|
||||
|
||||
// Build the bootstrap and run a command
|
||||
// FIXME: Use workcache to only compile the script when changed
|
||||
// FIXME: Use JIT once it works, it should be faster
|
||||
// FIXME (#4432): Use workcache to only compile the script when changed
|
||||
fn run(cmd: ~str) -> int {
|
||||
let work_dir = self.work_dir();
|
||||
let input = self.input;
|
||||
|
@ -15,14 +15,14 @@
|
||||
use syntax::ast_util::*;
|
||||
use syntax::{ast, attr, codemap, diagnostic, fold, parse, visit};
|
||||
use codemap::span;
|
||||
use semver::Version;
|
||||
use std::semver;
|
||||
use std::{json, term, sort, getopts};
|
||||
use getopts::groups::getopts;
|
||||
use Listener;
|
||||
|
||||
pub struct Package {
|
||||
id: ~str,
|
||||
vers: Version,
|
||||
vers: semver::Version,
|
||||
bins: ~[~str],
|
||||
libs: ~[~str],
|
||||
}
|
||||
@ -488,7 +488,7 @@ pub fn ready_crate(sess: session::Session,
|
||||
@fold.fold_crate(*crate)
|
||||
}
|
||||
|
||||
pub fn parse_vers(vers: ~str) -> result::Result<Version, ~str> {
|
||||
pub fn parse_vers(vers: ~str) -> result::Result<semver::Version, ~str> {
|
||||
match semver::parse(vers) {
|
||||
Some(vers) => result::Ok(vers),
|
||||
None => result::Err(~"could not parse version: invalid")
|
||||
@ -1023,7 +1023,7 @@ pub fn exe_suffix() -> ~str { ~".exe" }
|
||||
pub fn exe_suffix() -> ~str { ~"" }
|
||||
|
||||
|
||||
// FIXME: Use workcache to only compile when needed
|
||||
// FIXME (#4432): Use workcache to only compile when needed
|
||||
pub fn compile_crate(sysroot: Option<Path>, crate: &Path, dir: &Path,
|
||||
flags: ~[~str], cfgs: ~[~str], opt: bool,
|
||||
test: bool) -> bool {
|
||||
@ -1040,7 +1040,7 @@ pub fn compile_str(sysroot: Option<Path>, code: ~str, dir: &Path,
|
||||
|
||||
#[cfg(windows)]
|
||||
pub fn link_exe(_src: &Path, _dest: &Path) -> bool {
|
||||
/* FIXME: Investigate how to do this on win32
|
||||
/* FIXME (#1768): Investigate how to do this on win32
|
||||
Node wraps symlinks by having a .bat,
|
||||
but that won't work with minGW. */
|
||||
|
||||
|
@ -17,7 +17,7 @@
|
||||
use str;
|
||||
use to_str::ToStr;
|
||||
use char;
|
||||
use cmp;
|
||||
use core::cmp;
|
||||
|
||||
pub struct Version {
|
||||
major: uint,
|
||||
|
@ -99,6 +99,7 @@ pub mod rl;
|
||||
pub mod workcache;
|
||||
pub mod bigint;
|
||||
pub mod stats;
|
||||
pub mod semver;
|
||||
|
||||
#[cfg(unicode)]
|
||||
mod unicode;
|
||||
|
Loading…
Reference in New Issue
Block a user