Commit graph

524 commits

Author SHA1 Message Date
Ed Page 077b1bc311 chore: Mark unpublished crates as such
This is a follow up to #12039.
This makes it easier for tools to report less irrelevant information.

I did both `publish = false` and `version = "0.0.0"` to help draw
attention to the fact that these crates are internal (inspired by a
matklad post).

I left `cargo-test-macro` and `cargo-test-support` in for my own
personal bias of one day wanting to see those crates published...

The only one removed that had previously been published was `mdman` but
seeing as that was a `0.0.0`, I'm assuming that was a mistake or just
reserving the name.

Before:
```console
$ cargo unpublished
name published current
==== ========= =======
cargo-platform 0.1.2 0.1.3
cargo-test-macro - 0.1.0
cargo-test-support - 0.1.0
cargo-util 0.2.3 0.2.4
crates-io 0.36.0 0.36.1
mdman 0.0.0 0.1.0
resolver-tests - 0.1.0
cargo 0.70.1 0.72.0
semver-check - 0.1.0
cargo-credential 0.1.0 0.2.0
cargo-credential-1password 0.1.0 0.2.0
cargo-credential-gnome-secret 0.1.0 0.2.0
cargo-credential-macos-keychain 0.1.0 0.2.0
cargo-credential-wincred 0.1.0 0.2.0
benchsuite - 0.1.0
```

After:
```console
name published current
==== ========= =======
cargo-platform 0.1.2 0.1.3
cargo-test-macro - 0.1.0
cargo-test-support - 0.1.0
cargo-util 0.2.3 0.2.4
crates-io 0.36.0 0.36.1
cargo 0.70.1 0.72.0
cargo-credential 0.1.0 0.2.0
cargo-credential-1password 0.1.0 0.2.0
cargo-credential-gnome-secret 0.1.0 0.2.0
cargo-credential-macos-keychain 0.1.0 0.2.0
cargo-credential-wincred 0.1.0 0.2.0
```
2023-04-26 17:51:16 -05:00
bors 8bcf8fe770 Auto merge of #12039 - epage:xtask, r=weihanglo
chore(xtask): Add `cargo xtask unpublished`

### What does this PR try to resolve?

This tries to make it easy to see what existing versions have not been published.  A future version of this could post to a PR what the current delta in version numbers for touched crates so reviewer have more context when deciding if they should ask for a crate version to be bumped
```console
$ cargo unpublished
    Finished dev [unoptimized + debuginfo] target(s) in 0.12s
     Running `/home/epage/src/personal/cargo/target/debug/xtask unpublished`
    Updating crates.io index
name published current
==== ========= =======
cargo-test-macro - 0.1.0
cargo-test-support - 0.1.0
cargo-util 0.2.3 0.2.4
mdman 0.0.0 0.1.0
resolver-tests - 0.1.0
cargo 0.70.0 0.71.0
cargo-credential 0.1.0 0.2.0
cargo-credential-1password 0.1.0 0.2.0
cargo-credential-gnome-secret 0.1.0 0.2.0
cargo-credential-macos-keychain 0.1.0 0.2.0
cargo-credential-wincred 0.1.0 0.2.0
benchsuite - 0.1.0
```

Room for improvement
- Aligning the start of each column
- Filtering the list by a commit range
- Adding this to an action to post to a review
- Maybe sorting the output
- Marking some our crates as `package.publish = false`, like benchsuite and resolver-tests

### How should we test and review this PR?

This is broken down commit by commit for easier seeing of the building blocks for our first xtask
2023-04-26 23:09:59 +00:00
Ed Page 5b13963044 perf(xtask): Split xtask binaries
This will allow running an xtask without requiring building the world.
In most cases, a user will already have been building cargo but not in
CI.

The packages keep an `xtask-` prefix to help raise awareness of them but
exposed as `cargo <suffix>` to avoid having a direction proxy to wrap
`cargo run -p xtask-<suffix>` as `cargo xtask <suffix>`.
2023-04-26 11:18:51 -05:00
Eric Huss a4f01c0352 Update home dependency 2023-04-25 11:38:52 -07:00
Ed Page c6f8ee9e51 feat(xtask): First pass at 'cargo xtask unpublished' 2023-04-25 03:06:46 -05:00
Ed Page 0b20bd99e3 chore(xtask): Add core cargo flags 2023-04-25 02:33:47 -05:00
Ed Page a675e047e7 chore(xtask): Add xtask skeleton 2023-04-25 02:13:56 -05:00
bors a4a8bd1742 Auto merge of #12021 - ehuss:update-windows-sys, r=weihanglo
Update windows-sys

This updates the windows-sys dependency from 0.45 to 0.48. This shouldn't add or remove any duplicate dependencies (since there are other dependencies still using 0.45 and 0.42). The intent is to move it along the direction towards unifying in the future (though it seems like a moving target that will be difficult to ever hit).

This also bumps the home crate version. I think it should be OK to make the migration from winapi to windows-sys a patch version, though there seems to be some issues with the way windows-sys works that could introduce some build-time problems in some situations (such as those encountered in https://github.com/rust-lang/rust/pull/108665 and https://github.com/rust-lang/rust/pull/106610). However, I don't expect too much of an issue.
2023-04-24 11:50:26 +00:00
bors c5bee5d902 Auto merge of #12014 - ecnelises:bump_libc_142, r=weihanglo
Bump libc to 0.2.142

libc 0.2.141 cannot build successfully on AIX. (CI on AIX is not available yet)

Upgrade libc to 0.2.142 to make cargo build on AIX.
2023-04-24 11:01:59 +00:00
bors 65a135fc91 Auto merge of #12005 - loongarch-rs:update-openssl-src, r=weihanglo
Update openssl-src to 111.25.3+1.1.1t

### What does this PR try to resolve?

Support for LoongArch has been added to the `openssl-src` start from `v111.25.3`. Therefore, we have updated the version to include this support.

Thanks
2023-04-24 10:09:12 +00:00
Eric Huss eea69e549f Bump versions of local crates 2023-04-23 13:01:29 -07:00
Eric Huss ac25009500 Update windows-sys 2023-04-23 12:40:00 -07:00
bors de80432f04 Auto merge of #12012 - weihanglo:version-bump, r=epage
Bump to 0.72.0; update changelog

[rendered](https://github.com/weihanglo/cargo/blob/version-bump/CHANGELOG.md)
2023-04-21 13:18:32 +00:00
Qiu Chaofan b1290767ac Bump libc to 0.2.142 2023-04-21 18:01:52 +08:00
Weihang Lo ff216ebc96
chore: make server-check a workspace member 2023-04-21 10:58:45 +01:00
WANG Rui 860b64a846 Update openssl-src to 111.25.3+1.1.1t
Adds support for LoongArch.
2023-04-21 12:59:57 +08:00
QiangHeisenberg 9ba0d4439b output use line wrap 2023-04-21 11:25:09 +08:00
Weihang Lo caf0c82b4c
Bump to 0.72.0 2023-04-21 01:12:56 +01:00
WANG Rui d54cc301eb Update linux-raw-sys to 0.3.2
Adds support for LoongArch.
2023-04-19 10:31:23 +08:00
Weihang Lo aaca5a0a56
chore: remove dependency rustc-workspace-hack
Co-authored-by: Scott Schafer <schaferjscott@gmail.com>
Co-authored-by: Eric Huss <eric@huss.org>
2023-04-12 11:32:58 +01:00
Weihang Lo 0289f2b8d5
chore: track Cargo.lock
Co-authored-by: Scott Schafer <schaferjscott@gmail.com>
Co-authored-by: Eric Huss <eric@huss.org>
2023-04-12 11:32:24 +01:00
Alex Crichton 5c9665f41c Delete Cargo.lock from this repo
There's now a lock file upstream in rust-lang/rust so the one here isn't
actually used, and otherwise this crate is used as a dependency so the lock file
isn't respected anyway!
2017-10-18 07:43:15 -07:00
Alex Crichton 9b8efd18e9 Bump to 0.24.0
It's that time of the year again!
2017-10-15 08:30:11 -07:00
Dirkjan Ochtman 7097174a91 Update dependencies (unbreak macOS 10.13 with libgit2-sys-0.6.16) 2017-10-04 21:37:55 +02:00
Simon Sapin f38c53f5c3 Make manifest serialization deterministic
Fixes #4326

`cargo package` (and so `cargo publish`) parses a crate’s `Cargo.toml`,
makes some modifications, and re-serializes it.
Because the `TomlManifest` struct uses `HashMap`
with its default `RandomState` hasher,
the maps’ iteration order changed on every run.

As a result, when using `cargo vendor`,
updating a dependency would generate a diff larger than necessary,
with non-significant order-changes obscuring significant changes.

This replaces some uses of `HashMap` with `BTreeMap`,
whose iteration order is deterministic (based on `Ord`).
2017-10-02 12:09:54 +02:00
Dirkjan Ochtman ab724fc513 Update dependencies
It would be nice to use openssl-0.9.19 in particular, since it supports
newer LibreSSL.
2017-09-23 09:57:34 +02:00
Alex Crichton 4c077033dd Update dependencies
Just a usual `cargo update` plus moving over some major versions
2017-09-05 15:29:07 -07:00
Alex Crichton 1e54d9efa3 Bump Cargo to 0.23.0 2017-08-28 07:45:43 -07:00
Tatsuyuki Ishi 72de74c9eb cargotest: purge deps 2017-08-24 13:00:04 +09:00
bors 8720d63bc1 Auto merge of #4390 - alexcrichton:read-hard-links, r=matklad
Use `same-file` to avoid unnecessary hard links

This is targeted at removing the need for a workaround in rust-lang/rust#39518,
allowing the main rust build system to move back to hard links which should be
much more efficient.
2017-08-10 09:04:21 +00:00
Kornel 8e0a7caddf Exclude target directory from Time Machine
Temporary/derived files outside dedicated system directories should be explicitly excluded from backups to prevent undesirable bloat and churn.
2017-08-10 01:42:32 +01:00
Alex Crichton 599db09980 Use same-file to avoid unnecessary hard links
This is targeted at removing the need for a workaround in rust-lang/rust#39518,
allowing the main rust build system to move back to hard links which should be
much more efficient.
2017-08-09 17:22:34 -07:00
Guillaume Gomez 638ac11171 Update error-chain dep for crates-io as well 2017-07-28 23:37:54 +02:00
Guillaume Gomez 6f23ce5cc2 Update to rc error chain 2017-07-28 21:12:05 +02:00
Alex Crichton e8a7132805 Bump to 0.22.0 and update deps 2017-07-20 08:35:07 -07:00
Brian Anderson fdb9f1bd1d Replace homedir definition with home crate 2017-07-18 17:25:31 -07:00
Behnam Esfahbod c072ba4242 [sources/path] Add gitignore-like pattern matching and warn on mismatches
Add gitignore-like pattern matching logic to `list_files()` and throw
warnings for paths getting different inclusion/exclusion results from
the old and the new methods.

Migration Tracking: <https://github.com/rust-lang/cargo/issues/4268>
2017-07-18 00:14:14 -06:00
Alex Crichton f429be4f4c Don't set MAKEFLAGS for build scripts
Closes #4156
Closes rust-lang/rust#42635
2017-07-12 14:15:56 -07:00
Alex Crichton f490635e0f Update dependencies with semver-compat version
Just a standard update
2017-07-07 14:01:40 -07:00
Alex Crichton 9cd803bfe0 Update wincolor
Helps mitigate #4189
2017-06-19 10:42:58 -07:00
Alex Crichton 9629f99dd0 Use the atty crate for TTY detection
This is more robust in the face of msys terminals and otherwise helps share more
dependencies!

Closes #4166
2017-06-15 08:08:35 -07:00
Alex Crichton f8fb0a0228 Migrate from the term crate to termcolor
The API of `termcolor` fits what the system gives us much more nicely and should
be well battle-tested from ripgrep. Additionally we don't really need huge
terminfo parsers, that wasn't every really the intention of the color support
here.
2017-06-13 14:28:37 -07:00
bors 45148e0efd Auto merge of #4149 - ordian:master, r=alexcrichton
Drop rustc-serialize dependency

Fixes #3944.
2017-06-13 19:53:41 +00:00
Alex Crichton 63ea2d319b Update dependencies
Brings in a few fixes for Windows-related dependencies
2017-06-13 10:39:01 -07:00
Andronik Ordian 10373f4039 Drop rustc-serialize dependency 2017-06-09 00:56:48 +03:00
Alex Crichton 90299a66f2 Bump to 0.21.0
We're working on the next version now!
2017-06-08 09:08:01 -07:00
Marc-Antoine Perennou f407bc838f update git2
Fixes build with libressl

Signed-off-by: Marc-Antoine Perennou <Marc-Antoine@Perennou.com>
2017-06-07 21:35:27 +02:00
Marco A L Barbosa 728694abf0 Bump jobserver to 0.1.4 2017-06-05 14:15:40 -03:00
Alex Crichton 74777c1274 Remove more allocatoins in index querying
Removing some allocations arounds the stored hashes by having nested hash maps
instead of tuple keys. Also remove an intermediate array when parsing
dependencies through a custom implementation of `Deserialize`. While this
doesn't make this code path blazingly fast it definitely knocks it down in the
profiles below other higher-value targets.
2017-06-05 07:36:44 -07:00
Alex Crichton 48446574a6 Optimize resolution by removing allocations
This commit is a relatively serious optimization pass of the resolution phase in
Cargo, targeted at removing as many allocations as possible from this phase.
Executed as an iterative loop this phase of Cargo can often be costly for large
graphs but it's run on every single build!

The main optimization here is to avoid cloning the context and/or pushing a
backtracking frame if there are no candidates left in the current list of
candidates. That optimizes a fast-path for crates with lock files (almost all of
them) and gets us to the point where cloning the context basically disappears
from all profiling.
2017-06-05 07:36:44 -07:00
bors 8fb6e7c157 Auto merge of #4110 - alexcrichton:jobserver, r=matklad
Add a GNU make jobserver implementation to Cargo

This commit adds a GNU make jobserver implementation to Cargo, both as a client
of existing jobservers and also a creator of new jobservers. The jobserver is
actually just an IPC semaphore which manifests itself as a pipe with N bytes
of tokens on Unix and a literal IPC semaphore on Windows. The rough protocol
is then if you want to run a job you read acquire the semaphore (read a byte on
Unix or wait on the semaphore on Windows) and then you release it when you're
done.

All the hairy details of the jobserver implementation are housed in the
`jobserver` crate on crates.io instead of Cargo. This should hopefully make it
much easier for the compiler to also share a jobserver implementation
eventually.

The main tricky bit here is that on Unix and Windows acquiring a jobserver token
will block the calling thread. We need to either way for a running job to exit
or to acquire a new token when we want to spawn a new job. To handle this the
current implementation spawns a helper thread that does the blocking and sends a
message back to Cargo when it receives a token. It's a little trickier with
shutting down this thread gracefully as well but more details can be found in
the `jobserver` crate.

Unfortunately crates are unlikely to see an immediate benefit of this once
implemented. Most crates are run with a manual `make -jN` and this overrides the
jobserver in the environment, creating a new jobserver in the sub-make. If the
`-jN` argument is removed, however, then `make` will share Cargo's jobserver and
properly limit parallelism.

Closes #1744
2017-06-02 22:53:36 +00:00
Alex Crichton cbf25a9b0a Add a GNU make jobserver implementation to Cargo
This commit adds a GNU make jobserver implementation to Cargo, both as a client
of existing jobservers and also a creator of new jobservers. The jobserver is
actually just an IPC semaphore which manifests itself as a pipe with N bytes
of tokens on Unix and a literal IPC semaphore on Windows. The rough protocol
is then if you want to run a job you read acquire the semaphore (read a byte on
Unix or wait on the semaphore on Windows) and then you release it when you're
done.

All the hairy details of the jobserver implementation are housed in the
`jobserver` crate on crates.io instead of Cargo. This should hopefully make it
much easier for the compiler to also share a jobserver implementation
eventually.

The main tricky bit here is that on Unix and Windows acquiring a jobserver token
will block the calling thread. We need to either way for a running job to exit
or to acquire a new token when we want to spawn a new job. To handle this the
current implementation spawns a helper thread that does the blocking and sends a
message back to Cargo when it receives a token. It's a little trickier with
shutting down this thread gracefully as well but more details can be found in
the `jobserver` crate.

Unfortunately crates are unlikely to see an immediate benefit of this once
implemented. Most crates are run with a manual `make -jN` and this overrides the
jobserver in the environment, creating a new jobserver in the sub-make. If the
`-jN` argument is removed, however, then `make` will share Cargo's jobserver and
properly limit parallelism.

Closes #1744
2017-06-02 08:06:30 -07:00
Brian Anderson a7cbd5eba1 Update gcc crate for MSVC 2017 2017-06-01 21:01:17 +00:00
jluner 7f6dbc14da Resolve upstream updates to referenced crates 2017-05-27 23:50:55 -05:00
Alex Crichton 0ceab8e3c1 Update a slew of dependencies and such
Standard bug fixes and otherwise keeping up to date
2017-05-27 17:21:42 -07:00
jluner d121e05966 Update gcc dependency to match updated gcc elsewhere in cargo 2017-05-27 02:37:10 -05:00
jluner 6e9161b38e Merge remote-tracking branch 'upstream/master' 2017-05-27 02:29:15 -05:00
Brian Anderson 2377bfd69e Update lockfile for gcc and cmake crates to pick up MSVC 2017 fixes 2017-05-26 10:14:12 -07:00
jluner e95044e313 Add error-chain errors
Convert CargoResult, CargoError into an implementation provided by error-chain. The previous is_human machinery is mostly removed; now errors are displayed unless of the Internal kind, verbose mode will print all errors.
2017-05-24 21:14:04 -05:00
Alex Crichton 852968e679 Remove chrono as a dependency
Turns out we don't use it!
2017-05-18 09:02:40 -07:00
Alex Crichton 77b761260b Update libssh2-sys
It now has an updated initialization routine to hopefully get ssh working on
Windows, with a fix for alexcrichton/git2-rs#202
2017-05-08 09:15:41 -07:00
Marc-Antoine Perennou f8d2883618 update libgit2-sys for libressl compat
Signed-off-by: Marc-Antoine Perennou <Marc-Antoine@Perennou.com>
2017-04-30 08:08:23 +02:00
Alex Crichton 2dd168c14e Bump to 0.20.0 2017-04-27 20:11:52 -07:00
Alex Crichton 0b59f17d63 Update dependencies Cargo uses
Namely update to serde 1.0.0!
2017-04-27 12:06:34 -07:00
Marco A L Barbosa f125e4d7c5 Bump time (0.1.37) and libc (0.2.22) 2017-04-27 11:46:45 -03:00
Jessica Hamilton f463e3c747 Update num_cpus to 1.4.0 (adds support for Haiku) 2017-04-26 15:29:44 +12:00
Alex Crichton f881e863b1 Update dependencies in Cargo.lock 2017-04-24 07:32:53 -07:00
Marco A L Barbosa d5da19129b Update openssl-probe to 0.1.1 2017-04-12 16:50:30 -03:00
Alex Crichton 21dea9cacc Update toml to fix a regression in backcompat
Related to rust-lang/rust#40956
2017-03-31 18:45:55 -07:00
Ewan Higgs b998130435 Cleanup of template patch reversion. 2017-03-29 22:23:46 +02:00
Ewan Higgs 7e66058af4 Revert "Cargo templating for new and init"
This reverts commit 875a8aba79.
2017-03-29 21:57:33 +02:00
Ewan Higgs d869179c48 Revert "Upgrade handlebars to 0.25."
This reverts commit 0aad658f09.
2017-03-29 21:54:39 +02:00
Ewan Higgs 82830c77bd Revert "Use time crate directly to get the year"
This reverts commit 47221e9818.
2017-03-29 21:51:50 +02:00
Ewan Higgs 2c8f94288d Revert "Add year to project template variables"
This reverts commit 69ffd99f42.
2017-03-29 21:50:53 +02:00
Alex Crichton d6f088a028 Bump to 0.19.0 2017-03-16 14:03:30 -07:00
bors 3bc886585d Auto merge of #3795 - jryans:template-year, r=alexcrichton
Add year to project template variables

This adds the current year as a `year` variable for project templates. Some license files / headers include the year, so this should make it easier to include those in a template.
2017-03-06 20:42:29 +00:00
J. Ryan Stinnett 47221e9818 Use time crate directly to get the year 2017-03-06 11:41:19 -06:00
J. Ryan Stinnett 69ffd99f42 Add year to project template variables 2017-03-03 12:49:44 -06:00
Ning Sun 72d0a72d64
Use serde type system for handlebars
This will help cargo to drop rustc_serialize as dependency
2017-03-03 17:25:06 +08:00
Alex Crichton 923f21c32e Add an option to ignore SSL revocation checking
This is apparently required in some Windows setups to get past SSL context
creation in schannel.
2017-02-22 12:31:47 -08:00
Alex Crichton a5a298f1fd Migrate from rustc-serialize to Serde
This commit migrates Cargo as much as possible from rustc-serialize to
Serde. This not only provides an excellent testing ground for the toml
0.3 release but it also is a big boost to the speed of parsing the JSON
bits of the registry.

This doesn't completely excise the dependency just yet as docopt still
requires it along with handlebars. I'm sure though that in time those
crates will migrate to serde!
2017-02-22 10:29:40 -08:00
bors 453b888309 Auto merge of #3719 - alexcrichton:curl-sys, r=alexcrichton
Update libz-sys

Try to fix AppVeyor CI
2017-02-16 17:36:26 +00:00
Alex Crichton 1dba9224d3 Update libz-sys to fix AppVeyor CI
Needs a fix for msys instead of Windows paths
2017-02-16 09:35:35 -08:00
Alex Crichton db892466b9 Update libgit2
Pull in a fix for #3610
2017-02-15 14:46:46 -08:00
Alex Crichton a2c82595e9 Update dependencies
Another major version of Cargo, another suite of updated dependencies!
2017-02-07 09:43:15 -08:00
Marc-Antoine Perennou 3de59d6586 ensure libressl compatibility
Update libgit2-sys, openssl-sys and openssl
as the versions currently in Cargo.lock are
not compatible with libressl.
Also update tests accordingly

Signed-off-by: Marc-Antoine Perennou <Marc-Antoine@Perennou.com>
2017-02-03 16:41:01 +01:00
bors c0650fb9fe Auto merge of #3635 - alexcrichton:bump, r=alexcrichton
Bump to 0.18.0
2017-02-03 05:58:33 +00:00
Alex Crichton d53ab1d8e3 Bump to 0.18.0 2017-02-02 11:30:37 -08:00
Steve Klabnik 090d48b39d bump semver version 2017-02-02 13:52:09 -05:00
Ewan Higgs 0aad658f09 Upgrade handlebars to 0.25. 2017-01-31 10:23:44 +01:00
Ewan Higgs 875a8aba79 Cargo templating for new and init
PR #3004 This is a resubmission of the PR #1747 (from scratch) which adds
support for templating in Cargo. The templates are implemented using the
handlebars crate (where the original PR used mustache).

Examples:
cargo new --template https://url/to/template somedir foo
cargo new --template https://url/to/templates --template-subdir somedir foo
cargo new --template ../path/to/template somedir foo
2017-01-31 10:23:42 +01:00
Steven Fackler fee22860aa Update shell-escape 2017-01-04 22:06:11 -08:00
Steven Fackler d105e75271 Use externally sourced shell-escape
Closes #3374
2016-12-30 10:21:10 -08:00
bors c96d76036d Auto merge of #3435 - alexcrichton:bump-libssh2, r=brson
Update libssh2 to fix a segfault on Windows

There's some more discussion on #3401, but this essentially is just an inclusion
of libssh2/libssh2#163

Closes #3401
2016-12-29 08:49:03 +00:00
Alex Crichton 5f4b9f27d0 Bump crates-io to 0.6.0 2016-12-25 08:02:35 -08:00
Alex Crichton b287b51a7b Update libssh2 to fix a segfault on Windows
There's some more discussion on #3401, but this essentially is just an inclusion
of libssh2/libssh2#163

Closes #3401
2016-12-20 14:40:11 -08:00
Alex Crichton 9c0be483f6 Bump to 0.17.0 2016-12-19 16:28:47 -08:00
Alex Crichton 34b44cec74 Bump libz-sys to 1.0.9
This just switches libz to always link statically instead of relying on the
system zlib. For MinGW it seems that linkage may default pull in a DLL, which is
almost never what we want.

Also update curl-sys to fix a build issue on MinGW.

Closes #3384
2016-12-14 17:27:55 -08:00
Alex Crichton db60e6ccdb Compile statically against the MSVC CRT
This updates our AppVeyor builds to compile with `-Ctarget-feature=+crt-static`
to help Cargo be a bit more portable and not rely on the MSVC redistributable
artifacts. Over time this may even let us converge on only releasing one build
of Cargo and just pairing that with all Windows toolchains...
2016-12-13 13:45:04 -08:00
Alex Crichton 52fa74113a Bump git2 dep to fix SSL paths
This commit includes alexcrichton/git2-rs@a8f4a7faa which switches the order of
initialization of libgit2. That commit ensures that the relevant env vars which
a statically linked OpenSSL needs to function are set before libgit2 is
initialized to ensure that libgit2 uses them.

This was regressed accidentally in alexcrichton/git2-rs@071902aa when
initialization was tweaked.

Closes #3340
2016-11-28 15:48:10 -08:00
Alex Crichton 61b19feb4a Update git2 fixing initialization races
This updates libgit2/libssh2 bindings to fix initialization races in
OpenSSL. This should fix some of the spurious segfaults we've been
seeing on Travis OSX.
2016-11-26 09:11:08 -08:00
Tobias Bucher b08de74b4d Bump git2 dependency to fix #3312 2016-11-25 00:13:57 +01:00
Alex Crichton 8dc8c08624 Bump to 0.16.0 2016-11-16 16:05:31 -08:00
Alex Crichton 15acaa9c31 More updates for OpenSSL 1.1.0 2016-11-14 13:55:11 -08:00
Josh Stone 0af16532b2 Update dependencies for OpenSSL 1.1.0 compatibility
The primary targets here are openssl and openssl-sys crates 0.9,
bringing support for OpenSSL 1.1.0.  This requires updating the curl
and git2 related dependencies as well.

A small change is required in cargo itself for the new Hasher API.
Results from the hasher are simply unwrapped for now, matching the
Windows behavior that already panics on error.
2016-11-11 11:06:07 -08:00
Alex Crichton 61860021c3 Bump to 0.15.0 2016-11-10 12:17:45 -08:00
Alex Crichton dd69aeebd5 Update curl and curl-sys
Pick up a few security related fixes in libcurl
2016-10-31 11:27:31 -07:00
Alex Crichton 13038032d6 Download more cross builds 2016-10-24 22:31:27 -07:00
Steve Klabnik b20de58b2d bump semver to 0.5.1
Fixes #3202
2016-10-17 14:42:20 -04:00
Alex Crichton eb0b9dbddd Prepare for more cross-compiled Cargos
Update deps, add support, ensure everything compiles right.
2016-10-15 00:47:47 -07:00
Sébastien Marie d482b770ec bump hamcrest to 0.1.1 2016-10-10 12:08:48 +02:00
Steve Klabnik 464e6a96fb Bump to semver@0.5.0 2016-10-07 16:03:08 -04:00
Steve Klabnik c0f854cfc6 upgrade semver 2016-10-07 10:57:31 -07:00
bors 505b9b0478 Auto merge of #3162 - alexcrichton:ugh-mspdbsrv, r=brson
Leak mspdbsrv.exe processes on Windows

Instead of having our job object tear them down, instead leak them intentionally
if everything succeeded.

Closes #3161
2016-10-05 22:47:07 -07:00
Alex Crichton 5ede71e539 Leak mspdbsrv.exe processes on Windows
Instead of having our job object tear them down, instead leak them intentionally
if everything succeeded.

Closes #3161
2016-10-04 16:15:28 -07:00
Alex Crichton 035236020c Update curl to track more error info 2016-09-29 17:30:18 -07:00
Alex Crichton 4c2bfad067 Bump to 0.14.0 2016-09-29 11:31:17 -07:00
Jake Goldsborough ac8488199e adding policies page to the docs 2016-08-29 11:39:39 -07:00
Alex Crichton d971f115ff Update libz-sys to 1.0.6
Fixes a build error on OSX

Closes #3037
2016-08-26 14:42:40 -07:00
Steve Klabnik c49c1a9ba3 Revert to previous semver version.
As it turns out, people were taking advantage of bugginess in semver, so
we can't do this upgrade yet.

Fixes #3001
2016-08-17 10:10:10 -04:00
Alex Crichton 7a8ad36997 Update dependencies in Cargo.lock
A few bug fixes here and there we'll pick up (e.g. the gcc crate on newer MSVC
versions), but otherwise just staying on top of things.
2016-08-08 10:46:55 -07:00
Alex Crichton 5c6a7dd7bb Update OpenSSL-using dependencies
They've all been updated to canonicalize as `openssl_sys::init` as the "one true
method" for initializing OpenSSL,

Closes #2961
2016-08-06 17:50:16 -07:00
John Ericson 2a66dfba1f Use openssl on Unix rather than C functions directly for SHA256 2016-08-01 13:28:25 -07:00
Steve Klabnik 3e1c9264fc regenerate the lockfile 2016-07-30 20:58:58 -04:00
Alex Crichton fb2faf29b2 Bump to 0.13.0 2016-07-07 09:44:05 -07:00
Alex Crichton 26690d33e4 Stream build script output to the console
This commit alters Cargo's behavior when the `-vv` option is passed (two verbose
flags) to stream output of all build scripts to the console. Cargo makes not
attempt to prevent interleaving or indicate *which* build script is producing
output, rather it simply forwards all output to one to the console.

Cargo still acts as a middle-man, capturing the output, to parse build script
output and interpret the results. The parsing is still deferred to completion
but the stream output happens while the build script is running.

On Unix this is implemented via `select` and on Windows this is implemented via
IOCP.

Closes #1106
2016-06-14 07:35:51 -07:00
bors f8e75eca75 Auto merge of #2680 - alexcrichton:update-toml, r=brson
Update TOML parser to pick up a bugfix

Cargo has previously accepted invalid TOML as valid, but this bugfix should fix
the problem. In order to prevent breaking all crates immediately toml-rs has a
compatibility mode which emulates the bug that was fixed. Cargo will issue a
warning if this compatibility is required to parse a crate.
2016-06-12 05:21:23 -07:00
Alex Crichton 2a1e16c08a Update TOML parser to pick up a bugfix
Cargo has previously accepted invalid TOML as valid, but this bugfix should fix
the problem. In order to prevent breaking all crates immediately toml-rs has a
compatibility mode which emulates the bug that was fixed. Cargo will issue a
warning if this compatibility is required to parse a crate.
2016-06-12 04:14:35 -07:00
bors 4fbd47c1a5 Auto merge of #2770 - alexcrichton:new-curl, r=brson
Update to curl 0.3
2016-06-07 15:52:14 -07:00
Alex Crichton f7d213e744 Update to curl 0.3 2016-06-04 23:48:05 -07:00
Alex Crichton bb82035f9c Bump version numbers
Working on 0.12.0 now
2016-05-26 09:36:37 -07:00
Alex Crichton 763ba535eb Shared the test suite into multiple binaries
Compiling everything in one binary was getting annoying as it just took forever
to build, instead shard it all up so we can build just particular test suites at
a time.
2016-05-25 21:25:13 -07:00
Demur Rumed 6083780ad8 Remove dependency on time in favor of std::time 2016-05-14 14:10:07 +00:00
Stephen Becker IV 7b03532b4f Network retry issue 1602
Dearest Reviewer,

This branch resolves #1602 which relates to retrying network
issues automatically. There is a new utility helper for retrying
any network call.

There is a new config called net.retry value in the .cargo.config
file. The default value is 2. The documentation has also been
updated to reflect the new value.

Thanks
Becker
2016-05-12 11:26:58 -07:00
Simon Sapin 32562e9288 Update to rust-url 1.x 2016-05-03 19:41:06 +02:00
bors 59238e852c Auto merge of #2575 - alexcrichton:bump, r=alexcrichton
Bump to 0.11.0
2016-04-14 10:36:06 -07:00
Alex Crichton 1f889f7447 Bump to 0.11.0 2016-04-14 10:10:02 -07:00
Alex Crichton 5d87c4fef2 Bump the crates-io crate to 0.2 2016-04-14 10:04:34 -07:00
Alex Crichton 11a0a316af Update dependency on tar
Includes a fix for alexcrichton/tar-rs#61
2016-04-11 12:55:38 -07:00
Alex Crichton ea8de0a0d0 Update curl-sys
Picks up a fix to hopefully and correctly configure OpenSSL to be enabled in
cross-compiled situations where OpenSSL comes from a different location
(currently specified by the `OPENSSL_ROOT_DIR` environment variable that libssh2
also reads).
2016-03-25 09:24:35 -07:00
Alex Crichton 83b4f39c44 Prepare for ARM/FreeBSD/NetBSD nightlies
This commit beefs up Cargo's makefiles to support nightly builds of Cargo for
multiple platforms. This primarily involves vendoring the logic of how to build
OpenSSL for statically linking against Cargo into the Makefiles directly. We'll
have to update the version of OpenSSL as releases are made, but we essentially
already do that with the normal docker container.

The Linux nightlies will still run in the normal dist docker container (a really
old CentOS build) and builds for new platforms will happen in the standard
linux-cross container we use for other cross builds. The nightly versions of
these will produce Cargo tarballs for a whole bunch of platforms to get
uploaded.

This has been tested in the `alexcrichton/rust-slave-linux-cross:2016-03-17b`
docker container for the 3 ARM targets and FreeBSD target. NetBSD will come once
rust-lang/rust#32407 lands.
2016-03-22 16:19:35 -07:00
Ryan Quattlebaum 1750307c11 Bring in changes from master 2016-03-18 12:20:36 -04:00
Ryan Quattlebaum fe53e05dbf Move suggestion logic into generate_targets() 2016-03-18 12:00:22 -04:00
Alex Crichton 8eac1d62d8 Fix running Cargo concurrently
Cargo has historically had no protections against running it concurrently. This
is pretty unfortunate, however, as it essentially just means that you can only
run one instance of Cargo at a time **globally on a system**.

An "easy solution" to this would be the use of file locks, except they need to
be applied judiciously. It'd be a pretty bad experience to just lock the entire
system globally for Cargo (although it would work), but otherwise Cargo must be
principled how it accesses the filesystem to ensure that locks are properly
held. This commit intends to solve all of these problems.

A new utility module is added to cargo, `util::flock`, which contains two types:

* `FileLock` - a locked version of a `File`. This RAII guard will unlock the
  lock on `Drop` and I/O can be performed through this object. The actual
  underlying `Path` can be read from this object as well.
* `Filesystem` - an unlocked representation of a `Path`. There is no "safe"
  method to access the underlying path without locking a file on the filesystem
  first.

Built on the [fs2] library, these locks use the `flock` system call on Unix and
`LockFileEx` on Windows. Although file locking on Unix is [documented as not so
great][unix-bad], but largely only because of NFS, these are just advisory, and
there's no byte-range locking. These issues don't necessarily plague Cargo,
however, so we should try to leverage them. On both Windows and Unix the file
locks are released when the underlying OS handle is closed, which means that
if the process dies the locks are released.

Cargo has a number of global resources which it now needs to lock, and the
strategy is done in a fairly straightforward way:

* Each registry's index contains one lock (a dotfile in the index). Updating the
  index requires a read/write lock while reading the index requires a shared
  lock. This should allow each process to ensure a registry update happens while
  not blocking out others for an unnecessarily long time. Additionally any
  number of processes can read the index.
* When downloading crates, each downloaded crate is individually locked. A lock
  for the downloaded crate implies a lock on the output directory as well.
  Because downloaded crates are immutable, once the downloaded directory exists
  the lock is no longer needed as it won't be modified, so it can be released.
  This granularity of locking allows multiple Cargo instances to download
  dependencies in parallel.
* Git repositories have separate locks for the database and for the project
  checkout. The datbase and checkout are locked for read/write access when an
  update is performed, and the lock of the checkout is held for the entire
  lifetime of the git source. This is done to ensure that any other Cargo
  processes must wait while we use the git repository. Unfortunately there's
  just not that much parallelism here.
* Binaries managed by `cargo install` are locked by the local metadata file that
  Cargo manages. This is relatively straightforward.
* The actual artifact output directory is just globally locked for the entire
  build. It's hypothesized that running Cargo concurrently in *one directory* is
  less of a feature needed rather than running multiple instances of Cargo
  globally (for now at least). It would be possible to have finer grained
  locking here, but that can likely be deferred to a future PR.

So with all of this infrastructure in place, Cargo is now ready to grab some
locks and ensure that you can call it concurrently anywhere at any time and
everything always works out as one might expect.

One interesting question, however, is what does Cargo do on contention? On one
hand Cargo could immediately abort, but this would lead to a pretty poor UI as
any Cargo process on the system could kick out any other. Instead this PR takes
a more nuanced approach.

* First, all locks are attempted to be acquired (a "try lock"). If this
  succeeds, we're done.
* Next, Cargo prints a message to the console that it's going to block waiting
  for a lock. This is done because it's indeterminate how long Cargo will wait
  for the lock to become available, and most long-lasting operations in Cargo
  have a message printed for them.
* Finally, a blocking acquisition of the lock is issued and we wait for it to
  become available.

So all in all this should help Cargo fix any future concurrency bugs with file
locking in a principled fashion while also allowing concurrent Cargo processes
to proceed reasonably across the system.

[fs2]: https://github.com/danburkert/fs2-rs
[unix-bad]: http://0pointer.de/blog/projects/locking.html

Closes #354
2016-03-16 22:14:26 -07:00
Brian Anderson 2f01868a94 Add rustflags support to config files
`build.rustflags` is treated exactly like `RUSTFLAGS`.

It is a list, so argument lists with spaces work.

`RUSTFLAGS` takes precedent, then `build.rustflags`.
2016-03-16 17:32:00 +00:00
Brian Anderson e17933ec7f Apply RUSTFLAGS env var to rustc builds
This passes RUSTFLAGS to rustc builds for the target architecture.

We don't want to pass the RUSTFLAGS args to multiple architectures because
they may contain architecture-specific flags. Ideally, the scheme
we would use would treat plugins and build scripts - which may not
be for the target architecture - consistently. Unfortunately it's
quite difficult in the current Cargo architecture to seperately
identify build scripts, plugins and their dependencies from
code used by the target.

So the scheme here is very simple:

1) If --target is not specified, RUSTFLAGS applies to all builds.
2) If --target is specified, RUSTFLAGS only applies to builds
   with the Kind::Target target kind, which indicates build units
   derived from the requested --target.

Closes #2112
2016-03-16 16:49:21 +00:00
Alex Crichton d8adf5c19c Update curl dependency
Fixes a segfault on nightly
2016-03-12 09:59:16 -08:00
Jesús Espino 134edb20c1 Adding --limit usage suggestion on search results (#2402) 2016-03-08 09:31:26 +01:00
Alex Crichton ac20c99020 Bump to 0.10.0 2016-03-03 11:12:10 -08:00
Alex Crichton 333ba43fe2 Update dependency on git2
This crate was recently updated to the next release of libgit2, and I've noticed
historically that a noop `cargo build` was slow in the git2-rs repository.
Curious to see if the new libgit2 version helped speed things up at all, I
tested it out.

Before this commit, a noop `cargo build` produced 599108 syscalls. After this
commit, a noop build produced 86925 syscalls, an 85% reduction in the number of
syscalls! Needless to say it's much faster.
2016-02-26 13:47:56 -08:00
Alex Crichton e5b818bf8a Update tar-rs dependency
Fixes compile on nightly
2016-02-17 10:50:05 -08:00
Alex Crichton 5b68527169 Update some dependencies, plus the rust version
The new bundled rust version supports unwinding on 32-bit MSVC!
2016-02-13 23:21:22 -08:00
bors 7330169feb Auto merge of #2348 - steveklabnik:gh2337, r=alexcrichton
Fixes #2337
2016-02-01 22:04:19 +00:00
Steven Allen cfcfa08a0a Detect whether or not the terminal supports color.
Before v0.4, term used to return `Ok(true)` if something succeeded,
`Ok(false)` if the operation was unsupported, and `Err(io::Error)` if
there was an IO error. Now, it returns `Ok(())` if the operation
succeeds and `Err(term::Error)` if the operation fails. If the operation
is unsupported, it returns `Err(term::Error::NotSupported)`. This means
that, if `op` is unsupported, `try!(term.op())` will now return an error
instead of silently failing (well, return false but that's effectively
silent).

Fixes #2338
2016-02-01 16:06:01 -05:00
Steve Klabnik a2fa2d27e2 Bump semver version
Fixes #2337
2016-02-01 15:12:17 -05:00
Steven Allen fd463d65f9 Revert "Downgrade term crate back down to 0.2 (from 0.4)."
This reverts commit 75e0371ba0.
2016-01-30 15:30:53 -05:00
Felix S. Klock II 75e0371ba0 Downgrade term crate back down to 0.2 (from 0.4).
This is undoing part of commit dd34296

Fix #2338

(Unfortunately I do not have a suggestion for how to make a unit test
for this problem; doing so would require putting in a bit more effort
than I have time for at the moment.)
2016-01-30 14:57:15 +01:00
Alex Crichton ff4b89636d Update libgit2-sys
Fixes a linkage error on linux if libhttp_parser is already installed.
2016-01-28 08:50:31 -08:00
bors 44c0d7b785 Auto merge of #2297 - alexcrichton:update, r=alexcrichton
Just a routine for niche bug fixes, linkage errors, perf improvements, etc.

Closes #2295
2016-01-25 17:34:19 +00:00
Alex Crichton dd34296008 Update dependencies and Rust version
Just a routine for niche bug fixes, linkage errors, perf improvements, etc.
2016-01-25 09:33:51 -08:00
Alex Crichton 43cc710b6c Bump to 0.9.0 2016-01-21 13:47:11 -08:00
Felix Crux fdfe8fc5dc Bump rand to 0.3.13 2016-01-11 19:26:48 -05:00
Steven Fackler a40f7d90fb Bump libc to 0.2
Also update everything else which removes all remaining libc 0.1
dependencies
2015-12-20 15:58:55 -07:00
Alex Crichton 4baeb83fb6 Update toml dependency to catch more unused keys
This includes alexcrichton/toml-rs@39d77b6d which ensures that more unused
fields stick around when decoding TOML, allowing this to:

Closes #2230
2015-12-18 16:33:17 -08:00
Alex Crichton 75ce18d676 Bump to 0.8.0 2015-12-10 07:26:17 -08:00
Steve Klabnik 94cc5e1eab Update semver to 0.2.0 2015-12-04 11:14:39 -05:00
Alex Crichton e0dff0f2dd Update dependencies
Closes #2152
2015-11-19 09:20:39 -08:00
Alex Crichton beec3706bd Update to a curl-rust that doesn't use OpenSSL on OSX
This should help continue to mitigate #1420 further
2015-11-05 15:42:22 -08:00
Alex Crichton afe837d7e6 Add more safeguards around odd filenames
This commit is targeted at fixing #2102 via two routes:

1. The dependency on `tar` was upgraded to include more contextual information
   in error messages about why the unpack failed. This should help diagnose
   these sorts of issues that happen in the first place.
2. Packaging crates that have files with odd filenames is no longer allowed.
   An error is returned indicating that the files cannot be packaged as they're
   not cross platform. The currently rejected set of files are non-utf8
   filenames (already present) and those containing characters special on
   Windows.

Closes #2102
2015-11-04 13:11:19 -08:00
Alex Crichton ab05dbb66b Bump to 0.7.0 2015-10-30 11:25:30 -07:00
Alex Crichton 0fc31aa468 Update dependencies
* Move along the same rails for all dependencies, picking up various small perf,
  build, and portability improvements.
* Update pinned rustc to pick up perf improvements and such
* Tweak expected error message from tests to continue to work
2015-10-21 13:59:27 -07:00
bors 8964ea787f Auto merge of #2036 - alexcrichton:update-build-tools, r=alexcrichton
* Updates git2-rs back to 0.3 now that the distribution issue on OSX has been
  fixed.
* Updates libgit2-sys to using the `cmake` crate so building with VS 2015 can
  work.
2015-10-07 21:27:36 +00:00
Alex Crichton 8778797dc7 Update some build tools and libgit2
* Updates git2-rs back to 0.3 now that the distribution issue on OSX has been
  fixed.
* Updates libgit2-sys to using the `cmake` crate so building with VS 2015 can
  work.
* Update pkg-config to totally disable it on MSVC (basically guaranteed to never
  work)
2015-10-07 11:33:39 -07:00
Alex Crichton 17cc43379f Update TOML dependency
Closes #2031
Closes #2033
2015-10-07 10:46:20 -07:00
Alex Crichton c447e9d073 Add better diagnostics for rebuilding
This commit overhauls how a `Fingerprint` is stored on the filesystem and
in-memory to help provide much better diagnostics as to why crates are being
rebuilt. This involves storing more structured data on the filesystem in order
to have a finer-grained comparison with the previous state. This is not
currently surfaced in the output of cargo and still requires
`RUST_LOG=cargo::ops::cargo_rustc::fingerprint=info` but if it turns out to be
useful we can perhaps surface the output.

There are performance considerations here to ensure that a noop build is still
quite speedy for a few reasons:

1. JSON decoding is slow (these are just big structures to decode)
2. Each fingerprint stores all recursive fingerprints, so we can't just "vanilla
   decode" as it would decode O(n^2) items
3. Hashing is actually somewhat nontrivial for this many items here and there,
   so we still need as much memoization as possible.

To ensure that builds are just as speedy tomorrow as they are today, a few
strategies are taken:

* The same fingerprint strategy is used today as a "first line of defense" where
  a small text file with a string contains the "total fingerprint" hash. A
  separately stored file then contains the more detailed JSON structure of the
  old fingerprint, and that's only decoded if there's a mismatch of the short
  hashes. The rationale here is that most crates don't need to be rebuilt so we
  shouldn't decode JSON, but if it does need to be rebuilt then the work of
  compiling far dwarfs the work of decoding the JSON.
* When encoding a full fingerprint as JSON we don't actually include any
  dependencies, just the resolved u64 of them. This helps the O(n^2) problem in
  terms of decoding time and storage space on the filesystem.
* Short hashes continue to be memoized to ensure we don't recompute a hash if
  we've already done so (e.g. shared dependencies).

Overall, when profiling with Servo, this commit does not regress noop build
times, but should help diagnose why crates are being rebuilt hopefully!

Closes #2011
2015-10-05 11:32:58 -07:00
Alex Crichton 659f824406 Refactor Cargo's backend, again!
This commit started out identifying a relatively simple bug in Cargo. A recent
change made it such that the resolution graph included all target-specific
dependencies, relying on the structure of the backend to filter out those which
don't need to get built. This was unfortunately not accounted for in the portion
of the backend that schedules work, mistakenly causing spurious rebuilds if
different runs of the graph pulled in new crates. For example if `cargo build`
didn't build any target-specific dependencies but then later `cargo test` did
(e.g. a dev-dep pulled in a target-specific dep unconditionally) then it would
cause a rebuild of the entire graph.

This class of bug is certainly not the first in a long and storied history of
the backend having multiple points where dependencies are calculated and those
often don't quite agree with one another. The purpose of this rewrite is
twofold:

1. The `Stage` enum in the backend for scheduling work and ensuring that maximum
   parallelism is achieved is removed entirely. There is already a function on
   `Context` which expresses the dependency between targets (`dep_targets`)
   which takes a much finer grain of dependencies into account as well as
   already having all the logic for what-depends-on-what. This duplication has
   caused numerous problems in the past, an unifying these two will truly grant
   maximum parallelism while ensuring that everyone agrees on what their
   dependencies are.

2. A large number of locations in the backend have grown to take a (Package,
   Target, Profile, Kind) tuple, or some subset of this tuple. In general this
   represents a "unit of work" and is much easier to pass around as one
   variable, so a `Unit` was introduced which references all of these variables.
   Almost the entire backend was altered to take a `Unit` instead of these
   variables specifically, typically providing all of the contextual information
   necessary for an operation.

A crucial part of this change is the inclusion of `Kind` in a `Unit` to ensure
that everyone *also* agrees on what architecture they're compiling everything
for. There have been many bugs in the past where one part of the backend
determined that a package was built for one architecture and then another part
thought it was built for another. With the inclusion of `Kind` in dependency
management this is handled in a much cleaner fashion as it's only calculated in
one location.

Some other miscellaneous changes made were:

* The `Platform` enumeration has finally been removed. This has been entirely
  subsumed by `Kind`.
* The hokey logic for "build this crate once" even though it may be depended on
  by both the host/target kinds has been removed. This is now handled in a much
  nicer fashion where if there's no target then Kind::Target is just never used,
  and multiple requests for a package are just naturally deduplicated.
* There's no longer any need to build up the "requirements" for a package in
  terms of what platforms it's compiled for, this now just naturally falls out
  of the dependency graph.
* If a build script is overridden then its entire tree of dependencies are not
  compiled, not just the build script itself.
* The `threadpool` dependency has been replaced with one on `crossbeam`. The
  method of calculating dependencies has quite a few non-static lifetimes and
  the scoped threads of `crossbeam` are now used instead of a thread pool.
* Once any thread fails to execute a command work is no longer scheduled unlike
  before where some extra pending work may continue to start.
* Many functions used early on, such as `compile` and `build_map` have been
  massively simplified by farming out dependency management to
  `Context::dep_targets`.
* There is now a new profile to represent running a build script. This is used
  to inject dependencies as well as represent that a library depends on running
  a build script, not just building it.

This change has currently been tested against cross-compiling Servo to Android
and passes the test suite (which has quite a few corner cases for build scripts
and such), so I'm pretty confident that this refactoring won't have at least too
many regressions!
2015-10-05 11:32:58 -07:00
Alex Crichton 604e867845 Bump to 0.6.0 2015-09-16 09:35:43 -07:00
Alex Crichton 47d4876b1d Update curl bindings
Includes a fix for #1937 to not panic on downloading crates on newer OSX
versions.

Closes #1937
2015-09-08 10:39:40 -07:00
Alex Crichton 959d1a7283 Update for Rust nightly
* Update dependencies that are getting warnings on nightly
* Tweak expected output of failing tests
2015-08-21 11:44:16 -07:00
Alex Crichton 3f96b7d106 Update libssh2-sys's build script
The builds on the linux bots are currently broken because the recent
modifications to this build script forgot to set up PKG_CONFIG_PATH for custom
installations of OpenSSL
2015-08-18 10:24:56 -07:00
Alex Crichton 6bf164203b Revert update of libgit2
Unfortunately this flew past on the bots because we didn't built on one of the
10.7 bots, but it looks like libgit2 doesn't currently build on OSX 10.7 so
we'll have to wait until that's fixed to update.
2015-08-17 10:08:13 -07:00
Alex Crichton 530e1d180d Update dependencies and Rust that's used
* Picks up a few breaking changes to dependency APIs, notably the tar-rs changes
  and git2-rs changes.
* Builds should now work with VS 2015
2015-08-14 13:30:53 -07:00
Alex Crichton 91152c911d Update rust-url to fix a bug in URL parsing
Closes #1884
2015-08-13 09:25:24 -07:00
Alex Crichton 4c851ceac5 Bump to 0.5.0 2015-08-11 13:31:21 -07:00
Alex Crichton 4b555d6ea9 Use filetime for set_file_times
Don't vendor the implementation locally.

Closes #1859
2015-07-29 10:25:22 -07:00
Alex Crichton c1071c69a1 Update docopt to fix forwarding --
Closes #1426
2015-07-27 18:08:28 -07:00
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
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 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
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 4c796a1dae Update Cargo.lock for updated version 2015-07-01 09:57:57 -07:00
Alex Crichton 0da6c943c8 Fix build on MSVC
* Download all snapshots and such from static.rust-lang.org (drive-by fix)
* Update dependencies to work and build on MSVC
  * ssh2-sys uses `nmake` to build libssh2
  * libgit2-sys uses `cmake` to build libgit2
  * curl-sys uses `nmake` to build libcurl
  * libz-sys uses `nmake` to build zlib
  * miniz-sys uses `gcc-rs` to drive `cl.exe` manually
  * term updated to pick up windows-specific deps on MSVC
* Updated .travis.install.deps.sh to install MSVC target libraries on Windows,
  so the compiler can be used to target MSVC. A 64-bit target is now used by
  default as well.
* Updated the configure script and Makefile to set appropriate environment
  variables to build Cargo from a MSYS shell with a MSVC target. This is similar
  to how Rust bootstraps on MSVC as well.

With this commit Cargo can successfully bootstrap itself on MSVC (use the MSVC
product to build itself again). The tests currently do not pass because
unwinding is not implemented, but soon!
2015-06-23 18:01:32 -07:00
Alex Crichton f67574c3bf Bump toml to improve errors on enums
Closes #1739
2015-06-23 17:46:26 -07:00
Sebastian Thiel ba459acb5f Compatibility with term *0.2.9*
When attempting to compile cargo with the latest `term` crate,
one would face compilation issues due to an attempt to declare
a `Terminal` type without its apparently new associated type
called `Output`.

The fix involves the removal of the `UghWHyIsThisNecessary` type,
and declares the `Terminal` type as
`Terminal<Output=Box<Write + Send>>`.
2015-06-20 22:08:15 +02:00
Alex Crichton a0b3d2067c Update docopt to fix some option parsing
Closes #1720
2015-06-17 15:55:16 -07:00
Alex Crichton 23762e4586 Move Cargo onto stable Rust
This commit moves Cargo onto 100% stable Rust now that the necessary fs features
have been stabilized. The tests were updated to understand when they're running
with a non-nightly compiler and disable all plugin-related tests. The only major
feature here is that the calls to `fs::set_file_times` were reimplemented
manually in the tests that Cargo has.

Cargo still requires a *nightly compiler* due to the stable features not having
made their way into the stable channel yet, but it will soon work on all of the
stable, beta, and nightly compilers once 1.1 is released!
2015-06-16 22:31:34 -07:00
bors 3b164462d6 Auto merge of #1657 - alexcrichton:share-target-dirs, r=brson
This commit adds support to allow specifying a custom output directory to Cargo.
First, the `build.target-dir` configuration key is checked, and failing that the
`CARGO_TARGET_DIR` environment variable is checked, and failing that the root
package's directory joined with the directory name "target" is used.

There are a few caveats to switching target directories, however:

* If the target directory is in the current source tree, and the folder name is
  not called "target", then Cargo may walk the output directory when determining
  whether a tree is fresh.
* If the target directory is not called "target", then Cargo may look inside it
  currently for `Cargo.toml` files to learn about local packages.
* Concurrent usage of Cargo will still result in badness (#354), and this is now
  exascerbated because many Cargo projects can share the same output directory.
* The top-level crate is not cached for future compilations, so if a crate is
  built into directory `foo` and then that crate is later used as a dependency,
  it will be recompiled.

The naming limitations can be overcome in time, but for now it greatly
simplifies the crawling routines and shouldn't have much of a negative impact
other than some Cargo runtimes (which can in turn be negated by following the
"target" name convention).

Closes #482
2015-06-04 17:30:58 +00:00
Alex Crichton e5a870bb6f Update rust-url to improve hash/cmp performance
Both no longer require allocations!
2015-06-02 22:02:23 -07:00
Alex Crichton 7d49029a1c Switch from a custom MTime to the filetime crate
The crate provides the same functionality necessary for Cargo, but it's
maintained elsewhere now.
2015-06-02 18:05:47 -07:00
Ivan Ukhov 632780ebef Fix the detection of directories when listing files using libgit2 2015-06-02 10:55:04 -04:00
Alex Crichton 655c40be25 Bump Cargo.toml's version to 0.3.0 2015-05-28 15:39:03 -07:00
bors de903c7739 Auto merge of #1653 - alexcrichton:update-tar, r=alexcrichton
Fixes some extraction bugs when unpacking archives.
2015-05-27 20:14:08 +00:00
Alex Crichton b98344935d Update libssh2-sys's build script
The bots are trying to build something which isn't needed and is failing on
nightlies, so the build script has been updated to not bulid this unnecessary
artifact as part of libssh2
2015-05-27 11:31:33 -07:00
Alex Crichton c111410791 Update the tar-rs dependency
Fixes some extraction bugs when unpacking archives.
2015-05-26 10:16:41 -07:00
Alex Crichton 54d1ac3966 Update cargo deps
Opt in to nightly features for a few, and update others to get bitrig support
2015-05-18 14:47:33 -07: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
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
Jakub Bukaj e4ae24b124 Loosen the dependency versions in Cargo.toml 2015-05-01 13:25:09 +02: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 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
ozmorph a72ddb73df updated threadpool dependency from v0.1.1 to v0.1.4 2015-04-18 18:12:45 -04:00
Alex Crichton 30bc5a6517 Bump cargo to 0.2.0
Closes #808
Closes #1178
2015-04-16 15:59:14 -07:00
Alex Crichton 0392e05e37 Update semver to support multiple version reqs 2015-04-07 22:16:37 -07:00
Ivan Ukhov abe56727d4 Derive Clone when deriving Copy 2015-04-05 09:07:10 +02:00
Tamir Duberstein a5337f32c6 Rustup 2015-04-02 2015-04-04 16:36:34 -07:00
Alex Crichton 80fe0e6df6 Update to rust-2015-04-02
Along the way, this also removes the ability to specify `[[lib]]` targets while
getting warnings. While we're at it remove nearly all unstable features that
Cargo is depending on as well!
2015-04-02 16:28:53 -07:00
Alex Crichton 6e6dec8ab9 Use Entry::or_insert where possible 2015-03-30 17:54:20 -07:00
Alex Crichton e8944ac6b0 Update to rust 2015-03-30 2015-03-30 12:30:50 -07:00
Alex Crichton e95cbb05a0 Update flate2-rs
There were a few bugs in creation of gzip'd files which caused package creation
to fail in some circumstances.

Closes #1465
2015-03-28 23:08:20 -07:00
Alex Crichton 964e72ffc0 Update to rust 2015-03-26 2015-03-26 11:59:30 -07:00
Tamir Duberstein 1ced1dc8dd Update to rust 2015-03-22 2015-03-23 13:59:59 -07:00
Alex Crichton 50c6eb4d46 Update to rust master 2015-03-17 09:26:13 -07:00
Jakub Bukaj 08313a31cd Update to the latest nightly 2015-03-12 11:42:59 +01:00
Alex Crichton 22e7ede6c8 Fix all tests from the update to rust master 2015-03-09 13:51:11 -07:00
Victor-Nicolae Savu 2fac34aa90 Updated versions for rustc, curl, docopt and regex. 2015-03-06 22:52:55 +01:00
Victor-Nicolae Savu a1faa7cb14 Updated to rust nightly 2015-03-04 2015-03-05 07:20:58 +01:00
Alex Crichton b1c005dff2 Update tar dependency
Fixes a bug reported in alexcrichton/flate2-rs#15 where the header wasn't being
properly read.
2015-03-01 11:09:40 -08:00
Alex Crichton a6dad62221 Update to rust master and std::{io, path} 2015-02-27 15:34:13 -08:00
Alex Crichton 7b059db1d3 Fixup warnings and the travis script 2015-02-24 11:57:29 -08:00
Robin Gloster 973f6712f0 rustup 2015-02-24 12:43:41 +01:00
Andrew Paseltiner 1384050eea update Rust 2015-02-12 23:10:25 -05:00
Alex Crichton b20b0f6bd8 Add git2-curl as a dependency
Due to libgit2 not supporting HTTP proxies, the custom transport API of the
library must be used to reimplement the HTTP transport with proxy support. The
git2-curl crate implements this transport on top of the curl-rust crate. By
using libcurl we gain all sorts of proxy support for free.

This transport is not used by default, however, as it is not well battle tested
and the architecture is not currently ideal (download the entire repo into
memory on a clone). Only when an HTTP proxy is present is the new transport
used.

The other drawback of git2-curl is that it does not currently support
authentication. If a private git repository is cloned or authentication is
required then it will generate an error instead of correctly asking for
credentials.

Closes #636
2015-02-09 21:26:13 -08:00
Alex Crichton f2aa5b4c90 Update to rust master 2015-02-09 12:54:45 -08:00
Alex Crichton 7a2facba86 Remove leading get_ prefix from accessors
The current naming is [against our guidelines][guidelines]

[guidelines]: https://github.com/rust-lang/rfcs/blob/master/text/0344-conventions-galore.md#gettersetter-apis
2015-02-06 15:35:53 -08:00
Alex Crichton ee5e24ff8b Update to rust master 2015-02-06 15:10:05 -08:00
Alex Crichton e0b31b6b3d Update to the most current nightly 2015-02-04 10:21:38 -08:00
Gabriel Souza Franco 857c229682 Update dependencies 2015-01-30 16:08:04 -02:00
Gabriel Souza Franco 98854f6f7c Update log crate to v0.2 2015-01-30 16:08:04 -02:00
Peter Atashian 1943978cd5 Add explicit dependency on regex.
Signed-off-by: Peter Atashian <retep998@gmail.com>
2015-01-25 19:59:38 -05:00
Alex Crichton d73a110d36 Update to rust 2015-01-24 2015-01-24 23:48:18 -08:00
Сухарик 04bc76f8b1 update to recent rust changes: part #2 2015-01-24 11:16:54 +03:00
Сухарик 213afc02dc update to recent rust changes: part #1 2015-01-23 21:42:29 +03:00
Peter Atashian 8bd0572c9c Use external crates for Windows FFI
Signed-off-by: Peter Atashian <retep998@gmail.com>
2015-01-20 11:01:52 -05:00
Alex Crichton b65197b6a8 Update to rust master 2015-01-19 13:22:48 -08:00
Alex Crichton 553211119b Update to rust master 2015-01-13 14:11:20 -08:00
Alex Crichton 5be647ef2e Start using precise -L flags
Now that the compiler supports the notion for a "dependency lookup path" Cargo
can specify this information to the compiler in order to prevent transitive
dependencies from being imported.

Closes #1037
2015-01-05 17:06:25 -08:00
Alex Crichton ba2800478d Update to rust master 2015-01-05 11:17:01 -08:00
Alex Crichton 315341368c Update to rust master 2015-01-02 13:39:30 -08:00
Alex Crichton b9dddc22b1 Update usage of git2-rs 2014-12-31 13:09:21 -08:00
Marc Bowes 5b90a02ccd Update dependencies for ascii reform 2014-12-31 10:20:57 +02:00