This change adds the `--features` and `--all-features` flags to the
above mentioned commands. This is to allow publishing of crates that
have certain feature requirements for compilation, without having to
rely on `--no-verify` which isn't good practise.
This PR adds two new fields `features` and `all_features` to both the
`PackageOpts` and `PublishOpts` and also adds the argument options
to the CLI commands.
Merging this feature will allow people to publish crates on crates.io
that require some feature flag to compile (or all?) without needing
to rely on not checking the package before uploading, potentially
resulting in less packaging errors and broken packages.
Some minor documentation changes.
A few updates for things that changed recently, some things that were
wrong/missing, and hopefully some clarifications on some matters.
For reviewing, I recommend ignoring the auto-generated .html/.man files and focus on the .md/.adoc files.
Warn on unused patches.
Adds a warning when a `[patch]` entry fails to match anything.
I've hit this several times in the past, and it always takes me
5 minutes of confusion to figure out what's wrong.
Fixes#6444
don't write a an incorrect rustc version to the fingerprint file
In making https://github.com/holmgr/cargo-sweep/pull/14 I noted that some fingerprint files related to build scripts report being built with a rustc that hashes to "0". To work around this I just marked them as still being needed, even though no rustc that hashes to "0" is currently installed.
I believe that this PR just filles in the correct info for the build script fingerprints. This makes it possible for outside tools to more reliably clean up after cargo, at basically no cost.
@ehuss Thanks again for the help.
Rewrite `login` and registry cleanups.
- Login:
- Change `login` so that it reads the API host from the registry config so it knows the `{api}/me` URL to display.
- The `--host` flag is deprecated/unused. It wasn't used for much before.
- `--registry` supports interactive entry of the token (does not require it on the command line).
- Displays a message after saving the token (fixes#5868).
- Because `login` now requires an index, some of the tests had to be updated.
- Fix so that if `api` is missing from the config, it will display a nice error message instead of panicking with unwrap.
Remove Stale bot's configuration
We couldn't get stale bot to operate as we'd like (poke up N
older-then-X-period tickets a day) and therefore we're tearing it down.
We've chosen to keep the "stale" label, so tickets closed by the bot
may be found with that label.
Closes#6035
We couldn't get stale bot to operate as we'd like (poke up N
older-then-X-period tickets a day) and therefore we're tearing it down.
We've chosen to keep the "stale" label, so tickets closed by the bot
may be found with that label.
Fix new man page links.
The rustc link checker found some problems:
- The raw generated HTML files were being included when they shouldn't.
Fixed by moving them out of the mdbook directory.
- The `print.html` file concatenates all the pages together, causing duplicate
`id`'s. Fix by giving each page a unique set of IDs.
The rustc link checker found some problems:
- The raw generated HTML files were being included when they shouldn't.
Fixed by moving them out of the mdbook directory.
- The `print.html` file concatenates all the pages together, causing duplicate
`id`'s. Fix by giving each page a unique set of IDs.
Fix metabuild compile errors with --message-format=json.
If an error occurs while compiling a metabuild target with `--message-format=json`, it would panic because it was unable to serialize `Target`. This change makes it so that it places a fake "metabuild.rs" string in the `src_path` in this situation.
I'm very unhappy with this solution, but I'm unable to think of something better. Changing `src_path` to an `Option` (or something) would break existing tools (this might break, but maybe not catastrophically?). I tried implementing something that resets the `src_path` to the correct path in the target dir after the workspace is configured, but it felt very brittle – you have to fix up after all dependencies are downloaded, and there's not a good place to ensure that happens correctly. Any alternate ideas?
This adds a `with_json_contains_unordered` to help with tests.
If an error occurs while compiling a metabuild target with
`--message-format=json`, it would panic because it was unable to serialize
`Target`. This change makes it so that it places a fake "metabuild.rs" string in
the `src_path` in this situation.
I'm very unhappy with this solution, but I'm unable to think of something
better. Changing `src_path` to an `Option` (or something) would break existing
tools. I tried implementing something that resets the `src_path` to the correct
path in the target dir after the workspace is configured, but it felt very
brittle – you have to fix up after all dependencies are downloaded, and there's
not a good way to ensure that happens correctly.
This adds a `with_json_contains_unordered` to help with tests.
Update the rustup URL
Yesterday at the Melbourne Rust meetup I helped someone install Rust on their Mac. They were following the instructions from the cargo book and I was surprised to see `rustup` and all the tools being installed globally in `/usr/local/bin`. Eventually we worked out that the URL in the cargo book was different from the one on the Rust website and on rustup.rs. After using the other URL the install proceeded as expected, installing into the user's home directory. It appears the old link is an old version of rustup/rust-init.
This PR updates the install command to match the Rust home page.
New man pages.
This is a rewrite and update of the man pages. This also adds them to the website documentation. They are now in Asciidoc format to make it easy to output multiple formats and have decent formatting. There is a Makefile with instructions on how to rebuild the man pages.
Closes#5729.
Reify the DepFingerprint type
I'm very slightly concerned I might've incompatibly changed the serialise/deserialise code with respect to existing serialised data, so please double-check my work.
Upgrade the metabuild to Rust 2018
Just happened across the code that @ehuss mentioned in https://github.com/rust-lang/cargo/pull/6423#issuecomment-446807216 and thought of reviving that effort.
@ehuss says there's no reason to. Let's see if it passes CI and we should land this change or not.
Make edition comparing code consistent
Rather than sometimes comparing equality, sometimes using ordering and
sometimes pattern matching, consistently compare by equalty to 2015.
Document `name` and `authors` in [package]
I don't think we need to take a principled stand on the exact meaning of
"authors", so I left it somewhat vague. Also, it was made optional in #3682 so
the existing docs were a little wrong.
Closes#5934
Update git2-curl requirement from 0.8.1 to 0.9.0
Updates the requirements on [git2-curl](https://github.com/alexcrichton/git2-rs) to permit the latest version.
<details>
<summary>Commits</summary>
- See full diff in [compare view](https://github.com/alexcrichton/git2-rs/commits)
</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 cancel merge` will cancel a previously requested merge
- `@dependabot reopen` will reopen this PR if it is closed
- `@dependabot ignore this [patch|minor|major] version` will close this PR and stop Dependabot creating any more for this minor/major 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.
</details>