Commit Graph

17507 Commits

Author SHA1 Message Date
Florian Hahn af07397aaf Add --destdir option to install.sh 2014-07-15 16:25:44 +02:00
bors 5a095d6dad 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.
2014-07-15 02:44:43 +00:00
thiagopnts 77facf511d undo inline for better readability 2014-07-14 23:25:08 -03:00
thiagopnts 6328d1b48e Minor fixes for code style consistency 2014-07-14 22:45:27 -03:00
bors 9dea8869d9 auto merge of #57 : ebfe/cargo/git-chmod, r=alexcrichton 2014-07-15 01:29:43 +00:00
bors 3d8d5019cf auto merge of #199 : jdeseno/cargo/cleanup, r=alexcrichton
Touch-up. the return statement here isn't very rusty.
2014-07-14 23:29:45 +00:00
Joshua DeSeno 1d5b2c2dd2 remove unecessary return statement 2014-07-15 08:17:13 +09:00
bors 6a2031985d auto merge of #198 : rust-lang/cargo/another-nightly-fix, r=wycats
I actually verified it this time to make sure it passes!
2014-07-14 20:44:45 +00:00
Alex Crichton 7d94af09ae Re-attempt to fix the nightly windows installer 2014-07-14 13:09:37 -07:00
Alex Crichton 93c8534b26 Remove accidental debugging print 2014-07-14 13:00:14 -07:00
bors 3b80377cd8 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.
2014-07-14 19:29:45 +00:00
Alex Crichton 38c272704e Attempt to fix the windows dist bot 2014-07-14 12:03:14 -07:00
bors 126c85b002 auto merge of #196 : alexcrichton/cargo/linker-and-ar, r=wycats 2014-07-14 18:40:45 +00:00
Alex Crichton 12af54e17a 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.
2014-07-14 11:28:40 -07:00
Alex Crichton a0dec4e1b0 Allow tables in configuration 2014-07-14 11:28:24 -07:00
bors db5e41c206 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
2014-07-14 18:28:22 +00:00
bors 811d70d148 auto merge of #190 : alexcrichton/cargo/cargo-run, r=wycats
This currently only supports executing the `src/main.rs` convention, no other.

Close #149
2014-07-14 18:16:57 +00:00
bors dc617cf81b 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
2014-07-14 18:03:22 +00:00
Alex Crichton 1aaaf85166 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
2014-07-14 08:18:49 -07:00
Alex Crichton a64b9073f4 Add a `cargo run` command
This currently only supports executing the `src/main.rs` convention, no other.

Close #149
2014-07-14 06:40:51 -07:00
bors 4ef91beed0 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 :)
2014-07-13 21:14:49 +00:00
Christoph Burgdorf dd2459cd2f Add documentation and make minor variable renames 2014-07-13 22:57:05 +02:00
Alex Crichton 8defed6160 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
2014-07-13 11:33:11 -07:00
bors ec0895b460 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.
2014-07-13 15:48:50 +00:00
Huon Wilson 22c254af74 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.
2014-07-13 22:48:45 +10:00
bors 2f60ba328b auto merge of #180 : sfackler/cargo/ndebug, r=wycats
This will disable debug!() and debug_assert!() statements.
2014-07-13 05:44:50 +00:00
Steven Fackler a12a909c04 Pass --cfg ndebug when debug = false
This will disable debug!() and debug_assert!() statements.
2014-07-12 20:46:11 -07:00
bors 6ca709df1e auto merge of #161 : alexcrichton/cargo/cargo-test, r=wycats
This allows `cargo test` usage to filter test being run, use --nocapture, etc.
2014-07-13 03:44:50 +00:00
Alex Crichton a70be72342 Pass through extra arguments to `cargo test`
This allows `cargo test` usage to filter test being run, use --nocapture, etc.
2014-07-12 20:29:51 -07:00
bors 311b879853 auto merge of #172 : huonw/cargo/minor-refactoring, r=alexcrichton
There was some unnecessary duplication and allocation.
2014-07-12 06:14:49 +00:00
Huon Wilson a1784a8344 Minor refactorings.
There was some unnecessary duplication and allocation.
2014-07-12 16:13:13 +10:00
bors 9d13d8a184 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.
2014-07-12 03:59:51 +00:00
bors 7dcd19c6b0 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`.
2014-07-12 03:14:51 +00:00
Alex Crichton f6d22b64b9 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.
2014-07-11 14:20:24 -07:00
Ben Longbons 2e90972004 Do not run examples during 'cargo test' 2014-07-11 13:41:26 -07:00
Ben Longbons b7379e51b4 Add support for external tests 2014-07-11 13:41:26 -07:00
Ben Longbons 246c9e2a55 Add support for examples 2014-07-11 13:41:26 -07:00
bors 9007f42507 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.
2014-07-11 19:59:51 +00:00
Christoph Burgdorf 233e0290d2 list `clean` command in help 2014-07-11 21:48:05 +02:00
bors 66d5ab0dd0 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
2014-07-11 19:21:07 +00:00
Alex Crichton ff19a48290 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.
2014-07-11 12:20:25 -07:00
bors a18bd22356 auto merge of #166 : nielsle/cargo/command-env, r=alexcrichton
Quickfix for the build after https://github.com/rust-lang/rust/pull/15353
2014-07-11 18:14:52 +00:00
Niels langager Ellegaard 95f000512e Use command.env_set_all() instead of command.env()
Fixes build after
https://github.com/rust-lang/rust/pull/15353
2014-07-11 19:50:28 +02:00
Alex Crichton 685f2b4ee7 Add some simple tests for cross compilation 2014-07-11 09:08:51 -07:00
Alex Crichton 7c8ea19b99 Refactor the parallel job queue to its own module 2014-07-11 08:57:47 -07:00
Alex Crichton d3c350b97d Refactor fingerprint logic out of cargo_rustc 2014-07-11 08:45:42 -07:00
Alex Crichton 1e1412fd5b Refactor Context into its own submodule 2014-07-11 08:35:23 -07:00
Alex Crichton 25abb5ab1a Refactor `Job` to its own module 2014-07-11 08:06:39 -07:00
Alex Crichton 2bcf29263d 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.
2014-07-11 07:50:24 -07:00
Alex Crichton 1bb35578cc Update to master 2014-07-11 07:50:01 -07:00