Commit graph

2017 commits

Author SHA1 Message Date
Alex Crichton 70152d8003 Only compile activated optional dependencies
Development dependencies are traversed during the resolution process, causing
them to be returned as the list of dependencies for a package in terms of
resolution. The compilation phase would then filter these out depending on the
dependency's transitivity, but this was incorrectly accounted for when the
dependency showed up multiple times in a few lists.

This commit fixes this behavior by updating the filtering logic to ensure that
only activated optional dependencies (those whose feature names are listed) are
compiled.

Closes #1805
2015-07-17 10:05:57 -07:00
Alex Crichton 25644b7f51 Remove an unnecessary HashMap when Vec works
Dependencies aren't necessarily unique per name as the same dependency can show
up multiple times in various dependency kind lists, so it's not quite right to
use a hash map anyway.
2015-07-17 10:05:17 -07:00
bors 6919fbfb93 Auto merge of #1808 - Gankro:msg, r=alexcrichton 2015-07-17 05:53:58 +00:00
bors a5689772fa Auto merge of #1810 - alexcrichton:update-rust-installer, r=alexcrichton
Closes #1798
2015-07-17 05:36:21 +00:00
Alex Crichton a84c5b9f66 Update rust-installer submodule
Closes #1798
2015-07-16 13:21:23 -07:00
Alexis Beingessner a3a01db4f8 fix error message copy-paste error 2015-07-15 15:27:53 -07:00
bors aa6967ff46 Auto merge of #1803 - tafia:patch-1, r=alexcrichton
This is a very tiny optimization ...

An unnecessary clone was done because of matching on a tuple.
Checking items separately avoids it entirely.
2015-07-13 16:47:21 +00:00
Johann Tuffe b0f432296f avoid an unnecessary clone in without_prefix
This is a very tiny optimization ...

An unnecessary clone was done because of matching on a tuple.
Checking items separately avoids it entirely.
2015-07-13 13:23:33 +08:00
bors 15b497b10c Auto merge of #1792 - steveklabnik:gh26482, r=alexcrichton
In addition, clean up these docs a little.

Addresses part of rust-lang/rust#26482
2015-07-08 17:35:42 +00:00
Steve Klabnik bc3ccf3b07 Dont refer to NPM for semver
In addition, clean up these docs a little.

Addresses part of rust-lang/rust#26482
2015-07-08 13:16:56 -04:00
bors 5f4c188401 Auto merge of #1788 - alexcrichton:appveyor, r=brson
This commit aims to have the end goal of adding AppVeyor CI support to this
repo, and along the way it ended up meaning that the dependency installation
bits were rewritten in Python. This has a number of benefits:

* Python is more portable than shell
* Python is more readable than shell
* curl is no longer required on Windows (powershell is used for downloads)

There are also a few minor updates made as part of this commit as well:

* The README has been updated in how to build Cargo
* We now use `sudo: false` on Travis for faster builds. This is done by
  specifying packages to install instead of installing them ourselves.
* pkg-config is no longer listed as a required program
2015-07-07 22:17:05 +00:00
Alex Crichton cfb69ad256 Rewrite dependency installation in Python
This commit aims to have the end goal of adding AppVeyor CI support to this
repo, and along the way it ended up meaning that the dependency installation
bits were rewritten in Python. This has a number of benefits:

* Python is more portable than shell
* Python is more readable than shell
* curl is no longer required on Windows (powershell is used for downloads)

There are also a few minor updates made as part of this commit as well:

* The README has been updated in how to build Cargo
* We now use `sudo: false` on Travis for faster builds. This is done by
  specifying packages to install instead of installing them ourselves.
* pkg-config is no longer listed as a required program
2015-07-07 15:16:09 -07:00
bors e67c3c0601 Auto merge of #1780 - seth:sf/nested-projects-fix, r=alexcrichton
This is a fix for #1779
2015-07-07 16:20:43 +00:00
Seth Falcon 8790c820b6 Use info! instead of warn! for skipping message 2015-07-06 18:40:36 -07:00
bors 8cb1053a1f Auto merge of #1776 - alexcrichton:no-entry-found-for-key-again, r=brson
Previously a Target was not considered to be in the key of the map to build
script dependencies, but this meant that information like whether it was a
dev-dependency was lost. As a result libraries would depend on the build scripts
of their dev-dependencies, causing an internal error when the build script
hadn't finished yet when the library was being built.

Closes #1751
2015-07-07 01:36:44 +00:00
bors 90422d6a5d Auto merge of #1786 - eminence:docs, r=alexcrichton
See also https://github.com/rust-lang/cargo/issues/1614
2015-07-07 00:04:27 +00:00
Andrew Chin 09edeb8591 Updated guide.md with local config clarification
See also https://github.com/rust-lang/cargo/issues/1614
2015-07-06 14:58:13 -04:00
bors 5e1635e092 Auto merge of #1782 - Dineshs91:uninstall, r=alexcrichton
Fixes #1068.
2015-07-06 17:07:59 +00:00
Seth Falcon d33da5492d Add test for ignoring nested self packages 2015-07-05 11:34:43 -07:00
Seth Falcon 2ceb3d03c8 Remove readme note for libgit2
Indeed this seems to be handled by the build automatically.
2015-07-05 11:33:57 -07:00
dinesh ee47eda322 Add make uninstall to .travis.yml 2015-07-05 23:43:55 +05:30
bors 7d82f10b90 Auto merge of #1785 - kennytm:patch-1, r=alexcrichton 2015-07-05 18:01:28 +00:00
kennytm 088b050d1a Fix minor typo in cargo rustc --help. 2015-07-06 01:57:05 +08:00
dinesh fb66b607a8 Pass prefix and destdir 2015-07-05 23:01:23 +05:30
bors 35aa539caa Auto merge of #1783 - c4rlo:run-typos, r=alexcrichton 2015-07-05 16:53:33 +00:00
c4rlo 22c308178d cargo run: fix typos in help text 2015-07-05 11:23:36 +01:00
dinesh 828aa6d8e7 Add uninstall target 2015-07-04 13:47:28 +05:30
Seth Falcon cdbaa7493e Disallow nesting of packages with same packge_id
If a package contains a subdirectory that contains a copy of
itself (strange, but encountered in the wild in the context of an OS
package build tool), cargo was failing with a non-descriptive "An
unknown error occurred" (or "no package found in source" with
--verbose).

Since nested packages use the root path, such a package will have an
identical package_id to the root package. With this patch, we keep the
first occurance of a given package_id rather than overwritting --
effectively ignoring the nested package with duplicated name. A warn!
message is printed.
2015-07-03 15:36:25 -07:00
Seth Falcon 78088b5cac Add libgit2 to list of build deps in README 2015-07-03 15:35:33 -07:00
bors a48fe5f4c1 Auto merge of #1778 - steveklabnik:fix_css, r=alexcrichton
https://twitter.com/steveklabnik/status/617031020429373440
2015-07-03 18:50:01 +00:00
Steve Klabnik cab644a7ba Fix double scrollbar issue
https://twitter.com/steveklabnik/status/617031020429373440
2015-07-03 14:18:46 -04:00
bors e4fcf443c7 Auto merge of #1762 - Dineshs91:manifest, r=alexcrichton
Fixes #1580. I am a bit skeptical with the use of unwrap( ) though. Suggestion's on how to replace that would be great.

r? @alexcrichton
2015-07-03 00:20:26 +00:00
dinesh 06b72059d0 Check for empty target names 2015-07-02 22:30:55 +05:30
dinesh 9c8f5fffd0 Add tests for all targets without names 2015-07-02 22:30:55 +05:30
dinesh beba5a8954 Create a method called name on TomlTarget 2015-07-02 22:30:55 +05:30
dinesh 9a49913526 Make lib name optional 2015-07-02 22:30:54 +05:30
Alex Crichton 8ee373ad4a Add a Target to the build script deps key
Previously a Target was not considered to be in the key of the map to build
script dependencies, but this meant that information like whether it was a
dev-dependency was lost. As a result libraries would depend on the build scripts
of their dev-dependencies, causing an internal error when the build script
hadn't finished yet when the library was being built.

Closes #1751
2015-07-01 10:37:21 -07:00
bors b48cd463a0 Auto merge of #1748 - pwoolcoc:feature/quiet-mode, r=alexcrichton
New version of #738, adds `-q` and `--quiet` to all `cargo` subcommands.

cc @sinistersnare (sorry it took me 1.5 months to circle back around to this)
2015-07-01 17:18:25 +00:00
bors c8c6e5750e Auto merge of #1775 - alexcrichton:update-cargo-lock, r=alexcrichton 2015-07-01 16:59:23 +00:00
Alex Crichton 4c796a1dae Update Cargo.lock for updated version 2015-07-01 09:57:57 -07:00
Paul Woolcock 88e557fbdc Closes #653
Adds a `-q|--quiet` option to all cargo commands that suppresses output from
cargo. In the case of `cargo run`, output from the project executable will
still be shown.
2015-07-01 07:27:01 -04:00
bors 89435c48f9 Auto merge of #1770 - alexcrichton:shell, r=alexcrichton
Tweaked version of https://github.com/rust-lang/cargo/pull/1673.
2015-07-01 00:41:14 +00:00
Alex Crichton ea41f5c7fc Tweak escaping on Windows shells
Also detect if we're on Windows whether we're an MSYS or cmd.exe shell at
runtime
2015-06-30 17:38:30 -07:00
bors 4e5fdcd657 Auto merge of #1760 - jdub:cc-to-gcc, r=alexcrichton 2015-06-29 17:24:44 +00:00
Alex Crichton 8b378da13a Don't conditionally compile escaping strategies
Compile them both in and select at runtime.
2015-06-29 09:22:49 -07:00
Alex Crichton f9b18f7f05 Merge branch 'shell-escape' of https://github.com/bluss/cargo into shell 2015-06-29 09:19:56 -07:00
Jeff Waugh 64049b2d7c Use gcc crate in native build script example 2015-06-29 16:19:17 +10:00
bors 339a103fa7 Auto merge of #1761 - jdub:1684-target-examples, r=alexcrichton
Fixes rust-lang/cargo#1684
2015-06-29 05:40:06 +00:00
Jeff Waugh 5bbabe0555 Add path and target file dependency examples
Fixes rust-lang/cargo#1684
2015-06-29 11:16:59 +10:00
bors d1517c8582 Auto merge of #1765 - gentoo90:bash-comp, r=alexcrichton 2015-06-28 19:56:26 +00:00