Commit graph

2043 commits

Author SHA1 Message Date
Sondre Lefsaker 512b217b0b Remove the pkgid arg and replace the profile flag with package. 2015-05-02 12:19:55 +02:00
Sondre Lefsaker b177d2ab56 Pass the arg_opts from the command line further on to the CompileOptions.
- The new tests verifies that the extra arguments gets appended to the command. One is for lib and one is for main
- Currently the arguments gets passed on to *every* target that gets built, so the tests only contain one file each
2015-05-02 01:21:10 +02:00
Sondre Lefsaker 77bb01ece2 Add a new field to CompileOptions and BuildConfig: target_rustc_args
- The new field is a list with arguments to compile the target with.
- There should only be one target that gets compiled with these arguments
2015-05-02 00:22:36 +02:00
Sondre Lefsaker 754938ffb8 Add new subcommand rustc.
- `cargo rustc` is starting out based on `cargo build`
2015-05-01 23:19:43 +02:00
Jakub Bukaj e4ae24b124 Loosen the dependency versions in Cargo.toml 2015-05-01 13:25:09 +02:00
bors efb482d9ed Auto merge of #1566 - alexcrichton:fix-transitive-update-dash-p, r=brson
Currently when a dependency is transitively updated the source may not itself be
updated, so an update may not happen at all. This commit modifies this behavior
to be sure to add the non-updated source to the registry for any matching
package which will trigger the source to update itself.
2015-04-30 02:11:47 +00:00
bors 91ea24061e Auto merge of #1564 - alexcrichton:right-timeout, r=brson
Previously a timeout was set via libcurl's blanket timeout option, which is a
timeout for the entire request. This isn't always what we want, however, as
cargo is used on quite a variety of networks. Instead what we really want is
timing out data being received, so instead of a blanket timeout we set two
different timeouts:

* The connect timeout is now configured (time it takes to connect the socket)
* A "low speed" timeout is now also set. This means that if Cargo doesn't
  receive 10 bytes of data in the specified tiemout period that the entire
  transfer will be timed out.

Closes #1560
2015-04-30 01:48:01 +00:00
Alex Crichton 923c2f2dfa Tweak the meaning of HTTP timeouts
Previously a timeout was set via libcurl's blanket timeout option, which is a
timeout for the entire request. This isn't always what we want, however, as
cargo is used on quite a variety of networks. Instead what we really want is
timing out data being received, so instead of a blanket timeout we set two
different timeouts:

* The connect timeout is now configured (time it takes to connect the socket)
* A "low speed" timeout is now also set. This means that if Cargo doesn't
  receive 10 bytes of data in the specified tiemout period that the entire
  transfer will be timed out.

Closes #1560
2015-04-29 18:46:24 -07:00
Alex Crichton 242f8c428b Fix transitively updating dependencies
Currently when a dependency is transitively updated the source may not itself be
updated, so an update may not happen at all. This commit modifies this behavior
to be sure to add the non-updated source to the registry for any matching
package which will trigger the source to update itself.
2015-04-29 18:45:47 -07:00
bors efd2ea99a9 Auto merge of #1559 - alexcrichton:platform-specific-deps++, r=brson
They're available at the top-level, so no reason to not expose them at the
target level as well!

Closes #1464
2015-04-29 20:38:14 +00:00
bors d9b2202c6e Auto merge of #1563 - alexcrichton:ar-linker-for-plugins, r=alexcrichton
Just touching up a test so hopefully it can pass on Windows!
2015-04-29 19:29:58 +00:00
bors 6778d18a13 Auto merge of #1562 - alexcrichton:doc-include, r=alexcrichton
Just adding a few nits of my own.
2015-04-29 19:18:08 +00:00
bors c874e37fbe Auto merge of #1558 - alexcrichton:less-hashes, r=brson
The root crate often has artifacts which are later intended for distribution of
some form, so adding a hash will just make predicting the file name difficult.
The hash also isn't necessary as it's guaranteed to not conflict with other
files (no other dependencies are in the same directory) and all other libraries
have metadata so symbols will not conflict.

Closes #1484
2015-04-29 19:04:31 +00:00
Alex Crichton ab99e6a049 Update dependencies
Primarily pick up an update to curl-rust which transitively means we need to
update openssl for other deps
2015-04-29 11:57:50 -07:00
bors f1d6a1a6e6 Auto merge of #1505 - alexcrichton:issue-1478, r=brson
This commit enables the build script for a crate to provide feedback to the
crate itself about how it should be built. This is done through the `--cfg`
flags of the compiler, and each build script is now allowed to print `rustc-cfg`
directives to inform Cargo about what `--cfg` flags it should pass.

All `--cfg` flags are local to the current crate and are not propagated outwards
to transitive dependencies. The primary use-case that this feature is targeting
is compile-time feature detection for applications like C bindings or C
libraries where the version being targeted may change over time.

Closes #1478
2015-04-29 18:51:34 +00:00
bors aeded21397 Auto merge of #1557 - alexcrichton:exhaustive, r=brson
This commit fills out the functionality of `--lib`, `--test`, `--bin`,
`--bench`, and `--example` for the `cargo {test,build,bench}` commands all at
once. The support for all of this was introduced long ago, and the flags just
weren't exposed at the time.
2015-04-29 18:35:16 +00:00
Alex Crichton 15b212e50a Relax the test for ar/linker with plugins
On windows it won't actually succeed or get past the first compile with cc/ar,
so just set it to something that for sure won't exist so it doesn't progress on
*any* platform.
2015-04-29 11:31:34 -07:00
Alex Crichton aae58b5b51 Merge branch 'ar-linker-host' of https://github.com/japaric/cargo into ar-linker-for-plugins 2015-04-29 11:28:06 -07:00
Alex Crichton 22d5434490 Touch up the include docs a bit 2015-04-29 11:26:01 -07:00
Alex Crichton 8fe08662cb Merge branch 'doc-include' of https://github.com/huonw/cargo into doc-include 2015-04-29 11:23:01 -07:00
bors 095847b468 Auto merge of #1561 - alexcrichton:cargo-test-release, r=alexcrichton
This just fixes up the test so it can pass the bots.
2015-04-29 18:22:12 +00:00
Alex Crichton 79c77414dd Fix the test for cargo test --release 2015-04-29 11:19:53 -07:00
Alex Crichton f3fbc82889 Merge branch 'addrelease' of https://github.com/psdh/cargo into cargo-test-release 2015-04-29 11:07:05 -07:00
Alex Crichton 27efa7ba03 Don't put hashes in libraries of the root crate
The root crate often has artifacts which are later intended for distribution of
some form, so adding a hash will just make predicting the file name difficult.
The hash also isn't necessary as it's guaranteed to not conflict with other
files (no other dependencies are in the same directory) and all other libraries
have metadata so symbols will not conflict.

Closes #1484
2015-04-29 11:03:21 -07:00
Alex Crichton 7a1d8d9481 Allow more advanced filtering of what to build
This commit fills out the functionality of `--lib`, `--test`, `--bin`,
`--bench`, and `--example` for the `cargo {test,build,bench}` commands all at
once. The support for all of this was introduced long ago, and the flags just
weren't exposed at the time.
2015-04-29 10:59:02 -07:00
Alex Crichton 3f0ef765c0 Add support for platform-specific build/dev dependencies
They're available at the top-level, so no reason to not expose them at the
target level as well!

Closes #1464
2015-04-29 10:23:08 -07:00
bors e3a642559d Auto merge of #1540 - lfairy:strip-affixes, r=alexcrichton
If the user invokes `cargo new` with a name of the form `rust-foo` or `foo-rs` (or any variation of the two), and the `--bin` option is *not* present, then the resulting `Cargo.toml` will have a `name` field of just `foo` instead.

Closes #1532
2015-04-27 16:55:30 +00:00
Chris Wong 6ca912d694 Set $USER variable in integration tests
This variable isn't set on homu, so we need to add it ourselves.
2015-04-27 19:10:08 +12:00
bors b119f7eae8 Auto merge of #1552 - IvanUkhov:spaces, r=alexcrichton 2015-04-27 06:33:09 +00:00
Ivan Ukhov d4bed1303a Make the usage of spaces next to square brackets consistent 2015-04-27 08:26:28 +02:00
Chris Wong 10fa4a128a Fix the warning to start with a lowercase letter 2015-04-25 12:36:08 +12:00
Chris Wong e34b36aeab Add integration tests 2015-04-24 17:20:08 +12:00
Chris Wong 78018d3602 Show a warning when the package is renamed 2015-04-24 17:00:01 +12:00
Chris Wong 99736d84a9 Add a --name option for setting the package name 2015-04-24 16:56:06 +12:00
bors dac600c110 Auto merge of #1543 - brson:installer, r=alexcrichton
r? @alexcrichton
2015-04-22 21:57:00 +00:00
Brian Anderson 5533250fbd Upgrade rust-installer 2015-04-22 14:50:15 -07:00
Chris Wong 3f298bca08 Strip rust- and -rs affixes in cargo new
Closes #1532
2015-04-21 11:13:45 +12:00
bors 86be4e4962 Auto merge of #1539 - gentoo90:bash-comp, r=alexcrichton
...and restrict `--manifest-path` to propose only `*.toml` files.
Also add `.gitignore` to `registry` folder
2015-04-20 16:05:11 +00:00
gentoo90 e28ef064f0 Ignore target/ and Cargo.lock in src/registry 2015-04-19 20:11:01 +03:00
gentoo90 23d7291a24 Add bashcomp for --example
and restrict --manifest-path to propose only *.toml files
2015-04-19 17:36:29 +03:00
bors 19fc3de955 Auto merge of #1535 - mohtar:doc-open, r=alexcrichton
`start` is not an actual executable, but rather a built-in command in Command Prompt. The correct way of launching a file using the default application is thus: `cmd /C start "" <file>`.

Fixes #741.
2015-04-19 07:53:21 +00:00
bors 32c0eee1aa Auto merge of #1537 - ozmorph:master, r=alexcrichton
fixes #1536 .  Tested with rustc 1.0.0-nightly (a52182ffd 2015-04-17) (built 2015-04-17).
2015-04-19 01:59:13 +00:00
ozmorph a72ddb73df updated threadpool dependency from v0.1.1 to v0.1.4 2015-04-18 18:12:45 -04:00
Mohd Tarmizi 0286a72dbe Open file correctly in Windows 2015-04-19 05:56:49 +08:00
bors 6882352814 Auto merge of #1533 - mohtar:doc-open, r=wycats
Since #318, the `doc` command generates documentation for binaries in addition to libraries. But currently running `cargo doc --open` would not launch the browser for binary-only packages, even though it should. This commit changes the logic: binaries will be searched when there are no libraries in the package.

A simple test case:

`Cargo.toml`:

    [package]
    name = "foo"
    version = "0.1.0"
    authors = []

`src/main.rs`:

    pub fn main() {
        println!("Hello, world!");
    }

EDIT: I should add that this should fix #1472
2015-04-18 15:20:10 +00:00
Mohd Tarmizi df56a07d8e cargo doc --open should work for binary-only packages too 2015-04-18 17:48:38 +08:00
bors 83a6d0ed82 Auto merge of #1531 - alexcrichton:cargo-version, r=brson
Closes #808
Closes #1178
2015-04-16 23:05:40 +00:00
Alex Crichton 30bc5a6517 Bump cargo to 0.2.0
Closes #808
Closes #1178
2015-04-16 15:59:14 -07:00
bors 74da5e2a5a Auto merge of #1530 - mvdnes:doctest-nativedep, r=alexcrichton
This will traverse all native dependencies and add them to the rustdoc command when running tests.

Fixes #1245
2015-04-16 17:43:48 +00:00
Mathijs van de Nes 55d7086012 Add native dependencies to doctest
This will traverse all native dependencies and add them to the rustdoc
command when running tests.

Fixes #1245
2015-04-16 17:00:39 +02:00