Commit graph

1877 commits

Author SHA1 Message Date
Lee Jeffery 10ac930fdd Added some checks for empty package and target names. 2015-05-17 13:03:23 +01:00
Lee Jeffery ec0ac6f9e6 Fix doc --open crate name. 2015-05-17 09:21:50 +01:00
Stephen Becker IV 649625d707 Update error message with more details.
This resolves #1379.
2015-05-16 12:39:48 -07:00
Alex Crichton bcc6c5c3a9 Use the right Kind when calculating compiled libraries
The wrong kind was mistakenly used in the case of having a dependency on a
plugin.
2015-05-16 10:34:10 -07:00
bors a48358155c Auto merge of #1611 - IvanUkhov:missing-bracket, r=alexcrichton 2015-05-14 20:34:00 +00:00
Ivan Ukhov 3502167ec4 Add a missing square bracket 2015-05-14 15:32:31 -04:00
bors d814fcbf8e Auto merge of #1604 - alexcrichton:update, r=alexcrichton
There was a lifetime parameter regression in git2-rs which prevented Cargo from
building on nightly
2015-05-13 04:24:28 +00:00
Alex Crichton d46aec562d Update Cargo to rust master
There was a lifetime parameter regression in git2-rs which prevented Cargo from
building on nightly
2015-05-12 21:22:14 -07:00
bors a078e01ffa Auto merge of #1598 - critiqjo:bash-complete, r=alexcrichton
Fixes #1548
@gentoo90 is it possible to handle long-opts such as `--url=` nicely?
@jeffs please test this out in OS X default bash version...
2015-05-11 18:01:02 +00:00
critiqjo e1dcd83148 Bash completion: bash 3 compatibility 2015-05-10 16:37:50 +05:30
bors 0d75eb6c8a Auto merge of #1568 - sondrele:rustc-subcommand, r=alexcrichton
## Work in progress
I have followed issue #595 for a while now. I hope that this PR can solve it, after it's done of course.

@alexcrichton: on IRC the other day, you suggested adding a `Vec<String>` to the `CompileOptions`. I have done this, but wasn't sure what the best way to identify the correct `Target` would be, so currently everything gets compiled with the additional arguments. 
I considered adding a `Target` structure to the `CompileOptions` as well, and then in `cargo_rustc::build_base_args` only append the arguments if the `Target` matches. What do you think about this? Is there an easier way of figuring out the correct `Target`?

r? @alexcrichton
2015-05-07 19:18:10 +00:00
bors 1ec2257b67 Auto merge of #1590 - alexcrichton:issue-1589, r=brson
Knowing the target architecture for calculating the filename is needed when
calculating the name of a dynamic library, and previously this was only taken
into account when a target was a plugin. Targets can, however, request that they
are built as a dynamic library which also needs to be taken into account.

Closes #1589
2015-05-07 18:39:48 +00:00
Alex Crichton c54c6a9df4 Add a Kind argument to target_filenames
Knowing the target architecture for calculating the filename is needed when
calculating the name of a dynamic library, and previously this was only taken
into account when a target was a plugin. Targets can, however, request that they
are built as a dynamic library which also needs to be taken into account.

Closes #1589
2015-05-06 19:29:05 -07:00
bors ece2a9235f Auto merge of #1586 - gentoo90:bash-comp, r=wycats
Fix inability to complete more than one option of a command.
Add missing options.
2015-05-06 16:54:57 +00:00
gentoo90 174aa2e61d Bash-completion minor improvements
Fix inability to complete more than one option of a command.
Add missing options.
2015-05-06 15:37:35 +03:00
Sondre Lefsaker 2cd3c86276 Suggest adding flags to filter the package in the error message 2015-05-06 12:08:43 +02:00
Sondre Lefsaker 98c0e2d83d Cleanup:
- Dereference arguments before matching
- use square brackets for vec! macro
2015-05-06 10:34:37 +02:00
Sondre Lefsaker dc33bfaa82 Update subcommand documentation 2015-05-06 10:29:59 +02:00
bors 30bc735921 Auto merge of #1585 - tshepang:typos, r=alexcrichton 2015-05-06 00:11:54 +00:00
Tshepang Lekhonkhobe 74076d2a04 fix typos caught by codespell 2015-05-06 02:05:41 +02:00
bors aa8ee2dfcc Auto merge of #1584 - alexcrichton:issue-797, r=brson
Closes #797
Closes #1575 

This is a reopening of #1170 but I see the two closed issues as important enough that this needs to land in some form or another, and I'm more comfortable with always taking into account untracked files than only if there isn't a commit yet.
2015-05-05 23:28:56 +00:00
Alex Crichton a8e9ce22c1 Scan untracked files in git for packaging/deps
Closes #797
Closes #1575
2015-05-05 15:58:00 -07:00
bors 9cd0d3570a Auto merge of #1577 - alexcrichton:issue-1567, r=brson
Previously if a package had been activated without the default feature and then
it was attempted to be reactivated with the default feature, resolution wouldn't
continue and actually activate the default feature. This means that the
fingerprint on the other end of compilation would be slightly different because
the set of activated features would be slightly different, causing spurious
recompiles.

Closes #1567
2015-05-05 17:42:08 +00:00
bors 83fd8aab38 Auto merge of #1576 - takkanm:add_search_to_help, r=alexcrichton
There was no "Search" to help message.
2015-05-05 16:50:19 +00:00
Alex Crichton 40d1c10a83 Check default features when skipping resolution of a package
Previously if a package had been activated without the default feature and then
it was attempted to be reactivated with the default feature, resolution wouldn't
continue and actually activate the default feature. This means that the
fingerprint on the other end of compilation would be slightly different because
the set of activated features would be slightly different, causing spurious
recompiles.

Closes #1567
2015-05-04 23:17:17 -07:00
Mitsutaka Mimura ae783c6c69 change search help to better message 2015-05-05 11:13:04 +09:00
Mitsutaka Mimura 4ebe44aef5 add search to help 2015-05-05 10:59:05 +09:00
bors 7f810ba5ef Auto merge of #1574 - alexcrichton:rustup, r=alexcrichton 2015-05-03 19:43:40 +00:00
Alex Crichton 9c445b9294 Update to rust master, picking up metadata mtime changes
This commit adds a new `MTime` structure specifically for dealing with
modification times across platforms.
2015-05-03 12:41:04 -07:00
Sondre Lefsaker c867813646 Add more tests:
- `build_with_args_to_one_of_multiple_binaries`, verify that only one bin gets built
- `fails_with_args_to_all_binaries`
- `build_with_args_to_one_of_multiple_tests`, same behavious as for the binaries
- `build_foo_with_bar_dependency`, verify that bar dependency gets built and only foo gets compiled with args
- `build_only_bar_dependency`, build the bar package, that foo depends, on with the extra args
2015-05-03 01:16:20 +02:00
Sondre Lefsaker bd4d15fe1e Cleanup tests - favor more explicit expected result instead of using helper functions 2015-05-03 00:49:58 +02:00
Sondre Lefsaker d8cd6f060b Modify test to build main like before, but lib also gets built as a dependency.
- The test verifies that the trailing arguments only gets passed to the binary being built
2015-05-02 18:18:05 +02:00
Sondre Lefsaker 582e9d94a8 Remove the arguments from BuildConfig and append them to the profile that's being compiled instead.
- An error will be returned if the length of `targets` is not 1
- The profile of `targets` gets cloned in order to append the extra arguments.
- The new test verifies that the build fails due to both `lib` and `main` being compiled
2015-05-02 17:43:11 +02:00
Sondre Lefsaker 53453c8e8d Add new field rustc_args to the Profile
- This field will be set by the `cargo rustc` command, only if one target is being compiled
- The field can not be read from the Cargo.toml
2015-05-02 16:29:28 +02:00
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