Skip to content

Commit

Permalink
Merge pull request #312 from brson/no-multirust
Browse files Browse the repository at this point in the history
Convert from multirust to rustup
  • Loading branch information
alexcrichton committed Apr 15, 2016
2 parents 2763d84 + c4417ff commit ec56e66
Show file tree
Hide file tree
Showing 63 changed files with 498 additions and 1,137 deletions.
110 changes: 55 additions & 55 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

14 changes: 7 additions & 7 deletions Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]

name = "multirust-rs"
name = "rustup"
version = "0.1.6"
authors = [ "Diggory Blake <diggsey@googlemail.com>" ]
description = "multirust in rust - manage multiple rust installations with ease"
Expand All @@ -16,8 +16,8 @@ keywords = ["multirust", "install", "proxy"]
license = "MIT OR Apache-2.0"

[dependencies]
multirust-dist = { path = "src/multirust-dist" }
multirust-utils = { path = "src/multirust-utils" }
rustup-dist = { path = "src/rustup-dist" }
rustup-utils = { path = "src/rustup-utils" }
clap = "2.2.4"
regex = "0.1.41"
openssl = "0.7.2"
Expand Down Expand Up @@ -55,15 +55,15 @@ user32-sys = "0.1.2"
kernel32-sys = "0.2.1"

[dev-dependencies]
multirust-mock = { path = "src/multirust-mock" }
rustup-mock = { path = "src/rustup-mock" }
lazy_static = "0.1.15"

[lib]
name = "multirust"
path = "src/multirust/lib.rs"
name = "rustup"
path = "src/rustup/lib.rs"
test = false # no unit tests

[[bin]]
name = "rustup-setup"
path = "src/multirust-cli/main.rs"
path = "src/rustup-cli/main.rs"
test = false # no unit tests
2 changes: 1 addition & 1 deletion appveyor.yml
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ build: false

test_script:
- cargo build --release
- cargo test --release -p multirust-dist
- cargo test --release -p rustup-dist
- cargo test --release

notifications:
Expand Down
2 changes: 1 addition & 1 deletion ci/run.sh
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,6 @@ set -ex
cargo build --release --target $TARGET

if [ -z "$SKIP_TESTS" ]; then
cargo test --release -p multirust-dist --target $TARGET
cargo test --release -p rustup-dist --target $TARGET
cargo test --release --target $TARGET
fi
File renamed without changes.
10 changes: 5 additions & 5 deletions src/multirust-cli/common.rs → src/rustup-cli/common.rs
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
//! Just a dumping ground for cli stuff
use multirust::{Cfg, Result, Notification, Toolchain, Error, UpdateStatus};
use multirust_utils::{self, utils};
use multirust_utils::notify::NotificationLevel;
use rustup::{Cfg, Result, Notification, Toolchain, Error, UpdateStatus};
use rustup_utils::{self, utils};
use rustup_utils::notify::NotificationLevel;
use self_update;
use std::ffi::OsStr;
use std::io::{Write, Read, BufRead};
Expand Down Expand Up @@ -83,9 +83,9 @@ pub fn run_inner<S: AsRef<OsStr>>(mut command: Command,
process::exit(code);
}
Err(e) => {
Err(multirust_utils::Error::RunningCommand {
Err(rustup_utils::Error::RunningCommand {
name: args[0].as_ref().to_owned(),
error: multirust_utils::raw::CommandError::Io(e),
error: rustup_utils::raw::CommandError::Io(e),
}.into())
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,9 @@ use std::collections::VecDeque;
use std::fmt;
use term;
use time::precise_time_s;
use multirust::Notification;
use multirust_dist::Notification as In;
use multirust_utils::Notification as Un;
use rustup::Notification;
use rustup_dist::Notification as In;
use rustup_utils::Notification as Un;
use tty;

/// Keep track of this many past download amounts
Expand Down
File renamed without changes.
File renamed without changes.
8 changes: 4 additions & 4 deletions src/multirust-cli/main.rs → src/rustup-cli/main.rs
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
extern crate multirust_dist;
extern crate rustup_dist;
#[macro_use]
extern crate multirust_utils;
extern crate rustup_utils;

#[macro_use]
extern crate clap;
extern crate regex;
extern crate hyper;
#[macro_use]
extern crate multirust;
extern crate rustup;
extern crate term;
extern crate openssl;
extern crate itertools;
Expand Down Expand Up @@ -42,7 +42,7 @@ mod term2;

use std::env;
use std::path::PathBuf;
use multirust::{Error, Result};
use rustup::{Error, Result};

fn main() {
if let Err(e) = run_multirust() {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,9 @@ use cli;
use common::{self, confirm, set_globals, run_inner,
show_channel_update, show_tool_versions,
update_all_channels};
use multirust::*;
use multirust_dist::manifest::Component;
use multirust_dist::dist::TargetTriple;
use rustup::*;
use rustup_dist::manifest::Component;
use rustup_dist::dist::TargetTriple;
use self_update;
use std::env;
use std::path::{Path, PathBuf};
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
use common::{run_inner, set_globals};
use multirust::{Cfg, Result, Error};
use multirust_utils::utils;
use rustup::{Cfg, Result, Error};
use rustup_utils::utils;
use std::env;
use std::path::PathBuf;
use job;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
use clap::{App, Arg, AppSettings, SubCommand, ArgMatches};
use common;
use multirust::{Result, Cfg, Error, Toolchain};
use multirust_dist::manifest::Component;
use multirust_dist::dist::TargetTriple;
use multirust_utils::utils;
use rustup::{Result, Cfg, Error, Toolchain};
use rustup_dist::manifest::Component;
use rustup_dist::dist::TargetTriple;
use rustup_utils::utils;
use self_update;
use std::path::Path;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -32,10 +32,10 @@
use common::{self, confirm};
use itertools::Itertools;
use multirust::{Error, Result, NotifyHandler};
use multirust_dist::dist;
use multirust_dist;
use multirust_utils::utils;
use rustup::{Error, Result, NotifyHandler};
use rustup_dist::dist;
use rustup_dist;
use rustup_utils::utils;
use openssl::crypto::hash::{Type, Hasher};
use std::env;
use std::env::consts::EXE_SUFFIX;
Expand Down Expand Up @@ -259,7 +259,7 @@ fn cleanup_legacy() -> Result<()> {

#[cfg(windows)]
fn legacy_multirust_home_dir() -> Result<PathBuf> {
use multirust_utils::raw::windows::{
use rustup_utils::raw::windows::{
get_special_folder, FOLDERID_LocalAppData
};

Expand Down Expand Up @@ -500,7 +500,7 @@ fn delete_multirust_and_cargo_home() -> Result<()> {
/// Run by multirust-gc-$num.exe to delete CARGO_HOME
#[cfg(windows)]
pub fn complete_windows_uninstall() -> Result<()> {
use multirust::NotifyHandler;
use rustup::NotifyHandler;
use std::ffi::OsStr;
use std::process::Stdio;

Expand Down Expand Up @@ -939,7 +939,7 @@ pub fn prepare_update() -> Result<Option<PathBuf>> {

// Check that hash is correct
if latest_hash != download_hash {
return Err(Error::Install(multirust_dist::Error::ChecksumFailed {
return Err(Error::Install(rustup_dist::Error::ChecksumFailed {
url: url,
expected: latest_hash,
calculated: download_hash,
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
use std::env;
use self_update;
use multirust::Result;
use rustup::Result;
use clap::{App, Arg};
use common;

Expand Down
File renamed without changes.
File renamed without changes.
8 changes: 4 additions & 4 deletions src/multirust-dist/Cargo.toml → src/rustup-dist/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]

name = "multirust-dist"
name = "rustup-dist"
version = "0.1.6"
authors = [ "Diggory Blake <diggsey@googlemail.com>" ]
description = "Installation from a Rust distribution server"
Expand All @@ -23,8 +23,8 @@ flate2 = "0.2.9"
tempdir = "0.3.4"
walkdir = "0.1.5"
toml = "0.1.27"
multirust-mock = { path = "../multirust-mock" }
multirust-utils = { path = "../multirust-utils" }
rustup-mock = { path = "../rustup-mock" }
rustup-utils = { path = "../rustup-utils" }

[lib]
name = "multirust_dist"
name = "rustup_dist"
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
/// `Components` and `DirectoryPackage` are the two sides of the
/// installation / uninstallation process.
use multirust_utils::{self, utils};
use rustup_utils::{self, utils};
use prefix::InstallPrefix;
use errors::*;

Expand Down Expand Up @@ -118,7 +118,7 @@ impl<'a> ComponentBuilder<'a> {
// FIXME: This writes relative paths to the component manifest,
// but rust-installer writes absolute paths.
try!(writeln!(file, "{}", part.encode()).map_err(|e| {
multirust_utils::Error::WritingFile {
rustup_utils::Error::WritingFile {
name: "component",
path: abs_path.clone(),
error: e,
Expand Down
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ use component::components::*;
use component::transaction::*;

use errors::*;
use multirust_utils::utils;
use rustup_utils::utils;
use temp;

use std::path::{Path, PathBuf};
Expand Down
Loading

0 comments on commit ec56e66

Please sign in to comment.