This copies the same Apache and MIT license files from the rust-lang/rust
repository to the cargo repository. It notable retains the same copyright line
as the rust repository:
Copyright (c) 2014 The Rust Project Developers
The COPYRIGHT file from the rust repository was not copied over as it looked
like it mainly contained information about third party dependencies, which cargo
does not have yet.
The wording at the end of the rust repository's README.md was also copied over
to cargo's README.md with tweaks to not mention COPYRIGHT and third-party BSD
licenses.
Closes#34
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.