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).
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).
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?
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!
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!
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
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.
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.
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
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
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.
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!
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.
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
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
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
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.
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.
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).
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
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.