9664 Commits

Author SHA1 Message Date
Joshua Nelson
0a975e96d8 Use a stable rustdoc option for testing 2020-07-04 15:04:51 -04:00
Joshua Nelson
bb95188093 Don't overwrite existing rustdoc args with --document-private-items
Instead, add that flag in addition to any existing flags.
2020-07-03 22:10:59 -04:00
bors
fede83ccf9 Auto merge of #8446 - ehuss:fix-usize-32, r=alexcrichton
Fix overflow error on 32-bit.

This fails to compile on 32-bit platforms with an overflow error ("attempt to shift right by 32_i32 which would overflow").

I think it would be highly unlikely for any value to be in the billions.  Alternatively it can be rewritten to something like `assert!(val <= u32::MAX as usize);`.
2020-07-02 21:51:34 +00:00
Eric Huss
fbee47a309 Fix overflow error on 32-bit. 2020-07-02 14:48:01 -07:00
bors
cf3bfc904d Auto merge of #8378 - jstasiak:backups, r=ehuss
Exclude the target directory from backups using CACHEDIR.TAG

This patch follows the lead of #4386 (which excludes target directories
from Time Machine backups) and is motived by the same reasons listen
in #3884. CACHEDIR.TAG is an OS-independent mechanism supported by Borg,
restic, GNU Tar and other backup/archiving solutions.

See https://bford.info/cachedir/ for more information about the
specification. This has been discussed in Rust Internals earlier this
year[1] and it seems like it's an uncontroversial improvement so I went
ahead with the patch.

One thing I'm wondering is whether this should maybe cover the whole main target directory (right now it applies to `target/debug`, `target/release` etc. but not to target root).

[1] https://internals.rust-lang.org/t/pre-rfc-put-cachedir-tag-into-target/12262/11
2020-07-02 14:49:38 +00:00
bors
ea32d80b41 Auto merge of #8436 - joshtriplett:zulip, r=alexcrichton
CONTRIBUTING.md: Link to Zulip rather than Discord

Discussed and approved by all members of the Cargo team.
2020-07-02 14:13:55 +00:00
Josh Triplett
552c664c2e CONTRIBUTING.md: Link to Zulip rather than Discord
Discussed and approved by all members of the Cargo team.
2020-07-01 15:10:43 -07:00
Jakub Stasiak
5f2ba2bec8 Remove no longer needed cleanup code 2020-07-01 23:44:14 +02:00
Jakub Stasiak
092781c1fa Compress two tests into one 2020-07-01 22:48:02 +02:00
Jakub Stasiak
f34b086949 Exclude whole target/ from backups
This is following the discussion on GitHub. The doc tests are no longer
necessary because Layout::new() creates CACHEDIR.TAG directly in target
root, no doc-specific code is necessary anymore.
2020-07-01 22:47:59 +02:00
bors
40550b9ea0 Auto merge of #8433 - giraffate:update_built-in_help_for_features, r=alexcrichton
Update built-in help for features

Fixed #8381.
2020-07-01 16:03:23 +00:00
Jakub Stasiak
1b5f749739 Exclude target/doc from backups as well 2020-07-01 14:14:29 +02:00
Takayuki Nakata
a00b5ac867 Update built-in help for features
Fixed #8381.
2020-07-01 08:28:20 +09:00
bors
305eaf0dc5 Auto merge of #8432 - rust-lang:dependabot/cargo/core-foundation-0.9.0, r=alexcrichton
Update core-foundation requirement from 0.7.0 to 0.9.0

Updates the requirements on [core-foundation](https://github.com/servo/core-foundation-rs) to permit the latest version.
<details>
<summary>Commits</summary>
<ul>
<li><a href="a57ca7f976"><code>a57ca7f</code></a> Major version update for core-foundation-sys and all other dependencies.</li>
<li><a href="aa69b91def"><code>aa69b91</code></a> Add missing major version changes.</li>
<li><a href="7487580958"><code>7487580</code></a> Publish core-foundation-sys 0.7.2.</li>
<li><a href="40a787f0e6"><code>40a787f</code></a> Auto merge of <a href="https://github-redirect.dependabot.com/servo/core-foundation-rs/issues/397">#397</a> - servo:major-bump, r=jdm</li>
<li><a href="56d8b6c161"><code>56d8b6c</code></a> Major version change for core-foundation, core-graphics, io-surface, core-tex...</li>
<li><a href="3754007311"><code>3754007</code></a> Auto merge of <a href="https://github-redirect.dependabot.com/servo/core-foundation-rs/issues/395">#395</a> - bryanburgers:timezone-name, r=jdm</li>
<li><a href="a4e2983219"><code>a4e2983</code></a> Add <code>CFTimeZone::name</code></li>
<li><a href="749c0855ad"><code>749c085</code></a> Auto merge of <a href="https://github-redirect.dependabot.com/servo/core-foundation-rs/issues/394">#394</a> - anp:releases, r=jdm</li>
<li><a href="9c264d2904"><code>9c264d2</code></a> Bump core-foundation(-sys) to 0.7.1 for release.</li>
<li><a href="d196c0c4c8"><code>d196c0c</code></a> Publish core-graphics 0.19.2.</li>
<li>Additional commits viewable in <a href="https://github.com/servo/core-foundation-rs/compare/core-foundation-v0.7.0...core-foundation-v0.9.0">compare view</a></li>
</ul>
</details>
<br />

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`.

[//]: # (dependabot-automerge-start)
[//]: # (dependabot-automerge-end)

---

<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)
- Pull request limits (per update run and/or open at any time)
- Automerge options (never/patch/minor, and dev/runtime dependencies)
- Out-of-range updates (receive only lockfile updates, if desired)
- Security updates (receive only security updates, if desired)

</details>
2020-06-30 14:16:08 +00:00
dependabot-preview[bot]
c4629eb93e
Update core-foundation requirement from 0.7.0 to 0.9.0
Updates the requirements on [core-foundation](https://github.com/servo/core-foundation-rs) to permit the latest version.
- [Release notes](https://github.com/servo/core-foundation-rs/releases)
- [Commits](https://github.com/servo/core-foundation-rs/compare/core-foundation-v0.7.0...core-foundation-v0.9.0)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2020-06-30 05:24:50 +00:00
bors
77b40585a9 Auto merge of #8421 - alexcrichton:read-env-dep, r=ehuss
Parse `# env-dep` directives in dep-info files

This commit updates Cargo's parsing of rustc's dep-info files to account
for changes made upstream in rust-lang/rust#71858. This means that if
`env!` or `option_env!` is used in crate files Cargo will correctly
rebuild the crate if the env var changes.

Closes #8417
2020-06-30 02:40:18 +00:00
bors
f12d72e11b Auto merge of #8419 - est31:string_interning, r=ehuss
Move string interning to util

Code that handles string interning is rather an util functionality than
a core functionality.
2020-06-29 23:56:15 +00:00
Alex Crichton
0750a6f504 Handle env var escaping 2020-06-29 12:57:09 -07:00
Alex Crichton
a6bf36e0ac Bump hashed metadata version 2020-06-29 12:39:44 -07:00
Alex Crichton
643f12efcf Address review feedback 2020-06-29 11:32:37 -07:00
Alex Crichton
68200151da Get past internal test on CI 2020-06-29 08:52:05 -07:00
Alex Crichton
784ea96e8e Filter env vars to check against 2020-06-29 08:26:10 -07:00
Alex Crichton
f666b19a8f Parse # env-dep directives in dep-info files
This commit updates Cargo's parsing of rustc's dep-info files to account
for changes made upstream in rust-lang/rust#71858. This means that if
`env!` or `option_env!` is used in crate files Cargo will correctly
rebuild the crate if the env var changes.

Closes #8417
2020-06-29 08:15:15 -07:00
bors
67075be626 Auto merge of #8418 - bdonlan:cdylib-out-path, r=alexcrichton
Expose built cdylib artifacts in the Compilation structure

This change makes it much easier to find these artifacts in a
platform-independent way when writing automation around the cargo API.
2020-06-26 19:35:23 +00:00
est31
836e91ce4c Make leak function private
The leak function is never used outside of interning.rs
and I don't think it makes any sense to use it.
2020-06-26 19:55:29 +02:00
est31
7f73a6c782 Move string interning to util
Code that handles string interning is rather an util functionality than
a core functionality.
2020-06-26 19:55:29 +02:00
Bryan Donlan
d19ff18347 Expose built cdylib artifacts in the Compilation structure
This change makes it much easier to find these artifacts in a
platform-independent way when writing automation around the cargo API.
2020-06-26 17:23:34 +00:00
bors
2f4097aa6b Auto merge of #8416 - est31:remove_derive, r=alexcrichton
Remove unused serde_derive dependency from the crates.io crate
2020-06-26 16:33:12 +00:00
est31
65591e8144 Remove unused serde_derive dependency 2020-06-26 17:29:09 +02:00
bors
85e38cafbe Auto merge of #8412 - est31:remove_remove, r=alexcrichton
Remove unused remove_dir_all dependency

Originally part of #8384 but sadly the PR got rejected.
2020-06-26 14:13:00 +00:00
est31
da86eaad8f Remove unused remove_dir_all dependency
Need to research why it isn't detected by cargo-udeps.
2020-06-26 06:37:40 +02:00
bors
8fc3da5e4a Auto merge of #8409 - alexcrichton:git-instead-of, r=Eh2406
Improve git error messages a bit

This commit is targeted at further improving the error messages
generated from git errors. For authentication errors the actual URL
fetched is now printed out as well if it's different from the original
URL. This should help handle `insteadOf` logic where SSH urls are used
instead of HTTPS urls and users can know to track that down.

Otherwise the logic about recommending `net.git-fetch-with-cli` was
tweaked a bit and moved to the same location as the rest of our error
reporting.

Note that a change piggy-backed here as well is that `Caused by:` errors
are now automatically all tabbed over a bit instead of only having the
first line tabbed over. This required a good number of tests to be
updated, but it's just an updated in renderings.
2020-06-25 18:47:08 +00:00
Alex Crichton
6514c289d2 Improve git error messages a bit
This commit is targeted at further improving the error messages
generated from git errors. For authentication errors the actual URL
fetched is now printed out as well if it's different from the original
URL. This should help handle `insteadOf` logic where SSH urls are used
instead of HTTPS urls and users can know to track that down.

Otherwise the logic about recommending `net.git-fetch-with-cli` was
tweaked a bit and moved to the same location as the rest of our error
reporting.

Note that a change piggy-backed here as well is that `Caused by:` errors
are now automatically all tabbed over a bit instead of only having the
first line tabbed over. This required a good number of tests to be
updated, but it's just an updated in renderings.
2020-06-25 08:47:15 -07:00
bors
3b142db791 Auto merge of #8408 - jstasiak:improve-home-path-documentation, r=alexcrichton
Improve the description of Config.home_path

I poked around and it seems it's not the user's home directory but Cargo
home (which may or may not be in user's home).
2020-06-25 14:12:00 +00:00
Jakub Stasiak
daa053c933 Improve the description of Config.home_path
I poked around and it seems it's not the user's home directory but Cargo
home (which may or may not be in user's home).
2020-06-25 15:19:40 +02:00
Jakub Stasiak
50f2290cfa Try to resolve a build-time conflict with master
This commit changed things a bit: 6263d726f6b32ff7bcb5e1c292e0c83d65145e41.
2020-06-24 23:49:56 +02:00
Jakub Stasiak
3eb2ae045c Add two tests 2020-06-24 23:22:20 +02:00
bors
f2aba14d07 Auto merge of #8364 - alexcrichton:default-no-master, r=ehuss
Improve support for non-`master` main branches

This commit improves Cargo's support for git repositories whose "main
branch" is not called `master`. Cargo currently pretty liberally assumes
that if nothing else about a git repository is specified then `master`
is the branch name to use. Instead now Cargo has a fourth option as the
desired reference of a repository named `DefaultBranch`. Cargo doesn't
know anything about the actual name of the default branch, it just
updates how git references are fetched internally.

This commit is motivated by news that GitHub is likely to switch away
from the default branch being named `master` in the near future. It
would be a bit of a bummer if from now on everyone had to type
`branch = '...'`, so this tries to improve that!

Closes #3517
2020-06-24 20:09:07 +00:00
bors
39b48d5d97 Auto merge of #8403 - matklad:abs-out-dir, r=Eh2406
Document that OUT_DIR in JSON messages is an absolute path
2020-06-24 18:12:36 +00:00
Aleksey Kladov
39c1081bc8 Document that OUT_DIR in JSON messages is an absolute path 2020-06-24 12:56:29 +02:00
bors
c26576f9ad Auto merge of #8387 - robinmoussu:master, r=alexcrichton
Adding environment variable CARGO_PKG_LICENSE_FILE

When #8325 was added, only CARGO_PKG_LICENSE was added. However, the field license [may be empty](https://doc.rust-lang.org/cargo/reference/manifest.html#the-license-and-license-file-fields) if the license_field is filled in.
2020-06-23 16:21:21 +00:00
bors
fd600f3a40 Auto merge of #8391 - bl2e:install-target-dir, r=alexcrichton
Enable "--target-dir" in "cargo install"

Issue #8263
2020-06-23 15:48:36 +00:00
bors
78c16716e6 Auto merge of #8323 - naerbnic:add_workspace_metadata_table, r=alexcrichton
Add support for `workspace.metadata` table

Implements feature request #8309

Additionally includes the information in the output of "cargo metadata" through a new top-level field `metadata`, similar to the per-package `metadata` field
2020-06-23 15:18:10 +00:00
bors
10ae887ffb Auto merge of #8398 - ehuss:clean-reserved-name, r=Eh2406
Fix overzealous `clean -p` for reserved names.

#8210 changed the way `clean -p` worked, but in some ways it is a little too sloppy.  If a package has a test named `build`, then it would delete the `build` directory thinking an executable named "build" exists.  This changes it so that it does not attempt to delete tests/benches from the uplift directory.
2020-06-22 21:07:37 +00:00
Eric Huss
6263d726f6 Fix overzealous clean -p for reserved names. 2020-06-22 12:56:10 -07:00
bors
b3b25ab6c5 Auto merge of #8395 - ehuss:fix-opt-dep-order, r=Eh2406
Fix order-dependent feature resolution.

There is a situation where if you have `pkg/feature` syntax, and `pkg` is an optional dependency, but also a dev-dependency, and the dev-dependency appears before the (optional) normal dependency in the summary, then the optional dependency would not get activated. This is because the feature code used `find` to get the first entry.

Fixes #8394
2020-06-22 00:35:00 +00:00
Eric Huss
ab73b2c35c Fix order-dependent feature resolution. 2020-06-21 17:28:36 -07:00
bl2e
538d925920 Fix post-execution path checks to be compatible with Windows 2020-06-20 23:37:56 -07:00
bl2e
bb3754276a Fix test compatibility for Windows 2020-06-20 23:01:35 -07:00
bl2e
291fb41665 Reference options-target-dir in cargo install documentation 2020-06-20 21:29:23 -07:00