Commit graph

320 commits

Author SHA1 Message Date
bors 6248ebe5b2 auto merge of #139 : tomjakubowski/cargo/fix-symlink-blowup, r=alexcrichton
Fingerprinting will fail at an `fs::stat()` call if there is a symlink in
a package's directory pointing to a non-existent file or directory.
This commit recovers from an `fs::stat(`) error on these bogus symlinks by
faking an mtime of 0, which should not affect the overall fingerprint.

Fix #135
2014-07-08 01:46:02 +00:00
Tom Jakubowski 94ba70881d Ignore the broken symlinks test on windows 2014-07-07 18:42:53 -07:00
Tom Jakubowski f488174208 fingerprint: Recover from fs::stat errors
Fingerprinting will fail at an fs::stat() call if there is a broken
symlink in a package's directory.  This commit recovers from fs::stat()
errors on broken symlinks by treating them as having mtime 0, which
should not affect the overall fingerprint.

Fix #135
2014-07-07 15:33:40 -07:00
bors d0ac39d40b auto merge of #140 : rust-lang/cargo/release, r=carllerche 2014-07-07 22:29:56 +00:00
Yehuda Katz + Carl Lerche a1980dc78b Add --release and related refactoring 2014-07-07 15:17:34 -07:00
bors 345e784779 auto merge of #136 : Tomaka17/cargo/multiple-build-cmds, r=alexcrichton
Closes #69

Adds a new syntax for the `build = ` command:

```
build = [
    ["./configure"],
    ["make", "lib/libovr.a"],
    ["/bin/mkdir", "target"],
    ["/bin/cp", "lib/libovr.a", "target/"]
]
```

The current syntax `build = "make"` still works.

`build = [ "a", "b" ]` is forbidden because it is ambiguous.
2014-07-07 20:44:55 +00:00
Tomaka17 c545221c25 Support for multiple and cleaner build commands 2014-07-07 22:12:26 +02:00
Yehuda Katz acabc5942a Merge pull request #134 from alexcrichton/nightlies
Add documentation about cargo nightlies
2014-07-07 07:52:38 -07:00
Alex Crichton ffd985f1f4 Add documentation about cargo nightlies 2014-07-07 07:49:14 -07:00
bors e1c618b6ef auto merge of #131 : alexcrichton/cargo/update-to-master, r=update 2014-07-07 13:28:45 +00:00
Alex Crichton c097d985cc Update with master changes 2014-07-07 06:27:09 -07:00
bors ae1efeedf5 auto merge of #129 : riccieri/cargo/no_more_crate_id, r=alexcrichton
This solves warnings about the use of the deprecated `#![crate_id]` attribute, as well as the deprecated `--crate-file-name` command line option. See rust-lang/rust@c3ef04be55 for details.

Note that this won't compile on the current master without #128 (or equivalent). I can rebase after a fix lands
2014-07-07 13:18:13 +00:00
bors 825662c62d auto merge of #128 : riccieri/cargo/nightly-fix, r=alexcrichton
On rust-lang/rust@ed47c479d7 (which landed yesterday via rust-lang/rust@b8ef5cf131), `url.path` now returns a `Path`, not a `String`. This one-line patch makes cargo compile again (at least as of rust-lang/rust@b8ef5cf131, the `crate_id` changes haven't reached me yet).
2014-07-07 13:11:04 +00:00
Renato Zannon 0f1dc66098 Use --print-file-name instead of --crate-file-name 2014-07-07 02:22:59 -03:00
Renato Zannon 7888b8e068 Use #![crate_name] instead of #![crate_id] 2014-07-07 02:22:59 -03:00
Renato Zannon 869647b20c url.path is now a Path, not a String 2014-07-06 20:07:56 -03:00
bors 83590e2d41 auto merge of #123 : alexcrichton/cargo/canonicalize-github-urls, r=wycats
In addition to canonicalizing checkout locations, this canonicalizes packages
for the resolver. This allows two dependencies with slightly different urls
pointing to the same repository to resolve to the same location and package.

Closes #104
2014-07-05 23:59:58 +00:00
Alex Crichton 2ae6c499f4 Canonicalize github urls for the resolver
In addition to canonicalizing checkout locations, this canonicalizes packages
for the resolver. This allows two dependencies with slightly different urls
pointing to the same repository to resolve to the same location and package.

Closes #104
2014-07-05 16:46:18 -07:00
bors f13a36cb5a auto merge of #122 : Benny1992/cargo/master, r=alexcrichton
Tried with [[executable]] and got this:

```bash
FizzBuzz (master*) $ cargo build                                                                                                             mri-2.1.2
unused manifest key: executable.name
unused manifest key: executable.path
       Fresh fizzbuzz v0.0.1 (file:/home/benny/Web/RustApplications/FizzBuzz)
```

I think ```executable``` section should be ```bin```
2014-07-05 17:59:56 +00:00
Benny 5790b403a5 use [[bin]] instead of [[executable]] 2014-07-05 15:36:36 +02:00
bors c5522e6178 auto merge of #116 : Indiv0/cargo/typofix, r=alexcrichton
Currently, the "single source" error appears like this, with missing whitespace:

    lib/game-of-life $ cargo build --verbose
    An unknown error occurred

    Caused by:
      At the moment, Cargo only supports asingle source for a particular package name (piston).

This fixes the typo.
2014-07-04 02:44:56 +00:00
Indiv0 65131acbea Fix missing space typo in single source error 2014-07-03 22:29:04 -04:00
bors 127d290347 auto merge of #110 : bcobb/cargo/patch-1, r=alexcrichton
Just a small grammar change 😄
2014-07-03 22:31:19 +00:00
bors 15f950b270 auto merge of #106 : alexcrichton/cargo/no-path, r=wycats
This allows usage of cargo without all the executables in your PATH, you only
need to be able to reach the first one.
2014-07-03 22:03:26 +00:00
bors a2080452c0 auto merge of #113 : rust-lang/cargo/dev-deps, r=alexcrichton
Development dependencies are included when building or testing the current package, but not packages that depend on it:

```toml
[dev-dependencies.hamcrest]

git = "https://github.com/carllerche/hamcrest-rust.git"
```
2014-07-03 21:51:32 +00:00
Yehuda Katz + Carl Lerche 9cbb91ac06 Fix up dev-dependencies 2014-07-03 12:42:18 -07:00
Yehuda Katz + Carl Lerche 172cbefc3b Added [dev-dependencies] sections to Cargo.toml
If you put a dependency in [dev-dependencies], it will only be
used when building (or testing) your packages, not other packages that
depend on it.
2014-07-03 07:30:11 -07:00
Yehuda Katz + Carl Lerche c2c96a6591 Add support for non-transitive dependencies
Development and test dependencies should not be transitively pulled in.
For example, if I use rust-curl, and it happens to use hamcrest for
testing, that does not mean I depend on hamcrest.
2014-07-03 07:30:11 -07:00
Björn Steinbrink 98622817c2 Update hammer.rs to be compatible with the current rust master 2014-07-03 07:30:11 -07:00
Brian Cobb 7fdde8e1eb README uses "its" instead of "it's" 2014-07-02 08:54:46 -05:00
Alex Crichton e9b25787fa Enable execution without cargo in PATH
This allows usage of cargo without all the executables in your PATH, you only
need to be able to reach the first one.
2014-07-01 19:47:18 -07:00
bors 75959a440b auto merge of #109 : steveklabnik/cargo/json, r=alexcrichton 2014-07-02 00:00:00 +00:00
Steve Klabnik 947d5bf688 Fixing deprecated JSON call 2014-07-01 19:47:56 -04:00
bors 948e48c6bd auto merge of #108 : jdeseno/cargo/clean-submodules, r=alexcrichton
Small change. Use git's `submodule` `foreach` command to cleanup dependencies. I think this way you won't have to remember to update the makefile when a dependency is added or removed.
2014-07-01 23:15:01 +00:00
bors e00e924e53 auto merge of #107 : alexcrichton/cargo/issue-102, r=wycats
Closes #102
2014-07-01 22:49:29 +00:00
josh 89e5c0d627 make clean-all via git submodule foreach 2014-07-02 07:49:04 +09:00
Alex Crichton 8b5d626aa7 Don't call generic methods on trait objects
Closes #102
2014-07-01 15:44:55 -07:00
bors fe2d2e6680 auto merge of #100 : rust-lang/cargo/meta-packages, r=alexcrichton
This allows a single git repository to have multiple packages contained inside.

* Cargo will look for `Cargo.toml`s located anywhere inside the project.
* Cargo will stop searching once it reaches a submodule, to avoid accidentally exporting someone else's packages. It is still possible to explicitly depend on packages from a submodule using the `path=` syntax on dependencies.
2014-07-01 06:30:02 +00:00
Yehuda Katz 232461371f Improvements based on the review 2014-06-30 23:27:33 -07:00
bors 4cffb55de3 auto merge of #101 : alexcrichton/cargo/fix-git-1.7, r=wycats
Apparently these versions of git are broken for `git fetch $url`, so we have to
resort to `git fetch origin` and then just pray that it hasn't changed in the
meantime.
2014-07-01 04:15:54 +00:00
Alex Crichton d4cc40add1 Fix fetch() on git < 1.7.3
Apparently these versions of git are broken for `git fetch $url`, so we have to
resort to `git fetch origin` and then just pray that it hasn't changed in the
meantime.
2014-06-30 20:19:30 -07:00
Yehuda Katz ea3cb31cec Meta-packages 2014-06-30 18:36:27 -07:00
bors 55d48e1032 auto merge of #92 : alexcrichton/cargo/dash-j, r=wycats
This commit implements the -j flag in the `cargo_rustc` module, using the
primitives from the other commits. The default parllelism is `os::num_cpus()`.

This change also brings proper freshness propagation instead of the hokey logic
of once something is compiled, "compile everything to the right as well".
2014-06-30 23:15:02 +00:00
Alex Crichton 5834a76703 Implement parallel compilation
This commit implements the -j flag in the `cargo_rustc` module, using the
primitives from the previous commits. The default parllelism is `os::num_cpus()`

This change also brings proper freshness propagation instead of the hokey logic
of once something is compiled, "compile everything to the right as well".
2014-06-30 16:06:00 -07:00
Alex Crichton 6d0f457987 Add a dependency queue abstraction
This data structure is used to track when packages should be built and when they
become buildable. Additionally, it is used to propagate dirtiness throughout the
dependency graph.
2014-06-30 16:00:33 -07:00
Alex Crichton c1290f9eed Add a task-pool abstraction
The standard library also provides a task pool, but it's scheduling is not quite
the desired semantics. This task pool instead has all workers contend on a
shared queue to take work from rather than assigning new jobs to specific
workers for forever.
2014-06-30 16:00:33 -07:00
Alex Crichton 1db53b8395 Make CargoError inherit from Send
Due to a bug in the compiler, this also requires adding `+ Send` any time that
CargoError is mentioned. This change will allow errors to be sent across tasks.
2014-06-30 16:00:33 -07:00
Alex Crichton 3db6c2ffa4 Accept -j as a command-line parameter
This parameter will be used to control the number of concurrent builds that
cargo has executing.
2014-06-30 16:00:33 -07:00
bors 33b77bb059 auto merge of #86 : alexcrichton/cargo/issue-77, r=wycats
Instead, keep a table of what we've visited and halt recursion whenever we
re-visit a package.
2014-06-30 20:20:07 +00:00
Alex Crichton 71e4252a90 Don't infinitely recurse on cyclic path deps
Instead, keep a table of what we've visited and halt recursion whenever we
re-visit a package.

Closes #77
2014-06-30 13:18:14 -07:00