]> git.proxmox.com Git - cargo.git/log
cargo.git
10 years agoauto merge of #240 : alexcrichton/cargo/cargo-new, r=wycats
bors [Tue, 22 Jul 2014 17:44:39 +0000 (17:44 +0000)]
auto merge of #240 : alexcrichton/cargo/cargo-new, r=wycats

This command is used to create a new cargo repository at a destination that
previously does not exist. A separate command, cargo-init, will be implemented
to initialize an already-existing repository.

cc #21

This is currently rebased on #238

10 years agoImplement cargo-new
Alex Crichton [Tue, 22 Jul 2014 05:19:31 +0000 (22:19 -0700)]
Implement cargo-new

This command is used to create a new cargo repository at a destination that
previously does not exist. A separate command, cargo-init, will be implemented
to initialize an already-existing repository.

cc #21

10 years agoauto merge of #245 : alexcrichton/cargo/fix-fresh, r=wycats
bors [Tue, 22 Jul 2014 17:08:50 +0000 (17:08 +0000)]
auto merge of #245 : alexcrichton/cargo/fix-fresh, r=wycats

This ends up serving the same purpose, but a critical change is that it
canonicalizes the relevant git url (if one is used) to ensure that the same
package from two slightly different locations is always built the same way.

Sadly I'm not quite sure how to add a test for this as it involves using remote
git urls which are unusable during tests.

10 years agoFix travis builds
Alex Crichton [Tue, 22 Jul 2014 15:08:55 +0000 (08:08 -0700)]
Fix travis builds

10 years agoUse a hash for -C metadata instead of a string
Alex Crichton [Tue, 22 Jul 2014 15:33:47 +0000 (08:33 -0700)]
Use a hash for -C metadata instead of a string

This ends up serving the same purpose, but a critical change is that it
canonicalizes the relevant git url (if one is used) to ensure that the same
package from two slightly different locations is always built the same way.

Sadly I'm not quite sure how to add a test for this as it involves using remote
git urls which are unusable during tests.

10 years agoauto merge of #242 : alexcrichton/cargo/issue-111, r=wycats
bors [Tue, 22 Jul 2014 16:42:04 +0000 (16:42 +0000)]
auto merge of #242 : alexcrichton/cargo/issue-111, r=wycats

This was fixed when rustc properly added extra-filename to all temp outputs as
opposed to just libraries.

Closes #111

10 years agoauto merge of #241 : alexcrichton/cargo/fix, r=wycats
bors [Tue, 22 Jul 2014 16:11:07 +0000 (16:11 +0000)]
auto merge of #241 : alexcrichton/cargo/fix, r=wycats

If a build was canceled halfway-through, this would lead to problems when the
project was rebuilt again.

10 years agoauto merge of #238 : alexcrichton/cargo/cstr-builder, r=wycats
bors [Tue, 22 Jul 2014 15:44:51 +0000 (15:44 +0000)]
auto merge of #238 : alexcrichton/cargo/cstr-builder, r=wycats

At the same time, remove a bunch of `path.display().to_string()` and friends.

10 years agoAdd a test for closed issue #111
Alex Crichton [Tue, 22 Jul 2014 14:45:46 +0000 (07:45 -0700)]
Add a test for closed issue #111

This was fixed when rustc properly added extra-filename to all temp outputs as
opposed to just libraries.

Closes #111

10 years agoCorrect a typo in layout preparation
Alex Crichton [Tue, 22 Jul 2014 14:38:01 +0000 (07:38 -0700)]
Correct a typo in layout preparation

If a build was canceled halfway-through, this would lead to problems when the
project was rebuilt again.

10 years agoauto merge of #237 : cburgdorf/cargo/fix_deprecation_warning, r=alexcrichton
bors [Tue, 22 Jul 2014 14:29:43 +0000 (14:29 +0000)]
auto merge of #237 : cburgdorf/cargo/fix_deprecation_warning, r=alexcrichton

10 years agoremove deprecated lexical_ordering() usage
Christoph Burgdorf [Mon, 21 Jul 2014 22:30:54 +0000 (00:30 +0200)]
remove deprecated lexical_ordering() usage

10 years agoauto merge of #235 : rust-lang/cargo/better-test-output, r=alexcrichton
bors [Tue, 22 Jul 2014 05:22:22 +0000 (05:22 +0000)]
auto merge of #235 : rust-lang/cargo/better-test-output, r=alexcrichton

@alexcrichton r?

10 years agoFix windows tests
Alex Crichton [Tue, 22 Jul 2014 05:21:16 +0000 (22:21 -0700)]
Fix windows tests

10 years agoUse Path::display().to_string() less often
Alex Crichton [Tue, 22 Jul 2014 02:33:02 +0000 (19:33 -0700)]
Use Path::display().to_string() less often

Unfortunately this cannot yet have a test for it as rustc itself does not work
if it is run on non-utf8 paths.

10 years agoMove git macros to using `arg()`
Alex Crichton [Tue, 22 Jul 2014 02:18:23 +0000 (19:18 -0700)]
Move git macros to using `arg()`

10 years agoSimplify the ProcessBuilder struct
Alex Crichton [Tue, 22 Jul 2014 02:06:52 +0000 (19:06 -0700)]
Simplify the ProcessBuilder struct

This changes many bounds to ToCStr to stay in line with the since-introduced
Command structure. The builder remains separate of command to have control over
executing and Show.

Path-related methods have been removed and env-initialization/management are
left to Command, ProcessBuilder only keeps track of the delta.

10 years agoauto merge of #236 : cburgdorf/cargo/kill_lifetimes, r=alexcrichton
bors [Mon, 21 Jul 2014 22:29:41 +0000 (22:29 +0000)]
auto merge of #236 : cburgdorf/cargo/kill_lifetimes, r=alexcrichton

This commit removes lifetime annotations
that are now automatically inferred by
the compiler.

10 years agokill unnecessary lifetime annotations
Christoph Burgdorf [Mon, 21 Jul 2014 21:36:08 +0000 (23:36 +0200)]
kill unnecessary lifetime annotations

This commit removes lifetime annotations
that are now automatically inferred by
the compiler.

10 years agoImprove test output
Yehuda Katz [Mon, 21 Jul 2014 19:23:01 +0000 (12:23 -0700)]
Improve test output

10 years agoImprove error message on failed compile
Yehuda Katz [Fri, 18 Jul 2014 11:49:34 +0000 (04:49 -0700)]
Improve error message on failed compile

10 years agoauto merge of #224 : alexcrichton/cargo/canonical-hash, r=wycats
bors [Mon, 21 Jul 2014 16:40:50 +0000 (16:40 +0000)]
auto merge of #224 : alexcrichton/cargo/canonical-hash, r=wycats

This should prevent some weird bugs where if you have slightly different sources that you occasionally have to recompile them when cargo switches between one or the other (thinking they're different)

10 years agoauto merge of #222 : alexcrichton/cargo/no-cargo-toml-in-target, r=wycats
bors [Mon, 21 Jul 2014 15:59:39 +0000 (15:59 +0000)]
auto merge of #222 : alexcrichton/cargo/no-cargo-toml-in-target, r=wycats

When cargo is building itself, it just ends up getting confused because the test
directory is in this location.

10 years agoauto merge of #232 : bkoropoff/cargo/fix-repeated-cargo-test, r=alexcrichton
bors [Mon, 21 Jul 2014 00:57:04 +0000 (00:57 +0000)]
auto merge of #232 : bkoropoff/cargo/fix-repeated-cargo-test, r=alexcrichton

Generate the right target filename for rlibs built in test
mode so that they are correctly moved back out of the old-root
directory.

10 years agoAdd regression test for running `cargo test` twice
Brian Koropoff [Mon, 21 Jul 2014 00:02:09 +0000 (17:02 -0700)]
Add regression test for running `cargo test` twice

10 years agoFix failure on second run of 'cargo test'
Brian Koropoff [Sun, 20 Jul 2014 22:11:41 +0000 (15:11 -0700)]
Fix failure on second run of 'cargo test'

Generate the right target filename for rlibs built in test
mode so that they are correctly moved back out of the old-root
directory.

10 years agoauto merge of #231 : alexcrichton/cargo/burningtree, r=burningtree
bors [Sun, 20 Jul 2014 19:03:41 +0000 (19:03 +0000)]
auto merge of #231 : alexcrichton/cargo/burningtree, r=burningtree

10 years agoFactor the metadata into test filenames
Alex Crichton [Sun, 20 Jul 2014 19:00:01 +0000 (12:00 -0700)]
Factor the metadata into test filenames

Closes #221
Closes #226

10 years agofix deprecated usage
Steve Klabnik [Fri, 18 Jul 2014 15:25:15 +0000 (11:25 -0400)]
fix deprecated usage

10 years agoDon't look inside target/ for sub-packages
Alex Crichton [Fri, 18 Jul 2014 15:29:40 +0000 (08:29 -0700)]
Don't look inside target/ for sub-packages

When cargo is building itself, it just ends up getting confused because the test
directory is in this location.

10 years agoCanonicalize URLs when hashing sources
Alex Crichton [Sat, 19 Jul 2014 05:38:30 +0000 (22:38 -0700)]
Canonicalize URLs when hashing sources

10 years agoauto merge of #216 : alexcrichton/cargo/issue-205, r=wycats
bors [Sat, 19 Jul 2014 01:08:05 +0000 (01:08 +0000)]
auto merge of #216 : alexcrichton/cargo/issue-205, r=wycats

As discovered in #205, cargo wasn't properly ensuring a fresh build state for new builds. As commented in #205, this is an easy way to have a non deterministic build which is one of cargo's major goals to avoid. These commits rectify the situation.

All build output is now "obliterated" by moving to a location unknown to the compiler as soon as a build starts. All fresh output is moved back into place automatically, and all dirty output will only have known artifacts available to it.

The major consequence of this strategy is that the location of the output of the `build` command must also change. Instead of spraying into a shared directory, build commands are now contained to their own build directory which is entirely removed on rebuild or entirely preserved on a fresh build. There's more documentation in the new `layout.rs` about the build directory structure.

In general this should not have much impact as a user-facing change.

10 years agoHouse all native build output in a per-package dir
Alex Crichton [Fri, 18 Jul 2014 03:50:16 +0000 (20:50 -0700)]
House all native build output in a per-package dir

In order to ensure there are no stale artifacts as part of a build, this commit
houses all output of native build commands in their own directories. Each
directory is on a per-package basis, and the output is preserved if the package
is fresh or discarded if it is not.

This does not remove the DEPS_DIR environment variable, it just wires it to the
same value as OUT_DIR.

10 years agoBlow away all directories/files on each build
Alex Crichton [Fri, 18 Jul 2014 02:53:47 +0000 (19:53 -0700)]
Blow away all directories/files on each build

And aftewards selectively move them back into place if they're fresh. This
prevents stale files from showing up from old builds.

This currently breaks anyone build `build=` scripts, the fix is coming in the
next commit.

Closes #205

10 years agoauto merge of #220 : erickt/cargo/master, r=alexcrichton
bors [Fri, 18 Jul 2014 15:32:10 +0000 (15:32 +0000)]
auto merge of #220 : erickt/cargo/master, r=alexcrichton

Please don't land this until https://github.com/wycats/hammer.rs/pull/12 is landed, or else it will break the build.

10 years agoauto merge of #217 : gchp/cargo/docs, r=alexcrichton
bors [Fri, 18 Jul 2014 15:07:19 +0000 (15:07 +0000)]
auto merge of #217 : gchp/cargo/docs, r=alexcrichton

There were inconsistencies in the manifest file between using `[[bin]]` and `[[executable]]`. I've changed the examples to use `[[bin]]` for consistency.

10 years agoUpdate hammer to fix `cargo build -h`.
Erick Tryzelaar [Fri, 18 Jul 2014 14:59:13 +0000 (07:59 -0700)]
Update hammer to fix `cargo build -h`.

10 years agoauto merge of #212 : fhahn/cargo/version, r=alexcrichton
bors [Fri, 18 Jul 2014 14:53:17 +0000 (14:53 +0000)]
auto merge of #212 : fhahn/cargo/version, r=alexcrichton

This PR adds a rustc style version command

10 years agoauto merge of #219 : alexcrichton/cargo/update-to-mater, r=burningtree
bors [Fri, 18 Jul 2014 14:41:19 +0000 (14:41 +0000)]
auto merge of #219 : alexcrichton/cargo/update-to-mater, r=burningtree

10 years agoUpdate to master
Alex Crichton [Fri, 18 Jul 2014 14:40:15 +0000 (07:40 -0700)]
Update to master

10 years agoAdd version command, closes #201
Florian Hahn [Thu, 17 Jul 2014 20:00:58 +0000 (22:00 +0200)]
Add version command, closes #201

10 years agoUse [[bin]] instead of [[executable]] in manifest examples
Greg Chapple [Fri, 18 Jul 2014 11:53:48 +0000 (12:53 +0100)]
Use [[bin]] instead of [[executable]] in manifest examples

10 years agoauto merge of #213 : fhahn/cargo/fix-warnings-2, r=alexcrichton
bors [Thu, 17 Jul 2014 20:59:42 +0000 (20:59 +0000)]
auto merge of #213 : fhahn/cargo/fix-warnings-2, r=alexcrichton

This patch replaces `get()` calls with indexing for vectors and `str::from_utf8_lossy` with `String::from_ut8_lossy` to silence recent rustc warnings

10 years agoUse indexing instead of get() function to access Vec
Florian Hahn [Thu, 17 Jul 2014 20:20:13 +0000 (22:20 +0200)]
Use indexing instead of get() function to access Vec

10 years agoauto merge of #208 : alexcrichton/cargo/fix-main-name, r=wycats
bors [Thu, 17 Jul 2014 19:44:40 +0000 (19:44 +0000)]
auto merge of #208 : alexcrichton/cargo/fix-main-name, r=wycats

The crate name should be the package name, not `main`.

Closes #207

10 years agoauto merge of #211 : japaric/cargo/update-toml, r=alexcrichton
bors [Thu, 17 Jul 2014 18:14:41 +0000 (18:14 +0000)]
auto merge of #211 : japaric/cargo/update-toml, r=alexcrichton

which fixes the errors caused by Vec.get method deprecation.

10 years agoUpdate toml submodule
Jorge Aparicio [Thu, 17 Jul 2014 18:08:45 +0000 (13:08 -0500)]
Update toml submodule

10 years agoFix inferred name of `src/main.rs`
Alex Crichton [Thu, 17 Jul 2014 01:44:30 +0000 (18:44 -0700)]
Fix inferred name of `src/main.rs`

The crate name should be the package name, not `main`.

Closes #207

10 years agoauto merge of #206 : alexcrichton/cargo/update-toml, r=wycats
bors [Wed, 16 Jul 2014 15:12:24 +0000 (15:12 +0000)]
auto merge of #206 : alexcrichton/cargo/update-toml, r=wycats

TOML recently grew multiline string literals as well as literal strings with no
escaping, which can be used instead of the hokey escape_path() function.

10 years agoUpdate toml-rs
Alex Crichton [Wed, 16 Jul 2014 15:08:55 +0000 (08:08 -0700)]
Update toml-rs

TOML recently grew multiline string literals as well as literal strings with no
escaping, which can be used instead of the hokey escape_path() function.

10 years agoauto merge of #202 : fhahn/cargo/master, r=alexcrichton
bors [Tue, 15 Jul 2014 14:29:42 +0000 (14:29 +0000)]
auto merge of #202 : fhahn/cargo/master, r=alexcrichton

Currently it seems like the `DESTDIR` option is ignored during the build process. This poses problems when packaging `rustc`, because it always tries to use `/` as a base path of the prefix. When packaging cargo for Arch Linux, everything should be installed into a separate directory, which content is used to create the package archive. At the moment this step requires `sudo`, which is discouraged in PKGBUILDs. Now, `make install DESTDIR=foo` prepends `DESTDIR` to all relevant paths during installation.

This probably could be archived using `install --prefix=foo/usr/` as well, but the convention to separate prefix and destdir is rather common

10 years agoAdd --destdir option to install.sh
Florian Hahn [Tue, 15 Jul 2014 07:34:47 +0000 (09:34 +0200)]
Add --destdir option to install.sh

10 years agoauto merge of #200 : thiagopnts/cargo/master, r=alexcrichton
bors [Tue, 15 Jul 2014 02:44:43 +0000 (02:44 +0000)]
auto merge of #200 : thiagopnts/cargo/master, r=alexcrichton

As I've been looking around cargo's source I ended up making some changes to keep the code style more consistent.

10 years agoundo inline for better readability
thiagopnts [Tue, 15 Jul 2014 02:25:08 +0000 (23:25 -0300)]
undo inline for better readability

10 years agoMinor fixes for code style consistency
thiagopnts [Tue, 15 Jul 2014 01:45:27 +0000 (22:45 -0300)]
Minor fixes for code style consistency

10 years agoauto merge of #57 : ebfe/cargo/git-chmod, r=alexcrichton
bors [Tue, 15 Jul 2014 01:29:43 +0000 (01:29 +0000)]
auto merge of #57 : ebfe/cargo/git-chmod, r=alexcrichton

10 years agoauto merge of #199 : jdeseno/cargo/cleanup, r=alexcrichton
bors [Mon, 14 Jul 2014 23:29:45 +0000 (23:29 +0000)]
auto merge of #199 : jdeseno/cargo/cleanup, r=alexcrichton

Touch-up. the return statement here isn't very rusty.

10 years agoremove unecessary return statement
Joshua DeSeno [Mon, 14 Jul 2014 23:17:13 +0000 (08:17 +0900)]
remove unecessary return statement

10 years agoauto merge of #198 : rust-lang/cargo/another-nightly-fix, r=wycats
bors [Mon, 14 Jul 2014 20:44:45 +0000 (20:44 +0000)]
auto merge of #198 : rust-lang/cargo/another-nightly-fix, r=wycats

I actually verified it this time to make sure it passes!

10 years agoRe-attempt to fix the nightly windows installer
Alex Crichton [Mon, 14 Jul 2014 20:09:37 +0000 (13:09 -0700)]
Re-attempt to fix the nightly windows installer

10 years agoRemove accidental debugging print
Alex Crichton [Mon, 14 Jul 2014 20:00:14 +0000 (13:00 -0700)]
Remove accidental debugging print

10 years agoauto merge of #197 : alexcrichton/cargo/fix-windows-dist, r=wycats
bors [Mon, 14 Jul 2014 19:29:45 +0000 (19:29 +0000)]
auto merge of #197 : alexcrichton/cargo/fix-windows-dist, r=wycats

The executables all have an `.exe` suffix which needs to be dealt with when moving files around.

10 years agoAttempt to fix the windows dist bot
Alex Crichton [Mon, 14 Jul 2014 19:01:48 +0000 (12:01 -0700)]
Attempt to fix the windows dist bot

10 years agoauto merge of #196 : alexcrichton/cargo/linker-and-ar, r=wycats
bors [Mon, 14 Jul 2014 18:40:45 +0000 (18:40 +0000)]
auto merge of #196 : alexcrichton/cargo/linker-and-ar, r=wycats

10 years agoAllow configuratin ar/ld for rustc
Alex Crichton [Mon, 14 Jul 2014 17:57:04 +0000 (10:57 -0700)]
Allow configuratin ar/ld for rustc

This adds a new .cargo/config option which allows configuring the ar and linker
tools that rustc invokes. This should aid in any cross-compilation attempts.

10 years agoAllow tables in configuration
Alex Crichton [Mon, 14 Jul 2014 17:15:53 +0000 (10:15 -0700)]
Allow tables in configuration

10 years agoauto merge of #195 : alexcrichton/cargo/install, r=wycats
bors [Mon, 14 Jul 2014 18:28:22 +0000 (18:28 +0000)]
auto merge of #195 : alexcrichton/cargo/install, r=wycats

This updates the `make install` target and adds a new `make dist` target which
will prepare a distributable tarball with an install script. All work is based
off the equivalent rust nightly tarball and nightly installation scripts.

Closes #159
Closes #184

10 years agoauto merge of #190 : alexcrichton/cargo/cargo-run, r=wycats
bors [Mon, 14 Jul 2014 18:16:57 +0000 (18:16 +0000)]
auto merge of #190 : alexcrichton/cargo/cargo-run, r=wycats

This currently only supports executing the `src/main.rs` convention, no other.

Close #149

10 years agoauto merge of #189 : alexcrichton/cargo/all-crate-types, r=wycats
bors [Mon, 14 Jul 2014 18:03:22 +0000 (18:03 +0000)]
auto merge of #189 : alexcrichton/cargo/all-crate-types, r=wycats

While we support the `crate_type` key in the manifest, we need to pass through
all crate types to the `--extern` flag.

Closes #177

10 years agoAdd an installation script to the repo
Alex Crichton [Mon, 14 Jul 2014 15:06:14 +0000 (08:06 -0700)]
Add an installation script to the repo

This updates the `make install` target and adds a new `make dist` target which
will prepare a distributable tarball with an install script. All work is based
off the equivalent rust nightly tarball and nightly installation scripts.

Closes #159
Closes #184

10 years agoAdd a `cargo run` command
Alex Crichton [Sun, 13 Jul 2014 18:47:37 +0000 (11:47 -0700)]
Add a `cargo run` command

This currently only supports executing the `src/main.rs` convention, no other.

Close #149

10 years agoauto merge of #176 : cburgdorf/cargo/docs_1, r=alexcrichton
bors [Sun, 13 Jul 2014 21:14:49 +0000 (21:14 +0000)]
auto merge of #176 : cburgdorf/cargo/docs_1, r=alexcrichton

I was chasing the `cargo clean` command it's way down to get a better understanding of the inner workings of cargo. Those minor documentation changes and variable renaming are the outcome which I think make the code base just a tiny bit more welcoming :)

10 years agoAdd documentation and make minor variable renames
Christoph Burgdorf [Sat, 12 Jul 2014 18:54:31 +0000 (20:54 +0200)]
Add documentation and make minor variable renames

10 years agoPass all formats via --extern for libs
Alex Crichton [Sun, 13 Jul 2014 18:33:11 +0000 (11:33 -0700)]
Pass all formats via --extern for libs

While we support the `crate_type` key in the manifest, we need to pass through
all crate types to the `--extern` flag.

Closes #177

10 years agoauto merge of #188 : huonw/cargo/remove-src-test, r=wycats
bors [Sun, 13 Jul 2014 15:48:50 +0000 (15:48 +0000)]
auto merge of #188 : huonw/cargo/remove-src-test, r=wycats

It's not unreasonable to have unittests in a separate submodule of the
crate (being called `test` or `tests`), and having them in their own
file can be very sensible. Thus, the `src/test.rs` implicit default is
likely to trip up some perfectly reasonable use-cases. There's already
the `tests/...` default, so repairing a codebase after this removal is
just moving `src/test.rs` to `tests/whatever_name_you_want.rs`.

Closes #187.

10 years agoRemove the src/test.rs implicit test.
Huon Wilson [Sun, 13 Jul 2014 12:45:26 +0000 (22:45 +1000)]
Remove the src/test.rs implicit test.

It's not unreasonable to have unittests in a separate submodule of the
crate (being called `test` or `tests`), and having them in their own
file can be very sensible. Thus, the `src/test.rs` implicit default is
likely to trip up some perfectly reasonable use-cases. There's already
the `tests/...` default, so repairing a codebase after this removal is
just moving `src/test.rs` to `tests/whatever_name_you_want.rs`.

Closes #187.

10 years agoauto merge of #180 : sfackler/cargo/ndebug, r=wycats
bors [Sun, 13 Jul 2014 05:44:50 +0000 (05:44 +0000)]
auto merge of #180 : sfackler/cargo/ndebug, r=wycats

This will disable debug!() and debug_assert!() statements.

10 years agoPass --cfg ndebug when debug = false
Steven Fackler [Sat, 12 Jul 2014 22:30:24 +0000 (15:30 -0700)]
Pass --cfg ndebug when debug = false

This will disable debug!() and debug_assert!() statements.

10 years agoauto merge of #161 : alexcrichton/cargo/cargo-test, r=wycats
bors [Sun, 13 Jul 2014 03:44:50 +0000 (03:44 +0000)]
auto merge of #161 : alexcrichton/cargo/cargo-test, r=wycats

This allows `cargo test` usage to filter test being run, use --nocapture, etc.

10 years agoPass through extra arguments to `cargo test`
Alex Crichton [Thu, 10 Jul 2014 20:53:36 +0000 (13:53 -0700)]
Pass through extra arguments to `cargo test`

This allows `cargo test` usage to filter test being run, use --nocapture, etc.

10 years agoauto merge of #172 : huonw/cargo/minor-refactoring, r=alexcrichton
bors [Sat, 12 Jul 2014 06:14:49 +0000 (06:14 +0000)]
auto merge of #172 : huonw/cargo/minor-refactoring, r=alexcrichton

There was some unnecessary duplication and allocation.

10 years agoMinor refactorings.
Huon Wilson [Sat, 12 Jul 2014 06:02:38 +0000 (16:02 +1000)]
Minor refactorings.

There was some unnecessary duplication and allocation.

10 years agoauto merge of #170 : alexcrichton/cargo/same-name, r=wycats
bors [Sat, 12 Jul 2014 03:59:51 +0000 (03:59 +0000)]
auto merge of #170 : alexcrichton/cargo/same-name, r=wycats

This allows the dependency queue to properly handle packages with the same
name but from different sources.

A test was added which exercieses this functionality by depending on two
different revs of the same git repo.

10 years agoauto merge of #163 : o11c/cargo/examples, r=wycats
bors [Sat, 12 Jul 2014 03:14:51 +0000 (03:14 +0000)]
auto merge of #163 : o11c/cargo/examples, r=wycats

This add support for `examples/*.rs` being built (as normal bin crates) during `cargo test`,
and `src/test.rs` and `tests/*.rs` being built and run (as test crates) during `cargo test`.

10 years agoUse PackageId in the DependencyQueue
Alex Crichton [Fri, 11 Jul 2014 20:32:27 +0000 (13:32 -0700)]
Use PackageId in the DependencyQueue

This allows the dependency queue to properly handle packages with the same
name but from different sources.

A test was added which exercieses this functionality by depending on two
different revs of the same git repo.

10 years agoDo not run examples during 'cargo test'
Ben Longbons [Fri, 11 Jul 2014 20:34:50 +0000 (13:34 -0700)]
Do not run examples during 'cargo test'

10 years agoAdd support for external tests
Ben Longbons [Fri, 11 Jul 2014 00:08:19 +0000 (17:08 -0700)]
Add support for external tests

10 years agoAdd support for examples
Ben Longbons [Thu, 10 Jul 2014 22:13:53 +0000 (15:13 -0700)]
Add support for examples

10 years agoauto merge of #169 : cburgdorf/cargo/name_clean, r=alexcrichton
bors [Fri, 11 Jul 2014 19:59:51 +0000 (19:59 +0000)]
auto merge of #169 : cburgdorf/cargo/name_clean, r=alexcrichton

There are other unnamed commands like `verify-project` but I'm unsure if they are **not** listed on purpose because they should be used directly by the user less frequently. However, the clean command seems like a command that should be listed here.

Not sure about the wording though. It could be more abstract like *remove build artifacts* but given it's current behavior I think *remove target directory* is somehow straight forward, too.

10 years agolist `clean` command in help
Christoph Burgdorf [Fri, 11 Jul 2014 19:43:13 +0000 (21:43 +0200)]
list `clean` command in help

10 years agoauto merge of #167 : alexcrichton/cargo/cross-compile, r=wycats
bors [Fri, 11 Jul 2014 19:21:07 +0000 (19:21 +0000)]
auto merge of #167 : alexcrichton/cargo/cross-compile, r=wycats

This also refactored many things along the way, I would recommend reading each commit individually rather than them all as a whole.

Closes #119

10 years agoFinish plugin support
Alex Crichton [Fri, 11 Jul 2014 18:22:07 +0000 (11:22 -0700)]
Finish plugin support

This commit implements full support for plugins by answering the question of
whether any target needed as a plugin or needed as a target dependency. This
commit builds on the previous abstractions to enable parallel compilation
wherever possible.

10 years agoauto merge of #166 : nielsle/cargo/command-env, r=alexcrichton
bors [Fri, 11 Jul 2014 18:14:52 +0000 (18:14 +0000)]
auto merge of #166 : nielsle/cargo/command-env, r=alexcrichton

Quickfix for the build after https://github.com/rust-lang/rust/pull/15353

10 years agoUse command.env_set_all() instead of command.env()
Niels langager Ellegaard [Fri, 11 Jul 2014 17:49:02 +0000 (19:49 +0200)]
Use command.env_set_all() instead of command.env()

Fixes build after
https://github.com/rust-lang/rust/pull/15353

10 years agoAdd some simple tests for cross compilation
Alex Crichton [Fri, 11 Jul 2014 16:08:51 +0000 (09:08 -0700)]
Add some simple tests for cross compilation

10 years agoRefactor the parallel job queue to its own module
Alex Crichton [Fri, 11 Jul 2014 15:57:47 +0000 (08:57 -0700)]
Refactor the parallel job queue to its own module

10 years agoRefactor fingerprint logic out of cargo_rustc
Alex Crichton [Fri, 11 Jul 2014 15:45:42 +0000 (08:45 -0700)]
Refactor fingerprint logic out of cargo_rustc

10 years agoRefactor Context into its own submodule
Alex Crichton [Fri, 11 Jul 2014 15:35:23 +0000 (08:35 -0700)]
Refactor Context into its own submodule

10 years agoRefactor `Job` to its own module
Alex Crichton [Fri, 11 Jul 2014 15:06:39 +0000 (08:06 -0700)]
Refactor `Job` to its own module

10 years agoImprove intra-target parallelism
Alex Crichton [Fri, 11 Jul 2014 14:50:24 +0000 (07:50 -0700)]
Improve intra-target parallelism

With cross compilation soon on the horizon, it may be required to build a
library for both the host and target architectures. These two copies can
certainly be built in parallel. Additionally, all binaries produced by a package
can also be built in parallel, but are currently forced to be built
sequentially.

This commit improves this parallelism by allowing each job to create more work
before the package is considered built. Only after all targets have been built
is the new fingerprint written.