]> git.proxmox.com Git - cargo.git/log
cargo.git
5 years agoAuto merge of #6637 - dwijnand:introduce-Source.download_now, r=@Eh2406
bors [Sat, 9 Feb 2019 03:12:44 +0000 (03:12 +0000)]
Auto merge of #6637 - dwijnand:introduce-Source.download_now, r=@Eh2406

Introduce Source::download_now

Fixes #6518

5 years agoAuto merge of #6644 - ehuss:bashcomp-updates, r=dwijnand
bors [Fri, 8 Feb 2019 08:10:53 +0000 (08:10 +0000)]
Auto merge of #6644 - ehuss:bashcomp-updates, r=dwijnand

Some updates to bash completion.

- Be smarter about editing an existing command (currently completion only worked well at the end of the line).
- Update for new command line options and commands.
- Support libtest completions.
- Fallback to filename completion in some circumstances.
- Use rustup to complete `--target`.

5 years agoSome updates to bash completion.
Eric Huss [Fri, 1 Feb 2019 17:06:16 +0000 (09:06 -0800)]
Some updates to bash completion.

5 years agoIntroduce Source::download_now
Dale Wijnand [Tue, 5 Feb 2019 17:21:43 +0000 (18:21 +0100)]
Introduce Source::download_now

5 years agoAuto merge of #6631 - dwijnand:fix-run-help, r=ehuss
bors [Tue, 5 Feb 2019 15:27:26 +0000 (15:27 +0000)]
Auto merge of #6631 - dwijnand:fix-run-help, r=ehuss

Fix run's help message

Fixes #3115

5 years agoFix run's help message
Dale Wijnand [Mon, 4 Feb 2019 18:10:13 +0000 (19:10 +0100)]
Fix run's help message

5 years agoAuto merge of #6630 - dwijnand:test-cleanup/remove-unnecessary-with_status_0, r=alexc...
bors [Mon, 4 Feb 2019 19:59:21 +0000 (19:59 +0000)]
Auto merge of #6630 - dwijnand:test-cleanup/remove-unnecessary-with_status_0, r=alexcrichton

Test cleanup: remove unnecessary with_status(0)

(WTB project-specific clippy lints/rustfix rewrites...)

5 years agoTest cleanup: remove unnecessary with_status(0)
Dale Wijnand [Mon, 4 Feb 2019 17:52:33 +0000 (18:52 +0100)]
Test cleanup: remove unnecessary with_status(0)

5 years agoAuto merge of #6621 - dwijnand:clean-cargo_compile, r=ehuss
bors [Mon, 4 Feb 2019 17:18:06 +0000 (17:18 +0000)]
Auto merge of #6621 - dwijnand:clean-cargo_compile, r=ehuss

Extract & re-use filter_targets in cargo_compile

Also drop part of the docs in `list_rule_targets`, as that info is now on `Proposal`.

5 years agoAuto merge of #6619 - dwijnand:cargo-test-help, r=ehuss
bors [Mon, 4 Feb 2019 16:06:54 +0000 (16:06 +0000)]
Auto merge of #6619 - dwijnand:cargo-test-help, r=ehuss

In cargo test's help, add that examples are built

Also clarify that --lib runs the library's unit tests.

Closes #5387

5 years agoExtract & re-use filter_targets in cargo_compile
Dale Wijnand [Mon, 4 Feb 2019 15:27:34 +0000 (16:27 +0100)]
Extract & re-use filter_targets in cargo_compile

Also drop part of the docs in `list_rule_targets`, as that info is now on `Proposal`.

5 years agoIn cargo test's help, add that examples are built
Dale Wijnand [Sun, 3 Feb 2019 13:28:52 +0000 (14:28 +0100)]
In cargo test's help, add that examples are built

Also clarify that --lib runs the library's unit tests.

5 years agoAuto merge of #6628 - dwijnand:doc-no-run, r=Eh2406
bors [Mon, 4 Feb 2019 14:43:10 +0000 (14:43 +0000)]
Auto merge of #6628 - dwijnand:doc-no-run, r=Eh2406

Bail when trying to run "test --doc --no-run"

Fixes #5242

5 years agoBail when trying to run "test --doc --no-run"
Dale Wijnand [Mon, 4 Feb 2019 14:11:58 +0000 (15:11 +0100)]
Bail when trying to run "test --doc --no-run"

5 years agoAuto merge of #6625 - ehuss:fix-macos-fallback-path, r=alexcrichton
bors [Mon, 4 Feb 2019 10:57:18 +0000 (10:57 +0000)]
Auto merge of #6625 - ehuss:fix-macos-fallback-path, r=alexcrichton

Fix default DYLD_FALLBACK_LIBRARY_PATH on MacOS.

On MacOS, dyld uses the default `$(HOME)/lib:/usr/local/lib:/lib:/usr/lib` for `DYLD_FALLBACK_LIBRARY_PATH` when it is not set.  #6355 switched cargo to use `DYLD_FALLBACK_LIBRARY_PATH`, which means the default paths no longer worked. This explicitly adds the defaults back to the end of the list.

Fixes #6623

5 years agoAuto merge of #6611 - Eh2406:conservative-updates, r=alexcrichton
bors [Mon, 4 Feb 2019 08:14:14 +0000 (08:14 +0000)]
Auto merge of #6611 - Eh2406:conservative-updates, r=alexcrichton

keep track of crates that are whitelisted to be used even if yanked

This is a start on #6609. It definitely needs tests that the bug is fixed, and to reduce the clones. But for now let's see what CI thinks.

5 years agoAuto merge of #6620 - dwijnand:make-better-use-of-stdlib-Path-strip_prefix, r=alexcri...
bors [Mon, 4 Feb 2019 07:46:42 +0000 (07:46 +0000)]
Auto merge of #6620 - dwijnand:make-better-use-of-stdlib-Path-strip_prefix, r=alexcrichton

Replace util::without_prefix with Path::strip_prefix

None

5 years agoFix default DYLD_FALLBACK_LIBRARY_PATH on MacOS.
Eric Huss [Mon, 4 Feb 2019 04:22:40 +0000 (20:22 -0800)]
Fix default DYLD_FALLBACK_LIBRARY_PATH on MacOS.

5 years agoReplace util::without_prefix with Path::strip_prefix
Dale Wijnand [Sat, 2 Feb 2019 10:15:31 +0000 (10:15 +0000)]
Replace util::without_prefix with Path::strip_prefix

5 years agoUpdate existing sources when whitelist modified
Alex Crichton [Sat, 2 Feb 2019 18:44:19 +0000 (10:44 -0800)]
Update existing sources when whitelist modified

When sources already exist in a `PackageRegistry` and the whitelist is
updated in the package registry, be sure to update all the existing
sources to ensure that everyone gets the same view of the intended whitelist.

5 years agoAuto merge of #6618 - ehuss:fix-progress-stdout, r=Eh2406
bors [Sat, 2 Feb 2019 17:48:44 +0000 (17:48 +0000)]
Auto merge of #6618 - ehuss:fix-progress-stdout, r=Eh2406

Fix overlapping progress with stdout.

Minor issue introduced in #6615. The progress bar was not being cleared for stdout output (because Shell only does stderr).

5 years agoFix overlapping progress with stdout.
Eric Huss [Sat, 2 Feb 2019 17:42:59 +0000 (09:42 -0800)]
Fix overlapping progress with stdout.

5 years agoAuto merge of #6615 - ehuss:progress-updates, r=alexcrichton
bors [Fri, 1 Feb 2019 20:20:29 +0000 (20:20 +0000)]
Auto merge of #6615 - ehuss:progress-updates, r=alexcrichton

Improve progress bar flickering.

This attempts to reduce the amount of flickering primarily by reducing the number of times the progress bar is updated. The outline of changes:

- Don't display the progress bar for all the initial "Fresh" messages (if -v is not given).
- Don't redisplay the progress bar if it hasn't changed.
- Don't clear the progress bar if it is not displayed.
- Don't clear the progress bar for `Message` events that don't print anything.
- Drain messages in batches to avoid frequently updating the progress bar.
- Only display progress bar if the queue is blocked.

This significantly improves the initial "fresh" updates, but I still see some flickering during normal updates. I wasn't able to figure out why. Logging to a file and doing screen captures I see cargo is printing the progress bar <1ms after it is cleared. I'm guessing that it's just bad timing where the terminal renders just before the progress bar is displayed, and it has to wait an entire rendering cycle until it gets displayed.

I tested on a variety of different terminals and OS's, but the more testing this can get the better.

This unfortunately adds some brittleness of carefully clearing the progress bar before printing new messages. I don't really see an easy way to make that better since there is such a wide variety of ways a `Message` can be printed.

Fixes #6574

5 years agoUse flag in Shell to track progress clearing.
Eric Huss [Fri, 1 Feb 2019 19:40:45 +0000 (11:40 -0800)]
Use flag in Shell to track progress clearing.

5 years agoFix a test assertion
Alex Crichton [Fri, 1 Feb 2019 15:49:35 +0000 (07:49 -0800)]
Fix a test assertion

5 years agoDon't add the entire resolve to the yanked whitelist
Alex Crichton [Fri, 1 Feb 2019 15:48:58 +0000 (07:48 -0800)]
Don't add the entire resolve to the yanked whitelist

If we're updating a crate then its previous version in the lock file is
no longer whitelisted. We may want to perhaps change this in the future!

5 years agoImprove progress bar flickering.
Eric Huss [Fri, 1 Feb 2019 02:54:48 +0000 (18:54 -0800)]
Improve progress bar flickering.

5 years agoRevert "only whitelist packages we are keeping from the lockfile"
Eh2406 [Thu, 31 Jan 2019 16:58:24 +0000 (11:58 -0500)]
Revert "only whitelist packages we are keeping from the lockfile"

This reverts commit 4fb53e53

5 years agomap_source for ReplacedSource
Eh2406 [Wed, 30 Jan 2019 22:33:25 +0000 (17:33 -0500)]
map_source for ReplacedSource

5 years ago[WIP] add tests why does this not pass!?
Eh2406 [Wed, 30 Jan 2019 15:53:04 +0000 (10:53 -0500)]
[WIP] add tests   why does this not pass!?

5 years agopush the rest of the clones to the bottom
Eh2406 [Tue, 29 Jan 2019 22:12:59 +0000 (17:12 -0500)]
push the rest of the clones to the bottom

5 years agoonly whitelist packages we are keeping from the lockfile
Eh2406 [Tue, 29 Jan 2019 21:58:47 +0000 (16:58 -0500)]
only whitelist packages we are keeping from the lockfile

5 years agokeep track of crates that are whitelisted to be used even if yanked
Eh2406 [Tue, 29 Jan 2019 21:24:41 +0000 (16:24 -0500)]
keep track of crates that are whitelisted to be used even if yanked

5 years agoAuto merge of #6603 - dwijnand:add-detail-to-multiple-rename-deps, r=alexcrichton
bors [Tue, 29 Jan 2019 22:06:36 +0000 (22:06 +0000)]
Auto merge of #6603 - dwijnand:add-detail-to-multiple-rename-deps, r=alexcrichton

Add detail to multiple rename deps

Fixes #6601

5 years agoAuto merge of #6591 - hugwijst:fix-race-local-registry, r=alexcrichton
bors [Tue, 29 Jan 2019 00:14:52 +0000 (00:14 +0000)]
Auto merge of #6591 - hugwijst:fix-race-local-registry, r=alexcrichton

Fix race condition in local registry crate unpacking

Copy crate and keep exclusive lock to it with local registries. Ensures
that only one instance will try to extract the source of a new package.

Fixes #6588.

5 years agoAuto merge of #6610 - alexcrichton:revert-incremental, r=Eh2406
bors [Mon, 28 Jan 2019 23:27:38 +0000 (23:27 +0000)]
Auto merge of #6610 - alexcrichton:revert-incremental, r=Eh2406

Revert "Make incremental compilation the default for all profiles."

This reverts commit 2c408583ce4936d7ab5f07a46db8fdcc954925a1.

5 years agoAuto merge of #6606 - dwijnand:unlie-crate-type, r=ehuss
bors [Mon, 28 Jan 2019 22:53:54 +0000 (22:53 +0000)]
Auto merge of #6606 - dwijnand:unlie-crate-type, r=ehuss

Fixup the docs on crate-type

Fixes #4809

5 years agoAdd detail to multiple rename deps
Dale Wijnand [Sun, 27 Jan 2019 17:53:13 +0000 (17:53 +0000)]
Add detail to multiple rename deps

5 years agoRevert "Make incremental compilation the default for all profiles."
Alex Crichton [Mon, 28 Jan 2019 15:24:41 +0000 (07:24 -0800)]
Revert "Make incremental compilation the default for all profiles."

This reverts commit 2c408583ce4936d7ab5f07a46db8fdcc954925a1.

5 years agoFixup the docs on crate-type
Dale Wijnand [Sun, 27 Jan 2019 19:15:47 +0000 (19:15 +0000)]
Fixup the docs on crate-type

5 years agoFirst try opening the package source lock read-only.
Hugo van der Wijst [Mon, 28 Jan 2019 03:47:28 +0000 (19:47 -0800)]
First try opening the package source lock read-only.

5 years agoAuto merge of #6604 - dwijnand:owner-add-invites, r=ehuss
bors [Sun, 27 Jan 2019 23:00:45 +0000 (23:00 +0000)]
Auto merge of #6604 - dwijnand:owner-add-invites, r=ehuss

Document that owner --add now just invites

Fixes #4599

5 years agoDocument that owner --add now just invites
Dale Wijnand [Sun, 27 Jan 2019 18:01:41 +0000 (18:01 +0000)]
Document that owner --add now just invites

5 years agoAuto merge of #6602 - k-nasa:fix_fmt, r=dwijnand
bors [Sun, 27 Jan 2019 15:17:26 +0000 (15:17 +0000)]
Auto merge of #6602 - k-nasa:fix_fmt, r=dwijnand

$cargo fmt --all

It is just PR using the rustfmt command.

I have nothing to do with this PR, but do not you introduce format checks by clippy or rustfmt into CI?

5 years ago$cargo fmt --all
nasa [Sun, 27 Jan 2019 13:39:49 +0000 (22:39 +0900)]
$cargo fmt --all

5 years agoAuto merge of #6600 - ehuss:atomic-deprecated, r=dwijnand
bors [Sun, 27 Jan 2019 07:49:12 +0000 (07:49 +0000)]
Auto merge of #6600 - ehuss:atomic-deprecated, r=dwijnand

Remove deprecated ATOMIC initializers.

Required for rust-lang/rust#57765.

cc @Mark-Simulacrum

5 years agoRemove deprecated ATOMIC initializers.
Eric Huss [Sun, 27 Jan 2019 04:28:48 +0000 (20:28 -0800)]
Remove deprecated ATOMIC initializers.

Required for updating to 1.34.

5 years agoAuto merge of #6599 - Eh2406:more-tests, r=dwijnand
bors [Fri, 25 Jan 2019 21:23:58 +0000 (21:23 +0000)]
Auto merge of #6599 - Eh2406:more-tests, r=dwijnand

Tweeks to proptests

This is some small tweaks to the prop test configuration and adds an additional test.

Most of the diff is whitespace.

5 years agoadditional cases are added by more tests, so dont need the note
Eh2406 [Fri, 25 Jan 2019 16:47:30 +0000 (11:47 -0500)]
additional cases are added by more tests, so dont need the note

5 years agoLock unpacking instead of local registry tarball.
Hugo van der Wijst [Thu, 24 Jan 2019 16:19:43 +0000 (08:19 -0800)]
Lock unpacking instead of local registry tarball.

5 years agoadd an additional fuzz test
Eh2406 [Thu, 24 Jan 2019 22:41:47 +0000 (17:41 -0500)]
add an additional fuzz test

5 years agogen reverse alphabetical graphs
Eh2406 [Thu, 24 Jan 2019 20:56:19 +0000 (15:56 -0500)]
gen reverse alphabetical graphs

5 years agoAuto merge of #6596 - Eh2406:slow-cpu-test, r=dwijnand+alexcrichton
bors [Thu, 24 Jan 2019 19:10:11 +0000 (19:10 +0000)]
Auto merge of #6596 - Eh2406:slow-cpu-test, r=dwijnand+alexcrichton

Some CI setups are much slower then the equipment used by Cargo itself

This adds a "CARGO_TEST_SLOW_CPU_MULTIPLIER" that increases all the time outs used in the tests, and disables Proptest shrinking on non tty cases.

Closes: #6491
CC: #6490, @infinity0
5 years agoremove a lazy_static
Eh2406 [Thu, 24 Jan 2019 18:37:24 +0000 (13:37 -0500)]
remove a lazy_static

5 years agooops
Eh2406 [Thu, 24 Jan 2019 18:06:43 +0000 (13:06 -0500)]
oops

5 years agoDon't shrink if not tty
Eh2406 [Thu, 24 Jan 2019 17:34:43 +0000 (12:34 -0500)]
Don't shrink if not tty

5 years agoSome CI setups are much slower then the equipment used by Cargo itself
Eh2406 [Thu, 24 Jan 2019 17:28:21 +0000 (12:28 -0500)]
Some CI setups are much slower then the equipment used by Cargo itself

5 years agoAuto merge of #6564 - michaelwoerister:default_incremental_everywhere, r=alexcrichton
bors [Thu, 24 Jan 2019 16:55:06 +0000 (16:55 +0000)]
Auto merge of #6564 - michaelwoerister:default_incremental_everywhere, r=alexcrichton

Make incremental compilation the default for all profiles.

This PR makes incremental compilation the default for all profiles, that is, also `release` and `bench`. `rustc` performs ThinLTO by default for incremental release builds for a while now and the [data we've gathered so far](https://github.com/rust-lang/rust/pull/56678) indicates that the generated binaries exhibit roughly the same runtime performance as non-incrementally compiled ones. At the same time, incremental release builds can be 2-5 times as fast as non-incremental ones.

Making incremental compilation (temporarily) the default in `cargo` would be a simple way of gathering more data about runtime performance via [lolbench.rs](https://lolbench.rs). If the results look acceptable, we can just leave it on and give a massive compile time reduction to everyone. If not, we can revert the change and think about a plan B.

This strategy assumes that lolbench will actually use the nightly `cargo` version. Is that true, @anp?

r? @alexcrichton

5 years agoAuto merge of #6593 - k-nasa:refactor_clippy, r=dwijnand
bors [Wed, 23 Jan 2019 14:47:20 +0000 (14:47 +0000)]
Auto merge of #6593 - k-nasa:refactor_clippy, r=dwijnand

into_iter() call is equivalent to .iter() and will not move the slice

5 years agorefactor: .into_iter() call is equivalent to .iter() and will not move the slice
nasa [Wed, 23 Jan 2019 13:48:23 +0000 (22:48 +0900)]
refactor: .into_iter() call is equivalent to .iter() and will not move the slice

5 years agoFix race condition in local registry crate downloading.
Hugo van der Wijst [Wed, 23 Jan 2019 05:50:27 +0000 (21:50 -0800)]
Fix race condition in local registry crate downloading.

Copy crate and keep exclusive lock to it with local registries. Ensures
that only one instance will try to extract the source of a new package.

Fixes #6588.

5 years agoAuto merge of #6587 - alexcrichton:bump, r=ehuss
bors [Tue, 22 Jan 2019 21:43:53 +0000 (21:43 +0000)]
Auto merge of #6587 - alexcrichton:bump, r=ehuss

Bump to 0.35.0

A routine update!

5 years agoBump to 0.35.0
Alex Crichton [Tue, 22 Jan 2019 21:18:16 +0000 (13:18 -0800)]
Bump to 0.35.0

A routine update!

5 years agoAuto merge of #6581 - dwijnand:private-publish-docs, r=ehuss
bors [Tue, 22 Jan 2019 18:39:06 +0000 (18:39 +0000)]
Auto merge of #6581 - dwijnand:private-publish-docs, r=ehuss

Mention "private" in publish field docs

Fixes #6576

5 years agoAuto merge of #6548 - dwijnand:mark-lockfile-as-generated, r=alexcrichton
bors [Tue, 22 Jan 2019 18:10:02 +0000 (18:10 +0000)]
Auto merge of #6548 - dwijnand:mark-lockfile-as-generated, r=alexcrichton

Marking Cargo.lock as generated

12 weeks have passed, let's mark lock files as generated!

Fixes #6180

5 years agoAuto merge of #6565 - SamWhited:add_srht_ci_config, r=alexcrichton
bors [Tue, 22 Jan 2019 17:02:49 +0000 (17:02 +0000)]
Auto merge of #6565 - SamWhited:add_srht_ci_config, r=alexcrichton

Add builds.sr.ht CI config to book

This adds a CI configuration for [builds.sr.ht](https://builds.sr.ht) to the book alongside the existing configurations for Travis and GitLab CI.
The config in question is broadly similar to those two, except that I also opted to build the docs as I commonly find markdown oddities this way from the warnings it spits out.
I picked Arch Linux as the base image because it's easy to install rustup there (since there's a package for it in the Arch repos), but it could have been Debian or FreeBSD or something else just as easily if you have strong opinions about manually installing rustup.

**EDIT:** None of the other build configs had it, so I didn't add publishing tagged commits to crates.io using its secrets mechanism to log cargo in. However, if that's something you think would be beneficial, I can add it.

5 years agoMention "private" in publish field docs
Dale Wijnand [Tue, 22 Jan 2019 09:16:43 +0000 (10:16 +0100)]
Mention "private" in publish field docs

5 years agoAuto merge of #6578 - nanpuyue:patch-1, r=ehuss
bors [Tue, 22 Jan 2019 04:05:36 +0000 (04:05 +0000)]
Auto merge of #6578 - nanpuyue:patch-1, r=ehuss

fix an error completion of `cargo run --example`

5 years agofix an error completion of `cargo run --example`
南浦月 [Tue, 22 Jan 2019 03:36:39 +0000 (11:36 +0800)]
fix an error completion of `cargo run --example`

5 years agoAuto merge of #6573 - ehuss:mtime-on-use-feature, r=dwijnand
bors [Sun, 20 Jan 2019 22:31:07 +0000 (22:31 +0000)]
Auto merge of #6573 - ehuss:mtime-on-use-feature, r=dwijnand

Put mtime-on-use behind a feature flag.

This places #6477 behind the `-Z mtime-on-use` feature flag.

The change to update the mtime each time a crate is used has caused a performance regression on the rust playground (rust-lang/rust#57774). It is using about 241 pre-built crates in a Docker container. Due to the copy-on-write nature of Docker, it can take a significant amount of time to update the timestamps (over 10 seconds on slower systems).

cc @Mark-Simulacrum

5 years agoPut mtime-on-use behind a feature flag.
Eric Huss [Sun, 20 Jan 2019 22:23:16 +0000 (14:23 -0800)]
Put mtime-on-use behind a feature flag.

5 years agoAuto merge of #6569 - dwijnand:fix-unstable-doc-typo, r=ehuss
bors [Sun, 20 Jan 2019 20:21:34 +0000 (20:21 +0000)]
Auto merge of #6569 - dwijnand:fix-unstable-doc-typo, r=ehuss

Fix a typo in the unstable docs

None

5 years agoFix a typo in the unstable docs
Dale Wijnand [Sun, 20 Jan 2019 16:05:57 +0000 (16:05 +0000)]
Fix a typo in the unstable docs

5 years agoAuto merge of #6550 - In-line:did-you-mean-with-question-mark, r=dwijnand
bors [Sun, 20 Jan 2019 07:34:22 +0000 (07:34 +0000)]
Auto merge of #6550 - In-line:did-you-mean-with-question-mark, r=dwijnand

Perhaps you meant: foo, bar or foobar

Hi! Rust project is very cool, but I noticed some minor issues. In every place `did you mean: bla bla` end with the question mark, so I decided to include it here too.

5 years agoPerhaps you meant: bar, foo or foobar
Alik Aslanyan [Mon, 14 Jan 2019 19:34:46 +0000 (23:34 +0400)]
Perhaps you meant: bar, foo or foobar

5 years agoMarking Cargo.lock as generated
Dale Wijnand [Mon, 14 Jan 2019 10:20:10 +0000 (10:20 +0000)]
Marking Cargo.lock as generated

5 years agoAuto merge of #6557 - k-nasa:move_uninstall, r=dwijnand
bors [Sat, 19 Jan 2019 08:36:35 +0000 (08:36 +0000)]
Auto merge of #6557 - k-nasa:move_uninstall, r=dwijnand

Refactor: Create uninstall submodule

Since 'uninstall' was found in the 'install' module, it split.
And I moved duplicate functions to utils.

5 years agorefactor: Rename ops :: utils module
nasa [Sat, 19 Jan 2019 00:43:10 +0000 (09:43 +0900)]
refactor: Rename ops :: utils module

Changed to common_for_install_and_uninstall

5 years agofix: Replace the reference to v1 with a method
nasa [Sat, 19 Jan 2019 00:22:09 +0000 (09:22 +0900)]
fix: Replace the reference to v1 with a method

5 years agofeat: Add a method to get mutable access of v1 field
nasa [Sat, 19 Jan 2019 00:20:09 +0000 (09:20 +0900)]
feat: Add a method to get mutable access of v1 field

5 years agofeat: Add v1 field getter
nasa [Sat, 19 Jan 2019 00:17:23 +0000 (09:17 +0900)]
feat: Add v1 field getter

5 years agofix: Make v1 field private
nasa [Sat, 19 Jan 2019 00:15:33 +0000 (09:15 +0900)]
fix: Make v1 field private

5 years agoAuto merge of #6561 - ehuss:fix-switch-features, r=alexcrichton
bors [Fri, 18 Jan 2019 23:28:48 +0000 (23:28 +0000)]
Auto merge of #6561 - ehuss:fix-switch-features, r=alexcrichton

Fix spurious Windows errors with switch_features_rerun.

Fix a flaky test on Windows which fails with "Access is denied.".

Previous errors:
https://ci.appveyor.com/project/rust-lang-libs/cargo/builds/17766698
https://ci.appveyor.com/project/rust-lang-libs/cargo/builds/18040797
https://ci.appveyor.com/project/rust-lang-libs/cargo/builds/20472056
https://ci.appveyor.com/project/rust-lang-libs/cargo/builds/18746372
https://ci.appveyor.com/project/rust-lang-libs/cargo/builds/18559776
https://ci.appveyor.com/project/rust-lang-libs/cargo/builds/19659571
https://ci.appveyor.com/project/rust-lang-libs/cargo/builds/18956349
https://ci.appveyor.com/project/rust-lang-libs/cargo/builds/18183191
https://ci.appveyor.com/project/rust-lang-libs/cargo/builds/20334485
https://ci.appveyor.com/project/rust-lang-libs/cargo/builds/18554058

5 years agoAdd builds.sr.ht CI config to book
Sam Whited [Fri, 18 Jan 2019 16:42:52 +0000 (10:42 -0600)]
Add builds.sr.ht CI config to book

5 years agoRename method.
Eric Huss [Fri, 18 Jan 2019 16:39:25 +0000 (08:39 -0800)]
Rename method.

5 years agoMake incremental compilation the default for all profiles.
Michael Woerister [Fri, 18 Jan 2019 10:11:32 +0000 (11:11 +0100)]
Make incremental compilation the default for all profiles.

5 years agoAuto merge of #6562 - ehuss:travis-no-master, r=dwijnand
bors [Fri, 18 Jan 2019 07:12:43 +0000 (07:12 +0000)]
Auto merge of #6562 - ehuss:travis-no-master, r=dwijnand

Stop building on master on Travis.

I think #6540 probably should have included this, now that there is a green icon.

5 years agoStop building on master on Travis.
Eric Huss [Fri, 18 Jan 2019 01:03:53 +0000 (17:03 -0800)]
Stop building on master on Travis.

5 years agoFix spurious Windows errors with switch_features_rerun.
Eric Huss [Fri, 18 Jan 2019 00:39:04 +0000 (16:39 -0800)]
Fix spurious Windows errors with switch_features_rerun.

5 years agoAuto merge of #6560 - ehuss:better-install-error, r=Eh2406
bors [Thu, 17 Jan 2019 23:57:50 +0000 (23:57 +0000)]
Auto merge of #6560 - ehuss:better-install-error, r=Eh2406

Better error message for bad manifest with `cargo install`.

The old code assumed that any error loading a manifest meant that the
manifest didn't exist, but there are many other reasons it may fail.
Add a few helpful messages for some common cases.

First noticed at https://github.com/rust-lang/cargo/issues/5654#issuecomment-455293220

5 years agoAuto merge of #6559 - euclio:relax-rustdoc-output, r=ehuss
bors [Thu, 17 Jan 2019 21:00:49 +0000 (21:00 +0000)]
Auto merge of #6559 - euclio:relax-rustdoc-output, r=ehuss

relax rustdoc output assertion

The output of this rustdoc error is changing in rust-lang/rust#56884. This PR relaxes an assertion on the output so that the test will still pass once the rustdoc PR is merged.

5 years agoBetter error message for bad manifest with `cargo install`.
Eric Huss [Thu, 17 Jan 2019 20:59:43 +0000 (12:59 -0800)]
Better error message for bad manifest with `cargo install`.

The old code assumed that any error loading a manifest meant that the
manifest didn't exist, but there are many other reasons it may fail.
Add a few helpful messages for some common cases.

5 years agorelax rustdoc output assertion
Andy Russell [Thu, 17 Jan 2019 18:15:14 +0000 (13:15 -0500)]
relax rustdoc output assertion

5 years agoAdd utils mod
nasa [Thu, 17 Jan 2019 08:12:59 +0000 (17:12 +0900)]
Add utils mod

5 years agorefacotor: Move uninstall
nasa [Thu, 17 Jan 2019 08:12:36 +0000 (17:12 +0900)]
refacotor: Move uninstall

5 years agoDelete code transferred to utils
nasa [Thu, 17 Jan 2019 08:10:20 +0000 (17:10 +0900)]
Delete code transferred to utils

5 years agoadd: Move common functions in 'install' and 'uninstall' to ops::utils
nasa [Thu, 17 Jan 2019 08:07:56 +0000 (17:07 +0900)]
add: Move common functions in 'install' and 'uninstall' to ops::utils

5 years agoAuto merge of #6477 - Eh2406:add-a-timestamp-file, r=ehuss
bors [Wed, 16 Jan 2019 23:28:02 +0000 (23:28 +0000)]
Auto merge of #6477 - Eh2406:add-a-timestamp-file, r=ehuss

touch some files when we use them

This is a small change to improve the ability for a third party subcommand to clean up a target folder. I consider this part of the push to experiment with out of tree GC, as discussed in #6229.

how it works?
--------

This updates the modification time of a file in each fingerprint folder and the modification time of the intermediate outputs every time cargo checks that they are up to date. This allows a third party subcommand to look at the modification time of the timestamp file to determine the last time a cargo invocation required that file. This is far more reliable then the current practices of looking at the `accessed` time. `accessed` time is not available or disabled on many operating systems, and is routinely set by arbitrary other programs.

is this enough to be useful?
--------

The current implementation of cargo sweep on master will automatically use this data with no change to the code. With this PR, it will work even on systems that do not update `accessed` time.

This also allows a crude script to clean some of the largest subfolders based on each files modification time.

is this worth adding, or should we just build `clean --outdated` into cargo?
------
I would love to see a `clean --outdated` in cargo! However, I think there is a lot of design work before we can make something good enough to deserve the cargo teams stamp of approval. Especially as an in tree version will have to work with many use cases some of witch are yet to be designed (like distributed builds). Even just including `cargo-sweep`s existing functionality opens a full bike shop about what arguments to take, and in what form (`cargo-sweep` takes a days argument, but maybe we should have a minutes or a ISO standard time or ...). This PR, or equivalent, allows out of tree experimentation with all different interfaces, and is basically required for any `LRU` based system. (For example [Crater](https://github.com/rust-lang-nursery/crater/issues/346) wants a GC that cleans files in an `LRU` manner to maintain a target folder below a target size. This is not a use case that is widely enough needed to be worth adding to cargo but one supported by this PR.)

what are the downsides?
----

1. There are legitimate performance concerns about writing so many small files during a NOP build.
2. There are legitimate concerns about unnecessary wrights on read-only filesystems.
3. If we add this, and it starts seeing widespread use, we may be de facto stabilizing the folder structure we use. (This is probably true of any system that allows out of tree experimentation.)
4. This may not be an efficient way to store the data. (It does have the advantage of not needing different cargos to manipulate the same file. But if you have a better idea please make a suggestion.)

5 years agoAuto merge of #6553 - ehuss:doc-publish-features, r=alexcrichton
bors [Tue, 15 Jan 2019 02:38:14 +0000 (02:38 +0000)]
Auto merge of #6553 - ehuss:doc-publish-features, r=alexcrichton

Add documentation for new package/publish feature flags.

Added in #6453.

5 years agoAuto merge of #6554 - ehuss:chat-link, r=alexcrichton
bors [Tue, 15 Jan 2019 01:36:42 +0000 (01:36 +0000)]
Auto merge of #6554 - ehuss:chat-link, r=alexcrichton

Update chat link to Discord.

I'm not sure if anyone is hanging out in the IRC channel much these days.