20651 Commits

Author SHA1 Message Date
Alex Crichton
919ca13abd Fix long lines 2014-06-23 10:30:25 -07:00
Alex Crichton
8901563c0b Fix a red test 2014-06-23 09:44:00 -07:00
Yehuda Katz
bb52365b6f Simplify flags 2014-06-21 23:51:55 -07:00
Yehuda Katz
c27d90c3ff Improve error messages 2014-06-21 23:16:12 -07:00
Yehuda Katz
ad2c2f876d More shell refactoring 2014-06-21 23:02:38 -07:00
Yehuda Katz
19bea0ad0c Thread the shell through more of the system 2014-06-21 22:22:56 -07:00
Yehuda Katz
687035657d Terminal colors 2014-06-21 18:53:07 -07:00
Yehuda Katz
4ac45e6830 Adds initial usage support 2014-06-21 16:15:31 -07:00
Yehuda Katz
89b9374814 Improve error messages 2014-06-20 23:26:19 -07:00
Yehuda Katz
78d8d61ccc Make try! an extended version of std::try!
The only caveat to this is that you cannot use try! inside of a function
that return a Result to another function that expects a totally generic
error.

The primary case of this is Encodable/Decodable, which call into
user-specified methods, expecting an `E` back. In these (extremely
unusual) cases, you can use raw_try!.

Of note:

* Once Error lands in core (optimistic much?), Encodable/Decodable can
  be changed to expect an E: Error + FromError<E>.
* This works fine with concrete error types, since FromError maps things
  like IoError to IoError. The only reason it doesn't work with totally
  generic E is that we can't implement FromError<Box<Error>> for
  impl Error and FromError<E> for E.
2014-06-20 19:18:06 -07:00
Tim Carey-Smith + Tom Dale
f137281b98 Handle some errors better
Also, use cargo_try in more places
2014-06-20 17:51:35 -07:00
Yehuda Katz
617fd51cab Merge pull request #25 from alexcrichton/fingerprints
Don't rebuild dependencies if they haven't changed
2014-06-19 22:13:29 -07:00
Alex Crichton
e05b4dc838 Don't rebuild dependencies if they haven't changed
This commit adds support for recognizing "fingerprints" of upstream
dependencies. When a dependency's fingerprint change, it must be rebuilt.
Currently the fingerprint unconditionally includes the version of the compiler
you're using as well as a specialized version depending on the type of source
you're compiling from:

  - git sources return their fingerprint as the current SHA. This will
    disregard any local changes.
  - path sources return their fingerprint as the maximum mtime of any file found
    at the location. This is a little too coarse and may rebuild packages too
    often (due to sub-packages), but this should get the job done for now.

When executing `cargo compile`, dependencies are not rebuilt if their
fingerprint remained constant.
2014-06-19 21:55:37 -07:00
Yehuda Katz
2af55011b5 Merge pull request #23 from alexcrichton/crate-types
Invoke rustc only once for multiple crate types
2014-06-19 19:49:56 -07:00
Alex Crichton
bc1dea82c8 Invoke rustc only once for multiple crate types 2014-06-19 19:44:45 -07:00
Yehuda Katz
13d3277032 Merge pull request #24 from alexcrichton/style
Update to rust style guidelines
2014-06-19 18:58:52 -07:00
Alex Crichton
64ff29ff86 Update to rust style guidelines
* 80 char line limit highly recommended
* /// and //! for doc comments
2014-06-19 17:02:21 -07:00
Alex Crichton
608133376a Get travis working on OSX 2014-06-19 15:49:40 -07:00
Yehuda Katz
fce9983203 Add --verbose cause chain support 2014-06-19 14:15:17 -07:00
Alex Crichton
bee480e465 Merge pull request #18 from erickt/master
Fix a typo in the README
2014-06-19 12:00:37 -07:00
Yehuda Katz
745b76dd05 Merge pull request #22 from alexcrichton/make
Allow executing an arbitrary command before building
2014-06-19 11:53:49 -07:00
Alex Crichton
27274b1206 Update hammer.rs 2014-06-19 11:52:51 -07:00
Alex Crichton
d68719566a Add a .travis.yml 2014-06-19 11:52:51 -07:00
Alex Crichton
a9d8d2c62a Run tests in parallel
Give each test is own root inside of the shared root to ensure that the tests
are still isolated from one another.
2014-06-19 11:52:51 -07:00
Alex Crichton
fbfa8bdeca Make CARGO_BIN_PATH optional for tests
This allows easier use of running tests by hand.
2014-06-19 11:52:51 -07:00
Alex Crichton
3433a01eba Allow custom precompile commands
This commit enables support for custom precompilation commands to be triggered
before a package builds via rustc. The current interface is to have
`build = "foo"` in the `[project]` section of Cargo.toml and cargo will just
execute the exact command given.
2014-06-19 11:52:51 -07:00
Alex Crichton
47d9bf8b4c Provide more context on process errors
When printing an error for a failed process execution, the stdout/stderr are
included for inspection.
2014-06-19 11:52:51 -07:00
Yehuda Katz
96ab5d73ff Optimized mark_human for ConcreteCargoError 2014-06-19 11:52:49 -07:00
Yehuda Katz
90149584c0 Add CargoError::with_cause
This allows concrete implementations with a `cause` field to have a
better implementation than converting the entire original error into a
concrete representation.
2014-06-19 11:49:50 -07:00
Yehuda Katz
cd6c6d66ec Add mark_human 2014-06-19 11:02:24 -07:00
Yehuda Katz
af0f2733c7 Rename to 2014-06-19 10:43:46 -07:00
Yehuda Katz
e4f4f47192 Require human-tagging errors 2014-06-19 10:12:51 -07:00
Yehuda Katz
08b5b93363 Add FromError 2014-06-19 09:33:09 -07:00
Yehuda Katz
2c2652526d Add cargo_try! 2014-06-19 08:13:58 -07:00
Yehuda Katz
8c72add4f5 Squelch warnings and minor cleanup 2014-06-19 01:21:24 -07:00
Yehuda Katz
3e09f70259 Initial pass at boxed errors
The next step is to clean up the error handling in general so that
failure cases produce good errors.
2014-06-19 00:57:12 -07:00
Carl Lerche
21b7418a38 PathSource - load packages in update fn 2014-06-18 14:42:07 -07:00
Carl Lerche
c665938dcc Source::update takes mutable self 2014-06-18 12:33:22 -07:00
Yehuda Katz + Carl Lerche
bcf9028749 Support nested paths in git and path sources 2014-06-17 17:40:22 -07:00
Yehuda Katz + Carl Lerche
9224a5ae61 Paths nested in paths 2014-06-17 17:05:29 -07:00
Yehuda Katz + Carl Lerche
98322afd90 Improvements to transitive dependency infra
Initial work to enable cross-source transitive dependencies.
2014-06-17 15:36:50 -07:00
Yehuda Katz + Carl Lerche
9b278af150 WIP3 2014-06-16 18:16:34 -07:00
Yehuda Katz + Carl Lerche
6a809efba6 Make cargo foo work 2014-06-16 14:51:46 -07:00
Carl Lerche
0222b4af73 Track Rust master 2014-06-16 12:57:34 -07:00
Erick Tryzelaar
bbfce4aca4 Fix a typo in the README 2014-06-13 22:14:55 -07:00
Carl Lerche + Yehuda Katz
5569835eb6 Better file names 2014-06-13 15:06:15 -07:00
Carl Lerche + Yehuda Katz
512ec4b794 Fix tests 2014-06-13 14:19:06 -07:00
Carl Lerche + Yehuda Katz
f9601cd2f6 Allow multiple and non-default crate_types
Note that at present there is no good error handling for fat-fingering
the crate type. This is a TODO.
2014-06-12 17:49:10 -07:00
Carl Lerche + Yehuda Katz
35e21c7600 Smoke test for git support 2014-06-12 15:51:16 -07:00
Yehuda Katz + Carl Lerche
9c101e39a4 Update to master and fix warnings 2014-06-12 13:45:10 -07:00