Allow `cargo update --precise` with metadata.
`cargo update --precise` would require that the version matches *exactly*, including build metadata. Usually the build metadata is ignored (like in dependency declarations), but in this circumstance it isn't. This can be awkward in some cases where it can be more convenient to type just the version number without the build metadata.
This changes it so that if the metadata isn't provided, then it will be ignored when matching. Otherwise, it will be honored. This is slightly different from a version requirement like `=1.2.3+foo` which ignores the metadata completely.
This also adds a slightly better error message if you don't type in valid syntax for a version number (previously it would just emit the `no matching package` error).
Support path_in_vcs as part of cargo_vcs_metadata
Depends on #9865 - this PR will look simpler once that one lands. I can't target my PR to the base branch of #9865 as an external contributor (since it's in my fork). For now just review the latest commit of this one.
This is a backward compatible change that is an alternative to #9837
Add some clarity on the license/license-file warning.
As noted in #8537, there is some confusion about why license and license-file are mutually exclusive. This attempts to add some detail to the warning.
Add fetch smoke test.
This adds a test with a statically built curl to check if running `cargo fetch` works. This adds a few minutes to CI time, but I think it is worthwhile to try to catch some regressions.
Note that macOS uses system curl to match the rust-lang/rust build mode.
Differentiate tests in progress bar.
Some people have expressed confusion when the progress bar includes the package name twice, such as:
```
Building [=======================> ] 301/307: rustc_interface, rustc_interface
```
This can happen in a variety of circumstances, but a common one is `cargo test`. This causes the library to be built in parallel with the library being built for unittests. This PR adds some additional markers to differentiate what is being built:
- Lib as test: `lib_name(test)`
- Binary as test: `bin_name(bin test)`
- Example as test: `example_name(example test)`
* 'master' of https://github.com/rust-lang/cargo: (21 commits)
Remove TOML incompatibility hacks
Use a more compact way to compare versions
Remove broken link in contrib docs.
Change diesel compatibility messages
Temporarily revert curl-sys update.
Update curl-sys
Bump Cargo's curl requirement to 7.79.0
Revert "When a dependency does not have a version, git or path, fails directly"
Fix warnings from better precision of `dead_code` lint
Improve "wrong output" error.
Add some contributor docs for debugging testsuite tests.
Fix warnings when documenting with `--document-private-items`
Update changelog for 1.56
Bump to 0.58.0
Fix rustc --profile=dev unstable check.
config.md: fix typo
Enable some tests on windows.
Fix `cargo fix --edition` on stable.
Enable strip test on macos.
Remove log
...
Remove TOML incompatibility hacks
- `set_require_newline_after_table` was added in #2680 back in 2016
- `set_allow_duplicate_after_longer_table` was added in #6761 in 2019
Several years later, this PR is turning these warnings into errors.
The function and documentation was kept so we can add additional hacks
in the future, like if we switch TOML parsers.
- `set_require_newline_after_table` was added in #2680 back in 2016
- `set_allow_duplicate_after_longer_table` was added in #6761 in 2019
Several years later, this PR is turning these warnings into errors.
The function and documentation was kept so we can add additional hacks
in the future, like if we switch TOML parsers.
Diesel 1.4.8 fixes the critical behaviour. This commit changes the
corresponding messages for `cargo fix` and normal builds to promt the
user to just update the diesel version to fix the corresponding
compilation errors.
Revert "When a dependency does not have a version, git or path, fails directly"
Reverts rust-lang/cargo#9686
We discussed, and felt like this change wasn't all that important, and a few people have mentioned that it caused problems for them.
Closes#9885
Fix warnings when documenting with `--document-private-items`
- Use hyperlinks for URLs
- Fix broken intra-doc links
This doesn't fix the following warning, since I wasn't sure what change
was appropriate:
```
warning: public documentation for `rustc_process` links to private item `self::core::compiler::Context::primary_packages`
--> src/cargo/core/compiler/compilation.rs:164:22
|
164 | /// flag), see [`crate::core::compiler::Context::primary_packages`].
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ this item is private
|
= note: `#[warn(rustdoc::private_intra_doc_links)]` on by default
= note: this link resolves only because you passed `--document-private-items`, but will break without
```
To avoid noise, this doesn't add an `allow` either.
Improve "wrong output" error.
The error message for an improperly formatted build script output was a bit abrupt and unhelpful. This adds some more details to the error message.
Fix warnings from better precision of `dead_code` lint
The lint now ignores derived `Clone` and `Debug` implementations, as of
PR rust-lang/rust#85200, which landed a couple of days ago.
I sprinkled `#[allow(dead_code)]` in a few places; the fields are not
expected to be read since they are just part of a very specific test.
The lint now ignores derived `Clone` and `Debug` implementations, as of
PR rust-lang/rust#85200, which landed a couple of days ago.
I sprinkled `#[allow(dead_code)]` in a few places; the fields are not
expected to be read since they are just part of a very specific test.
- Use hyperlinks for URLs
- Fix broken intra-doc links
This doesn't fix the following warning, since I wasn't sure what change
was appropriate:
```
warning: public documentation for `rustc_process` links to private item `self::core::compiler::Context::primary_packages`
--> src/cargo/core/compiler/compilation.rs:164:22
|
164 | /// flag), see [`crate::core::compiler::Context::primary_packages`].
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ this item is private
|
= note: `#[warn(rustdoc::private_intra_doc_links)]` on by default
= note: this link resolves only because you passed `--document-private-items`, but will break without
```
To avoid noise, this doesn't add an `allow` either.