In order to ensure there are no stale artifacts as part of a build, this commit
houses all output of native build commands in their own directories. Each
directory is on a per-package basis, and the output is preserved if the package
is fresh or discarded if it is not.
This does not remove the DEPS_DIR environment variable, it just wires it to the
same value as OUT_DIR.
And aftewards selectively move them back into place if they're fresh. This
prevents stale files from showing up from old builds.
This currently breaks anyone build `build=` scripts, the fix is coming in the
next commit.
Closes#205
TOML recently grew multiline string literals as well as literal strings with no
escaping, which can be used instead of the hokey escape_path() function.
This adds a new .cargo/config option which allows configuring the ar and linker
tools that rustc invokes. This should aid in any cross-compilation attempts.
It's not unreasonable to have unittests in a separate submodule of the
crate (being called `test` or `tests`), and having them in their own
file can be very sensible. Thus, the `src/test.rs` implicit default is
likely to trip up some perfectly reasonable use-cases. There's already
the `tests/...` default, so repairing a codebase after this removal is
just moving `src/test.rs` to `tests/whatever_name_you_want.rs`.
Closes#187.
It's not unreasonable to have unittests in a separate submodule of the
crate (being called `test` or `tests`), and having them in their own
file can be very sensible. Thus, the `src/test.rs` implicit default is
likely to trip up some perfectly reasonable use-cases. There's already
the `tests/...` default, so repairing a codebase after this removal is
just moving `src/test.rs` to `tests/whatever_name_you_want.rs`.
Closes#187.
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.
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.
This commit implements full support for plugins by answering the question of
whether any target needed as a plugin or needed as a target dependency. This
commit builds on the previous abstractions to enable parallel compilation
wherever possible.
Most notably, `resolve` now takes the root, so it can properly link the
root package with its dependencies (which is required to build the
--externs for the root package).
This commit adds support for passing --extern to dependencies. It allows
multiple copies of the same named dependency in the system, as long as
they come from different repos.
This touches up the filtering logic to ensure that upstream dependencies as well
as local dependencies are built with optimizations when `cargo build --release`
is used.
If a package had both bin and lib deps, `cargo test` was not building the `lib`
dependency when building the bins with `--test`. This commit adds an extra
"test" profile (not compiled with --test) for situations such as this which is
filtered out normally but kept around for the `cargo test` case.
This PR moves Cargo over to the new naming based on [RFC 35](https://github.com/rust-lang/rfcs/blob/master/complete/0035-remove-crate-id.md).
* You should no longer use `#[crate_name]` or `#[crate_id]` in any crate managed by Cargo.
* You no longer need a `[[lib]]` section in your `Cargo.toml` if you name your library `src/lib.rs`.
* You no longer need a `[[bin]]` section in your `Cargo.toml` if you name your library `src/main.rs`.
* You can include multiple `[[bins]]` in `src/bin/*.rs` and Cargo will treat them as if they were specified via `[[bin]]`.
This commit does not yet add support for `-C metadata` or `-C extra-file-name`, but that is coming soon.