]> git.proxmox.com Git - cargo.git/log
cargo.git
8 years agoGo through `layout` to get doc dir output directories
Alex Crichton [Fri, 19 Feb 2016 22:14:23 +0000 (14:14 -0800)]
Go through `layout` to get doc dir output directories

8 years agoMerge the get/download methods on the Source trait
Alex Crichton [Fri, 19 Feb 2016 21:49:14 +0000 (13:49 -0800)]
Merge the get/download methods on the Source trait

Nothing currently implements the ability to more efficiently download a set of
packages at any one point in time, and the download/get distinction isn't really
used at all. We can always refactor later, but currently there's no benefit, nor
can it really be seen what the possible benefit is, so let's just merge these
two methods into one and have them operate on one id at a time.

8 years agoRemove SourceSet
Alex Crichton [Fri, 19 Feb 2016 21:37:55 +0000 (13:37 -0800)]
Remove SourceSet

This isn't used anywhere

8 years agoRemove the ability to list packages in PackageSet
Alex Crichton [Fri, 19 Feb 2016 21:34:27 +0000 (13:34 -0800)]
Remove the ability to list packages in PackageSet

If we download lazily, that's excessively wasteful!

8 years agoMove the `get_package` step later when calculating deps
Alex Crichton [Fri, 19 Feb 2016 21:16:14 +0000 (13:16 -0800)]
Move the `get_package` step later when calculating deps

Future calls to `get_package` may end up actually downloading a package, so we
want to defer this as late as possible to ensure that we don't download
anything.

8 years agoRefactor build script output state initialization
Alex Crichton [Fri, 19 Feb 2016 19:15:39 +0000 (11:15 -0800)]
Refactor build script output state initialization

Like with the previous refactor, remove the need to list all packages in a
package set as we only need to lazily do this for the actual packages being
compiled. Whenever a build script is requested to be executed is when we
actually go and try to see if an override was in play.

8 years agoRefactor links validation to not use PackageSet
Alex Crichton [Fri, 19 Feb 2016 19:02:17 +0000 (11:02 -0800)]
Refactor links validation to not use PackageSet

Eventually we may not have the entire set of packages resident in memory, so
refactor the implementation to validate the `links` attribute in a demand driven
way rather than all at once up front.

8 years agoFuse SourceMap and PackageSet
Alex Crichton [Fri, 19 Feb 2016 18:53:57 +0000 (10:53 -0800)]
Fuse SourceMap and PackageSet

This commit moves the SourceMap structure into the PackageSet structure, and
simultaneously massively cuts down on the API surface area of PackageSet. It's
intended that eventually a PackageSet will be a lazily loaded set of packages so
we don't have to download everything all at once, and this is the commit in
preparation of that.

8 years agoAuto merge of #2393 - WiSaGaN:bugfix/tests-mod-naming, r=alexcrichton
bors [Thu, 18 Feb 2016 17:12:57 +0000 (17:12 +0000)]
Auto merge of #2393 - WiSaGaN:bugfix/tests-mod-naming, r=alexcrichton

In the default `lib.rs` provided by `cargo-new`, the "test" module is named "test" while Rust convention is using "tests" as the name of the module: https://doc.rust-lang.org/book/testing.html#the-tests-module
The plural form also conforms with the style used in special directories at project root such as "examples" and "tests".
This pull request conforms to the existing style.

8 years agoFix naming of tests mod in cargo new
Wangshan Lu [Thu, 18 Feb 2016 10:47:28 +0000 (18:47 +0800)]
Fix naming of tests mod in cargo new

8 years agoAuto merge of #2390 - vi:conditionalize_adding_cargo_lock_to_gitignore, r=alexcrichton
bors [Wed, 17 Feb 2016 19:23:14 +0000 (19:23 +0000)]
Auto merge of #2390 - vi:conditionalize_adding_cargo_lock_to_gitignore, r=alexcrichton

For cargo new, it depends on --bin option

For cargo init, it depends on detected files
(--bin option may be used or may be ignored)

No tests conver this code so far.

8 years agocargo init: Implement test for conditional Cargo.lock ignoring
Vitaly _Vi Shukela [Wed, 17 Feb 2016 19:03:57 +0000 (22:03 +0300)]
cargo init: Implement test for conditional Cargo.lock ignoring

8 years agoAuto merge of #2391 - alexcrichton:update, r=alexcrichton
bors [Wed, 17 Feb 2016 18:50:52 +0000 (18:50 +0000)]
Auto merge of #2391 - alexcrichton:update, r=alexcrichton

Fixes compile on nightly

8 years agoUpdate tar-rs dependency
Alex Crichton [Wed, 17 Feb 2016 18:50:05 +0000 (10:50 -0800)]
Update tar-rs dependency

Fixes compile on nightly

8 years agoAuto merge of #2389 - vu3rdd:doc-init, r=alexcrichton
bors [Wed, 17 Feb 2016 17:02:27 +0000 (17:02 +0000)]
Auto merge of #2389 - vu3rdd:doc-init, r=alexcrichton

The commit documents the 'cargo init' sub-command in the usage string and in the manpage.

8 years agocargo new/init: Conditionalize adding Cargo.lock to gitignore
Vitaly _Vi Shukela [Wed, 17 Feb 2016 15:45:51 +0000 (18:45 +0300)]
cargo new/init: Conditionalize adding Cargo.lock to gitignore

For cargo new, it depends on --bin option

For cargo init, it depends on detected files
(--bin option may be used or may be ignored)

No tests conver this code so far.

8 years agodocument "cargo init"
Ramakrishnan Muthukrishnan [Wed, 17 Feb 2016 08:11:00 +0000 (13:41 +0530)]
document "cargo init"

8 years agoAuto merge of #2328 - alexcrichton:target-specific-deps, r=brson
bors [Tue, 16 Feb 2016 18:51:49 +0000 (18:51 +0000)]
Auto merge of #2328 - alexcrichton:target-specific-deps, r=brson

This commit is an implementation of [RFC 1361][rfc] which is an extension of
Cargo's `target` section in `Cargo.toml` to allow the use of `#[cfg]`-like
expressions for target-specific dependencies. Now that the compiler has been
extended with `--print cfg` each invocation of Cargo will scrape this output and
learn about the relevant `#[cfg]` directives in play for the target being
compiled. Cargo will then use these directives to decide whether a dependency
should be activated or not.

This should allow definition of dependencies along the lines of:

    [target.'cfg(unix)'.dependencies]
    [target.'cfg(target_os = "linux")'.dependencies]
    [target.'cfg(windows)'.dependencies]

Which is much more ergonomic and robust than listing all the triples out!

8 years agoImplement cfg-based target-specific dependencies
Alex Crichton [Tue, 26 Jan 2016 00:54:10 +0000 (16:54 -0800)]
Implement cfg-based target-specific dependencies

This commit is an implementation of [RFC 1361][rfc] which is an extension of
Cargo's `target` section in `Cargo.toml` to allow the use of `#[cfg]`-like
expressions for target-specific dependencies. Now that the compiler has been
extended with `--print cfg` each invocation of Cargo will scrape this output and
learn about the relevant `#[cfg]` directives in play for the target being
compiled. Cargo will then use these directives to decide whether a dependency
should be activated or not.

This should allow definition of dependencies along the lines of:

    [target.'cfg(unix)'.dependencies]
    [target.'cfg(target_os = "linux")'.dependencies]
    [target.'cfg(windows)'.dependencies]

Which is much more ergonomic and robust than listing all the triples out!

8 years agoAuto merge of #2387 - alexcrichton:update, r=alexcrichton
bors [Sun, 14 Feb 2016 07:23:18 +0000 (07:23 +0000)]
Auto merge of #2387 - alexcrichton:update, r=alexcrichton

The new bundled rust version supports unwinding on 32-bit MSVC!

8 years agoUpdate some dependencies, plus the rust version
Alex Crichton [Sun, 14 Feb 2016 07:21:22 +0000 (23:21 -0800)]
Update some dependencies, plus the rust version

The new bundled rust version supports unwinding on 32-bit MSVC!

8 years agoAuto merge of #2365 - japaric:env-gt-config, r=alexcrichton
bors [Fri, 12 Feb 2016 23:03:56 +0000 (23:03 +0000)]
Auto merge of #2365 - japaric:env-gt-config, r=alexcrichton

This patches fixes the precedence in these cases:

- CARGO_TARGET_ROOT is now preferred over build.target-dir
- RUSTC is now preferred over build.rustc
- RUSTDOC is now preferred over build.rustdoc

r? @alexcrichton

8 years agoAuto merge of #2384 - jseyfried:master, r=alexcrichton
bors [Fri, 12 Feb 2016 22:09:11 +0000 (22:09 +0000)]
Auto merge of #2384 - jseyfried:master, r=alexcrichton

r? @alexcrichton

8 years agoRemove non-inline modules in blocks
Jeffrey Seyfried [Fri, 12 Feb 2016 21:31:27 +0000 (21:31 +0000)]
Remove non-inline modules in blocks

8 years agoAuto merge of #2382 - carols10cents:pointer-to-release-notes, r=alexcrichton
bors [Fri, 12 Feb 2016 18:46:13 +0000 (18:46 +0000)]
Auto merge of #2382 - carols10cents:pointer-to-release-notes, r=alexcrichton

Connects to #1919 - just adds a note and a link to rust's release notes :) :runner:

8 years agoAdd a note about release notes being in Rust's release notes
Carol (Nichols || Goulding) [Fri, 12 Feb 2016 01:04:04 +0000 (20:04 -0500)]
Add a note about release notes being in Rust's release notes

8 years agoAuto merge of #2370 - alexcrichton:windows-jobs, r=brson
bors [Thu, 11 Feb 2016 19:51:06 +0000 (19:51 +0000)]
Auto merge of #2370 - alexcrichton:windows-jobs, r=brson

Currently it's somewhat surprising if you're using cargo and it's then ctrl-c'd.
The child processes that Cargo spawned are likely to still be running around in
the background as they're not killed as well, and this could cause output spew
or future build failures.

This situation is handled by default on Unix because ctrl-c will end up sending
a signal to the entire *process group*, which kills everything, but on Windows
we're not as lucky (just Cargo itself is killed). By using job objects on
Windows we can ensure that the entire tree dies instead of just the top Cargo
process.

cc #2343

8 years agoUse job objects on windows for ctrl-c to work
Alex Crichton [Mon, 8 Feb 2016 19:28:53 +0000 (11:28 -0800)]
Use job objects on windows for ctrl-c to work

Currently it's somewhat surprising if you're using cargo and it's then ctrl-c'd.
The child processes that Cargo spawned are likely to still be running around in
the background as they're not killed as well, and this could cause output spew
or future build failures.

This situation is handled by default on Unix because ctrl-c will end up sending
a signal to the entire *process group*, which kills everything, but on Windows
we're not as lucky (just Cargo itself is killed). By using job objects on
Windows we can ensure that the entire tree dies instead of just the top Cargo
process.

cc #2343

8 years agofix: prefer env variables over config files
Jorge Aparicio [Sat, 6 Feb 2016 20:25:52 +0000 (15:25 -0500)]
fix: prefer env variables over config files

This patches fixes the precedence in these cases:

- CARGO_TARGET_ROOT is now preferred over build.target-dir
- RUSTC is now preferred over build.rustc
- RUSTDOC is now preferred over build.rustdoc

8 years agoAuto merge of #2315 - alexcrichton:decode-some-signals, r=brson
bors [Fri, 5 Feb 2016 21:29:28 +0000 (21:29 +0000)]
Auto merge of #2315 - alexcrichton:decode-some-signals, r=brson

Instead of text that looks like

    Process failed (signal: 11)

the text now looks like:

    Process failed (signal: 11, SIGSEGV: invalid memory reference)

Closes #2315

8 years agoAuto merge of #2359 - matklad:metadata-no-deps, r=alexcrichton
bors [Fri, 5 Feb 2016 20:52:49 +0000 (20:52 +0000)]
Auto merge of #2359 - matklad:metadata-no-deps, r=alexcrichton

closes #2356. The output is not exactly the same as with `read-manifest`, because I wanted to include the `version` field.

Tests and implementation is a copy-paste from `read-manifest` except that [this line](https://github.com/rust-lang/cargo/blob/master/src/bin/read_manifest.rs#L36) is omited, because `root_package` [does update anyway](https://github.com/rust-lang/cargo/blob/master/src/cargo/sources/path.rs#L51).

8 years agometadata: add --no-deps option
Aleksey Kladov [Fri, 5 Feb 2016 00:56:49 +0000 (03:56 +0300)]
metadata: add --no-deps option

The intention is to eventually deprecate `cargo read-manifest`

8 years agoAuto merge of #2335 - fpgaminer:config-target, r=alexcrichton
bors [Fri, 5 Feb 2016 18:32:07 +0000 (18:32 +0000)]
Auto merge of #2335 - fpgaminer:config-target, r=alexcrichton

Fixed #2332.

This PR adds `build.target` to the Cargo config file, which behaves in the same way as passing `--target` to Cargo.  Example `.cargo/config`:

```
[build]
target = "thumbv6m-none-eabi"
```

Similar to how `--jobs` overrides `build.jobs`, `--target` will override `build.target`.

I added documentation to `config.md`, and a test to `test_cargo_cross_compile.rs`.  I couldn't get cross compile working on my machine for `cargo test`.  Hopefully travis passes it.

This is my first PR against Cargo; sorry if I missed any procedures.

8 years agoAuto merge of #2357 - matklad:no-more-warnings-in-tests, r=alexcrichton
bors [Fri, 5 Feb 2016 17:28:04 +0000 (17:28 +0000)]
Auto merge of #2357 - matklad:no-more-warnings-in-tests, r=alexcrichton

Warnings from unrelated tests can be a little disturbing. Maybe we should be stricter about them?

You can always temporary `#![allow(unused, warnings)]` in the module you are writing if you are in the middle of a new development and don't want the compiler putting a spoke in the wheel.

8 years agoAuto merge of #2360 - jedireza:copy-change, r=alexcrichton
bors [Fri, 5 Feb 2016 17:14:29 +0000 (17:14 +0000)]
Auto merge of #2360 - jedireza:copy-change, r=alexcrichton

8 years agoFix typo on build script page
jedireza [Fri, 5 Feb 2016 14:22:56 +0000 (14:22 +0000)]
Fix typo on build script page

8 years agotests: deny warnings
Aleksey Kladov [Fri, 5 Feb 2016 01:05:41 +0000 (04:05 +0300)]
tests: deny warnings

8 years agoAuto merge of #2355 - alexcrichton:fix-ordering-bug, r=brson
bors [Tue, 2 Feb 2016 21:12:37 +0000 (21:12 +0000)]
Auto merge of #2355 - alexcrichton:fix-ordering-bug, r=brson

Cargo needs to ensure that if a build script prints a `-L` path that it's the
first `-L` path passed to the compiler. That way the build script can be sure
that any output it generated is the first to be considered by the compiler.

Closes #2354

8 years agoFix DAG ordering of passed -L flags
Alex Crichton [Tue, 2 Feb 2016 19:42:57 +0000 (11:42 -0800)]
Fix DAG ordering of passed -L flags

Cargo needs to ensure that if a build script prints a `-L` path that it's the
first `-L` path passed to the compiler. That way the build script can be sure
that any output it generated is the first to be considered by the compiler.

Closes #2354

8 years agoAuto merge of #2353 - debris:bench_no_run, r=alexcrichton
bors [Tue, 2 Feb 2016 16:13:02 +0000 (16:13 +0000)]
Auto merge of #2353 - debris:bench_no_run, r=alexcrichton

Closes #2350

8 years agofixed cargo bench --no-run
debris [Tue, 2 Feb 2016 10:30:28 +0000 (11:30 +0100)]
fixed cargo bench --no-run

8 years agoAuto merge of #2351 - rbtcollins:master, r=alexcrichton
bors [Tue, 2 Feb 2016 06:12:10 +0000 (06:12 +0000)]
Auto merge of #2351 - rbtcollins:master, r=alexcrichton

8 years agoAuto merge of #2352 - alexcrichton:new-snapshots, r=alexcrichton
bors [Tue, 2 Feb 2016 04:52:21 +0000 (04:52 +0000)]
Auto merge of #2352 - alexcrichton:new-snapshots, r=alexcrichton

The current snapshot is *super* old (305 days), but as of a few minutes ago it looks like all builds are going to fail with:

```
    Updating registry `https://github.com/rust-lang/crates.io-index`
Failed to parse registry's information for: url

Caused by:
  the given version requirement is not implemented, yet
```

I believe this is because ages ago the semver library wasn't quite fully implemented. The [most recently published url crate](https://crates.io/crates/url/0.5.4) has a version requirement that looks like `>= foo, < bar` which I believe was implemented at some point in the last year.

As a result if we want to keep building Cargo on bors we'll have to upgrade the snapshot, so this does so! For now just pick the absolute newest Cargo to run with and we reset the counters!

8 years agoRegister new snapshots
Alex Crichton [Tue, 2 Feb 2016 04:49:06 +0000 (20:49 -0800)]
Register new snapshots

8 years agoFix warning about private types in API.
Robert Collins [Tue, 2 Feb 2016 04:37:06 +0000 (17:37 +1300)]
Fix warning about private types in API.

8 years agoAuto merge of #2348 - steveklabnik:gh2337, r=alexcrichton
bors [Mon, 1 Feb 2016 22:04:19 +0000 (22:04 +0000)]
Auto merge of #2348 - steveklabnik:gh2337, r=alexcrichton

Fixes #2337

8 years agoAdd a test for this too
Steve Klabnik [Mon, 1 Feb 2016 22:02:23 +0000 (17:02 -0500)]
Add a test for this too

8 years agoAuto merge of #2344 - Stebalien:upgrade-term, r=alexcrichton
bors [Mon, 1 Feb 2016 21:13:28 +0000 (21:13 +0000)]
Auto merge of #2344 - Stebalien:upgrade-term, r=alexcrichton

This PR re-upgrades term to 0.4.3. Cargo now detects whether or not
color is supported immediately after creating the TerminfoTerminal.

Backstory:

Before v0.4, term used to return `Ok(true)` if something succeeded,
`Ok(false)` if the operation was unsupported, and `Err(io::Error)` if there
was an IO error. Now, it returns `Ok(())` if the operation succeeds and
`Err(term::Error)` if the operation fails. If the operation is unsupported,
it returns `Err(term::Error::NotSupported)`. This means that, if `op` is
unsupported, `try!(term.op())` will now return an error instead of silently
failing (well, return false but that's effectively silent).

Fixes #2338.

8 years agoDon't fall back on stderr if color is unavailable
Steven Allen [Mon, 1 Feb 2016 14:48:52 +0000 (09:48 -0500)]
Don't fall back on stderr if color is unavailable

Having a TTY has no bearing on color support.

8 years agoDetect whether or not the terminal supports color.
Steven Allen [Mon, 1 Feb 2016 01:03:14 +0000 (20:03 -0500)]
Detect whether or not the terminal supports color.

Before v0.4, term used to return `Ok(true)` if something succeeded,
`Ok(false)` if the operation was unsupported, and `Err(io::Error)` if
there was an IO error. Now, it returns `Ok(())` if the operation
succeeds and `Err(term::Error)` if the operation fails. If the operation
is unsupported, it returns `Err(term::Error::NotSupported)`. This means
that, if `op` is unsupported, `try!(term.op())` will now return an error
instead of silently failing (well, return false but that's effectively
silent).

Fixes #2338

8 years agoBump semver version
Steve Klabnik [Mon, 1 Feb 2016 20:12:17 +0000 (15:12 -0500)]
Bump semver version

Fixes #2337

8 years agoAuto merge of #2336 - antonlarin:version-flag-interception-fix, r=alexcrichton
bors [Mon, 1 Feb 2016 19:22:12 +0000 (19:22 +0000)]
Auto merge of #2336 - antonlarin:version-flag-interception-fix, r=alexcrichton

Addresses #2286: when subcommand used `execute_main_without_stdin` and provided `--version` flag, cargo intercepted it and printed it's own version.

8 years agoAuto merge of #2347 - alexcrichton:robust-tests, r=wycats
bors [Mon, 1 Feb 2016 18:04:03 +0000 (18:04 +0000)]
Auto merge of #2347 - alexcrichton:robust-tests, r=wycats

* Remove the XDG_CONFIG_HOME environment variable as we're resetting HOME
* Add GIT_CONFIG_NOSYSTEM to encourage git to not read that configuration

Closes #2345

8 years agoMake tests a little more robust
Alex Crichton [Mon, 1 Feb 2016 18:02:04 +0000 (10:02 -0800)]
Make tests a little more robust

* Remove the XDG_CONFIG_HOME environment variable as we're resetting HOME
* Add GIT_CONFIG_NOSYSTEM to encourage git to not read that configuration

Closes #2345

8 years agoAdd a test for --version flag interception
Anton Larin [Sun, 31 Jan 2016 16:02:47 +0000 (19:02 +0300)]
Add a test for --version flag interception

8 years agoRevert "Downgrade term crate back down to 0.2 (from 0.4)."
Steven Allen [Sat, 30 Jan 2016 20:30:53 +0000 (15:30 -0500)]
Revert "Downgrade term crate back down to 0.2 (from 0.4)."

This reverts commit 75e0371ba0cd8ca235dea4e4178cf4c88dbf2e74.

8 years agoAuto merge of #2340 - gentoo90:bash-comp, r=alexcrichton
bors [Sat, 30 Jan 2016 19:58:02 +0000 (19:58 +0000)]
Auto merge of #2340 - gentoo90:bash-comp, r=alexcrichton

8 years agoBashcomp: complete init and metadata commands
gentoo90 [Sat, 30 Jan 2016 18:37:06 +0000 (20:37 +0200)]
Bashcomp: complete init and metadata commands

8 years agoAuto merge of #2339 - pnkfelix:downgrade-term-crate-for-emacs-shell, r=alexcrichton
bors [Sat, 30 Jan 2016 18:30:53 +0000 (18:30 +0000)]
Auto merge of #2339 - pnkfelix:downgrade-term-crate-for-emacs-shell, r=alexcrichton

Downgrade term crate back down to 0.2 (from 0.4).

This is undoing part of commit dd34296

Fix #2338

(Unfortunately I do not have a suggestion for how to make a unit test for this problem; doing so would require putting in a bit more effort than I have time for at the moment.)

8 years agoDowngrade term crate back down to 0.2 (from 0.4).
Felix S. Klock II [Sat, 30 Jan 2016 13:57:15 +0000 (14:57 +0100)]
Downgrade term crate back down to 0.2 (from 0.4).

This is undoing part of commit dd34296

Fix #2338

(Unfortunately I do not have a suggestion for how to make a unit test
for this problem; doing so would require putting in a bit more effort
than I have time for at the moment.)

8 years agoFix interception of subcommand --version flag
Anton Larin [Sat, 30 Jan 2016 09:47:25 +0000 (12:47 +0300)]
Fix interception of subcommand --version flag

Addresses #2286: when subcommand used execute_main_without_stdin and
provided --version flag, cargo intercepted it and printed it's own
version.

8 years agoSet target using config file
fpgaminer [Sat, 30 Jan 2016 08:31:42 +0000 (00:31 -0800)]
Set target using config file

8 years agoAuto merge of #2333 - matklad:remove-unused-var, r=alexcrichton
bors [Sat, 30 Jan 2016 00:53:14 +0000 (00:53 +0000)]
Auto merge of #2333 - matklad:remove-unused-var, r=alexcrichton

It became unused after https://github.com/rust-lang/cargo/commit/3194a23a706c17037556c11e7bf4303ea233f208

Is this intentional that unused variables are not denied in tests?

8 years agotests: remove unused variable
Aleksey Kladov [Sat, 30 Jan 2016 00:45:45 +0000 (03:45 +0300)]
tests: remove unused variable

8 years agoAuto merge of #2331 - matklad:metadata-encodable-resolve, r=alexcrichton
bors [Fri, 29 Jan 2016 23:44:29 +0000 (23:44 +0000)]
Auto merge of #2331 - matklad:metadata-encodable-resolve, r=alexcrichton

8 years agometadata: change resolve serialization
Aleksey Kladov [Fri, 29 Jan 2016 20:47:16 +0000 (23:47 +0300)]
metadata: change resolve serialization

8 years agoAuto merge of #2330 - rillian:fixes, r=alexcrichton
bors [Fri, 29 Jan 2016 22:15:35 +0000 (22:15 +0000)]
Auto merge of #2330 - rillian:fixes, r=alexcrichton

std::slice::SliceConcatExt::connect() was deprecated in 1.3.0
and renamed to join(). Now that 1.6.0 is the stable release,
we can transition to the newer method name.

8 years agoReplace deprecated slice::connect with slice::join.
Ralph Giles [Fri, 29 Jan 2016 21:27:20 +0000 (13:27 -0800)]
Replace deprecated slice::connect with slice::join.

std::slice::SliceConcatExt::connect() was deprecated in 1.3.0
and renamed to join(). Now that 1.6.0 is the stable release,
we can transition to the newer method name.

8 years agoAuto merge of #2329 - alexcrichton:fix-nightly, r=alexcrichton
bors [Fri, 29 Jan 2016 18:40:28 +0000 (18:40 +0000)]
Auto merge of #2329 - alexcrichton:fix-nightly, r=alexcrichton

Relax an output assertion to just contains instead of exhaustively matching

8 years agoFix a test on nightly Rust
Alex Crichton [Fri, 29 Jan 2016 18:20:54 +0000 (10:20 -0800)]
Fix a test on nightly Rust

Relax an output assertion to just contains instead of exhaustively matching

8 years agoAuto merge of #2327 - alexcrichton:ustar-archives, r=alexcrichton
bors [Fri, 29 Jan 2016 04:10:44 +0000 (04:10 +0000)]
Auto merge of #2327 - alexcrichton:ustar-archives, r=alexcrichton

The tar::Builder type by default will build GNU archives, but
unfortunately we force it here to use UStar archives instead. The
UStar format has more limitations on the length of path name that it
can encode, so it's not quite as nice to use.

Older cargos, however, had a bug where GNU archives were interpreted
as UStar archives. This bug means that if we publish a GNU archive
which has fully filled out metadata it'll be corrupt when unpacked by
older cargos.

Hopefully in the future after enough cargos have been running around
with the bugfixed tar-rs library we'll be able to switch this over to
GNU archives, but for now we'll just say that you can't encode paths
in archives that are *too* long.

Closes #2326

8 years agoBuild UStar archives by default
Alex Crichton [Fri, 29 Jan 2016 04:07:56 +0000 (20:07 -0800)]
Build UStar archives by default

The tar::Builder type by default will build GNU archives, but
unfortunately we force it here to use UStar archives instead. The
UStar format has more limitations on the length of path name that it
can encode, so it's not quite as nice to use.

Older cargos, however, had a bug where GNU archives were interpreted
as UStar archives. This bug means that if we publish a GNU archive
which has fully filled out metadata it'll be corrupt when unpacked by
older cargos.

Hopefully in the future after enough cargos have been running around
with the bugfixed tar-rs library we'll be able to switch this over to
GNU archives, but for now we'll just say that you can't encode paths
in archives that are *too* long.

Closes #2326

8 years agoAuto merge of #2324 - rillian:fixes, r=alexcrichton
bors [Thu, 28 Jan 2016 22:05:50 +0000 (22:05 +0000)]
Auto merge of #2324 - rillian:fixes, r=alexcrichton

8 years agoFix a typo.
Ralph Giles [Thu, 28 Jan 2016 21:04:44 +0000 (13:04 -0800)]
Fix a typo.

8 years agoAuto merge of #2323 - alexcrichton:update-libgit2, r=alexcrichton
bors [Thu, 28 Jan 2016 16:51:20 +0000 (16:51 +0000)]
Auto merge of #2323 - alexcrichton:update-libgit2, r=alexcrichton

Fixes a linkage error on linux if libhttp_parser is already installed.

8 years agoUpdate libgit2-sys
Alex Crichton [Thu, 28 Jan 2016 16:50:31 +0000 (08:50 -0800)]
Update libgit2-sys

Fixes a linkage error on linux if libhttp_parser is already installed.

8 years agoAuto merge of #2321 - JanLikar:private-crate, r=alexcrichton
bors [Tue, 26 Jan 2016 17:53:26 +0000 (17:53 +0000)]
Auto merge of #2321 - JanLikar:private-crate, r=alexcrichton

I Accidentally closed #2218, this is the new PR.

[Fix #2202]

8 years ago Add field `publish` to Cargo.toml
Jan Likar [Sat, 23 Jan 2016 21:16:30 +0000 (22:16 +0100)]
 Add field `publish` to Cargo.toml

Field `publish` set to false can be used to prevent a
package from being accidentally published.

8 years agoAuto merge of #2319 - alexcrichton:compat-12, r=brson
bors [Mon, 25 Jan 2016 21:50:36 +0000 (21:50 +0000)]
Auto merge of #2319 - alexcrichton:compat-12, r=brson

There hasn't actually ever been a request to maintain compatibility with older
stable Rust versions, and it's becoming a bit of a maintenance burden, so just
switch CI to run on stable Rust.

8 years agoRemove 1.2.0 from .travis.yml
Alex Crichton [Mon, 25 Jan 2016 20:52:23 +0000 (12:52 -0800)]
Remove 1.2.0 from .travis.yml

There hasn't actually ever been a request to maintain compatibility with older
stable Rust versions, and it's becoming a bit of a maintenance burden, so just
switch CI to run on stable Rust.

8 years agoAuto merge of #2317 - alexcrichton:install-current-crate, r=alexcrichton
bors [Mon, 25 Jan 2016 19:06:18 +0000 (19:06 +0000)]
Auto merge of #2317 - alexcrichton:install-current-crate, r=alexcrichton

Rolling together https://github.com/rust-lang/cargo/pull/2205 and  https://github.com/rust-lang/cargo/pull/2240

8 years agoAuto merge of #2316 - alexcrichton:update, r=alexcrichton
bors [Mon, 25 Jan 2016 18:53:17 +0000 (18:53 +0000)]
Auto merge of #2316 - alexcrichton:update, r=alexcrichton

A few small tweaks to tests were necessary to accomodate rust-lang/rust#29520,
and a few changes were made to the code to account for that as well.

8 years agoUpgrade Rust to build Cargo
Alex Crichton [Mon, 25 Jan 2016 18:20:23 +0000 (10:20 -0800)]
Upgrade Rust to build Cargo

A few small tweaks to tests were necessary to accomodate rust-lang/rust#29520,
and a few changes were made to the code to account for that as well.

8 years agoBe sure the 'is not a crate root' message shows up
Alex Crichton [Mon, 25 Jan 2016 18:41:44 +0000 (10:41 -0800)]
Be sure the 'is not a crate root' message shows up

8 years agoMerge branch 'master' of https://github.com/JIghtuse/cargo into install-current-crate
Alex Crichton [Mon, 25 Jan 2016 18:26:47 +0000 (10:26 -0800)]
Merge branch 'master' of https://github.com/JIghtuse/cargo into install-current-crate

8 years agoMerge branch 'quick-install' of https://github.com/thirtythreeforty/cargo into instal...
Alex Crichton [Mon, 25 Jan 2016 18:26:34 +0000 (10:26 -0800)]
Merge branch 'quick-install' of https://github.com/thirtythreeforty/cargo into install-current-crate

8 years agoAuto merge of #2196 - matklad:metadata2, r=alexcrichton
bors [Mon, 25 Jan 2016 17:56:00 +0000 (17:56 +0000)]
Auto merge of #2196 - matklad:metadata2, r=alexcrichton

Most of the work was done by @dan-t in #1225 and by @winger in #1434

Fixes #2193

I failed to properly rebase previous attempts so I just salvaged this from bits and pieces.

@alexcrichton are you sure that the default format should be TOML? I think that TOML is more suitable for humans, and JSON is better (at the moment at least) for tools. Maybe we should default to ~~TOML~~ JSON?

8 years agoAuto merge of #2297 - alexcrichton:update, r=alexcrichton
bors [Mon, 25 Jan 2016 17:34:19 +0000 (17:34 +0000)]
Auto merge of #2297 - alexcrichton:update, r=alexcrichton

Just a routine for niche bug fixes, linkage errors, perf improvements, etc.

Closes #2295

8 years agoUpdate dependencies and Rust version
Alex Crichton [Wed, 20 Jan 2016 17:07:47 +0000 (09:07 -0800)]
Update dependencies and Rust version

Just a routine for niche bug fixes, linkage errors, perf improvements, etc.

8 years agoExpand what signals are in output description
Alex Crichton [Mon, 25 Jan 2016 17:31:30 +0000 (09:31 -0800)]
Expand what signals are in output description

Instead of text that looks like

    Process failed (signal: 11)

the text now looks like:

    Process failed (signal: 11, SIGSEGV: invalid memory reference)

Closes #231

8 years agometadata: use existing infra for JSON output
Aleksey Kladov [Sun, 24 Jan 2016 21:16:33 +0000 (00:16 +0300)]
metadata: use existing infra for JSON output

8 years agometadata: add version to format
Aleksey Kladov [Sat, 23 Jan 2016 11:54:35 +0000 (14:54 +0300)]
metadata: add version to format

8 years agometadata: simplify
Aleksey Kladov [Thu, 14 Jan 2016 23:47:58 +0000 (02:47 +0300)]
metadata: simplify

8 years agometadata: serialize Resolve
Aleksey Kladov [Mon, 21 Dec 2015 15:05:26 +0000 (18:05 +0300)]
metadata: serialize Resolve

8 years agoIntroduce cargo metadata subcommand
Aleksey Kladov [Sat, 5 Dec 2015 00:22:54 +0000 (03:22 +0300)]
Introduce cargo metadata subcommand

Most of the work was done by @dan-t in #1225 and by @winger in #1434

Fixes #2193

8 years agoAuto merge of #2081 - vi:cargo_init, r=alexcrichton
bors [Sun, 24 Jan 2016 18:42:32 +0000 (18:42 +0000)]
Auto merge of #2081 - vi:cargo_init, r=alexcrichton

Implement `cargo init` command and appropriate tests ( #21).

Features:
* Working like `cargo new` if there are no files in current directory
* Auto-detection of `--bin`
* Auto-detection of already existing VSC and appending to respecive ignore file
* Appending of appropriate `[lib]` or `[[bin]]` section to `Cargo.toml` in case of some non-standard source locations

Concerns:
* I'm not experienced in Rust + lazy => code looks poorer compared to the rest Cargo code
* The test don't cover 100% of functions
* Project consisting of both binary and library is not handled
* Many deviations from [previously proposed algorithm](https://github.com/rust-lang/cargo/pull/2008#issuecomment-145607870)

8 years agoImplement "cargo init"
Vitaly _Vi Shukela [Sat, 23 Jan 2016 12:48:59 +0000 (15:48 +0300)]
Implement "cargo init"

When non-existing directory is provided as argument, it
works just like "cargo new".

When existing directory is used, it may also create template
source file like "cargo new" or may find and use existing
source code for Cargo.toml.

Squashed commit of the following:

    cargo init: Supply USER envvar for one test
    cargo init: Other message when Cargo.toml already exists
    cargo init: Resolve conflict after with #2257
    fix minor issues
    cargo new/init: Simplify error handling code in entry points
    cargo new/init: Better message for invalid characters in name
    cargo init: fix minor issues in test
    cargo init: Avoid excessive builds in the test
    cargo init: minor fixes
    cargo init: Skip no_filename test on Windows
    cargo init: Implement better error message for bin name clash
    cargo init: minor fixes
    cargo init: handle "/" path
    cargo init: Actualise
    cargo new: Fix upper case error message in test
    cargo init: Remove paths::{file,directory}_already_exists
    fix uppper-case error messages
    cargo init: Fix minor issues per diff comments
    cargo init: Change binary handling
    cargo init: Move multiple lib error detection away from mk
    cargo init: Support optional path argument
    cargo init: Fix minor issues per Github comments
    cargo init: Fix complaint from tests/check-style.sh
    cargo init: Handle projects with multiple mains
    cargo init: Major refactor, multi-target projects
    cargo init: Add Cargo.lock unconditionally
    cargo init: Fix complains from tests/check-style.sh
    cargo init: Tests for handling VCS
    cargo init: Handle VCS
    cargo init: work in progress
    cargo init: Deduplicate some things between new and init
    cargo init: Auto-detection of --bin
    cargo init: work in progress...
    cargo init: Fix tests and allow explicit --vcs
    cargo init: intermediate refactor
    cargo init: First sketch of implementation
    cargo init: Preliminary test
    cargo init: first stub

See
https://github.com/vi/cargo/tree/cargo_init_unsquashed
for individual commits

8 years agoAuto merge of #2307 - alexcrichton:readme, r=brson
bors [Sat, 23 Jan 2016 00:21:03 +0000 (00:21 +0000)]
Auto merge of #2307 - alexcrichton:readme, r=brson

Running `cargo build` should work just fine to build cargo as well as not
running the python script to download rustc itself. Now that Cargo runs on
stable (and a pretty old stable) most Rust installations should "Just Work" to
build Cargo.

8 years agoAdd more info to README about compiling
Alex Crichton [Sat, 23 Jan 2016 00:09:17 +0000 (16:09 -0800)]
Add more info to README about compiling

Running `cargo build` should work just fine to build cargo as well as not
running the python script to download rustc itself. Now that Cargo runs on
stable (and a pretty old stable) most Rust installations should "Just Work" to
build Cargo.

8 years agoMerge pull request #2303 from alexcrichton/bump
Brian Anderson [Thu, 21 Jan 2016 21:50:01 +0000 (13:50 -0800)]
Merge pull request #2303 from alexcrichton/bump

Bump to 0.9.0