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.
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.
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.
This allows concrete implementations with a `cause` field to have a
better implementation than converting the entire original error into a
concrete representation.