20566 Commits

Author SHA1 Message Date
Alex Crichton
eb7a16376f Clarify make install exists as a target
Closes #39
2014-06-24 06:44:47 -07:00
Yehuda Katz
bbd57905ca Update README.md 2014-06-23 23:09:03 -07:00
Yehuda Katz
d9a6af02a0 Merge pull request #31 from alexcrichton/hotfix-windows2
Work around \-characters on Windows for now
2014-06-23 22:49:11 -07:00
Alex Crichton
352efa73b5 Work around \-characters on Windows for now 2014-06-23 22:42:10 -07:00
Yehuda Katz
eb6b0d6281 Rename cargo-compile to cargo-build 2014-06-23 19:09:12 -07:00
Yehuda Katz
5919fa0dfc Only force update git if -u is passed
This will become moot once we have a lockfile, because we'll be able to
check whether the last rev we used is still available and skip fetching.
2014-06-23 18:54:13 -07:00
Yehuda Katz
860ca08ad2 Allow absent git version 2014-06-23 17:38:50 -07:00
Carl Lerche
de6944798c GitSource delegates to PathSource for path ops 2014-06-23 17:03:39 -07:00
Yehuda Katz
b4e8630270 Fix the README 2014-06-23 17:02:22 -07:00
Yehuda Katz
86b2a2a432 Support [package] or [project]
The plan is to free up [project] for simpler config plus output flags
like -O that don't make sense in packages.
2014-06-23 16:57:27 -07:00
Yehuda Katz
6ac9d779ba Merge pull request #29 from cmr/make-install
Makefile: support install, makes packaging easier
2014-06-23 16:34:44 -07:00
Carl Lerche
3948538018 Specify the SourceId that the path source represents 2014-06-23 16:16:22 -07:00
Corey Richardson
e6de26491f Makefile: support install, makes packaging easier 2014-06-23 15:38:56 -07:00
Yehuda Katz
dd9d81b6d6 Merge pull request #28 from alexcrichton/new-toml
Move from rust-toml to toml-rs
2014-06-23 14:13:59 -07:00
Alex Crichton
d4265ef2a0 Move from rust-toml to toml-rs
This commit should greatly improve all error messages related to decoding
Cargo.toml.
2014-06-23 11:38:53 -07:00
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