Commit graph

2043 commits

Author SHA1 Message Date
Alex Crichton a4c5438431 Tweak metadata to publish Cargo on crates.io
This commit tweaks some metadata here and there to publish Cargo on crates.io.

* License fields are added to Cargo.tomls
* `registry` was renamed to `crates-io`
* API docs for the `cargo` crate are now generated via `make doc`
2015-07-24 15:07:01 -07:00
bors fec382d5f2 Auto merge of #1829 - steveklabnik:doc_quickfix, r=alexcrichton 2015-07-24 17:02:37 +00:00
Steve Klabnik d7cbb94181 remove missing import from build script docs 2015-07-24 12:47:18 -04:00
bors 84ef25d5ef Auto merge of #1825 - alexcrichton:msvc-32, r=brson
These commits provide the necessary support to get cargo working in the 32-bit MSVC context. Now that we've got 32-bit MSVC nightlies rolling we can add support!
2015-07-23 06:16:34 +00:00
Alex Crichton 655bcdf527 Disable cross tests on appveyor for now 2015-07-22 23:10:25 -07:00
Alex Crichton 07cacbf86e Test 32/64 cross builds on MSVC
This commit enables Cargo's bots to test cross builds between 32 and 64 bit
hosts. Many tests were fixed to work on Windows, and the 32-bit test case now
actually crosses to 64.
2015-07-22 23:10:25 -07:00
Alex Crichton a24ca998ba Remove MSVC logic from the configure script
Cargo will soon support testing the cross compilation capabilities between 32/64
bit Windows, meaning that there's not "one true value" for any of these
environment variables that Cargo is setting (e.g. where to find `cl`, `link`,
etc). Instead, all dependencies have been updated to probe the system (in the
same manner as the compiler) for the tools that they're using.

All of the logic is housed in the `gcc` crate which now exposes a function to
probe the system for a particular tool. The updated crates here then use the
result of this probe to run the various build scripts. This all boils down to
being able to build MSVC targets inside an MSYS shell instead of requiring use
of a MSVC shell (which doesn't allow for simultaneous host builds and cross
builds).
2015-07-22 22:53:09 -07:00
Alex Crichton c814d85f39 Update the nightly of Rust to build Cargo 2015-07-22 22:53:09 -07:00
Alex Crichton 67f2a9db1f etc: Remove an unused variable binding 2015-07-22 22:53:09 -07:00
Alex Crichton 43046ec1cd etc: Don't modify the installation manifest
We're not actually using it as we're not running the installation script, so no
need to modify it.
2015-07-22 22:53:09 -07:00
Alex Crichton 8e9d5b5bd2 etc: Fix merging distributions on Windows
The rustlib folder is in `bin` on Windows, not in `lib`.
2015-07-22 22:53:09 -07:00
Alex Crichton 819af01db1 etc: Use Popen instead of call to spawn processes
I saw the usage of `call` locking up quite a bit when running this script on
Windows, and googling around on the internet seems to indicate that Popen should
be used instead of call to prevent this locking up, and it does indeed work!
2015-07-22 22:53:09 -07:00
Alex Crichton 71b522c291 Use the download module for printing snapshots
The script that prints new snapshots for Cargo now uses the same download module
as the rest of Cargo. Also adds a quiet option to suppress printing.
2015-07-22 14:33:21 -07:00
bors 5cf4a89915 Auto merge of #1822 - alexcrichton:fix-recursion, r=brson
It looks like the empty string is leaking in as a feature to all crates being
published on crates.io unintentionally. This means that each dependency edge
activates the feature `""`. This in turn confuses the resolution process quite a
bit, causing it to be far more recursive than it should be.

The empty feature, `""`, is weeded out during activation of features but it's
never explicitly activated. This means that each new dependency we see has one
requested feature (the empty one) with no activated features (as it doesn't have
any). This ends up causing us to recurse to attempt to reactivate the
dependency. This extreme recursion ended up blowing the stack on some smaller
crates and this commit fixes that.
2015-07-21 17:36:53 +00:00
Alex Crichton dffb5078f2 Weed out empty features from the registry
It looks like the empty string is leaking in as a feature to all crates being
published on crates.io unintentionally. This means that each dependency edge
activates the feature `""`. This in turn confuses the resolution process quite a
bit, causing it to be far more recursive than it should be.

The empty feature, `""`, is weeded out during activation of features but it's
never explicitly activated. This means that each new dependency we see has one
requested feature (the empty one) with no activated features (as it doesn't have
any). This ends up causing us to recurse to attempt to reactivate the
dependency. This extreme recursion ended up blowing the stack on some smaller
crates and this commit fixes that.
2015-07-21 10:35:13 -07:00
Alex Crichton 740e250c14 Touch up some stylistic nits in the resolver 2015-07-21 10:16:05 -07:00
bors 0faebf2e54 Auto merge of #1819 - alexcrichton:fix-no-pkg-config, r=alexcrichton
Contains a fix for building on systems where pkg-config isn't installed.

Closes #1727
2015-07-20 23:05:33 +00:00
Alex Crichton 67ace87f1c Update libgit2-sys
Contains a fix for building on systems where pkg-config isn't installed.

Closes #1727
2015-07-20 16:03:56 -07:00
bors 9c5ffcb871 Auto merge of #1814 - gentoo90:no-git-build, r=alexcrichton
When built from archive, downloaded from https://github.com/rust-lang/cargo/releases
 version info looks like this: `cargo 0.3.0 ( ) (built 2015-05-16)`.
Patch will make it look like this: `cargo 0.3.0 (built 2015-05-16)`
2015-07-20 04:44:34 +00:00
gentoo90 c6989822a2 Fix version info when built without git repo 2015-07-18 16:36:44 +03:00
bors a10897c20d Auto merge of #1804 - alexcrichton:aggressively-backtrack, r=brson
Resolving a dependency graph may involve quite a bit of backtracking to select
different versions of crates, but the previous implementation of resolution
would not backtrack enough.

Once a dependency is completely resolved it's possible that any number of
candidates for its transitive dependencies were left out of the resolution
process (e.g. we didn't hit them yet). These candidates were not previously used
for backtracking (because resolution overall of the dependency finished), but
this commit alters the implementation to instead consider these as candidates
for backtracking.

Architecturally this changes the code to CPS to pass around a `finished`
continuation to allow tweaking the behavior whenever a dependency successfully
resolves. The key change is then that whenever a candidate for a dependency is
activated, we ensure the recursive step for the rest of the graph happens as a
sub-call. This means that if *anything* in the recursive call fails (including
some previous up-the-stack resolution) we'll retry the next candidate.

Closes #1800
2015-07-17 20:26:42 +00:00
Alex Crichton bcdb7473de Run travis against stable/beta/nightly 2015-07-17 13:09:54 -07:00
Alex Crichton 44eb16d3b1 Backtrack more aggressively when resolving
Resolving a dependency graph may involve quite a bit of backtracking to select
different versions of crates, but the previous implementation of resolution
would not backtrack enough.

Once a dependency is completely resolved it's possible that any number of
candidates for its transitive dependencies were left out of the resolution
process (e.g. we didn't hit them yet). These candidates were not previously used
for backtracking (because resolution overall of the dependency finished), but
this commit alters the implementation to instead consider these as candidates
for backtracking.

Architecturally this changes the code to CPS to pass around a `finished`
continuation to allow tweaking the behavior whenever a dependency successfully
resolves. The key change is then that whenever a candidate for a dependency is
activated, we ensure the recursive step for the rest of the graph happens as a
sub-call. This means that if *anything* in the recursive call fails (including
some previous up-the-stack resolution) we'll retry the next candidate.

Closes #1800
2015-07-17 12:55:28 -07:00
Alex Crichton f3d6e35fbc Update Rust nightly
Looks like the new LLVM version has optimizations which help out a good deal
with the recursion faced in the resolver, so let's use that version instead!
2015-07-17 12:55:05 -07:00
Alex Crichton 4b69b3bc29 Fix running cargo test from the project root
Previously the `cit` folder was placed in the root directory but this adds logic
to ensure it stays within the `target` subdirectory.
2015-07-17 12:55:04 -07:00
bors 1923241386 Auto merge of #1812 - alexcrichton:moar-filtering, r=huonw
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 17:23:19 +00:00
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