Commit graph

1877 commits

Author SHA1 Message Date
bors bc40ad7b14 Auto merge of #1664 - IvanUkhov:is-dir, r=alexcrichton
The pull request addresses issue #1663. The problem is that `libgit2` [combines][1] `S_IFDIR ` with `S_IFLNK`, and, therefore, the [strict comparison][2] based on `S_ISDIR` rejects directories.


Regards,
Ivan

[1]: 47f3740025/src/index.c (L308)
[2]: 06dbe6555a/src/cargo/sources/path.rs (L150)
2015-06-02 20:38:40 +00:00
Ivan Ukhov 632780ebef Fix the detection of directories when listing files using libgit2 2015-06-02 10:55:04 -04:00
Ivan Ukhov 036d6f6d16 tests: add a test for submodule packaging 2015-06-02 10:55:00 -04:00
Ivan Ukhov 32dae0bb37 tests: move Git-related routines to support 2015-06-02 10:00:32 -04:00
bors e91865c19a Auto merge of #1671 - alexcrichton:osx-more-robust, r=huonw
Tests are often flaky because the resolution of the OSX filesystem timestamps
appears to be 1s, so we often have to manually sleep for 1s to ensure that
enough time has passed to guarantee that the timestamp is different (used in
freshness calculations).
2015-06-02 02:32:13 +00:00
Alex Crichton 8086ab40d5 Make a freshness test more robust on OSX
Tests are often flaky because the resolution of the OSX filesystem timestamps
appears to be 1s, so we often have to manually sleep for 1s to ensure that
enough time has passed to guarantee that the timestamp is different (used in
freshness calculations).
2015-06-01 18:24:57 -07:00
bors 06dbe6555a Auto merge of #1656 - EduardoBautista:cargo-home-absolute-path, r=alexcrichton
OK, this should fix https://github.com/rust-lang/cargo/issues/1655.  It worked on my local.  I am not entirely sure how to write a test for this.  Can I get some help and be pointed in the right direction?
2015-05-29 05:54:27 +00:00
bors bedfde0b9c Auto merge of #1659 - alexcrichton:shorten-paths-on-windows, r=alexcrichton
Unfortunately paths are getting a little too long on Windows and libgit2 is
given us back the error:

      Failed to rename lockfile to 'C:/bot/slave/nightly-dist-cargo-win-gnu-64-64/build/target/x86_64-pc-windows-gnu/debug/cit/test-155/home/.cargo/git/checkouts/meta-dep-27104ee87001fd00/08c585f6f3927118da012a2d682b67a789c35211/.git/objects/pack/pack-ba5fd201f4c1be9792e6d54eef194e6b733ae719.idx': The data area passed to a system call is too small.

Windows isn't always the best at handling long paths, so this commit changes the
location of the `cit` output directory where tests are located as well as
shortening the name of each test's folder to hopefully get the folder sizes a
little under the limit.

I believe this test is only failing on the nightly bots because the folder name
for the nightly bots is longer than the folder name for the auto bots. Hurray!
2015-05-29 00:08:40 +00:00
Alex Crichton ef13d35b08 Shorten paths in the test runner for windows
Unfortunately paths are getting a little too long on Windows and libgit2 is
given us back the error:

      Failed to rename lockfile to 'C:/bot/slave/nightly-dist-cargo-win-gnu-64-64/build/target/x86_64-pc-windows-gnu/debug/cit/test-155/home/.cargo/git/checkouts/meta-dep-27104ee87001fd00/08c585f6f3927118da012a2d682b67a789c35211/.git/objects/pack/pack-ba5fd201f4c1be9792e6d54eef194e6b733ae719.idx': The data area passed to a system call is too small.

Windows isn't always the best at handling long paths, so this commit changes the
location of the `cit` output directory where tests are located as well as
shortening the name of each test's folder to hopefully get the folder sizes a
little under the limit.

I believe this test is only failing on the nightly bots because the folder name
for the nightly bots is longer than the folder name for the auto bots. Hurray!
2015-05-28 17:06:25 -07:00
Eduardo Bautista f8b91b577b Use absolute path for CARGO_HOME 2015-05-28 18:34:50 -05:00
bors 9a09446474 Auto merge of #1658 - alexcrichton:debug-windows, r=alexcrichton
This test is failing on the win64 bot, and I'm not 100% sure why, so trying to
get some more info out of it.
2015-05-28 22:59:10 +00:00
Alex Crichton 7d73487e5a Try to debug a failing test on the windows bots
This test is failing on the win64 bot, and I'm not 100% sure why, so trying to
get some more info out of it.
2015-05-28 15:56:42 -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
bors 727e7ce2cd Auto merge of #1654 - alexcrichton:udpate-ssh2-sys, r=alexcrichton
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 19:35:25 +00:00
bors 8fa3aaf697 Auto merge of #1642 - alexcrichton:opt-fs, r=huonw
Traversing large directory trees can take quite some time, and this commit optimizes a few locations to reduce the number of calls to `fs::metadata`.
2015-05-27 19:16:14 +00:00
bors cd46b343a6 Auto merge of #1641 - alexcrichton:update-less, r=brson
Updating a path source can be a possibly expensive operation (lots of
directories that need to be traversed), and currently the root path source is
updated three times:

* Once when the root package is initially loaded.
* Again when the first resolution pass happens over a graph.
* Finally a third when the second resolution pass happens over the graph.

This commit pushes through the original `Source` trait object into the
`PackageRegistry` and removes the implicit call to `add_sources`, pushing that
call up to the stack a bit.
2015-05-27 19:03:50 +00:00
bors 00016d6210 Auto merge of #1639 - jimmycuadra:jobs-flag-docs, r=wycats
Addresses #1591.

I believe this issue only affects `cargo bench` and `cargo test`. If it's applicable to any of the other commands, let me know and I'll amend this.
2015-05-27 18:51:59 +00:00
bors 463a5fa539 Auto merge of #1637 - dhuseby:bitrig_snapshot, r=alexcrichton
adds the bitrig cargo snapshot.  d/l the tarball from here: http://blog.linuxprogrammer.org/cargo-nightly-x86_64-unknown-bitrig.tar.gz
2015-05-27 18:41:28 +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
bors 980d7cf94e Auto merge of #1617 - alexcrichton:fix-kind-after-the-fact, r=brson
The wrong kind was mistakenly used in the case of having a dependency on a
plugin.

Unfortunately I don't know of a great way to test this, so no unit test is included for now.

Closes #1612
2015-05-27 18:29:48 +00:00
bors 6c86f13312 Auto merge of #1651 - Roysten:master, r=alexcrichton 2015-05-26 20:05:48 +00:00
Roy van der Vegt "platypus 284c0ef974 fix name escaping issue in Cargo.toml (#1635) and added corresponding
test
2015-05-26 21:42:10 +02:00
Alex Crichton c111410791 Update the tar-rs dependency
Fixes some extraction bugs when unpacking archives.
2015-05-26 10:16:41 -07:00
Brian Anderson 3090cc3151 Merge pull request #1640 from alexcrichton/fix-rel-config
Fix a relative `rustc` spec to .cargo/config
2015-05-21 20:01:39 -07:00
Alex Crichton 046a6c59e9 Reduce calls to fs::metadata in list_git_files
When walking over entries in the index of a git repository the file type can be
known without a syscall (in the form of a libc constant), but walking over
untracked files still requires a syscall to determine if it's a directory.
2015-05-19 23:07:15 -07:00
Alex Crichton e595e87762 Optimize the number of calls to fs::metadata
When iterating over `DirEntry` values the file type of the entry can typically
be determined without a syscall, so use the new unstable APIs in `std::fs` to
avoid an extra call to `fs::metadata`. When traversing large directory trees the
improvement is quite noticeable!
2015-05-19 23:04:47 -07:00
Alex Crichton ef8c651af1 Don't update the same path source multiple times
Updating a path source can be a possibly expensive operation (lots of
directories that need to be traversed), and currently the root path source is
updated three times:

* Once when the root package is initially loaded.
* Again when the first resolution pass happens over a graph.
* Finally a third when the second resolution pass happens over the graph.

This commit pushes through the original `Source` trait object into the
`PackageRegistry` and removes the implicit call to `add_sources`, pushing that
call up to the stack a bit.
2015-05-19 22:57:37 -07:00
Alex Crichton 081065d369 Fix a relative rustc spec to .cargo/config
The paths were mistakenly relative to .cargo/config, not the directory
containing .cargo/config
2015-05-19 21:43:41 -07:00
Jimmy Cuadra 07df28e8e1 Clarify that --jobs doesn't affect parallelism when running the resulting binary. 2015-05-19 21:06:24 -07:00
Dave Huseby f96f0ba654 oops forgot to grab the bitrig line 2015-05-19 15:38:10 -07:00
Dave Huseby d31bd78be3 updating snapshot scripts to support bitrig 2015-05-19 15:36:13 -07:00
Dave Huseby 3474a1a78b adding bitrig cargo snapshot 2015-05-19 15:06:28 -07:00
bors a1778efa74 Auto merge of #1629 - alexcrichton:env-rustc, r=alexcrichton
These commits add two vectors through which the compiler run can be configured:

* A `RUSTC` environment variable
* A `build.rustc` configuration variable in a `.cargo/config` file
2015-05-19 04:13:45 +00:00
Alex Crichton 8a8ea1e89e Add rustc/rustdoc config keys to Cargo config
In addition to global RUSTC/RUSTDOC env vars, this commit recognizes
`build.rustc` and `build.rustdoc` as configuration keys for Cargo to instruct
what tools should be used instead of the default.

Closes #967
2015-05-18 21:11:51 -07:00
bors 6962728bb1 Auto merge of #1625 - alexcrichton:ignore-dotfile, r=brson
Whenever Cargo infers various targets for a project it currently picks up all
files in associated folders, but dotfiles are a common example of files which
editors generate which Cargo should not pick up, so this commit ignores all
dotfiles in the folders that it is looking at.

Closes #1615
2015-05-19 01:03:03 +00:00
bors 9be0f261a8 Auto merge of #1632 - hansjorg:master, r=alexcrichton
Check for existence of file in dl_path before fetching with curl.
If file exists, compare hash with expected.

Also wrap tarfile.open() in contextlib.closing() to support older
python versions (<= 2.6).

This fixes part of #1525.
2015-05-19 00:50:07 +00:00
Hans Jørgen Hoel 79cb5b9106 Make dl-snapshot.py avoid dl'ing existing files
Check for existence of file in dl_path before fetching with curl.
If file exists, compare hash with expected.

Also wrap tarfile.open() in contextlib.closing() to support older
python versions (<= 2.6).

This fixes part of #1525.
2015-05-19 01:27:29 +02:00
Alex Crichton 2fe0bf83bf Remove borrowed pointer in Config
Not having a lifetime parameter on the ubiquitous Config structure allows a
great deal of other lifetime annotations to be removed and should make dealing
with storage of Config in a structure much easier (only one lifetime to deal
with, not two).
2015-05-18 15:33:04 -07:00
Alex Crichton 20ce682e85 Recognize RUSTC/RUSTDOC environment variables 2015-05-18 15:01:35 -07:00
bors 3721b634d5 Auto merge of #1628 - alexcrichton:update-deps, r=alexcrichton
Opt in to nightly features for a few, and update others to get bitrig support
2015-05-18 21:49:39 +00: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
bors 3d926ee57b Auto merge of #1627 - brson:version, r=alexcrichton
So we have a unique version number to pair with Rust 1.1.
2015-05-18 20:07:47 +00:00
Brian Anderson 49ac979568 Bump version to 0.3 2015-05-18 11:21:57 -07:00
bors e2372a88b3 Auto merge of #1619 - Eljay:fix-doc-open, r=alexcrichton
Fixes #1595.
2015-05-18 15:42:06 +00:00
Alex Crichton 1727409e6d Don't auto-build dotfiles in inferred folders
Whenever Cargo infers various targets for a project it currently picks up all
files in associated folders, but dotfiles are a common example of files which
editors generate which Cargo should not pick up, so this commit ignores all
dotfiles in the folders that it is looking at.

Closes #1615
2015-05-18 08:32:35 -07:00
Lee Jeffery ccfcc9008c Reuse existing crate_name method instead. 2015-05-17 21:57:10 +01:00
bors ac61996f8d Auto merge of #1616 - sbeckeriv:master, r=alexcrichton
This resolves #1379
2015-05-17 20:30:03 +00:00
bors c60f58568d Auto merge of #1620 - Eljay:empty-package-name, r=alexcrichton
Some simple validation for package/target names. Currently failure for these cases happens later in rustc (e.g. "crate name must not be empty") or at the os level (e.g. "Is a directory" error when package name is empty on linux). Better to handle this earlier so it's consistent across platforms.

Still could do with a lot of validation for invalid characters etc. though.
2015-05-17 20:06:53 +00:00
Stephen Becker IV 372e9d60b9 Fix whitespace
Now matches test output.
2015-05-17 09:32:53 -07:00
Stephen Becker IV d726c576b0 Update text per comment in pull request.
Better error message with details around lib and bin.
2015-05-17 09:01:50 -07:00