20 Commits

Author SHA1 Message Date
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
Yehuda Katz + Carl Lerche
59bc9adb29 Refactor PackageId.namespace -> source_id 2014-07-08 14:58:56 -07:00
Yehuda Katz + Carl Lerche
a1980dc78b Add --release and related refactoring 2014-07-07 15:17:34 -07:00
Yehuda Katz
ea3cb31cec Meta-packages 2014-06-30 18:36:27 -07:00
Arcterus
856f37091c Error out on ssh dependencies (fixes #55) 2014-06-26 21:41:06 -07:00
Tim Carey-Smith
13eb123213 Add cargo test 2014-06-26 16:47:27 -07:00
Alex Crichton
80a81334f6 Fix lots of windows tests
* Add a convenience method bin() for generating the name of a binary. On windows
  this remembers to append `.exe`.

* Stop executing relative paths to binaries and relying on PATH. This is
  suffering from rust-lang/rust#15149 and failing to spawn processes on windows.
  Additionally, this allows the tests to work with a pre-installed cargo becuase
  the freshly built executables are precisely specified.

* A new function, escape_path(), was added for tests. When generated source
  files with paths, this function needs to be called to properly escape the
  \-character that appears in windows path names. Without this function we would
  be generating invalid TOML and rust.
2014-06-25 11:15:04 -07:00
Yehuda Katz
c08f8f3026 Add support for branch/tag/rev options 2014-06-24 15:23:14 -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
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
Yehuda Katz
19bea0ad0c Thread the shell through more of the system 2014-06-21 22:22:56 -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
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
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
Yehuda Katz + Carl Lerche
bcf9028749 Support nested paths in git and path sources 2014-06-17 17:40:22 -07:00
Carl Lerche + Yehuda Katz
512ec4b794 Fix tests 2014-06-13 14:19:06 -07:00
Carl Lerche + Yehuda Katz
35e21c7600 Smoke test for git support 2014-06-12 15:51:16 -07:00