bors [Tue, 27 Aug 2019 22:12:43 +0000 (22:12 +0000)]
Auto merge of #7303 - alexcrichton:duplicate-patch, r=ehuss
Fixes around multiple `[patch]` per crate
This commit fixes a few bugs in handling of `[patch]` where multiple
version of the same crate name have been patched in. Two sub-issues were
discovered when investigating #7264:
* The first issue is that the source of the assertion, the logic in
`lock`, revealed a fundamental flaw in the logic. The `lock` function
serves the purpose of applying a lock file to a dependency candidate
and ensure that it stays within locked versions of dependencies, if
they're previously found. The logic here to handle `[patch]`, however,
happened a bit too late and was a bit too zealous to simply lock a
dependency by name instead of accounting for the version as well.
The updated logic is to move the locking of dependencies here to
during the normal iteration over the list of dependencies. Adjacent to
`matches_id` we check `matches_ignoring_source`. If the latter returns
`true` then we double-check that the previous dependency is still in
`[patch]`, and then we let it through. This means that patches with
multiple versions should be correctly handled where edges drawn with
`[patch]` are preserved.
* The second issue, after fixing this, was found where if the exact same
version was listed in `[patch]` multiple times then we would
continuously update the original source since one of the replacements
gets lost along the way. This commit adds a first-class warning
disallowing patches pointing to the exact same crate version, since we
don't have a way to prioritize amongst them anyway.
Alex Crichton [Mon, 26 Aug 2019 19:52:26 +0000 (12:52 -0700)]
Fixes around multiple `[patch]` per crate
This commit fixes a few bugs in handling of `[patch]` where multiple
version of the same crate name have been patched in. Two sub-issues were
discovered when investigating #7264:
* The first issue is that the source of the assertion, the logic in
`lock`, revealed a fundamental flaw in the logic. The `lock` function
serves the purpose of applying a lock file to a dependency candidate
and ensure that it stays within locked versions of dependencies, if
they're previously found. The logic here to handle `[patch]`, however,
happened a bit too late and was a bit too zealous to simply lock a
dependency by name instead of accounting for the version as well.
The updated logic is to move the locking of dependencies here to
during the normal iteration over the list of dependencies. Adjacent to
`matches_id` we check `matches_ignoring_source`. If the latter returns
`true` then we double-check that the previous dependency is still in
`[patch]`, and then we let it through. This means that patches with
multiple versions should be correctly handled where edges drawn with
`[patch]` are preserved.
* The second issue, after fixing this, was found where if the exact same
version was listed in `[patch]` multiple times then we would
continuously update the original source since one of the replacements
gets lost along the way. This commit adds a first-class warning
disallowing patches pointing to the exact same crate version, since we
don't have a way to prioritize amongst them anyway.
bors [Tue, 27 Aug 2019 20:52:36 +0000 (20:52 +0000)]
Auto merge of #7306 - alexcrichton:mkdir-error, r=ehuss
Improve error messages on mkdir failure
This commit ensures that `fs::create_dir*` isn't called throughout Cargo
and is instead routed through our own wrapper `paths::create_dir_all`
which brings with it a few benefits:
* Gracefully handles when the directory already exists (which is the
behavior we always want anyway)
* Includes the path name in the error message of what failed
* Handles races of creating a directory by default
Alex Crichton [Tue, 27 Aug 2019 19:52:49 +0000 (12:52 -0700)]
Improve error messages on mkdir failure
This commit ensures that `fs::create_dir*` isn't called throughout Cargo
and is instead routed through our own wrapper `paths::create_dir_all`
which brings with it a few benefits:
* Gracefully handles when the directory already exists (which is the
behavior we always want anyway)
* Includes the path name in the error message of what failed
* Handles races of creating a directory by default
bors [Tue, 27 Aug 2019 16:10:51 +0000 (16:10 +0000)]
Auto merge of #7296 - okapia:zsh-completion, r=ehuss
Update and improve zsh completion
I went through the zsh completion to clean it up, adapt it to zsh conventions, and to bring it up-to-date for new cargo options. For context, I'm one of the zsh developers and do know what I'm doing with zsh completion functions. As for cargo, I do use it but was referring to documentation here.
I added new functions for completion of installed crates and unstable flags.
Many subcommands had out-of-date option lists which I've updated, This isn't yet comprehensive, however.
Factored out the definition of some common options into variables - this explains the greater number of lines deleted than added.
Corrected the syntax of option exclusion lists which erroneously contained commas. It was also common for option arguments to be missing and = to not be allowed before them.
--verbose can be repeated so now has * instead of the self-exclusion. It and --quiet appear to be mutually exclusive, however.
I've given internal functions an _cargo prefix as per zsh conventions. This avoids name clashes. I also removed _get from the names - zsh convention is a plural noun for what is completed.
Completion of normal arguments to many subcommands was missing. In many cases, this is now just a description - e.g. "crate". _guard is needed in some cases so as not to break option completion. For rustc and rustdoc, it'll dispatch to their respective completions if they ever gain one, otherwise using default completion.
It now passes -s to _arguments to allow clumping of short options, -S for correct
handling of -- and -C for correct context handling. _arguments also changes some variables which should be declared local and I've restored these - ShellCheck had persuaded someone to remove them.
For unknown cargo subcommands, it will now try a _cargo-<subcommand>
function if found and fallback to _default allowing cargo plugins to
define their own completion. This is common zsh practice, see e.g. _git. And fallbacks to default completion are always a good idea - users don't tend to like filename completion being broken.
$curcontext is now updated to include the sub-command which provides more flexibility to users configuring zsh completion with zstyle.
bors [Mon, 26 Aug 2019 14:48:27 +0000 (14:48 +0000)]
Auto merge of #7294 - SnejUgal:fix-inconsistent-coloring, r=alexcrichton
Fix `error:`/`warning:` coloring inconsistency with rustc
When `rustc` prints an error, the word `error` is red, but the colon after it is white (and the same goes for `warn`, `note` and other messages). `cargo`, however, colors the colon as well, and it [looks inconsistent](https://user-images.githubusercontent.com/10610844/63640674-45040f00-c6cd-11e9-9ee9-6f6f44a51f83.png) when `rustc`'s output is followed by `cargo`'s side-by-side. If `cargo` prints the colon in white, the output [looks more accurate](https://user-images.githubusercontent.com/10610844/63640792-f2c3ed80-c6ce-11e9-9b6e-ba209a4f9788.png).
Oliver Kiddle [Sat, 24 Aug 2019 23:29:21 +0000 (01:29 +0200)]
Update and improve zsh completion
Added completion of installed crates and unstable flags along with
some newer options.
Factored out the definition of some common options into variables.
Corrected the syntax of option exclusion lists which contained commas
--verbose can be repeated so now has * instead of the self-exclusion
Internal functions given _cargo prefix as per zsh conventions
Completion of normal arguments to many subcommands was missing
Pass -s to _arguments to allow clumping of short options, -S for correct
handling of -- and -C for correct context handling.
For unknown cargo subcommands, it will now try a _cargo-<subcommand>
function if found and fallback to _default allowing cargo plugins to
define their own completion. This is common zsh practice, see e.g. _git.
bors [Thu, 22 Aug 2019 15:06:10 +0000 (15:06 +0000)]
Auto merge of #7277 - lzutao:bump-home, r=alexcrichton
Update home dependencies to v0.5
This home's release remove support for the old `.multirust`
directory. Also it fixes rustup_home and cargo_home implementation
when corresponding environment variables are absolute paths.
Lzu Tao [Wed, 21 Aug 2019 13:24:06 +0000 (20:24 +0700)]
Update home dependencies to v0.5
This home's release remove support for the old `.multirust`
directory. Also it fixes rustup_home and cargo_home implementation
when corresponding environment variables are absolute paths.
bors [Tue, 20 Aug 2019 16:11:35 +0000 (16:11 +0000)]
Auto merge of #7262 - alexcrichton:fix-line-endings, r=ehuss
Fix old lockfile encoding wrt newlines
This commit fixes "old lockfile" encodings back to what they were prior
to #7070 with respect to newlines. The changes in #7070 accidentally
introduced a change where old lockfiles might have some extraneous
newlines removed unintentionally.
In #7070 it was attempted to clean up how newlines are emitted to ensure
a trailing blank newline never shows up at the end of the file, but this
acccidentally regressed cases where today we actually do have blank
newlines at the end of lock files. This commit instead restores all the
previous newline handling, and then scopes the "remove trailing
newlines" fix to specifically just the new encoding.
bors [Tue, 20 Aug 2019 14:04:06 +0000 (14:04 +0000)]
Auto merge of #7268 - benesch:dsym-uplifting, r=alexcrichton
Fix dSYM uplifting when symlink is broken
We were sporadically but persistently seeing errors like
failed to link or copy `.../target/debugs/deps/bin-264030cd6c8a02be.dSYM` to `.../target/debug/bin.dSYM`
Caused by:
the source path is not an existing regular file
while running `cargo build`. Once the error occurs once, `cargo build`
will fail forever with the same error until `target/debug/bin.dSYM` is
manually unlinked.
After some investigation, I've determined that this situation arises
when the target of `bin.dSYM` goes missing. For example, if bin.dSYM is
pointing at `deps/bin-86908f0fa7f1440e.dSYM`, and
`deps/bin-86908f0fa7f1440e.dSYM` does not exist, then this error will
occur. I'm still not clear on why the underlying dSYM bundle
sporadically goes missing--perhaps it's the result of pressing Ctrl-C at
the wrong moment?--but Cargo should at least be able to handle this
situation better.
It turns out that Cargo was getting confused by the broken symlink. When
it goes to install the new `target/debug/bin.dSYM` link, it will remove
the existing `target/debug/bin.dSYM` file, if it exists. Unfortunately,
Cargo was checking whether the *target* of that symlink existed (e.g.,
`deps/bin-86908f0fa7f1440e.dSYM`, which in the buggy case would not
exist), rather than the symlink itself, deciding that there was no
existing symlink to remove, and crashing with EEXIST when trying to
install the new symlink.
This commit adjusts the existence check to evaluate whether the symlink
itself exists, rather than its target.
Note that while the symptoms are the same as #4671, the root cause is
unrelated.
Nikhil Benesch [Mon, 19 Aug 2019 20:45:42 +0000 (16:45 -0400)]
Fix dSYM uplifting when symlink is broken
We were sporadically but persistently seeing errors like
failed to link or copy `.../target/debugs/deps/bin-264030cd6c8a02be.dSYM` to `.../target/debug/bin.dSYM`
Caused by:
the source path is not an existing regular file
while running `cargo build`. Once the error occurs once, `cargo build`
will fail forever with the same error until `target/debug/bin.dSYM` is
manually unlinked.
After some investigation, I've determined that this situation arises
when the target of `bin.dSYM` goes missing. For example, if bin.dSYM is
pointing at `deps/bin-86908f0fa7f1440e.dSYM`, and
`deps/bin-86908f0fa7f1440e.dSYM` does not exist, then this error will
occur. I'm still not clear on why the underlying dSYM bundle
sporadically goes missing--perhaps it's the result of pressing Ctrl-C at
the wrong moment?--but Cargo should at least be able to handle this
situation better.
It turns out that Cargo was getting confused by the broken symlink. When
it goes to install the new `target/debug/bin.dSYM` link, it will remove
the existing `target/debug/bin.dSYM` file, if it exists. Unfortunately,
Cargo was checking whether the *target* of that symlink existed (e.g.,
`deps/bin-86908f0fa7f1440e.dSYM`, which in the buggy case would not
exist), rather than the symlink itself, deciding that there was no
existing symlink to remove, and crashing with EEXIST when trying to
install the new symlink.
This commit adjusts the existence check to evaluate whether the symlink
itself exists, rather than its target.
Note that while the symptoms are the same as #4671, the root cause is
unrelated.
bors [Mon, 19 Aug 2019 16:53:34 +0000 (16:53 +0000)]
Auto merge of #7237 - ehuss:git-with-version, r=alexcrichton
Allow git+version dependency to be published.
This allows you to publish a dependency that specifies both `git` and `version`. The `git` value will be stripped out, just like a `path` dependency.
My original intent was to improve the error message, which was very confusing. I figured I might as well make `git` behave the same as `path`. I can change this PR to just reword the error instead of changing behavior if the new behavior isn't desired.
Alex Crichton [Mon, 19 Aug 2019 16:06:56 +0000 (09:06 -0700)]
Fix old lockfile encoding wrt newlines
This commit fixes "old lockfile" encodings back to what they were prior
to #7070 with respect to newlines. The changes in #7070 accidentally
introduced a change where old lockfiles might have some extraneous
newlines removed unintentionally.
In #7070 it was attempted to clean up how newlines are emitted to ensure
a trailing blank newline never shows up at the end of the file, but this
acccidentally regressed cases where today we actually do have blank
newlines at the end of lock files. This commit instead restores all the
previous newline handling, and then scopes the "remove trailing
newlines" fix to specifically just the new encoding.
bors [Mon, 19 Aug 2019 16:03:35 +0000 (16:03 +0000)]
Auto merge of #7246 - ehuss:install-remove-orphan, r=alexcrichton
`cargo install`: Remove orphaned executables.
When a new version of a package is installed that no longer contains an executable from a previous version, this change causes those orphaned executables to also be removed.
I can place this new behavior behind the `install-upgrade` feature gate if anyone is uncomfortable with changing the behavior now.
bors [Mon, 19 Aug 2019 15:31:03 +0000 (15:31 +0000)]
Auto merge of #7261 - rust-lang:dependabot/cargo/serde_ignored-0.1.0, r=ehuss
Update serde_ignored requirement from 0.0.4 to 0.1.0
Updates the requirements on [serde_ignored](https://github.com/dtolnay/serde-ignored) to permit the latest version.
<details>
<summary>Release notes</summary>
*Sourced from [serde_ignored's releases](https://github.com/dtolnay/serde-ignored/releases).*
> ## 0.1.0
> - Support more types in map keys ([#5](https://github-redirect.dependabot.com/dtolnay/serde-ignored/issues/5))
</details>
<details>
<summary>Commits</summary>
Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting `@dependabot rebase`.
<details>
<summary>Dependabot commands and options</summary>
<br />
You can trigger Dependabot actions by commenting on this PR:
- `@dependabot rebase` will rebase this PR
- `@dependabot recreate` will recreate this PR, overwriting any edits that have been made to it
- `@dependabot merge` will merge this PR after your CI passes on it
- `@dependabot squash and merge` will squash and merge this PR after your CI passes on it
- `@dependabot cancel merge` will cancel a previously requested merge and block automerging
- `@dependabot reopen` will reopen this PR if it is closed
- `@dependabot close` will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually
- `@dependabot ignore this major version` will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself)
- `@dependabot ignore this minor version` will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself)
- `@dependabot ignore this dependency` will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)
- `@dependabot use these labels` will set the current labels as the default for future PRs for this repo and language
- `@dependabot use these reviewers` will set the current reviewers as the default for future PRs for this repo and language
- `@dependabot use these assignees` will set the current assignees as the default for future PRs for this repo and language
- `@dependabot use this milestone` will set the current milestone as the default for future PRs for this repo and language
- `@dependabot badge me` will comment on this PR with code to add a "Dependabot enabled" badge to your readme
Additionally, you can set the following in your Dependabot [dashboard](https://app.dependabot.com):
- Update frequency (including time of day and day of week)
- Automerge options (never/patch/minor, and dev/runtime dependencies)
- Pull request limits (per update run and/or open at any time)
- Out-of-range updates (receive only lockfile updates, if desired)
- Security updates (receive only security updates, if desired)
Finally, you can contact us by mentioning @dependabot.
bors [Mon, 19 Aug 2019 13:34:17 +0000 (13:34 +0000)]
Auto merge of #7257 - RobMor:no-spaces-between-flags, r=alexcrichton
Fix #7217: Add support for rustc-flags without spaces between flags and values
Hi, I believe this pull request contains a fix for issue #7217. This is my first pull request to any open source project, much less any Rust project. I'm not super familiar with Rust at the moment, so let me know if I should change anything. Also any help/advice you can give me about this PR would be much appreciated!
I do have some specific questions:
- Is the test I added worthy of being its own test? I basically copied the one above it and remove the spaces between the flags and the values. Should I have added on to the test above it instead?
- Would it be better if I directly unit-tested this function in some other test file?
- Is the `ureachable!` macro good style?
Update serde_ignored requirement from 0.0.4 to 0.1.0
Updates the requirements on [serde_ignored](https://github.com/dtolnay/serde-ignored) to permit the latest version.
- [Release notes](https://github.com/dtolnay/serde-ignored/releases)
- [Commits](https://github.com/dtolnay/serde-ignored/compare/0.0.4...0.1.0)
bors [Tue, 13 Aug 2019 23:42:40 +0000 (23:42 +0000)]
Auto merge of #7245 - ehuss:warn-dirty-submodule, r=alexcrichton
Check in package/publish if a git submodule is dirty.
This extends the "dirty" check during `cargo publish` to check files within a submodule.
It is a little crude, since it unconditionally tries to open every submodule even if it is not relevant to the current package. The performance doesn't seem too bad (~2s for rust-lang/rust with 16 submodules).
It's also a little lax, by ignoring uninitialized submodules. Presumably the verification build will fail if the submodule is not initialized. It could be more aggressive, by requiring all submodules to be initialized?
bors [Tue, 13 Aug 2019 23:07:09 +0000 (23:07 +0000)]
Auto merge of #7243 - ehuss:ws-warn-fetch, r=alexcrichton
`cargo fetch`: Display workspace warnings.
Warnings were previously hidden with `cargo fetch`. It may be a little confusing, so go ahead and display them.
cc https://github.com/rust-lang/cargo/issues/7180#issuecomment-515489257
I thought about other commands that don't display warnings, but I couldn't think of any others where it would be useful. The only edge case is `publish`/`package`, which won't display unused key warnings because the manifest is rewritten and they are stripped. But displaying warnings there is awkward because some warnings will be displayed twice.
`cargo vendor` (without `--no-delete`) will delete all files in the `vendor/` directory when it starts. This changes it so that it will skip any entries starting with a dot. This allows one to track the vendor directory with a source control system like git.
bors [Mon, 12 Aug 2019 15:37:33 +0000 (15:37 +0000)]
Auto merge of #7239 - ehuss:publish-non-remote-registry, r=alexcrichton
Improve error message when using API command with non-remote registry.
If you try to use an API command (publish, yank, search, etc.) with a source replacement active (like cargo-vendor or cargo-local-registry), then you get a really weird "failed to fetch" error. This adds a specific check to provide a slightly nicer error.
I'm not entirely happy with the wording, but I think it gets the point across.
bors [Mon, 12 Aug 2019 15:17:19 +0000 (15:17 +0000)]
Auto merge of #7238 - ehuss:git-ssh-submodule, r=alexcrichton
Allow git dependency with shorthand ssh submodules to work.
If a submodule is defined with a shorthand ssh url (like `git@github.com/user/repo.git`), then cargo was choking on it trying to convert it to a URL. The fix is to just pass around strings.
An alternate solution would be to try to detect shorthand git urls and automatically add `ssh://` to the path. I'm concerned about matching git's heuristics for this, though. I'm willing to try if you think this would be better, though.
I can't think of a good way to write a test for this, since we don't have any SSH test infrastructure. I verified running locally against github.
bors [Fri, 9 Aug 2019 22:40:43 +0000 (22:40 +0000)]
Auto merge of #7162 - yaahallo:clippyargs, r=ehuss
reimplement arg passthrough for clippy-driver
Prior to this change, the old cargo subcommand version of `cargo clippy`
had a feature to pass trailing args down to clippy-driver but when this
the subcommand was reimplemented inside of cargo this feature was left
out accidentally.
This change readds the feature to to capture all args after a trailing
-- and forward them down to clippy-driver via an env variable.
bors [Wed, 7 Aug 2019 20:41:07 +0000 (20:41 +0000)]
Auto merge of #7214 - alexcrichton:json-diagnostics, r=ehuss
Add support for customizing JSON diagnostics from Cargo
Cargo has of #7143 enabled pipelined compilation by default which
affects how the compiler is invoked, especially with respect to JSON
messages. This, in some testing, has proven to cause quite a few issues
with rustbuild's current integration with Cargo. This commit is aimed at
adding features to Cargo to solve this issue.
This commit adds the ability to customize the stream of JSON messages
coming from Cargo. The new feature for Cargo is that it now also mirrors
rustc in how you can configure the JSON stream. Multiple
`--message-format` arguments are now supported and the value specified
is a comma-separated list of directives. In addition to the existing
`human`, `short`, and `json` directives these new directives have been
added:
* `json-render-diagnostics` - instructs Cargo to render rustc
diagnostics and only print out JSON messages for artifacts and Cargo
things.
* `json-diagnostic-short` - indicates that the `rendered` field of rustc
diagnostics should use the "short" rendering.
* `json-diagnostic-rendered-ansi` - indicates that the `rendered` field of rustc
diagnostics should embed ansi color codes.
The first option here, `json-render-diagnostics`, will be used by
rustbuild unconditionally. Additionally `json-diagnostic-short` will be
conditionally used based on the input to rustbuild itself.
This should be enough for external tools to customize how Cargo is
invoked and how all kinds of JSON diagnostics get printed, and it's
thought that we can relatively easily tweak this as necessary to extend
it and such.
bors [Tue, 6 Aug 2019 16:22:52 +0000 (16:22 +0000)]
Auto merge of #7219 - ehuss:remap-path-prefix-fix, r=alexcrichton
Fix remap-path-prefix from failing.
rustc currently remaps the source paths in the dep-info file, causing them to potentially point to a non-existent path. This causes the call to `canonicalize` added in #7137 to fail. Just ignore the error.
bors [Tue, 6 Aug 2019 14:23:42 +0000 (14:23 +0000)]
Auto merge of #7215 - ehuss:build-script-cleanup, r=alexcrichton
Clean up build script stuff and documentation.
I often get lost trying to understand some of this build script stuff, so this is an attempt to make it a little easier to follow. Overview:
- Remove `Context::build_script_overridden`.
- Add `BuildContext::script_override` to query if something is overridden.
- Do not bother to compute unit dependencies for overridden build scripts. This is the most risky change, since there are some subtle assumptions when connecting up the various build script maps. However, as best as I can reason through, it seems correct. The intent here is to avoid all the situations where it attempts to filter out these extra deps.
- Rename `Context::build_state` to `Context::build_script_outputs` to try to be clearer about what it is. Similarly rename `BuildState` to `BuildScriptOutputs`.
- Remove trivial 1-line function `load_build_deps`.
- Add some documentation.
Alex Crichton [Mon, 5 Aug 2019 16:42:28 +0000 (09:42 -0700)]
Add support for customizing JSON diagnostics from Cargo
Cargo has of #7143 enabled pipelined compilation by default which
affects how the compiler is invoked, especially with respect to JSON
messages. This, in some testing, has proven to cause quite a few issues
with rustbuild's current integration with Cargo. This commit is aimed at
adding features to Cargo to solve this issue.
This commit adds the ability to customize the stream of JSON messages
coming from Cargo. The new feature for Cargo is that it now also mirrors
rustc in how you can configure the JSON stream. Multiple
`--message-format` arguments are now supported and the value specified
is a comma-separated list of directives. In addition to the existing
`human`, `short`, and `json` directives these new directives have been
added:
* `json-render-diagnostics` - instructs Cargo to render rustc
diagnostics and only print out JSON messages for artifacts and Cargo
things.
* `json-diagnostic-short` - indicates that the `rendered` field of rustc
diagnostics should use the "short" rendering.
* `json-diagnostic-rendered-ansi` - indicates that the `rendered` field of rustc
diagnostics should embed ansi color codes.
The first option here, `json-render-diagnostics`, will be used by
rustbuild unconditionally. Additionally `json-diagnostic-short` will be
conditionally used based on the input to rustbuild itself.
This should be enough for external tools to customize how Cargo is
invoked and how all kinds of JSON diagnostics get printed, and it's
thought that we can relatively easily tweak this as necessary to extend
it and such.
bors [Mon, 5 Aug 2019 15:07:46 +0000 (15:07 +0000)]
Auto merge of #7208 - ehuss:fix-old-build-script-test, r=alexcrichton
Fix an old test.
This test was added in f888b4b7802d4c4699490af3810ce7dadf387915, part of #792, in a commented state. Might as well make it work. It is a bit surprising that passing `-l nonexistinglib` doesn't cause an error, but seems to be fine.
Jane Lusby [Mon, 22 Jul 2019 17:33:27 +0000 (10:33 -0700)]
reimplement arg passthrough for clippy-driver
Prior to this change, the old cargo subcommand version of `cargo clippy`
had a feature to pass trailing args down to clippy-driver but when this
the subcommand was reimplemented inside of cargo this feature was left
out accidentally.
This change readds the feature to to capture all args after a trailing
-- and forward them down to clippy-driver via an env variable.
Discovered in #7200 this is just a straight up recipe for deadlock. One Cargo has a jobserver token and wants a file lock. Another Cargo has the file lock and wants a jobserver token. If we had a way to acquire a jobserver token in a nonblocking fashion we could perhaps solve this, but for now I think it's best to revert to the previous behavior.
bors [Thu, 1 Aug 2019 15:23:48 +0000 (15:23 +0000)]
Auto merge of #7191 - debris:prerelease_error_message, r=Eh2406
improve error message for unmatched prerelease dependencies
fixes #7007
error message before:
```
error: no matching package named `a` found
location searched: [..]
perhaps you meant: a
required by package `b v0.1.0 ([..])`
```
error message now
```
error: no matching package named `a` found
location searched: [..]
prerelease package needs to be specified explicitly
a = { version = "0.1.1-alpha.0" }
required by package `b v0.1.0 ([..])`
```
Auto merge of #7192 - alexcrichton:fix-backups, r=ehuss
Fix excluding target dirs from backups on OSX
This fixes an accidental regression from #6880 identified in #7189 by
moving where the configuration of backup preferences happens since it
was accidentally never happening due to the folder always having been
created.
Auto merge of #6817 - thomwiggers:fix-2748, r=ehuss
Handle symlinks to directories
When cargo encounters a link, check if it's a directory when considering it for further processing.
I'm not sure how this interacts with things such as submodules – it allowed me to publish the crate [pqcrypto-kyber768](https://github.com/rustpq/pqcrypto) which uses a link to a submodule.
Fixes #2748.
This PR:
* Add new tests that demonstrate that links to dirs can't be packaged
* Fixes those tests
* Enabled symlink tests to run on Windows
* Fix a bug in the handling of symlinks
* Add new test runner behaviour on Windows (it will ignore symlink-related tests and instead run them if you specify --ignored.)
Auto merge of #7143 - alexcrichton:stabilize-pipelined-compilation, r=ehuss
Enable pipelined compilation by default
This commit enables pipelined compilation by default in Cargo now that
the requisite support has been stablized in rust-lang/rust#62766. This
involved minor updates in a number of locations here and there, but
nothing of meat has changed from the original implementation (just
tweaks to how rustc is called).
Alex Crichton [Wed, 17 Jul 2019 19:41:27 +0000 (12:41 -0700)]
Enable pipelined compilation by default
This commit enables pipelined compilation by default in Cargo now that
the requisite support has been stablized in rust-lang/rust#62766. This
involved minor updates in a number of locations here and there, but
nothing of meat has changed from the original implementation (just
tweaks to how rustc is called).