]> git.proxmox.com Git - cargo.git/log
cargo.git
10 years agoauto merge of #616 : iliekturtles/cargo/patch-2, r=alexcrichton
bors [Mon, 22 Sep 2014 01:13:37 +0000 (01:13 +0000)]
auto merge of #616 : iliekturtles/cargo/patch-2, r=alexcrichton

Closes #615.

Current links are 404. Updated to the i686-w64 nightlies.

10 years agoFix Rust and Cargo nightly Windows links.
Mike Boutin [Sun, 21 Sep 2014 22:07:18 +0000 (18:07 -0400)]
Fix Rust and Cargo nightly Windows links.

Closes #615.

10 years agoauto merge of #605 : brson/cargo/https, r=alexcrichton
bors [Sun, 21 Sep 2014 21:39:47 +0000 (21:39 +0000)]
auto merge of #605 : brson/cargo/https, r=alexcrichton

10 years agoauto merge of #612 : alexcrichton/cargo/nocapture, r=wycats
bors [Sun, 21 Sep 2014 21:19:06 +0000 (21:19 +0000)]
auto merge of #612 : alexcrichton/cargo/nocapture, r=wycats

There are some competing concerns when it comes to the output of compiling
dependencies:

* Not capturing anything leads to getting drowned in unrelated output
* Capturing requires coloration be compromised because of the way windows
  terminal colors are implemented.
* Path dependencies are often developed in tandem with the rest of a package,
  and capturing their output is not always desired.

To address these concerns, cargo previously captured output of dependent
compilations and then re-printed it to the screen if an error occurred. This
patch modifies the behavior to as follows:

* No output is captured. This preserves any coloration rustc provides.
* All dependencies are compiled with `-Awarnings`. This should suppress any
  extraneous output from the compiler and it is considered a bug otherwise if
  the compiler prints a warnings when `-Awarnings` is specified.
* All *path* dependencies (`path="..."`, overrides, etc) are *not* compiled with
  `-Awarnings`. The reason for this is that you are always in control of these
  packages and probably want to see warnings anyway.

Closes #490
Closes #496

10 years agoStop capturing output of all dependencies
Alex Crichton [Sun, 21 Sep 2014 17:22:46 +0000 (10:22 -0700)]
Stop capturing output of all dependencies

There are some competing concerns when it comes to the output of compiling
dependencies:

* Not capturing anything leads to getting drowned in unrelated output
* Capturing requires coloration be compromised because of the way windows
  terminal colors are implemented.
* Path dependencies are often developed in tandem with the rest of a package,
  and capturing their output is not always desired.

To address these concerns, cargo previously captured output of dependent
compilations and then re-printed it to the screen if an error occurred. This
patch modifies the behavior to as follows:

* No output is captured. This preserves any coloration rustc provides.
* All dependencies are compiled with `-Awarnings`. This should suppress any
  extraneous output from the compiler and it is considered a bug otherwise if
  the compiler prints a warnings when `-Awarnings` is specified.
* All *path* dependencies (`path="..."`, overrides, etc) are *not* compiled with
  `-Awarnings`. The reason for this is that you are always in control of these
  packages and probably want to see warnings anyway.

Closes #490
Closes #496

10 years agoauto merge of #611 : alexcrichton/cargo/update, r=alexcrichton
bors [Sun, 21 Sep 2014 20:31:12 +0000 (20:31 +0000)]
auto merge of #611 : alexcrichton/cargo/update, r=alexcrichton

10 years agoUpdate to rust master
Alex Crichton [Sun, 21 Sep 2014 16:27:08 +0000 (09:27 -0700)]
Update to rust master

10 years agoauto merge of #604 : klutzy/cargo/win-make-install, r=alexcrichton
bors [Fri, 19 Sep 2014 18:14:37 +0000 (18:14 +0000)]
auto merge of #604 : klutzy/cargo/win-make-install, r=alexcrichton

Since `Makefile` passes `--destdir="$$(DESTDIR)/"` to `install.sh`,
`make install` tries to install libraries to
`$CFG_DESTDIR$CFG_PREFIX/$CFG_LIBDIR_RELATIVE` which is usually
`//path/to/usr/$CFG_LIBDIR_RELATIVE`.

The POSIX spec [1] states that if path begins with `//` it is
implementation-defined.
Usual systems treat them as normal abaolute path, but cygwin and MSYS
does not! They use `//hostname/path` syntax for network drives.
This caused `make install` issue on Windows.

This patch removes `/` of destdir to solve the issue.

[1]: http://pubs.opengroup.org/onlinepubs/9699919799/basedefs/V1_chap04.html#tag_04_12

10 years agoauto merge of #591 : alexcrichton/cargo/snapshots, r=alexcrichton
bors [Fri, 19 Sep 2014 17:39:25 +0000 (17:39 +0000)]
auto merge of #591 : alexcrichton/cargo/snapshots, r=alexcrichton

10 years agoRegister new snapshots
Alex Crichton [Fri, 19 Sep 2014 17:04:39 +0000 (10:04 -0700)]
Register new snapshots

Closes #606
Closes #607

10 years agoChange downloads to HTTPS
Brian Anderson [Fri, 19 Sep 2014 02:16:19 +0000 (19:16 -0700)]
Change downloads to HTTPS

10 years agoFix `make install` on Windows
klutzy [Thu, 18 Sep 2014 17:34:35 +0000 (02:34 +0900)]
Fix `make install` on Windows

Since `Makefile` passes `--destdir="$$(DESTDIR)/"` to `install.sh`,
`make install` tries to install libraries to
`$CFG_DESTDIR$CFG_PREFIX/$CFG_LIBDIR_RELATIVE` which is usually
`//path/to/usr/$CFG_LIBDIR_RELATIVE`.

The POSIX spec [1] states that if path begins with `//` it is
implementation-defined.
Usual systems treat them as normal abaolute path, but cygwin and MSYS
does not! They use `//hostname/path` syntax for network drives.
This caused `make install` issue on Windows.

This patch removes `/` of destdir to solve the issue.

[1]: http://pubs.opengroup.org/onlinepubs/9699919799/basedefs/V1_chap04.html#tag_04_12

10 years agoauto merge of #603 : brson/cargo/win, r=alexcrichton,alexcrichton,me
bors [Fri, 19 Sep 2014 01:43:36 +0000 (01:43 +0000)]
auto merge of #603 : brson/cargo/win, r=alexcrichton,alexcrichton,me

10 years agoauto merge of #600 : alexcrichton/cargo/update-ssl, r=brson
bors [Fri, 19 Sep 2014 00:58:38 +0000 (00:58 +0000)]
auto merge of #600 : alexcrichton/cargo/update-ssl, r=brson

This *should* help with #598, but I'd like to confirm that it's fixed with a
snapshot before marking it as fixed.

10 years agoauto merge of #596 : alexcrichton/cargo/update-git2, r=brson
bors [Thu, 18 Sep 2014 23:58:40 +0000 (23:58 +0000)]
auto merge of #596 : alexcrichton/cargo/update-git2, r=brson

This brings in a commit which enables global template options by default as part
of initializing new git repositories, allowing a templates to be used as part of
`cargo new`.

Closes #498

10 years agoUpdate windows downloads
Brian Anderson [Thu, 18 Sep 2014 23:57:29 +0000 (16:57 -0700)]
Update windows downloads

10 years agoauto merge of #599 : epdtry/cargo/profile-codegen-units, r=alexcrichton
bors [Thu, 18 Sep 2014 18:43:40 +0000 (18:43 +0000)]
auto merge of #599 : epdtry/cargo/profile-codegen-units, r=alexcrichton

If the profile sets `codegen-units`, the value will be passed to `rustc`'s `-C codegen-units` option.  If no value is set, then no argument will be passed, so `rustc` will use its default settings.

10 years agoUpdate openssl-static-sys for ubuntu 10.04
Alex Crichton [Thu, 18 Sep 2014 17:56:38 +0000 (10:56 -0700)]
Update openssl-static-sys for ubuntu 10.04

This *should* help with #598, but I'd like to confirm that it's fixed with a
snapshot before marking it as fixed.

10 years agoadd codegen-units option to profile section
Stuart Pernsteiner [Thu, 18 Sep 2014 17:49:43 +0000 (10:49 -0700)]
add codegen-units option to profile section

10 years agoUpdate git2-rs
Alex Crichton [Thu, 18 Sep 2014 15:51:00 +0000 (08:51 -0700)]
Update git2-rs

This brings in a commit which enables global template options by default as part
of initializing new git repositories, allowing a templates to be used as part of
`cargo new`.

Closes #498

10 years agoauto merge of #589 : alexcrichton/cargo/fix-win64, r=alexcrichton
bors [Wed, 17 Sep 2014 20:15:50 +0000 (20:15 +0000)]
auto merge of #589 : alexcrichton/cargo/fix-win64, r=alexcrichton

See comments in the makefile

10 years agoSet PWD in a unix fashion for distcheck
Alex Crichton [Wed, 17 Sep 2014 19:30:58 +0000 (12:30 -0700)]
Set PWD in a unix fashion for distcheck

See comments in the makefile

10 years agoauto merge of #586 : alexcrichton/cargo/fix-win64, r=brson
bors [Wed, 17 Sep 2014 17:43:29 +0000 (17:43 +0000)]
auto merge of #586 : alexcrichton/cargo/fix-win64, r=brson

Right now the win64 snapshot builders are failing to produce a snapshot, and
I've managed to track it down to a path length issue. Windows paths have a
maximum of 260 characters, and the characters add up pretty fast for a path
like:

    c:\bot\slave\cargo-nightly-win-64
      \build\target\x86_64-w64-mingw32
      \cargo-integration-test\home\.cargo
      \git\checkouts\meta-dep-<hash>\
      \$SHA\.git\...

The normal builders aren't failing I presume because `cargo-nightly-win-64` is
longer than `cargo-win64-64` (we must be *right up* against the limit). I've
confirmed that this shortening fixes the tests on the bots.

10 years agoShorten the cargo integration test directory name
Alex Crichton [Wed, 17 Sep 2014 15:30:35 +0000 (08:30 -0700)]
Shorten the cargo integration test directory name

Right now the win64 snapshot builders are failing to produce a snapshot, and
I've managed to track it down to a path length issue. Windows paths have a
maximum of 260 characters, and the characters add up pretty fast for a path
like:

    c:\bot\slave\cargo-nightly-win-64
      \build\target\x86_64-w64-mingw32
      \cargo-integration-test\home\.cargo
      \git\checkouts\meta-dep-<hash>\
      \$SHA\.git\...

The normal builders aren't failing I presume because `cargo-nightly-win-64` is
longer than `cargo-win64-64` (we must be *right up* against the limit). I've
confirmed that this shortening fixes the tests on the bots.

10 years agoFix some more deprecation warnings
Alex Crichton [Wed, 17 Sep 2014 15:27:41 +0000 (08:27 -0700)]
Fix some more deprecation warnings

10 years agoauto merge of #585 : alexcrichton/cargo/update, r=alexcrichton
bors [Wed, 17 Sep 2014 13:55:31 +0000 (13:55 +0000)]
auto merge of #585 : alexcrichton/cargo/update, r=alexcrichton

10 years agoUpdate the toml dependency
Alex Crichton [Wed, 17 Sep 2014 13:52:40 +0000 (06:52 -0700)]
Update the toml dependency

10 years agoUpdate to new iter names to fix building with current rustc
Björn Steinbrink [Wed, 17 Sep 2014 09:08:27 +0000 (11:08 +0200)]
Update to new iter names to fix building with current rustc

10 years agoauto merge of #583 : alexcrichton/cargo/local-cargo, r=brson
bors [Wed, 17 Sep 2014 03:39:40 +0000 (03:39 +0000)]
auto merge of #583 : alexcrichton/cargo/local-cargo, r=brson

10 years agoContinue to tweak the win64 build process on the bots
Alex Crichton [Wed, 17 Sep 2014 03:31:20 +0000 (20:31 -0700)]
Continue to tweak the win64 build process on the bots

10 years agoAdd an option to bootstrap from a local cargo
Alex Crichton [Wed, 17 Sep 2014 01:49:18 +0000 (18:49 -0700)]
Add an option to bootstrap from a local cargo

10 years agoauto merge of #580 : alexcrichton/cargo/fix-cargo-doc, r=brson
bors [Wed, 17 Sep 2014 00:28:36 +0000 (00:28 +0000)]
auto merge of #580 : alexcrichton/cargo/fix-cargo-doc, r=brson

There's no "doc-all" profile, so it needs to be canonicalized when finding the
name of the profile to pass to a build command.

10 years agoauto merge of #570 : alexcrichton/cargo/fetch, r=brson
bors [Tue, 16 Sep 2014 23:33:21 +0000 (23:33 +0000)]
auto merge of #570 : alexcrichton/cargo/fetch, r=brson

This command is used to download all dependencies of a package ahead of time to
ensure that no more network communication will be necessary as part of a build.

cc #358

10 years agoImplement a `cargo fetch` command
Alex Crichton [Thu, 11 Sep 2014 18:50:57 +0000 (11:50 -0700)]
Implement a `cargo fetch` command

This command is used to download all dependencies of a package ahead of time to
ensure that no more network communication will be necessary as part of a build.

cc #358

10 years agoauto merge of #541 : alexcrichton/cargo/cargo-upload, r=brson
bors [Tue, 16 Sep 2014 22:49:51 +0000 (22:49 +0000)]
auto merge of #541 : alexcrichton/cargo/cargo-upload, r=brson

This PR implements the plumbing necessary for uploading packages to a registry, downloading packages, depending on those packages, etc. All APIs (upload/download) are tied to the current implementation of [the registry](https://github.com/alexcrichton/cargo-registry).

Most of the design-level details in this PR are in the first commit. The later commits are largely adding tests, polishing it off, and making it work on windows.

Dependency-wise, this picks up a dependency on `curl-rust`, albeit a small fork until the upstream linkage changes are merged. Linkage details can be found [here](https://github.com/carllerche/curl-rust/pull/16). I'll probably have to do some configuration of the bots to get this to work (or hopefully not!).

r? @wycats

10 years agoTweak filesystem hierarchy format
Alex Crichton [Tue, 16 Sep 2014 22:11:47 +0000 (15:11 -0700)]
Tweak filesystem hierarchy format

10 years agoTweak the 32-bit windows triple
Alex Crichton [Tue, 16 Sep 2014 19:05:37 +0000 (12:05 -0700)]
Tweak the 32-bit windows triple

10 years agoFix cargo doc with custom build commands
Alex Crichton [Tue, 16 Sep 2014 14:47:39 +0000 (07:47 -0700)]
Fix cargo doc with custom build commands

There's no "doc-all" profile, so it needs to be canonicalized when finding the
name of the profile to pass to a build command.

10 years agoUpdate deps
Alex Crichton [Thu, 11 Sep 2014 23:57:25 +0000 (16:57 -0700)]
Update deps

10 years agoFix tests on windows
Alex Crichton [Tue, 9 Sep 2014 19:35:31 +0000 (12:35 -0700)]
Fix tests on windows

10 years agoUse a different curl-rust for now
Alex Crichton [Tue, 9 Sep 2014 14:41:20 +0000 (07:41 -0700)]
Use a different curl-rust for now

Waiting on fixes to be merged upstream

10 years agoMore and more tests (cargo upload)
Alex Crichton [Tue, 9 Sep 2014 14:23:09 +0000 (07:23 -0700)]
More and more tests (cargo upload)

10 years agoAdd tests exercising the registry source
Alex Crichton [Tue, 9 Sep 2014 05:26:14 +0000 (22:26 -0700)]
Add tests exercising the registry source

10 years agoAdd proxy configurations
Alex Crichton [Tue, 9 Sep 2014 02:38:32 +0000 (19:38 -0700)]
Add proxy configurations

10 years agoTest the output of `cargo package`
Alex Crichton [Tue, 9 Sep 2014 02:38:16 +0000 (19:38 -0700)]
Test the output of `cargo package`

10 years agoImplement Sha256 bindings
Alex Crichton [Mon, 8 Sep 2014 23:01:38 +0000 (16:01 -0700)]
Implement Sha256 bindings

These are used to verify the downloads of packages from the registry.

10 years agoImplement a registry source
Alex Crichton [Fri, 18 Jul 2014 15:40:45 +0000 (08:40 -0700)]
Implement a registry source

# cargo upload

The cargo-upload command will take the local package and upload it to the
specified registry. The local package is uploaded as a tarball compressed with
gzip under maximum compression. Most of this is done by just delegating to
`cargo package` The host to upload to is specified, in order of priority, by a
command line `--host` flag, the `registry.host` config key, and then the default
registry. The default registry is still `example.com`

The registry itself is still a work in progress, but the general plumbing for a
command such as this would look like:

1. Ensure the local package has been compressed into an archive.
2. Fetch the relevant registry and login token from config files.
3. Ensure all dependencies for a package are listed as coming from the same
   registry.
4. Upload the archive to the registry with the login token.
5. The registry will verify the package is under 2MB (configurable).
6. The registry will upload the archive to S3, calculating a checksum in the
   process.
7. The registry will add an entry to the registry's index (a git repository).
   The entry will include the name of the package, the version uploaded, the
   checksum of the upload, and then the list of dependencies (name/version req)
8. The local `cargo upload` command will succeed.

# cargo login

Uploading requires a token from the api server, and this token follows the same
config chain for the host except that there is no fallback. To implement login,
the `cargo login` command is used. With 0 arguments, the command will request
that a site be visited for a login token, and with an argument it will set the
argument as the new login token.

The `util::config` module was modified to allow writing configuration as well as
reading it. The support is a little lacking in that comments are blown away, but
the support is there at least.

# RegistrySource

An implementation of `RegistrySource` has been created (deleting the old
`DummyRegistrySource`). This implementation only needs a URL to be constructed,
and it is assumed that the URL is running an instance of the cargo registry.

## RegistrySource::update

Currently this will unconditionally update the registry's index (a git
repository). Tuning is necessary to prevent updating the index each time (more
coming soon).

## RegistrySource::query

This is called in the resolve phase of cargo. This function is given a
dependency to query for, and the source will simply look into the index to see
if any package with the name is present. If found, the package's index file will
be loaded and parsed into a list of summaries.

The main optimization of this function is to not require the entire registry to
ever be resident in memory. Instead, only necessary packages are loaded into
memory and parsed.

## RegistrySource::download

This is also called during the resolve phase of cargo, but only when a package
has been selected to be built (actually resolved). This phase of the source will
actually download and unpack the tarball for the package.

Currently a configuration file is located in the root of a registry's index
describing the root url to download packages from.

This function is optimized for two different metrics:

1. If a tarball is downloaded, it is not downloaded again. It is assumed that
   once a tarball is successfully downloaded it will never change.
2. If the unpacking destination has a `.cargo-ok` file, it is assumed that the
   unpacking has already occurred and does not need to happen again.

With these in place, a rebuild should take almost no time at all.

## RegistrySource::get

This function is simply implemented in terms of a PathSource's `get` function by
creating a `PathSource` for all unpacked tarballs as part of the `download`
stage.

## Filesystem layout

There are a few new directories as part of the `.cargo` home folder:

* `.cargo/registry/index/$hostname-$hash` - This is the directory containing the
  actual index of the registry. `$hostname` comes from its url, and `$hash` is
  the hash of the entire url.

* `.cargo/registry/cache/$hostname-$hash/$pkg-$vers.tar.gz` - This is a
  directory used to cache the downloads of packages from the registry.

* `.cargo/registry/src/$hostname-$hash/$pkg-$vers` - This is the location of the
  unpacked packages. They will be compiled from this location.

# New Dependencies

Cargo has picked up a new dependency on the `curl-rust` package in order to send
HTTP requests to the registry as well as send HTTP requests to download
tarballs.

10 years agoauto merge of #581 : alexcrichton/cargo/manpage, r=brson
bors [Tue, 16 Sep 2014 17:43:43 +0000 (17:43 +0000)]
auto merge of #581 : alexcrichton/cargo/manpage, r=brson

Closes #578

10 years agoAdd a manpage
Alex Crichton [Tue, 16 Sep 2014 16:38:35 +0000 (09:38 -0700)]
Add a manpage

Closes #578

10 years agoauto merge of #558 : alexcrichton/cargo/issue-553, r=brson
bors [Mon, 15 Sep 2014 19:13:42 +0000 (19:13 +0000)]
auto merge of #558 : alexcrichton/cargo/issue-553, r=brson

10 years agoPass profile env vars to build commands
Alex Crichton [Thu, 11 Sep 2014 15:09:47 +0000 (08:09 -0700)]
Pass profile env vars to build commands

Closes #553

10 years agoRun tests with the --target flag
Alex Crichton [Thu, 11 Sep 2014 15:01:41 +0000 (08:01 -0700)]
Run tests with the --target flag

10 years agoauto merge of #574 : rust-lang/cargo/fix-win64, r=brson
bors [Mon, 15 Sep 2014 17:44:47 +0000 (17:44 +0000)]
auto merge of #574 : rust-lang/cargo/fix-win64, r=brson

These commits fix all tests and installation utilities on win64. I've confirmed that these are a green build on the bots.

10 years agoRewrite git tests to not rely on the CLI
Alex Crichton [Fri, 12 Sep 2014 15:02:14 +0000 (08:02 -0700)]
Rewrite git tests to not rely on the CLI

The CLI has started to have differences on windows than on other systems, and
instead of coding against multiple CLI versions, instead just rewrite everything
to use libgit2.

10 years agoauto merge of #537 : markberger/cargo/510-hg-flag, r=alexcrichton
bors [Mon, 15 Sep 2014 16:43:46 +0000 (16:43 +0000)]
auto merge of #537 : markberger/cargo/510-hg-flag, r=alexcrichton

Allows the client to initialize a mercurial repo when creating a new cargo project with `cargo new --hg`. This would close #510.

This is my first time writing code in rust outside of a toy program so please feel free to tear it apart or suggest an alternative solution.

10 years agoTweak the install script for windows nightlies
Alex Crichton [Fri, 12 Sep 2014 03:06:39 +0000 (20:06 -0700)]
Tweak the install script for windows nightlies

10 years agoauto merge of #576 : alexcrichton/cargo/update, r=alexcrichton
bors [Mon, 15 Sep 2014 15:35:26 +0000 (15:35 +0000)]
auto merge of #576 : alexcrichton/cargo/update, r=alexcrichton

10 years agoUpdate to rust master
Alex Crichton [Mon, 15 Sep 2014 15:31:21 +0000 (08:31 -0700)]
Update to rust master

10 years agoCreate hg repo with --hg flag on cargo new
Mark J. Berger [Fri, 5 Sep 2014 15:23:57 +0000 (08:23 -0700)]
Create hg repo with --hg flag on cargo new

10 years agoauto merge of #575 : mbrubeck/cargo/sleep, r=alexcrichton
bors [Sat, 13 Sep 2014 16:28:49 +0000 (16:28 +0000)]
auto merge of #575 : mbrubeck/cargo/sleep, r=alexcrichton

Travis is showing intermittent failures in `test_cargo_compile_path_deps::path_dep_build_cmd` and `test_cargo_compile_git_deps::git_dep_build_cmd` (added in #561 and #563).

I haven't managed to reproduce these failures locally, but I suspect the tests are timing-sensitive.  This tries to fix the failure by sleeping for a second between the two operations.

10 years agoTry to fix intermittent test failures
Matt Brubeck [Sat, 13 Sep 2014 04:49:35 +0000 (21:49 -0700)]
Try to fix intermittent test failures

Travis is showing intermittent failures in
`test_cargo_compile_path_deps::path_dep_build_cmd` and
`test_cargo_compile_git_deps::git_dep_build_cmd` (added in #561 and #563).

I haven't managed to reproduce these failures locally, but I suspect the tests
are timing-sensitive.  This tries to guarantee that the timestamps during the
two operations can't be the same.

10 years agoauto merge of #563 : mbrubeck/cargo/list-files-git, r=alexcrichton
bors [Sat, 13 Sep 2014 02:43:50 +0000 (02:43 +0000)]
auto merge of #563 : mbrubeck/cargo/list-files-git, r=alexcrichton

`list_files_git` assumes that the package is at the root of the git repository. This breaks when trying to list files for a package in a subdirectory of a repo, or in other cases, e.g. if the user's home directory is a git repo.

10 years agoauto merge of #561 : mbrubeck/cargo/list_file_walk, r=alexcrichton
bors [Sat, 13 Sep 2014 01:43:38 +0000 (01:43 +0000)]
auto merge of #561 : mbrubeck/cargo/list_file_walk, r=alexcrichton

Previously this was calling `.is_file()` on a relative path.  This would fail if the path was not relative to the current working directory, for example when listing files in a path dependency.

10 years agoBetter fix for tests on the Mac builders
Matt Brubeck [Sat, 13 Sep 2014 01:05:10 +0000 (18:05 -0700)]
Better fix for tests on the Mac builders

10 years agoauto merge of #569 : alexcrichton/cargo/update-git2, r=brson
bors [Sat, 13 Sep 2014 00:13:52 +0000 (00:13 +0000)]
auto merge of #569 : alexcrichton/cargo/update-git2, r=brson

This fixes some breaking changes with git2-rs, fixes a bug in tarball generation
from tar-rs, and fixes warnings with flate2-rs

10 years agoauto merge of #566 : alexcrichton/cargo/issue-565, r=brson
bors [Fri, 12 Sep 2014 23:29:58 +0000 (23:29 +0000)]
auto merge of #566 : alexcrichton/cargo/issue-565, r=brson

When cloning a remote repository, the default behavior of libgit2 is to only
update the local ref that's actually checked out, when we actually would prefer
to update all refs of the remote repo. This removes a call to clone() to a
init_bare() + fetch() which should update all refs accordingly

Closes #565

10 years agoTest for build commands in git subdirs
Matt Brubeck [Fri, 12 Sep 2014 22:21:23 +0000 (15:21 -0700)]
Test for build commands in git subdirs

10 years agoFix list_files_git for paths in subdirs of a repo
Matt Brubeck [Thu, 11 Sep 2014 21:09:44 +0000 (14:09 -0700)]
Fix list_files_git for paths in subdirs of a repo

list_files_git previously assumed that the package was always at the root of
the git repository.  This broke when trying to list files for a package in a
subdirectory of a repo, or in other cases, e.g. if the user's home directory
is a git repo.

10 years agoFix tests on Mac builders
Matt Brubeck [Fri, 12 Sep 2014 16:22:02 +0000 (09:22 -0700)]
Fix tests on Mac builders

Comparing URIs in /tmp was failing because of symlinks.

10 years agoTest for build command fingerprints in path deps
Matt Brubeck [Thu, 11 Sep 2014 22:42:46 +0000 (15:42 -0700)]
Test for build command fingerprints in path deps

This tests the fix for list_files_walk from #561.

10 years agoFix bug in list_file_walk when cwd != path
Matt Brubeck [Thu, 11 Sep 2014 19:00:11 +0000 (12:00 -0700)]
Fix bug in list_file_walk when cwd != path

Previously this was calling .is_file() on a relative path.  This would fail if
the path was not relative to the current working directory, for example when
fingerprinting a path dependency.

10 years agoDon't clone remote repos, use fetch instead
Alex Crichton [Thu, 11 Sep 2014 21:30:13 +0000 (14:30 -0700)]
Don't clone remote repos, use fetch instead

When cloning a remote repository, the default behavior of libgit2 is to only
update the local ref that's actually checked out, when we actually would prefer
to update all refs of the remote repo. This removes a call to clone() to a
init_bare() + fetch() which should update all refs accordingly

Closes #565

10 years agoauto merge of #564 : EduardoBautista/cargo/contributing-to-docs, r=alexcrichton
bors [Fri, 12 Sep 2014 01:13:57 +0000 (01:13 +0000)]
auto merge of #564 : EduardoBautista/cargo/contributing-to-docs, r=alexcrichton

The docs are now in the main cargo repository.

10 years agoUpdate all dependencies
Alex Crichton [Fri, 12 Sep 2014 00:05:33 +0000 (17:05 -0700)]
Update all dependencies

This fixes some breaking changes with git2-rs, fixes a bug in tarball generation
from tar-rs, and fixes warnings with flate2-rs

10 years agoauto merge of #568 : mbrubeck/cargo/dist-fix, r=alexcrichton
bors [Thu, 11 Sep 2014 23:43:55 +0000 (23:43 +0000)]
auto merge of #568 : mbrubeck/cargo/dist-fix, r=alexcrichton

Fixes a regression from #559.

10 years agoFix `make dist` and distcheck breakage
Matt Brubeck [Thu, 11 Sep 2014 23:00:29 +0000 (16:00 -0700)]
Fix `make dist` and distcheck breakage

Fixes a regression from #559.

10 years agoauto merge of #567 : EduardoBautista/cargo/fix-centering-on-safari, r=alexcrichton
bors [Thu, 11 Sep 2014 22:58:54 +0000 (22:58 +0000)]
auto merge of #567 : EduardoBautista/cargo/fix-centering-on-safari, r=alexcrichton

The website is not centered in Safari.

10 years agoCenter main content in Safari
Eduardo Bautista [Thu, 11 Sep 2014 21:39:04 +0000 (16:39 -0500)]
Center main content in Safari

10 years agoauto merge of #555 : alexcrichton/cargo/issue-215, r=brson
bors [Thu, 11 Sep 2014 21:28:53 +0000 (21:28 +0000)]
auto merge of #555 : alexcrichton/cargo/issue-215, r=brson

Also print the commands only right before they're actually run.

Closes #215

10 years agoUpdate "Contributing to the Docs"
Eduardo Bautista [Thu, 11 Sep 2014 21:12:26 +0000 (16:12 -0500)]
Update "Contributing to the Docs"

10 years agoauto merge of #562 : alexcrichton/cargo/win64, r=alexcrichton
bors [Thu, 11 Sep 2014 20:28:53 +0000 (20:28 +0000)]
auto merge of #562 : alexcrichton/cargo/win64, r=alexcrichton

10 years agoSwitch the URL from which nightlies are downloaded
Alex Crichton [Thu, 11 Sep 2014 19:56:08 +0000 (12:56 -0700)]
Switch the URL from which nightlies are downloaded

10 years agoMerge commit '314d47749a79d0382eea1b710456b038a1ac84c0' into win64
Alex Crichton [Thu, 11 Sep 2014 20:13:43 +0000 (13:13 -0700)]
Merge commit '314d47749a79d0382eea1b710456b038a1ac84c0' into win64

10 years agoAllows bootstrapping win64 from win32 snapshot.
Peter Atashian [Thu, 11 Sep 2014 18:26:22 +0000 (14:26 -0400)]
Allows bootstrapping win64 from win32 snapshot.
Remove triple = 'i686-pc-mingw32' once win64 snapshot is made.

Signed-off-by: Peter Atashian <retep998@gmail.com>
10 years agoauto merge of #559 : mbrubeck/cargo/make-install-fix, r=alexcrichton
bors [Thu, 11 Sep 2014 18:13:50 +0000 (18:13 +0000)]
auto merge of #559 : mbrubeck/cargo/make-install-fix, r=alexcrichton

This fixes an issue where `make dist` incorrectly does nothing after the source has changed and been rebuilt.  It also prevents `make install` from installing outdated files from the `dist` directory.

10 years agoAlways rebuild dist dir in "make dist" or install
Matt Brubeck [Thu, 11 Sep 2014 17:33:16 +0000 (10:33 -0700)]
Always rebuild dist dir in "make dist" or install

10 years agoauto merge of #554 : bkoropoff/cargo/update-git2, r=alexcrichton
bors [Thu, 11 Sep 2014 15:43:50 +0000 (15:43 +0000)]
auto merge of #554 : bkoropoff/cargo/update-git2, r=alexcrichton

This is pretty simple.  Do the existing unit tests sufficiently cover the git2-related changes?

10 years agoUpdate snapshots.txt
Brian Koropoff [Thu, 11 Sep 2014 15:28:08 +0000 (08:28 -0700)]
Update snapshots.txt

10 years agoDon't print `Running` for commands that aren't run
Alex Crichton [Thu, 11 Sep 2014 14:35:01 +0000 (07:35 -0700)]
Don't print `Running` for commands that aren't run

Also print the commands only right before they're actually run.

Closes #215

10 years agoFix obsolete `extern crate` syntax in some of the tests
Brian Koropoff [Thu, 11 Sep 2014 05:36:23 +0000 (22:36 -0700)]
Fix obsolete `extern crate` syntax in some of the tests

10 years agoFix build break by upgrading git2-rs
Brian Koropoff [Thu, 11 Sep 2014 05:29:14 +0000 (22:29 -0700)]
Fix build break by upgrading git2-rs

Update git2-rs to the latest version which includes a fix for `extern crate`
syntax changes.  This version changes the interface for credential callbacks,
so update the git source provider code as well.

10 years agoauto merge of #550 : alexcrichton/cargo/rustdoc, r=brson
bors [Wed, 10 Sep 2014 23:24:02 +0000 (23:24 +0000)]
auto merge of #550 : alexcrichton/cargo/rustdoc, r=brson

* All markdown files are now rendered with `rustdoc` into HTML
* A JS syntax highlighter, prism, is included for TOML syntax highlighting.
* A new makefile target, `make doc`, will build docs into `target/doc`

preview: http://people.mozilla.org/~acrichton/crates.io/doc/

Closes #524

10 years agoMove to rustdoc instead of ruby's middleman
Alex Crichton [Sun, 7 Sep 2014 17:53:20 +0000 (10:53 -0700)]
Move to rustdoc instead of ruby's middleman

* All markdown files are now rendered with `rustdoc` into HTML
* A JS syntax highlighter, prism, is included for TOML syntax highlighting.
* A new makefile target, `make doc`, will build docs into `target/doc`

10 years agoauto merge of #549 : alexcrichton/cargo/git-no-delete, r=brson
bors [Wed, 10 Sep 2014 18:27:54 +0000 (18:27 +0000)]
auto merge of #549 : alexcrichton/cargo/git-no-delete, r=brson

This primarily blows away all *submodules* as well, which sometimes can be quite
large and take some time to update. Instead, re-use an existing checkout, just
reset it to the right revision if possible.

Also, move the submodule update step to occur unconditionally to account for
corrupt submodule checkouts or interrupted downloads. This update step should be
much faster than `git submodule update` because we're using libgit2, so yay!

10 years agoauto merge of #548 : alexcrichton/cargo/frobbing-git-deps, r=brson
bors [Wed, 10 Sep 2014 18:03:21 +0000 (18:03 +0000)]
auto merge of #548 : alexcrichton/cargo/frobbing-git-deps, r=brson

The previous logic for recompiling any dependency was almost entirely based on
the mtimes of the relevant input files. This isn't quite what's desired for git
and registry dependencies because the mtime could be fluctuating while the files
aren't changing. For example:

1. Project A checks out git repo C at revision C1
2. Project A builds, records mtimes of C
3. Project B checks out git repo C at revision C2
4. Project B builds, records new mtimes of C
5. Project A is rebuilt, rebuilding C b/c mtimes are different

In step 5 here C should not be rebuilt because the revision didn't actually
change.

This commit alters git/registry dependencies to completely bypass the --dep-info
emitted and only rely on the git/registry source to inform what the fingerprint
is. This is the revision/version, respectively, and should be all that's
necessary to track changes to the repo and trigger a rebuild.

10 years agoauto merge of #547 : alexcrichton/cargo/git2-for-package, r=brson
bors [Wed, 10 Sep 2014 17:43:52 +0000 (17:43 +0000)]
auto merge of #547 : alexcrichton/cargo/git2-for-package, r=brson

One forgotten spot to modify when migrating from the CLI to libgit2

10 years agoauto merge of #542 : alexcrichton/cargo/issue-539, r=brson
bors [Wed, 10 Sep 2014 16:58:51 +0000 (16:58 +0000)]
auto merge of #542 : alexcrichton/cargo/issue-539, r=brson

Closes #539

10 years agoDon't blow away checked out git repos
Alex Crichton [Wed, 10 Sep 2014 14:47:11 +0000 (07:47 -0700)]
Don't blow away checked out git repos

This primarily blows away all *submodules* as well, which sometimes can be quite
large and take some time to update. Instead, re-use an existing checkout, just
reset it to the right revision if possible.

Also, move the submodule update step to occur unconditionally to account for
corrupt submodule checkouts or interrupted downloads. This update step should be
much faster than `git submodule update` because we're using libgit2, so yay!

10 years agoDon't recompile git deps so frequently
Alex Crichton [Wed, 10 Sep 2014 14:26:42 +0000 (07:26 -0700)]
Don't recompile git deps so frequently

The previous logic for recompiling any dependency was almost entirely based on
the mtimes of the relevant input files. This isn't quite what's desired for git
and registry dependencies because the mtime could be fluctuating while the files
aren't changing. For example:

1. Project A checks out git repo C at revision C1
2. Project A builds, records mtimes of C
3. Project B checks out git repo C at revision C2
4. Project B builds, records new mtimes of C
5. Project A is rebuilt, rebuilding C b/c mtimes are different

In step 5 here C should not be rebuilt because the revision didn't actually
change.

This commit alters git/registry dependencies to completely bypass the --dep-info
emitted and only rely on the git/registry source to inform what the fingerprint
is. This is the revision/version, respectively, and should be all that's
necessary to track changes to the repo and trigger a rebuild.

10 years agoUse libgit2 for `git ls-files`
Alex Crichton [Wed, 10 Sep 2014 14:01:32 +0000 (07:01 -0700)]
Use libgit2 for `git ls-files`

One forgotten spot to modify when migrating from the CLI to libgit2