Commit graph

9950 commits

Author SHA1 Message Date
Alex Crichton
624acc8e2b Build manpage archive deterministically
Keep deterministic builds for Cargo! The changes here are:

* Sort files being added to the archive to ensure they're added in the
  same order on all platforms.
* Flag the archive builder as "deterministic mode" which means it won't
  pick up fields like mtime.

Closes #8599
2020-08-10 06:47:00 -07:00
bors
20d35ffeb6 Auto merge of #8604 - jtojnar:patch-1, r=ehuss
doc: Qualify GNU licenses in example license field

Since SPDX License list 3.0, unqualified GNU licenses are deprecated:

https://www.gnu.org/licenses/identify-licenses-clearly.html

We use version 3.6 of the list so we should not use the deprecated licenses.
2020-08-09 19:27:31 +00:00
bors
5de5915ca2 Auto merge of #8598 - alexcrichton:fix-test, r=ehuss
Fix jobserver_exists test on single-cpu systems

Closes #8595
2020-08-09 19:05:39 +00:00
Eric Huss
5305a3def6
Fix typo
Co-authored-by: Teymour Aldridge <42674621+teymour-aldridge@users.noreply.github.com>
2020-08-09 11:43:52 -07:00
bors
3bf5ad8ca9 Auto merge of #8605 - louib:patch-1, r=ehuss
Fix small typo in reference/profiles.md
2020-08-09 18:42:18 +00:00
louib
ff7d328149
Fix small typo in reference/profiles.md 2020-08-08 17:53:21 -04:00
Jan Tojnar
916b392cdb
doc: Qualify GNU licenses in example license field
Since SPDX License list 3.0, unqualified GNU licenses are deprecated:

https://www.gnu.org/licenses/identify-licenses-clearly.html

We use version 3.6 of the list so we should not use the deprecated licenses.
2020-08-08 20:38:06 +02:00
Alex Crichton
02fc16aece Fix jobserver_exists test on single-cpu systems
Closes #8595
2020-08-07 12:50:25 -07:00
bors
449743b1ac Auto merge of #8571 - canova:publish-default, r=ehuss
Default cargo publish to the alt registry if it's the only allowed one

Hi, this PR fixes #8036. Previously if we had only one allowed registry in Cargo.toml file, `cargo publish` was failing. But with this PR, we are defaulting to the only allowed registry with printing a note if there is only one registry in that array. I believe this will make things easier for people who use an alternative registry all the time.
2020-08-06 17:48:55 +00:00
Nazım Can Altınova
a8ce734a95
Update man page of cargo publish to include the new behavior 2020-08-06 13:30:29 +02:00
Nazım Can Altınova
81ecfe9466
Update publish field doc to explain new cargo publish behavior 2020-08-06 13:30:29 +02:00
Nazım Can Altınova
32449a70db
Add a test case for new publish behavior change 2020-08-06 13:01:15 +02:00
Nazım Can Altınova
d0e86cb505
Default cargo publish to the alt registry if it's the only allowed one 2020-08-06 13:01:15 +02:00
Nazım Can Altınova
ae57964cc3
Fix the comment of Package::publish 2020-08-06 13:01:11 +02:00
bors
0aedda245b Auto merge of #8565 - pawanbisht62:master, r=ehuss
cargo install with specific yanked version gives confusing "not found" error

Resolves #8171
2020-08-05 20:31:06 +00:00
bishtpawan
81687e7926 Resolve PR comments 2020-08-05 20:56:56 +05:30
bors
f84a62735a Auto merge of #8589 - camelid:patch-1, r=alexcrichton
Fix typo

elswhere -> elsewhere
2020-08-05 14:17:14 +00:00
bishtpawan
3952fdb223 Refactor code and resolve PR comments 2020-08-05 17:46:33 +05:30
bishtpawan
dd654d5576 Add pattern match for yank check and updated corresponding test cases 2020-08-05 17:31:56 +05:30
bishtpawan
a50b10af27 Refactor code 2020-08-05 17:31:56 +05:30
bishtpawan
844cde203f Add test case for yank validation check 2020-08-05 17:31:56 +05:30
bishtpawan
c180eb4990 Update approach to check for yanked version 2020-08-05 17:31:56 +05:30
bishtpawan
8bea1b078f Add yank check for package that needs to be download 2020-08-05 17:31:56 +05:30
Camelid
3045228ee1 Fix typo 2020-08-04 18:23:12 -07:00
bors
1653f35464 Auto merge of #8587 - ehuss:close_output-fix, r=alexcrichton
Fix close_output test.

The close_output test was randomly failing on rust-lang/rust's CI.  This should fix the error. I ran the test in a loop on the rust-lang 16-thread CPU for 10,000 times over the course of 1.5 hours without fail.  The same stress test without this patch failed relatively easily.

I'm a bit on the fence, as this means the test is no longer testing a realistic scenario (the compiler usually doesn't emit a megabyte of diagnostics). Moving this test to a single-threaded runner should also solve the problem. I can't decide if it matters enough to bother.  WDYT?

Closes #8564
2020-08-04 23:14:37 +00:00
Eric Huss
191250b910 Fix close_output test. 2020-08-04 15:50:17 -07:00
bors
964a16a28e Auto merge of #8575 - matthiaskrgr:clippy_v16, r=ehuss
clippy fixes, use matches! macro in more places
2020-08-04 03:47:51 +00:00
bors
2732539e85 Auto merge of #8456 - ehuss:embedded-man, r=alexcrichton
Display embedded man pages for built-in commands.

This changes `cargo help COMMAND` to display the man page for the given command.  `cargo COMMAND --help` continues to show the basic clap output.

The man pages are embedded in the executable in a compressed format. There's also a copy of the man pages in text format for platforms that do not have the `man` executable (like Windows).

It is unfortunate to check in more pre-generated files. I hope in the future that the usage of asciidoc can be replaced with something else (possibly a custom markdown-based solution).

cc #6104
2020-08-03 21:20:46 +00:00
Matthias Krüger
f23b91190c use sort_by_key() instead of comparing by keys manually
replace format!() macro by String::from()
use eprintln() instead of manually writing to std::io::stderr
2020-08-03 22:52:01 +02:00
Eric Huss
0d6881c5bc Change extract_man to not return a Result (not needed). 2020-08-03 12:30:40 -07:00
Eric Huss
0e26eae5c1 Display embedded man pages for built-in commands. 2020-08-03 12:30:38 -07:00
Eric Huss
9138d65e4c Create a dedicated module for help tests. 2020-08-03 12:17:58 -07:00
bors
e9281208cd Auto merge of #8577 - ehuss:mdman, r=alexcrichton
Add mdman for generating man pages.

This introduces a new utility called `mdman` that converts a markdown-formatted document to a man page. This replaces asciidoctor, with the intent to make it easier to contribute, easier to have consistent formatting across platforms, and easier to generate plain-text documents for use on Windows (for #8456). This also includes a number of formatting fixes.

There is some documentation in the `mdman/doc` directory explaining how to use it, and the docs in `src/doc/README.md` have been updated (this explains the structure of the files). The Makefile has been replaced with a simple shell script.

CI has been updated to verify the checked-in docs are up-to-date. Perhaps in the future, these can be generated automatically (perhaps by `build.rs`?), but since that requires a bit of build system work (like upstream rust), this is deferred till later.
2020-08-03 18:37:44 +00:00
bors
af539d2ad8 Auto merge of #8581 - toshokan:fix-error-typo, r=Eh2406
Fix typo 'more then' -> 'more than' in error and comments

There were typos in a reported resolution error and in some comments
2020-08-03 16:10:33 +00:00
bors
2ba80edc67 Auto merge of #8579 - matthiaskrgr:cargo_login_message, r=alexcrichton
cargo login: make login message less ambiguous

The previous message
"please visit https://crates.io/me and paste the API Token below"
Had me waiting for a token to appear in the command line which I would then paste into the website.
Rephrase to
"please paste the api token found on https://crates.io/me below"
to clarify where to paste from and where to paste to.
2020-08-03 15:46:14 +00:00
bors
a5c3b50ce5 Auto merge of #8578 - ehuss:fix-build-cache-link, r=alexcrichton
Fix broken link in Build Cache chapter.
2020-08-03 15:23:11 +00:00
bors
24a00ab803 Auto merge of #8576 - ehuss:fix-broken_intra_doc_links, r=alexcrichton
Fix intra-doc tests for renamed lint.

The lint was renamed in https://github.com/rust-lang/rust/pull/74926.
2020-08-03 15:00:06 +00:00
toshokan
caa8f783ad
Fix typo 'more then' -> 'more than' in error and comments 2020-08-03 09:58:39 -04:00
Matthias Krüger
209701b285 cargo login: make login message less ambiguous
The previous message
"please visit https://crates.io/me and paste the API Token below"
Had me waiting for a token to appear in the command line which I would then paste into the website.
Rephrase to
"please paste the api token found on https://crates.io/me below"
to clarify where to paste from and where to paste to.
2020-08-02 18:04:12 +02:00
Eric Huss
66d2607a97 Fix broken link in Build Cache chapter. 2020-08-01 17:35:46 -07:00
Eric Huss
566706e863 Fix some Windows newline behavior. 2020-08-01 12:22:14 -07:00
Eric Huss
3134eef059 Docs, CI, and tools for building man pages. 2020-08-01 11:14:00 -07:00
Eric Huss
2d4aa38b4f Regenerate man pages using mdman. 2020-08-01 11:14:00 -07:00
Eric Huss
25291c6c36 Remove old HTML generated man pages. 2020-08-01 11:14:00 -07:00
Eric Huss
7b7d80e84a Reformat asciidoc man pages to markdown. 2020-08-01 11:14:00 -07:00
Eric Huss
5594bfa4bd Move asciidoc man pages to markdown. 2020-08-01 11:14:00 -07:00
Eric Huss
8b878f38cd Add mdman for generating man pages. 2020-08-01 11:13:52 -07:00
Eric Huss
1b72e1fbf4 Fix intra-doc tests for renamed lint. 2020-08-01 09:52:11 -07:00
Matthias Krüger
44e794614e use matches! macro in more places 2020-08-01 13:07:44 +02:00
bors
2d5c2381e4 Auto merge of #8573 - alexcrichton:hash-same, r=ehuss
Use the same index location on nightly as beta

Closes #8572
2020-07-31 21:56:08 +00:00