Skip to content

Commit f53fec0

Browse files
committed
Auto merge of #3878 - ehiggs:revert-template-until-after-rfc, r=alexcrichton
Revert template until after rfc As discussed in #3860, templates was merged without going through the RFC process. @ssokolow has raised some useful comments which need to be settled before the template system can be put back in. #3859 was another relevant issue.
2 parents 3191040 + b998130 commit f53fec0

File tree

16 files changed

+281
-974
lines changed

16 files changed

+281
-974
lines changed

Cargo.lock

Lines changed: 185 additions & 207 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Cargo.toml

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@ name = "cargo"
1717
path = "src/cargo/lib.rs"
1818

1919
[dependencies]
20+
chrono = "0.2.25"
2021
crates-io = { path = "src/crates-io", version = "0.8" }
2122
crossbeam = "0.2"
2223
curl = "0.4.6"
@@ -28,7 +29,6 @@ fs2 = "0.4"
2829
git2 = "0.6"
2930
git2-curl = "0.7"
3031
glob = "0.2"
31-
handlebars = { version = "0.25", features = ["serde_type", "partial4"], default-features = false }
3232
libc = "0.2"
3333
libgit2-sys = "0.6"
3434
log = "0.3"
@@ -43,7 +43,6 @@ shell-escape = "0.1"
4343
tar = { version = "0.4", default-features = false }
4444
tempdir = "0.3"
4545
term = "0.4.4"
46-
time = "0.1.36"
4746
toml = "0.3"
4847
url = "1.1"
4948

src/bin/init.rs

Lines changed: 2 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -12,8 +12,6 @@ pub struct Options {
1212
flag_lib: bool,
1313
arg_path: Option<String>,
1414
flag_name: Option<String>,
15-
flag_template_subdir: Option<String>,
16-
flag_template: Option<String>,
1715
flag_vcs: Option<ops::VersionControl>,
1816
flag_frozen: bool,
1917
flag_locked: bool,
@@ -34,8 +32,6 @@ Options:
3432
--bin Use a binary (application) template
3533
--lib Use a library template
3634
--name NAME Set the resulting package name
37-
--template <repository> Use a specified template repository
38-
--template-subdir <template> Use a specified template within a template repository
3935
-v, --verbose ... Use verbose output (-vv very verbose/build.rs output)
4036
-q, --quiet No output printed to stdout
4137
--color WHEN Coloring: auto, always, never
@@ -51,22 +47,14 @@ pub fn execute(options: Options, config: &Config) -> CliResult {
5147
options.flag_frozen,
5248
options.flag_locked)?;
5349

54-
let Options {
55-
flag_bin, flag_lib,
56-
arg_path, flag_name,
57-
flag_vcs,
58-
flag_template_subdir, flag_template,
59-
..
60-
} = options;
50+
let Options { flag_bin, flag_lib, arg_path, flag_name, flag_vcs, .. } = options;
6151

6252
let tmp = &arg_path.unwrap_or(format!("."));
6353
let opts = ops::NewOptions::new(flag_vcs,
6454
flag_bin,
6555
flag_lib,
6656
tmp,
67-
flag_name.as_ref().map(|s| s.as_ref()),
68-
flag_template_subdir.as_ref().map(|s| s.as_ref()),
69-
flag_template.as_ref().map(|s| s.as_ref()));
57+
flag_name.as_ref().map(|s| s.as_ref()));
7058

7159
let opts_lib = opts.lib;
7260
ops::init(opts, config)?;

src/bin/new.rs

Lines changed: 2 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -12,8 +12,6 @@ pub struct Options {
1212
flag_lib: bool,
1313
arg_path: String,
1414
flag_name: Option<String>,
15-
flag_template_subdir: Option<String>,
16-
flag_template: Option<String>,
1715
flag_vcs: Option<ops::VersionControl>,
1816
flag_frozen: bool,
1917
flag_locked: bool,
@@ -34,8 +32,6 @@ Options:
3432
--bin Use a binary (application) template
3533
--lib Use a library template
3634
--name NAME Set the resulting package name, defaults to the value of <path>
37-
--template <repository> Use a specified template repository
38-
--template-subdir <template-subdir> Use a specified template within a template repository
3935
-v, --verbose ... Use verbose output (-vv very verbose/build.rs output)
4036
-q, --quiet No output printed to stdout
4137
--color WHEN Coloring: auto, always, never
@@ -51,21 +47,13 @@ pub fn execute(options: Options, config: &Config) -> CliResult {
5147
options.flag_frozen,
5248
options.flag_locked)?;
5349

54-
let Options {
55-
flag_bin, flag_lib,
56-
arg_path, flag_name,
57-
flag_vcs,
58-
flag_template_subdir, flag_template,
59-
..
60-
} = options;
50+
let Options { flag_bin, flag_lib, arg_path, flag_name, flag_vcs, .. } = options;
6151

6252
let opts = ops::NewOptions::new(flag_vcs,
6353
flag_bin,
6454
flag_lib,
6555
&arg_path,
66-
flag_name.as_ref().map(|s| s.as_ref()),
67-
flag_template_subdir.as_ref().map(|s| s.as_ref()),
68-
flag_template.as_ref().map(|s| s.as_ref()));
56+
flag_name.as_ref().map(|s| s.as_ref()));
6957

7058
let opts_lib = opts.lib;
7159
ops::new(opts, config)?;

src/cargo/lib.rs

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@
55
#[macro_use] extern crate log;
66
#[macro_use] extern crate serde_derive;
77
#[macro_use] extern crate serde_json;
8+
extern crate chrono;
89
extern crate crates_io as registry;
910
extern crate crossbeam;
1011
extern crate curl;
@@ -14,7 +15,6 @@ extern crate flate2;
1415
extern crate fs2;
1516
extern crate git2;
1617
extern crate glob;
17-
extern crate handlebars;
1818
extern crate libc;
1919
extern crate libgit2_sys;
2020
extern crate num_cpus;
@@ -26,7 +26,6 @@ extern crate shell_escape;
2626
extern crate tar;
2727
extern crate tempdir;
2828
extern crate term;
29-
extern crate time;
3029
extern crate toml;
3130
extern crate url;
3231

0 commit comments

Comments
 (0)