Version in base suite: 0.47.0-3~deb10u1 Base version: cargo-mozilla_0.47.0-3~deb10u1 Target version: cargo-mozilla_0.57.0-7~deb10u1 Base file: /srv/ftp-master.debian.org/ftp/pool/main/c/cargo-mozilla/cargo-mozilla_0.47.0-3~deb10u1.dsc Target file: /srv/ftp-master.debian.org/policy/pool/main/c/cargo-mozilla/cargo-mozilla_0.57.0-7~deb10u1.dsc /srv/release.debian.org/tmp/k3GvWvjJce/cargo-mozilla-0.57.0/debian/libgit2_1.0.1+dfsg.1.orig.tar.xz |binary /srv/release.debian.org/tmp/k3GvWvjJce/cargo-mozilla-0.57.0/debian/libgit2_1.3.0+dfsg.1.orig.tar.xz |binary /srv/release.debian.org/tmp/k3GvWvjJce/cargo-mozilla-0.57.0/src/doc/theme/favicon.png |binary /srv/release.debian.org/tmp/k3GvWvjJce/cargo-mozilla-0.57.0/vendor/bstr/src/unicode/fsm/whitespace_anchored_rev.bigendian.dfa |binary /srv/release.debian.org/tmp/k3GvWvjJce/cargo-mozilla-0.57.0/vendor/bstr/src/unicode/fsm/whitespace_anchored_rev.littleendian.dfa |binary /srv/release.debian.org/tmp/k3GvWvjJce/cargo-mozilla-0.57.0/vendor/flate2/tests/corrupt-file.gz |binary /srv/release.debian.org/tmp/k3GvWvjJce/cargo-mozilla-0.57.0/vendor/flate2/tests/corrupt-gz-file.bin |binary cargo-mozilla-0.57.0/.github/ISSUE_TEMPLATE/tracking_issue.md | 35 cargo-mozilla-0.57.0/.github/dependabot.yml | 15 cargo-mozilla-0.57.0/.github/workflows/contrib.yml | 33 cargo-mozilla-0.57.0/.github/workflows/main.yml | 134 cargo-mozilla-0.57.0/ARCHITECTURE.md | 150 cargo-mozilla-0.57.0/CHANGELOG.md | 799 cargo-mozilla-0.57.0/CONTRIBUTING.md | 231 cargo-mozilla-0.57.0/Cargo.toml | 56 cargo-mozilla-0.57.0/README.md | 6 cargo-mozilla-0.57.0/azure-pipelines.yml | 118 cargo-mozilla-0.57.0/build.rs | 39 cargo-mozilla-0.57.0/ci/azure-install-rust.yml | 18 cargo-mozilla-0.57.0/ci/azure-test-all.yml | 33 cargo-mozilla-0.57.0/ci/validate-man.sh | 26 cargo-mozilla-0.57.0/crates/cargo-platform/Cargo.toml | 2 cargo-mozilla-0.57.0/crates/cargo-platform/src/cfg.rs | 4 cargo-mozilla-0.57.0/crates/cargo-test-macro/src/lib.rs | 8 cargo-mozilla-0.57.0/crates/cargo-test-support/Cargo.toml | 10 cargo-mozilla-0.57.0/crates/cargo-test-support/build.rs | 6 cargo-mozilla-0.57.0/crates/cargo-test-support/src/compare.rs | 583 cargo-mozilla-0.57.0/crates/cargo-test-support/src/cross_compile.rs | 33 cargo-mozilla-0.57.0/crates/cargo-test-support/src/diff.rs | 174 cargo-mozilla-0.57.0/crates/cargo-test-support/src/git.rs | 16 cargo-mozilla-0.57.0/crates/cargo-test-support/src/install.rs | 2 cargo-mozilla-0.57.0/crates/cargo-test-support/src/lib.rs | 1185 cargo-mozilla-0.57.0/crates/cargo-test-support/src/paths.rs | 117 cargo-mozilla-0.57.0/crates/cargo-test-support/src/publish.rs | 19 cargo-mozilla-0.57.0/crates/cargo-test-support/src/registry.rs | 412 cargo-mozilla-0.57.0/crates/cargo-test-support/src/tools.rs | 59 cargo-mozilla-0.57.0/crates/cargo-util/Cargo.toml | 29 cargo-mozilla-0.57.0/crates/cargo-util/LICENSE-APACHE | 201 cargo-mozilla-0.57.0/crates/cargo-util/LICENSE-MIT | 23 cargo-mozilla-0.57.0/crates/cargo-util/src/lib.rs | 18 cargo-mozilla-0.57.0/crates/cargo-util/src/paths.rs | 728 cargo-mozilla-0.57.0/crates/cargo-util/src/process_builder.rs | 424 cargo-mozilla-0.57.0/crates/cargo-util/src/process_error.rs | 194 cargo-mozilla-0.57.0/crates/cargo-util/src/read2.rs | 178 cargo-mozilla-0.57.0/crates/cargo-util/src/registry.rs | 45 cargo-mozilla-0.57.0/crates/cargo-util/src/sha256.rs | 56 cargo-mozilla-0.57.0/crates/crates-io/Cargo.toml | 4 cargo-mozilla-0.57.0/crates/crates-io/lib.rs | 199 cargo-mozilla-0.57.0/crates/credential/README.md | 8 cargo-mozilla-0.57.0/crates/credential/cargo-credential-1password/Cargo.toml | 13 cargo-mozilla-0.57.0/crates/credential/cargo-credential-1password/src/main.rs | 323 cargo-mozilla-0.57.0/crates/credential/cargo-credential-gnome-secret/Cargo.toml | 14 cargo-mozilla-0.57.0/crates/credential/cargo-credential-gnome-secret/build.rs | 3 cargo-mozilla-0.57.0/crates/credential/cargo-credential-gnome-secret/src/main.rs | 210 cargo-mozilla-0.57.0/crates/credential/cargo-credential-macos-keychain/Cargo.toml | 12 cargo-mozilla-0.57.0/crates/credential/cargo-credential-macos-keychain/src/main.rs | 50 cargo-mozilla-0.57.0/crates/credential/cargo-credential-wincred/Cargo.toml | 12 cargo-mozilla-0.57.0/crates/credential/cargo-credential-wincred/src/main.rs | 99 cargo-mozilla-0.57.0/crates/credential/cargo-credential/Cargo.toml | 10 cargo-mozilla-0.57.0/crates/credential/cargo-credential/README.md | 41 cargo-mozilla-0.57.0/crates/credential/cargo-credential/src/lib.rs | 86 cargo-mozilla-0.57.0/crates/mdman/Cargo.lock | 460 cargo-mozilla-0.57.0/crates/mdman/Cargo.toml | 18 cargo-mozilla-0.57.0/crates/mdman/README.md | 7 cargo-mozilla-0.57.0/crates/mdman/build-man.sh | 7 cargo-mozilla-0.57.0/crates/mdman/doc/mdman.md | 95 cargo-mozilla-0.57.0/crates/mdman/doc/out/mdman.1 | 124 cargo-mozilla-0.57.0/crates/mdman/doc/out/mdman.md | 95 cargo-mozilla-0.57.0/crates/mdman/doc/out/mdman.txt | 91 cargo-mozilla-0.57.0/crates/mdman/src/format.rs | 20 cargo-mozilla-0.57.0/crates/mdman/src/format/man.rs | 430 cargo-mozilla-0.57.0/crates/mdman/src/format/md.rs | 112 cargo-mozilla-0.57.0/crates/mdman/src/format/text.rs | 605 cargo-mozilla-0.57.0/crates/mdman/src/hbs.rs | 217 cargo-mozilla-0.57.0/crates/mdman/src/lib.rs | 121 cargo-mozilla-0.57.0/crates/mdman/src/main.rs | 133 cargo-mozilla-0.57.0/crates/mdman/src/util.rs | 44 cargo-mozilla-0.57.0/crates/mdman/tests/compare.rs | 48 cargo-mozilla-0.57.0/crates/mdman/tests/compare/expected/formatting.1 | 118 cargo-mozilla-0.57.0/crates/mdman/tests/compare/expected/formatting.md | 94 cargo-mozilla-0.57.0/crates/mdman/tests/compare/expected/formatting.txt | 84 cargo-mozilla-0.57.0/crates/mdman/tests/compare/expected/links.1 | 45 cargo-mozilla-0.57.0/crates/mdman/tests/compare/expected/links.md | 56 cargo-mozilla-0.57.0/crates/mdman/tests/compare/expected/links.txt | 40 cargo-mozilla-0.57.0/crates/mdman/tests/compare/expected/options.1 | 94 cargo-mozilla-0.57.0/crates/mdman/tests/compare/expected/options.md | 77 cargo-mozilla-0.57.0/crates/mdman/tests/compare/expected/options.txt | 57 cargo-mozilla-0.57.0/crates/mdman/tests/compare/expected/tables.1 | 108 cargo-mozilla-0.57.0/crates/mdman/tests/compare/expected/tables.md | 35 cargo-mozilla-0.57.0/crates/mdman/tests/compare/expected/tables.txt | 45 cargo-mozilla-0.57.0/crates/mdman/tests/compare/expected/vars.7 | 9 cargo-mozilla-0.57.0/crates/mdman/tests/compare/expected/vars.md | 7 cargo-mozilla-0.57.0/crates/mdman/tests/compare/expected/vars.txt | 6 cargo-mozilla-0.57.0/crates/mdman/tests/compare/formatting.md | 94 cargo-mozilla-0.57.0/crates/mdman/tests/compare/includes/links-include.md | 7 cargo-mozilla-0.57.0/crates/mdman/tests/compare/includes/options-common.md | 14 cargo-mozilla-0.57.0/crates/mdman/tests/compare/links.md | 49 cargo-mozilla-0.57.0/crates/mdman/tests/compare/options.md | 62 cargo-mozilla-0.57.0/crates/mdman/tests/compare/tables.md | 35 cargo-mozilla-0.57.0/crates/mdman/tests/compare/vars.md | 7 cargo-mozilla-0.57.0/crates/mdman/tests/invalid.rs | 34 cargo-mozilla-0.57.0/crates/mdman/tests/invalid/nested.md | 6 cargo-mozilla-0.57.0/crates/mdman/tests/invalid/not-inside-options.md | 5 cargo-mozilla-0.57.0/crates/resolver-tests/Cargo.toml | 1 cargo-mozilla-0.57.0/crates/resolver-tests/src/lib.rs | 43 cargo-mozilla-0.57.0/crates/resolver-tests/tests/resolve.rs | 30 cargo-mozilla-0.57.0/debian/README.source | 50 cargo-mozilla-0.57.0/debian/bin/cargo | 7 cargo-mozilla-0.57.0/debian/bootstrap.py | 1465 cargo-mozilla-0.57.0/debian/changelog | 78 cargo-mozilla-0.57.0/debian/control | 35 cargo-mozilla-0.57.0/debian/copyright | 44 cargo-mozilla-0.57.0/debian/debcargo-conf.patch | 55 cargo-mozilla-0.57.0/debian/lintian-to-copyright.sh | 5 cargo-mozilla-0.57.0/debian/make_orig_multi-pre-vendor.sh | 21 cargo-mozilla-0.57.0/debian/make_orig_multi.sh | 12 cargo-mozilla-0.57.0/debian/patches/0001-Change-test-to-not-trigger-emoji-error.patch | 37 cargo-mozilla-0.57.0/debian/patches/0002-Remove-eacces-test.patch | 93 cargo-mozilla-0.57.0/debian/patches/1005_relax_deprecated_diagnostic_message_check.patch | 30 cargo-mozilla-0.57.0/debian/patches/2002_disable-net-tests.patch | 11 cargo-mozilla-0.57.0/debian/patches/2003_disable_close_output.patch | 21 cargo-mozilla-0.57.0/debian/patches/2110-use-mfpu-on-armhf.patch | 18 cargo-mozilla-0.57.0/debian/patches/2111-curl-no-rebuild.patch | 12 cargo-mozilla-0.57.0/debian/patches/2112-handle-4-siphasher-algorithms.patch | 19 cargo-mozilla-0.57.0/debian/patches/2200-workaround-x32-test.patch | 13 cargo-mozilla-0.57.0/debian/patches/2300-disable-close_output_during_drain-test.patch | 23 cargo-mozilla-0.57.0/debian/patches/accept-test-execution-time.patch | 128 cargo-mozilla-0.57.0/debian/patches/series | 14 cargo-mozilla-0.57.0/debian/patches/u-8713.patch | 31 cargo-mozilla-0.57.0/debian/patches/use-vendored-libgit.patch | 20 cargo-mozilla-0.57.0/debian/rules | 8 cargo-mozilla-0.57.0/debian/scripts/debian-cargo-vendor | 7 cargo-mozilla-0.57.0/debian/source/include-binaries | 2 cargo-mozilla-0.57.0/debian/source/lintian-overrides | 6 cargo-mozilla-0.57.0/debian/tests/control | 4 cargo-mozilla-0.57.0/debian/tests/self-build | 6 cargo-mozilla-0.57.0/debian/tests/self-build.config.toml | 5 cargo-mozilla-0.57.0/debian/vendor-tarball-unsuspicious.txt | 17 cargo-mozilla-0.57.0/debian/watch | 6 cargo-mozilla-0.57.0/publish.py | 17 cargo-mozilla-0.57.0/src/bin/cargo/cli.rs | 121 cargo-mozilla-0.57.0/src/bin/cargo/commands/bench.rs | 33 cargo-mozilla-0.57.0/src/bin/cargo/commands/build.rs | 16 cargo-mozilla-0.57.0/src/bin/cargo/commands/check.rs | 39 cargo-mozilla-0.57.0/src/bin/cargo/commands/clean.rs | 17 cargo-mozilla-0.57.0/src/bin/cargo/commands/config.rs | 48 cargo-mozilla-0.57.0/src/bin/cargo/commands/doc.rs | 26 cargo-mozilla-0.57.0/src/bin/cargo/commands/fetch.rs | 13 cargo-mozilla-0.57.0/src/bin/cargo/commands/fix.rs | 62 cargo-mozilla-0.57.0/src/bin/cargo/commands/generate_lockfile.rs | 1 cargo-mozilla-0.57.0/src/bin/cargo/commands/help.rs | 137 cargo-mozilla-0.57.0/src/bin/cargo/commands/init.rs | 5 cargo-mozilla-0.57.0/src/bin/cargo/commands/install.rs | 68 cargo-mozilla-0.57.0/src/bin/cargo/commands/locate_project.rs | 64 cargo-mozilla-0.57.0/src/bin/cargo/commands/login.rs | 2 cargo-mozilla-0.57.0/src/bin/cargo/commands/logout.rs | 21 cargo-mozilla-0.57.0/src/bin/cargo/commands/metadata.rs | 9 cargo-mozilla-0.57.0/src/bin/cargo/commands/mod.rs | 10 cargo-mozilla-0.57.0/src/bin/cargo/commands/new.rs | 1 cargo-mozilla-0.57.0/src/bin/cargo/commands/owner.rs | 10 cargo-mozilla-0.57.0/src/bin/cargo/commands/package.rs | 14 cargo-mozilla-0.57.0/src/bin/cargo/commands/pkgid.rs | 27 cargo-mozilla-0.57.0/src/bin/cargo/commands/publish.rs | 7 cargo-mozilla-0.57.0/src/bin/cargo/commands/read_manifest.rs | 4 cargo-mozilla-0.57.0/src/bin/cargo/commands/report.rs | 45 cargo-mozilla-0.57.0/src/bin/cargo/commands/run.rs | 74 cargo-mozilla-0.57.0/src/bin/cargo/commands/rustc.rs | 57 cargo-mozilla-0.57.0/src/bin/cargo/commands/rustdoc.rs | 19 cargo-mozilla-0.57.0/src/bin/cargo/commands/search.rs | 1 cargo-mozilla-0.57.0/src/bin/cargo/commands/test.rs | 54 cargo-mozilla-0.57.0/src/bin/cargo/commands/tree.rs | 99 cargo-mozilla-0.57.0/src/bin/cargo/commands/uninstall.rs | 18 cargo-mozilla-0.57.0/src/bin/cargo/commands/update.rs | 41 cargo-mozilla-0.57.0/src/bin/cargo/commands/vendor.rs | 17 cargo-mozilla-0.57.0/src/bin/cargo/commands/verify_project.rs | 5 cargo-mozilla-0.57.0/src/bin/cargo/commands/version.rs | 1 cargo-mozilla-0.57.0/src/bin/cargo/commands/yank.rs | 18 cargo-mozilla-0.57.0/src/bin/cargo/main.rs | 105 cargo-mozilla-0.57.0/src/cargo/core/compiler/build_config.rs | 60 cargo-mozilla-0.57.0/src/cargo/core/compiler/build_context/mod.rs | 27 cargo-mozilla-0.57.0/src/cargo/core/compiler/build_context/target_info.rs | 267 cargo-mozilla-0.57.0/src/cargo/core/compiler/build_plan.rs | 11 cargo-mozilla-0.57.0/src/cargo/core/compiler/compilation.rs | 177 cargo-mozilla-0.57.0/src/cargo/core/compiler/compile_kind.rs | 42 cargo-mozilla-0.57.0/src/cargo/core/compiler/context/compilation_files.rs | 102 cargo-mozilla-0.57.0/src/cargo/core/compiler/context/mod.rs | 198 cargo-mozilla-0.57.0/src/cargo/core/compiler/crate_type.rs | 15 cargo-mozilla-0.57.0/src/cargo/core/compiler/custom_build.rs | 274 cargo-mozilla-0.57.0/src/cargo/core/compiler/fingerprint.rs | 238 cargo-mozilla-0.57.0/src/cargo/core/compiler/future_incompat.rs | 289 cargo-mozilla-0.57.0/src/cargo/core/compiler/job.rs | 23 cargo-mozilla-0.57.0/src/cargo/core/compiler/job_queue.rs | 415 cargo-mozilla-0.57.0/src/cargo/core/compiler/layout.rs | 10 cargo-mozilla-0.57.0/src/cargo/core/compiler/links.rs | 24 cargo-mozilla-0.57.0/src/cargo/core/compiler/lto.rs | 36 cargo-mozilla-0.57.0/src/cargo/core/compiler/mod.rs | 534 cargo-mozilla-0.57.0/src/cargo/core/compiler/output_depinfo.rs | 21 cargo-mozilla-0.57.0/src/cargo/core/compiler/rustdoc.rs | 36 cargo-mozilla-0.57.0/src/cargo/core/compiler/standard_lib.rs | 67 cargo-mozilla-0.57.0/src/cargo/core/compiler/timings.rs | 27 cargo-mozilla-0.57.0/src/cargo/core/compiler/unit.rs | 16 cargo-mozilla-0.57.0/src/cargo/core/compiler/unit_dependencies.rs | 257 cargo-mozilla-0.57.0/src/cargo/core/compiler/unit_graph.rs | 14 cargo-mozilla-0.57.0/src/cargo/core/dependency.rs | 129 cargo-mozilla-0.57.0/src/cargo/core/features.rs | 892 cargo-mozilla-0.57.0/src/cargo/core/manifest.rs | 111 cargo-mozilla-0.57.0/src/cargo/core/mod.rs | 5 cargo-mozilla-0.57.0/src/cargo/core/package.rs | 319 cargo-mozilla-0.57.0/src/cargo/core/package_id.rs | 40 cargo-mozilla-0.57.0/src/cargo/core/package_id_spec.rs | 132 cargo-mozilla-0.57.0/src/cargo/core/profiles.rs | 246 cargo-mozilla-0.57.0/src/cargo/core/registry.rs | 111 cargo-mozilla-0.57.0/src/cargo/core/resolver/conflict_cache.rs | 6 cargo-mozilla-0.57.0/src/cargo/core/resolver/context.rs | 65 cargo-mozilla-0.57.0/src/cargo/core/resolver/dep_cache.rs | 397 cargo-mozilla-0.57.0/src/cargo/core/resolver/encode.rs | 144 cargo-mozilla-0.57.0/src/cargo/core/resolver/errors.rs | 251 cargo-mozilla-0.57.0/src/cargo/core/resolver/features.rs | 452 cargo-mozilla-0.57.0/src/cargo/core/resolver/mod.rs | 108 cargo-mozilla-0.57.0/src/cargo/core/resolver/resolve.rs | 82 cargo-mozilla-0.57.0/src/cargo/core/resolver/types.rs | 64 cargo-mozilla-0.57.0/src/cargo/core/resolver/version_prefs.rs | 181 cargo-mozilla-0.57.0/src/cargo/core/shell.rs | 93 cargo-mozilla-0.57.0/src/cargo/core/source/mod.rs | 12 cargo-mozilla-0.57.0/src/cargo/core/source/source_id.rs | 335 cargo-mozilla-0.57.0/src/cargo/core/summary.rs | 546 cargo-mozilla-0.57.0/src/cargo/core/workspace.rs | 856 cargo-mozilla-0.57.0/src/cargo/lib.rs | 60 cargo-mozilla-0.57.0/src/cargo/ops/cargo_clean.rs | 34 cargo-mozilla-0.57.0/src/cargo/ops/cargo_compile.rs | 817 cargo-mozilla-0.57.0/src/cargo/ops/cargo_config.rs | 306 cargo-mozilla-0.57.0/src/cargo/ops/cargo_doc.rs | 92 cargo-mozilla-0.57.0/src/cargo/ops/cargo_generate_lockfile.rs | 30 cargo-mozilla-0.57.0/src/cargo/ops/cargo_install.rs | 1012 cargo-mozilla-0.57.0/src/cargo/ops/cargo_new.rs | 352 cargo-mozilla-0.57.0/src/cargo/ops/cargo_output_metadata.rs | 82 cargo-mozilla-0.57.0/src/cargo/ops/cargo_package.rs | 272 cargo-mozilla-0.57.0/src/cargo/ops/cargo_read_manifest.rs | 23 cargo-mozilla-0.57.0/src/cargo/ops/cargo_run.rs | 34 cargo-mozilla-0.57.0/src/cargo/ops/cargo_test.rs | 76 cargo-mozilla-0.57.0/src/cargo/ops/cargo_uninstall.rs | 9 cargo-mozilla-0.57.0/src/cargo/ops/common_for_install_and_uninstall.rs | 92 cargo-mozilla-0.57.0/src/cargo/ops/fix.rs | 470 cargo-mozilla-0.57.0/src/cargo/ops/lockfile.rs | 88 cargo-mozilla-0.57.0/src/cargo/ops/mod.rs | 43 cargo-mozilla-0.57.0/src/cargo/ops/registry.rs | 465 cargo-mozilla-0.57.0/src/cargo/ops/registry/auth.rs | 236 cargo-mozilla-0.57.0/src/cargo/ops/resolve.rs | 260 cargo-mozilla-0.57.0/src/cargo/ops/tree/format/mod.rs | 31 cargo-mozilla-0.57.0/src/cargo/ops/tree/graph.rs | 150 cargo-mozilla-0.57.0/src/cargo/ops/tree/mod.rs | 94 cargo-mozilla-0.57.0/src/cargo/ops/vendor.rs | 74 cargo-mozilla-0.57.0/src/cargo/sources/config.rs | 16 cargo-mozilla-0.57.0/src/cargo/sources/directory.rs | 21 cargo-mozilla-0.57.0/src/cargo/sources/git/source.rs | 12 cargo-mozilla-0.57.0/src/cargo/sources/git/utils.rs | 106 cargo-mozilla-0.57.0/src/cargo/sources/mod.rs | 2 cargo-mozilla-0.57.0/src/cargo/sources/path.rs | 106 cargo-mozilla-0.57.0/src/cargo/sources/registry/index.rs | 179 cargo-mozilla-0.57.0/src/cargo/sources/registry/local.rs | 7 cargo-mozilla-0.57.0/src/cargo/sources/registry/mod.rs | 194 cargo-mozilla-0.57.0/src/cargo/sources/registry/remote.rs | 55 cargo-mozilla-0.57.0/src/cargo/sources/replaced.rs | 14 cargo-mozilla-0.57.0/src/cargo/util/canonical_url.rs | 2 cargo-mozilla-0.57.0/src/cargo/util/command_prelude.rs | 231 cargo-mozilla-0.57.0/src/cargo/util/config/de.rs | 109 cargo-mozilla-0.57.0/src/cargo/util/config/key.rs | 27 cargo-mozilla-0.57.0/src/cargo/util/config/mod.rs | 826 cargo-mozilla-0.57.0/src/cargo/util/config/path.rs | 13 cargo-mozilla-0.57.0/src/cargo/util/config/target.rs | 71 cargo-mozilla-0.57.0/src/cargo/util/config/value.rs | 12 cargo-mozilla-0.57.0/src/cargo/util/counter.rs | 67 cargo-mozilla-0.57.0/src/cargo/util/dependency_queue.rs | 84 cargo-mozilla-0.57.0/src/cargo/util/diagnostic_server.rs | 129 cargo-mozilla-0.57.0/src/cargo/util/errors.rs | 176 cargo-mozilla-0.57.0/src/cargo/util/flock.rs | 12 cargo-mozilla-0.57.0/src/cargo/util/graph.rs | 32 cargo-mozilla-0.57.0/src/cargo/util/hex.rs | 11 cargo-mozilla-0.57.0/src/cargo/util/important_paths.rs | 28 cargo-mozilla-0.57.0/src/cargo/util/machine_message.rs | 2 cargo-mozilla-0.57.0/src/cargo/util/mod.rs | 62 cargo-mozilla-0.57.0/src/cargo/util/network.rs | 6 cargo-mozilla-0.57.0/src/cargo/util/paths.rs | 548 cargo-mozilla-0.57.0/src/cargo/util/process_builder.rs | 414 cargo-mozilla-0.57.0/src/cargo/util/progress.rs | 52 cargo-mozilla-0.57.0/src/cargo/util/read2.rs | 178 cargo-mozilla-0.57.0/src/cargo/util/restricted_names.rs | 7 cargo-mozilla-0.57.0/src/cargo/util/rustc.rs | 174 cargo-mozilla-0.57.0/src/cargo/util/semver_ext.rs | 76 cargo-mozilla-0.57.0/src/cargo/util/sha256.rs | 55 cargo-mozilla-0.57.0/src/cargo/util/to_semver.rs | 2 cargo-mozilla-0.57.0/src/cargo/util/toml/mod.rs | 632 cargo-mozilla-0.57.0/src/cargo/util/toml/targets.rs | 31 cargo-mozilla-0.57.0/src/cargo/util/vcs.rs | 34 cargo-mozilla-0.57.0/src/cargo/util/workspace.rs | 78 cargo-mozilla-0.57.0/src/doc/Makefile | 28 cargo-mozilla-0.57.0/src/doc/README.md | 46 cargo-mozilla-0.57.0/src/doc/asciidoc-extension.rb | 125 cargo-mozilla-0.57.0/src/doc/build-man.sh | 31 cargo-mozilla-0.57.0/src/doc/contrib/README.md | 12 cargo-mozilla-0.57.0/src/doc/contrib/book.toml | 6 cargo-mozilla-0.57.0/src/doc/contrib/src/SUMMARY.md | 20 cargo-mozilla-0.57.0/src/doc/contrib/src/architecture/codebase.md | 104 cargo-mozilla-0.57.0/src/doc/contrib/src/architecture/compilation.md | 39 cargo-mozilla-0.57.0/src/doc/contrib/src/architecture/console.md | 82 cargo-mozilla-0.57.0/src/doc/contrib/src/architecture/files.md | 67 cargo-mozilla-0.57.0/src/doc/contrib/src/architecture/index.md | 8 cargo-mozilla-0.57.0/src/doc/contrib/src/architecture/packages.md | 92 cargo-mozilla-0.57.0/src/doc/contrib/src/architecture/subcommands.md | 25 cargo-mozilla-0.57.0/src/doc/contrib/src/design.md | 101 cargo-mozilla-0.57.0/src/doc/contrib/src/index.md | 29 cargo-mozilla-0.57.0/src/doc/contrib/src/issues.md | 109 cargo-mozilla-0.57.0/src/doc/contrib/src/process/index.md | 124 cargo-mozilla-0.57.0/src/doc/contrib/src/process/release.md | 109 cargo-mozilla-0.57.0/src/doc/contrib/src/process/unstable.md | 83 cargo-mozilla-0.57.0/src/doc/contrib/src/process/working-on-cargo.md | 147 cargo-mozilla-0.57.0/src/doc/contrib/src/tests/index.md | 20 cargo-mozilla-0.57.0/src/doc/contrib/src/tests/profiling.md | 34 cargo-mozilla-0.57.0/src/doc/contrib/src/tests/running.md | 41 cargo-mozilla-0.57.0/src/doc/contrib/src/tests/writing.md | 132 cargo-mozilla-0.57.0/src/doc/man/cargo-bench.adoc | 152 cargo-mozilla-0.57.0/src/doc/man/cargo-bench.md | 164 cargo-mozilla-0.57.0/src/doc/man/cargo-build.adoc | 98 cargo-mozilla-0.57.0/src/doc/man/cargo-build.md | 109 cargo-mozilla-0.57.0/src/doc/man/cargo-check.adoc | 87 cargo-mozilla-0.57.0/src/doc/man/cargo-check.md | 96 cargo-mozilla-0.57.0/src/doc/man/cargo-clean.adoc | 76 cargo-mozilla-0.57.0/src/doc/man/cargo-clean.md | 83 cargo-mozilla-0.57.0/src/doc/man/cargo-doc.adoc | 97 cargo-mozilla-0.57.0/src/doc/man/cargo-doc.md | 125 cargo-mozilla-0.57.0/src/doc/man/cargo-fetch.adoc | 61 cargo-mozilla-0.57.0/src/doc/man/cargo-fetch.md | 63 cargo-mozilla-0.57.0/src/doc/man/cargo-fix.adoc | 142 cargo-mozilla-0.57.0/src/doc/man/cargo-fix.md | 180 cargo-mozilla-0.57.0/src/doc/man/cargo-generate-lockfile.adoc | 49 cargo-mozilla-0.57.0/src/doc/man/cargo-generate-lockfile.md | 49 cargo-mozilla-0.57.0/src/doc/man/cargo-help.adoc | 28 cargo-mozilla-0.57.0/src/doc/man/cargo-help.md | 26 cargo-mozilla-0.57.0/src/doc/man/cargo-init.adoc | 55 cargo-mozilla-0.57.0/src/doc/man/cargo-init.md | 51 cargo-mozilla-0.57.0/src/doc/man/cargo-install.adoc | 186 cargo-mozilla-0.57.0/src/doc/man/cargo-install.md | 208 cargo-mozilla-0.57.0/src/doc/man/cargo-locate-project.adoc | 46 cargo-mozilla-0.57.0/src/doc/man/cargo-locate-project.md | 60 cargo-mozilla-0.57.0/src/doc/man/cargo-login.adoc | 51 cargo-mozilla-0.57.0/src/doc/man/cargo-login.md | 51 cargo-mozilla-0.57.0/src/doc/man/cargo-metadata.adoc | 330 cargo-mozilla-0.57.0/src/doc/man/cargo-metadata.md | 350 cargo-mozilla-0.57.0/src/doc/man/cargo-new.adoc | 50 cargo-mozilla-0.57.0/src/doc/man/cargo-new.md | 46 cargo-mozilla-0.57.0/src/doc/man/cargo-owner.adoc | 80 cargo-mozilla-0.57.0/src/doc/man/cargo-owner.md | 81 cargo-mozilla-0.57.0/src/doc/man/cargo-package.adoc | 102 cargo-mozilla-0.57.0/src/doc/man/cargo-package.md | 120 cargo-mozilla-0.57.0/src/doc/man/cargo-pkgid.adoc | 94 cargo-mozilla-0.57.0/src/doc/man/cargo-pkgid.md | 89 cargo-mozilla-0.57.0/src/doc/man/cargo-publish.adoc | 90 cargo-mozilla-0.57.0/src/doc/man/cargo-publish.md | 115 cargo-mozilla-0.57.0/src/doc/man/cargo-run.adoc | 90 cargo-mozilla-0.57.0/src/doc/man/cargo-run.md | 108 cargo-mozilla-0.57.0/src/doc/man/cargo-rustc.adoc | 94 cargo-mozilla-0.57.0/src/doc/man/cargo-rustc.md | 106 cargo-mozilla-0.57.0/src/doc/man/cargo-rustdoc.adoc | 98 cargo-mozilla-0.57.0/src/doc/man/cargo-rustdoc.md | 112 cargo-mozilla-0.57.0/src/doc/man/cargo-search.adoc | 49 cargo-mozilla-0.57.0/src/doc/man/cargo-search.md | 52 cargo-mozilla-0.57.0/src/doc/man/cargo-test.adoc | 160 cargo-mozilla-0.57.0/src/doc/man/cargo-test.md | 186 cargo-mozilla-0.57.0/src/doc/man/cargo-tree.adoc | 227 cargo-mozilla-0.57.0/src/doc/man/cargo-tree.md | 251 cargo-mozilla-0.57.0/src/doc/man/cargo-uninstall.adoc | 57 cargo-mozilla-0.57.0/src/doc/man/cargo-uninstall.md | 63 cargo-mozilla-0.57.0/src/doc/man/cargo-update.adoc | 81 cargo-mozilla-0.57.0/src/doc/man/cargo-update.md | 97 cargo-mozilla-0.57.0/src/doc/man/cargo-vendor.adoc | 82 cargo-mozilla-0.57.0/src/doc/man/cargo-vendor.md | 93 cargo-mozilla-0.57.0/src/doc/man/cargo-verify-project.adoc | 57 cargo-mozilla-0.57.0/src/doc/man/cargo-verify-project.md | 58 cargo-mozilla-0.57.0/src/doc/man/cargo-version.adoc | 39 cargo-mozilla-0.57.0/src/doc/man/cargo-version.md | 41 cargo-mozilla-0.57.0/src/doc/man/cargo-yank.adoc | 64 cargo-mozilla-0.57.0/src/doc/man/cargo-yank.md | 70 cargo-mozilla-0.57.0/src/doc/man/cargo.adoc | 226 cargo-mozilla-0.57.0/src/doc/man/cargo.md | 235 cargo-mozilla-0.57.0/src/doc/man/description-install-root.adoc | 7 cargo-mozilla-0.57.0/src/doc/man/description-new-authors.adoc | 24 cargo-mozilla-0.57.0/src/doc/man/description-one-target.adoc | 4 cargo-mozilla-0.57.0/src/doc/man/generated/cargo-bench.html | 545 cargo-mozilla-0.57.0/src/doc/man/generated/cargo-build.html | 494 cargo-mozilla-0.57.0/src/doc/man/generated/cargo-check.html | 485 cargo-mozilla-0.57.0/src/doc/man/generated/cargo-clean.html | 254 cargo-mozilla-0.57.0/src/doc/man/generated/cargo-doc.html | 448 cargo-mozilla-0.57.0/src/doc/man/generated/cargo-fetch.html | 223 cargo-mozilla-0.57.0/src/doc/man/generated/cargo-fix.html | 569 cargo-mozilla-0.57.0/src/doc/man/generated/cargo-generate-lockfile.html | 191 cargo-mozilla-0.57.0/src/doc/man/generated/cargo-help.html | 53 cargo-mozilla-0.57.0/src/doc/man/generated/cargo-init.html | 263 cargo-mozilla-0.57.0/src/doc/man/generated/cargo-install.html | 461 cargo-mozilla-0.57.0/src/doc/man/generated/cargo-locate-project.html | 160 cargo-mozilla-0.57.0/src/doc/man/generated/cargo-login.html | 168 cargo-mozilla-0.57.0/src/doc/man/generated/cargo-metadata.html | 517 cargo-mozilla-0.57.0/src/doc/man/generated/cargo-new.html | 256 cargo-mozilla-0.57.0/src/doc/man/generated/cargo-owner.html | 220 cargo-mozilla-0.57.0/src/doc/man/generated/cargo-package.html | 354 cargo-mozilla-0.57.0/src/doc/man/generated/cargo-pkgid.html | 266 cargo-mozilla-0.57.0/src/doc/man/generated/cargo-publish.html | 338 cargo-mozilla-0.57.0/src/doc/man/generated/cargo-run.html | 407 cargo-mozilla-0.57.0/src/doc/man/generated/cargo-rustc.html | 469 cargo-mozilla-0.57.0/src/doc/man/generated/cargo-rustdoc.html | 475 cargo-mozilla-0.57.0/src/doc/man/generated/cargo-search.html | 166 cargo-mozilla-0.57.0/src/doc/man/generated/cargo-test.html | 602 cargo-mozilla-0.57.0/src/doc/man/generated/cargo-tree.html | 516 cargo-mozilla-0.57.0/src/doc/man/generated/cargo-uninstall.html | 191 cargo-mozilla-0.57.0/src/doc/man/generated/cargo-update.html | 241 cargo-mozilla-0.57.0/src/doc/man/generated/cargo-vendor.html | 240 cargo-mozilla-0.57.0/src/doc/man/generated/cargo-verify-project.html | 199 cargo-mozilla-0.57.0/src/doc/man/generated/cargo-version.html | 76 cargo-mozilla-0.57.0/src/doc/man/generated/cargo-yank.html | 196 cargo-mozilla-0.57.0/src/doc/man/generated/cargo.html | 470 cargo-mozilla-0.57.0/src/doc/man/generated_txt/cargo-bench.txt | 369 cargo-mozilla-0.57.0/src/doc/man/generated_txt/cargo-build.txt | 328 cargo-mozilla-0.57.0/src/doc/man/generated_txt/cargo-check.txt | 321 cargo-mozilla-0.57.0/src/doc/man/generated_txt/cargo-clean.txt | 145 cargo-mozilla-0.57.0/src/doc/man/generated_txt/cargo-doc.txt | 290 cargo-mozilla-0.57.0/src/doc/man/generated_txt/cargo-fetch.txt | 128 cargo-mozilla-0.57.0/src/doc/man/generated_txt/cargo-fix.txt | 398 cargo-mozilla-0.57.0/src/doc/man/generated_txt/cargo-generate-lockfile.txt | 104 cargo-mozilla-0.57.0/src/doc/man/generated_txt/cargo-help.txt | 23 cargo-mozilla-0.57.0/src/doc/man/generated_txt/cargo-init.txt | 112 cargo-mozilla-0.57.0/src/doc/man/generated_txt/cargo-install.txt | 299 cargo-mozilla-0.57.0/src/doc/man/generated_txt/cargo-locate-project.txt | 87 cargo-mozilla-0.57.0/src/doc/man/generated_txt/cargo-login.txt | 87 cargo-mozilla-0.57.0/src/doc/man/generated_txt/cargo-metadata.txt | 414 cargo-mozilla-0.57.0/src/doc/man/generated_txt/cargo-new.txt | 107 cargo-mozilla-0.57.0/src/doc/man/generated_txt/cargo-owner.txt | 122 cargo-mozilla-0.57.0/src/doc/man/generated_txt/cargo-package.txt | 234 cargo-mozilla-0.57.0/src/doc/man/generated_txt/cargo-pkgid.txt | 146 cargo-mozilla-0.57.0/src/doc/man/generated_txt/cargo-publish.txt | 214 cargo-mozilla-0.57.0/src/doc/man/generated_txt/cargo-run.txt | 239 cargo-mozilla-0.57.0/src/doc/man/generated_txt/cargo-rustc.txt | 301 cargo-mozilla-0.57.0/src/doc/man/generated_txt/cargo-rustdoc.txt | 305 cargo-mozilla-0.57.0/src/doc/man/generated_txt/cargo-search.txt | 84 cargo-mozilla-0.57.0/src/doc/man/generated_txt/cargo-test.txt | 410 cargo-mozilla-0.57.0/src/doc/man/generated_txt/cargo-tree.txt | 349 cargo-mozilla-0.57.0/src/doc/man/generated_txt/cargo-uninstall.txt | 96 cargo-mozilla-0.57.0/src/doc/man/generated_txt/cargo-update.txt | 142 cargo-mozilla-0.57.0/src/doc/man/generated_txt/cargo-vendor.txt | 137 cargo-mozilla-0.57.0/src/doc/man/generated_txt/cargo-verify-project.txt | 107 cargo-mozilla-0.57.0/src/doc/man/generated_txt/cargo-version.txt | 32 cargo-mozilla-0.57.0/src/doc/man/generated_txt/cargo-yank.txt | 109 cargo-mozilla-0.57.0/src/doc/man/generated_txt/cargo.txt | 271 cargo-mozilla-0.57.0/src/doc/man/includes/description-install-root.md | 7 cargo-mozilla-0.57.0/src/doc/man/includes/description-one-target.md | 4 cargo-mozilla-0.57.0/src/doc/man/includes/options-display.md | 22 cargo-mozilla-0.57.0/src/doc/man/includes/options-ignore-rust-version.md | 4 cargo-mozilla-0.57.0/src/doc/man/includes/options-index.md | 3 cargo-mozilla-0.57.0/src/doc/man/includes/options-jobs.md | 5 cargo-mozilla-0.57.0/src/doc/man/includes/options-locked.md | 25 cargo-mozilla-0.57.0/src/doc/man/includes/options-manifest-path.md | 4 cargo-mozilla-0.57.0/src/doc/man/includes/options-message-format.md | 21 cargo-mozilla-0.57.0/src/doc/man/includes/options-new.md | 39 cargo-mozilla-0.57.0/src/doc/man/includes/options-profile.md | 7 cargo-mozilla-0.57.0/src/doc/man/includes/options-registry.md | 6 cargo-mozilla-0.57.0/src/doc/man/includes/options-release.md | 5 cargo-mozilla-0.57.0/src/doc/man/includes/options-target-dir.md | 13 cargo-mozilla-0.57.0/src/doc/man/includes/options-target-triple.md | 13 cargo-mozilla-0.57.0/src/doc/man/includes/options-targets-lib-bin.md | 12 cargo-mozilla-0.57.0/src/doc/man/includes/options-targets.md | 57 cargo-mozilla-0.57.0/src/doc/man/includes/options-test.md | 14 cargo-mozilla-0.57.0/src/doc/man/includes/options-token.md | 11 cargo-mozilla-0.57.0/src/doc/man/includes/section-environment.md | 4 cargo-mozilla-0.57.0/src/doc/man/includes/section-exit-status.md | 4 cargo-mozilla-0.57.0/src/doc/man/includes/section-features.md | 26 cargo-mozilla-0.57.0/src/doc/man/includes/section-options-common.md | 21 cargo-mozilla-0.57.0/src/doc/man/includes/section-options-package.md | 13 cargo-mozilla-0.57.0/src/doc/man/includes/section-package-selection.md | 42 cargo-mozilla-0.57.0/src/doc/man/includes/section-profiles.md | 16 cargo-mozilla-0.57.0/src/doc/man/options-common.adoc | 14 cargo-mozilla-0.57.0/src/doc/man/options-display.adoc | 22 cargo-mozilla-0.57.0/src/doc/man/options-features.adoc | 23 cargo-mozilla-0.57.0/src/doc/man/options-index.adoc | 2 cargo-mozilla-0.57.0/src/doc/man/options-jobs.adoc | 5 cargo-mozilla-0.57.0/src/doc/man/options-locked.adoc | 24 cargo-mozilla-0.57.0/src/doc/man/options-manifest-path.adoc | 3 cargo-mozilla-0.57.0/src/doc/man/options-message-format.adoc | 18 cargo-mozilla-0.57.0/src/doc/man/options-new.adoc | 29 cargo-mozilla-0.57.0/src/doc/man/options-package.adoc | 7 cargo-mozilla-0.57.0/src/doc/man/options-packages.adoc | 27 cargo-mozilla-0.57.0/src/doc/man/options-profile.adoc | 6 cargo-mozilla-0.57.0/src/doc/man/options-registry.adoc | 4 cargo-mozilla-0.57.0/src/doc/man/options-release.adoc | 3 cargo-mozilla-0.57.0/src/doc/man/options-target-dir.adoc | 5 cargo-mozilla-0.57.0/src/doc/man/options-target-triple.adoc | 12 cargo-mozilla-0.57.0/src/doc/man/options-targets-lib-bin.adoc | 8 cargo-mozilla-0.57.0/src/doc/man/options-targets.adoc | 39 cargo-mozilla-0.57.0/src/doc/man/options-test.adoc | 8 cargo-mozilla-0.57.0/src/doc/man/options-token.adoc | 10 cargo-mozilla-0.57.0/src/doc/man/section-environment.adoc | 4 cargo-mozilla-0.57.0/src/doc/man/section-exit-status.adoc | 7 cargo-mozilla-0.57.0/src/doc/man/section-profiles.adoc | 26 cargo-mozilla-0.57.0/src/doc/semver-check/Cargo.toml | 10 cargo-mozilla-0.57.0/src/doc/semver-check/src/main.rs | 217 cargo-mozilla-0.57.0/src/doc/src/SUMMARY.md | 3 cargo-mozilla-0.57.0/src/doc/src/appendix/git-authentication.md | 4 cargo-mozilla-0.57.0/src/doc/src/appendix/glossary.md | 158 cargo-mozilla-0.57.0/src/doc/src/commands/cargo-bench.md | 448 cargo-mozilla-0.57.0/src/doc/src/commands/cargo-build.md | 398 cargo-mozilla-0.57.0/src/doc/src/commands/cargo-check.md | 394 cargo-mozilla-0.57.0/src/doc/src/commands/cargo-clean.md | 185 cargo-mozilla-0.57.0/src/doc/src/commands/cargo-doc.md | 360 cargo-mozilla-0.57.0/src/doc/src/commands/cargo-fetch.md | 158 cargo-mozilla-0.57.0/src/doc/src/commands/cargo-fix.md | 478 cargo-mozilla-0.57.0/src/doc/src/commands/cargo-generate-lockfile.md | 133 cargo-mozilla-0.57.0/src/doc/src/commands/cargo-help.md | 29 cargo-mozilla-0.57.0/src/doc/src/commands/cargo-init.md | 146 cargo-mozilla-0.57.0/src/doc/src/commands/cargo-install.md | 359 cargo-mozilla-0.57.0/src/doc/src/commands/cargo-locate-project.md | 122 cargo-mozilla-0.57.0/src/doc/src/commands/cargo-login.md | 114 cargo-mozilla-0.57.0/src/doc/src/commands/cargo-metadata.md | 459 cargo-mozilla-0.57.0/src/doc/src/commands/cargo-new.md | 141 cargo-mozilla-0.57.0/src/doc/src/commands/cargo-owner.md | 160 cargo-mozilla-0.57.0/src/doc/src/commands/cargo-package.md | 293 cargo-mozilla-0.57.0/src/doc/src/commands/cargo-pkgid.md | 174 cargo-mozilla-0.57.0/src/doc/src/commands/cargo-publish.md | 275 cargo-mozilla-0.57.0/src/doc/src/commands/cargo-run.md | 302 cargo-mozilla-0.57.0/src/doc/src/commands/cargo-rustc.md | 372 cargo-mozilla-0.57.0/src/doc/src/commands/cargo-rustdoc.md | 378 cargo-mozilla-0.57.0/src/doc/src/commands/cargo-search.md | 118 cargo-mozilla-0.57.0/src/doc/src/commands/cargo-test.md | 491 cargo-mozilla-0.57.0/src/doc/src/commands/cargo-tree.md | 402 cargo-mozilla-0.57.0/src/doc/src/commands/cargo-uninstall.md | 128 cargo-mozilla-0.57.0/src/doc/src/commands/cargo-update.md | 181 cargo-mozilla-0.57.0/src/doc/src/commands/cargo-vendor.md | 177 cargo-mozilla-0.57.0/src/doc/src/commands/cargo-verify-project.md | 138 cargo-mozilla-0.57.0/src/doc/src/commands/cargo-version.md | 45 cargo-mozilla-0.57.0/src/doc/src/commands/cargo-yank.md | 146 cargo-mozilla-0.57.0/src/doc/src/commands/cargo.md | 316 cargo-mozilla-0.57.0/src/doc/src/commands/command-common.html | 18 cargo-mozilla-0.57.0/src/doc/src/faq.md | 73 cargo-mozilla-0.57.0/src/doc/src/getting-started/first-steps.md | 21 cargo-mozilla-0.57.0/src/doc/src/getting-started/index.md | 5 cargo-mozilla-0.57.0/src/doc/src/getting-started/installation.md | 2 cargo-mozilla-0.57.0/src/doc/src/guide/build-cache.md | 9 cargo-mozilla-0.57.0/src/doc/src/guide/cargo-home.md | 11 cargo-mozilla-0.57.0/src/doc/src/guide/cargo-toml-vs-cargo-lock.md | 47 cargo-mozilla-0.57.0/src/doc/src/guide/continuous-integration.md | 7 cargo-mozilla-0.57.0/src/doc/src/guide/creating-a-new-project.md | 16 cargo-mozilla-0.57.0/src/doc/src/guide/dependencies.md | 20 cargo-mozilla-0.57.0/src/doc/src/guide/project-layout.md | 10 cargo-mozilla-0.57.0/src/doc/src/guide/tests.md | 9 cargo-mozilla-0.57.0/src/doc/src/guide/why-cargo-exists.md | 57 cargo-mozilla-0.57.0/src/doc/src/guide/working-on-an-existing-project.md | 14 cargo-mozilla-0.57.0/src/doc/src/images/winapi-features.svg | 3 cargo-mozilla-0.57.0/src/doc/src/index.md | 13 cargo-mozilla-0.57.0/src/doc/src/reference/build-script-examples.md | 4 cargo-mozilla-0.57.0/src/doc/src/reference/build-scripts.md | 81 cargo-mozilla-0.57.0/src/doc/src/reference/cargo-targets.md | 10 cargo-mozilla-0.57.0/src/doc/src/reference/config.md | 201 cargo-mozilla-0.57.0/src/doc/src/reference/environment-variables.md | 136 cargo-mozilla-0.57.0/src/doc/src/reference/external-tools.md | 7 cargo-mozilla-0.57.0/src/doc/src/reference/features-examples.md | 187 cargo-mozilla-0.57.0/src/doc/src/reference/features.md | 539 cargo-mozilla-0.57.0/src/doc/src/reference/index.md | 3 cargo-mozilla-0.57.0/src/doc/src/reference/manifest.md | 322 cargo-mozilla-0.57.0/src/doc/src/reference/overriding-dependencies.md | 6 cargo-mozilla-0.57.0/src/doc/src/reference/pkgid-spec.md | 49 cargo-mozilla-0.57.0/src/doc/src/reference/profiles.md | 56 cargo-mozilla-0.57.0/src/doc/src/reference/publishing.md | 37 cargo-mozilla-0.57.0/src/doc/src/reference/registries.md | 13 cargo-mozilla-0.57.0/src/doc/src/reference/resolver.md | 526 cargo-mozilla-0.57.0/src/doc/src/reference/semver.md | 1349 cargo-mozilla-0.57.0/src/doc/src/reference/source-replacement.md | 2 cargo-mozilla-0.57.0/src/doc/src/reference/specifying-dependencies.md | 46 cargo-mozilla-0.57.0/src/doc/src/reference/unstable.md | 945 cargo-mozilla-0.57.0/src/doc/src/reference/workspaces.md | 9 cargo-mozilla-0.57.0/src/doc/theme/head.hbs | 5 cargo-mozilla-0.57.0/src/etc/_cargo | 16 cargo-mozilla-0.57.0/src/etc/cargo.bashcomp.sh | 6 cargo-mozilla-0.57.0/src/etc/man/cargo-bench.1 | 520 cargo-mozilla-0.57.0/src/etc/man/cargo-build.1 | 452 cargo-mozilla-0.57.0/src/etc/man/cargo-check.1 | 443 cargo-mozilla-0.57.0/src/etc/man/cargo-clean.1 | 194 cargo-mozilla-0.57.0/src/etc/man/cargo-doc.1 | 403 cargo-mozilla-0.57.0/src/etc/man/cargo-fetch.1 | 166 cargo-mozilla-0.57.0/src/etc/man/cargo-fix.1 | 549 cargo-mozilla-0.57.0/src/etc/man/cargo-generate-lockfile.1 | 151 cargo-mozilla-0.57.0/src/etc/man/cargo-help.1 | 61 cargo-mozilla-0.57.0/src/etc/man/cargo-init.1 | 329 cargo-mozilla-0.57.0/src/etc/man/cargo-install.1 | 440 cargo-mozilla-0.57.0/src/etc/man/cargo-locate-project.1 | 153 cargo-mozilla-0.57.0/src/etc/man/cargo-login.1 | 142 cargo-mozilla-0.57.0/src/etc/man/cargo-metadata.1 | 219 cargo-mozilla-0.57.0/src/etc/man/cargo-new.1 | 327 cargo-mozilla-0.57.0/src/etc/man/cargo-owner.1 | 191 cargo-mozilla-0.57.0/src/etc/man/cargo-package.1 | 368 cargo-mozilla-0.57.0/src/etc/man/cargo-pkgid.1 | 239 cargo-mozilla-0.57.0/src/etc/man/cargo-publish.1 | 300 cargo-mozilla-0.57.0/src/etc/man/cargo-run.1 | 363 cargo-mozilla-0.57.0/src/etc/man/cargo-rustc.1 | 427 cargo-mozilla-0.57.0/src/etc/man/cargo-rustdoc.1 | 421 cargo-mozilla-0.57.0/src/etc/man/cargo-search.1 | 141 cargo-mozilla-0.57.0/src/etc/man/cargo-test.1 | 597 cargo-mozilla-0.57.0/src/etc/man/cargo-tree.1 | 551 cargo-mozilla-0.57.0/src/etc/man/cargo-uninstall.1 | 184 cargo-mozilla-0.57.0/src/etc/man/cargo-update.1 | 211 cargo-mozilla-0.57.0/src/etc/man/cargo-vendor.1 | 236 cargo-mozilla-0.57.0/src/etc/man/cargo-verify-project.1 | 151 cargo-mozilla-0.57.0/src/etc/man/cargo-version.1 | 77 cargo-mozilla-0.57.0/src/etc/man/cargo-yank.1 | 158 cargo-mozilla-0.57.0/src/etc/man/cargo.1 | 517 cargo-mozilla-0.57.0/tests/build-std/main.rs | 12 cargo-mozilla-0.57.0/tests/internal.rs | 17 cargo-mozilla-0.57.0/tests/testsuite/alt_registry.rs | 621 cargo-mozilla-0.57.0/tests/testsuite/bad_config.rs | 743 cargo-mozilla-0.57.0/tests/testsuite/bad_manifest_path.rs | 2 cargo-mozilla-0.57.0/tests/testsuite/bench.rs | 894 cargo-mozilla-0.57.0/tests/testsuite/binary_name.rs | 291 cargo-mozilla-0.57.0/tests/testsuite/build.rs | 2916 - cargo-mozilla-0.57.0/tests/testsuite/build_plan.rs | 254 cargo-mozilla-0.57.0/tests/testsuite/build_script.rs | 3166 - cargo-mozilla-0.57.0/tests/testsuite/build_script_env.rs | 87 cargo-mozilla-0.57.0/tests/testsuite/build_script_extra_link_arg.rs | 281 cargo-mozilla-0.57.0/tests/testsuite/cache_messages.rs | 92 cargo-mozilla-0.57.0/tests/testsuite/cargo_alias_config.rs | 147 cargo-mozilla-0.57.0/tests/testsuite/cargo_command.rs | 242 cargo-mozilla-0.57.0/tests/testsuite/cargo_config.rs | 522 cargo-mozilla-0.57.0/tests/testsuite/cargo_env_config.rs | 156 cargo-mozilla-0.57.0/tests/testsuite/cargo_features.rs | 491 cargo-mozilla-0.57.0/tests/testsuite/cargo_targets.rs | 29 cargo-mozilla-0.57.0/tests/testsuite/cfg.rs | 307 cargo-mozilla-0.57.0/tests/testsuite/check.rs | 534 cargo-mozilla-0.57.0/tests/testsuite/clean.rs | 144 cargo-mozilla-0.57.0/tests/testsuite/collisions.rs | 390 cargo-mozilla-0.57.0/tests/testsuite/concurrent.rs | 142 cargo-mozilla-0.57.0/tests/testsuite/config.rs | 351 cargo-mozilla-0.57.0/tests/testsuite/config_include.rs | 78 cargo-mozilla-0.57.0/tests/testsuite/corrupt_git.rs | 39 cargo-mozilla-0.57.0/tests/testsuite/credential_process.rs | 459 cargo-mozilla-0.57.0/tests/testsuite/cross_compile.rs | 903 cargo-mozilla-0.57.0/tests/testsuite/cross_publish.rs | 80 cargo-mozilla-0.57.0/tests/testsuite/custom_target.rs | 287 cargo-mozilla-0.57.0/tests/testsuite/death.rs | 28 cargo-mozilla-0.57.0/tests/testsuite/dep_info.rs | 144 cargo-mozilla-0.57.0/tests/testsuite/directory.rs | 227 cargo-mozilla-0.57.0/tests/testsuite/doc.rs | 1399 cargo-mozilla-0.57.0/tests/testsuite/edition.rs | 96 cargo-mozilla-0.57.0/tests/testsuite/features.rs | 1628 cargo-mozilla-0.57.0/tests/testsuite/features2.rs | 1105 cargo-mozilla-0.57.0/tests/testsuite/features_namespaced.rs | 1194 cargo-mozilla-0.57.0/tests/testsuite/fetch.rs | 44 cargo-mozilla-0.57.0/tests/testsuite/fix.rs | 706 cargo-mozilla-0.57.0/tests/testsuite/freshness.rs | 802 cargo-mozilla-0.57.0/tests/testsuite/future_incompat_report.rs | 417 cargo-mozilla-0.57.0/tests/testsuite/generate_lockfile.rs | 14 cargo-mozilla-0.57.0/tests/testsuite/git.rs | 1428 cargo-mozilla-0.57.0/tests/testsuite/git_auth.rs | 74 cargo-mozilla-0.57.0/tests/testsuite/git_gc.rs | 14 cargo-mozilla-0.57.0/tests/testsuite/glob_targets.rs | 539 cargo-mozilla-0.57.0/tests/testsuite/help.rs | 140 cargo-mozilla-0.57.0/tests/testsuite/init.rs | 190 cargo-mozilla-0.57.0/tests/testsuite/install.rs | 491 cargo-mozilla-0.57.0/tests/testsuite/install_upgrade.rs | 38 cargo-mozilla-0.57.0/tests/testsuite/jobserver.rs | 147 cargo-mozilla-0.57.0/tests/testsuite/list_availables.rs | 232 cargo-mozilla-0.57.0/tests/testsuite/list_targets.rs | 191 cargo-mozilla-0.57.0/tests/testsuite/local_registry.rs | 208 cargo-mozilla-0.57.0/tests/testsuite/locate_project.rs | 70 cargo-mozilla-0.57.0/tests/testsuite/lockfile_compat.rs | 410 cargo-mozilla-0.57.0/tests/testsuite/login.rs | 8 cargo-mozilla-0.57.0/tests/testsuite/logout.rs | 83 cargo-mozilla-0.57.0/tests/testsuite/lto.rs | 313 cargo-mozilla-0.57.0/tests/testsuite/main.rs | 29 cargo-mozilla-0.57.0/tests/testsuite/member_discovery.rs | 44 cargo-mozilla-0.57.0/tests/testsuite/member_errors.rs | 96 cargo-mozilla-0.57.0/tests/testsuite/message_format.rs | 24 cargo-mozilla-0.57.0/tests/testsuite/messages.rs | 142 cargo-mozilla-0.57.0/tests/testsuite/metabuild.rs | 592 cargo-mozilla-0.57.0/tests/testsuite/metadata.rs | 1640 cargo-mozilla-0.57.0/tests/testsuite/minimal_versions.rs | 14 cargo-mozilla-0.57.0/tests/testsuite/mock-std/Cargo.toml | 10 cargo-mozilla-0.57.0/tests/testsuite/mock-std/library/alloc/Cargo.toml | 8 cargo-mozilla-0.57.0/tests/testsuite/mock-std/library/alloc/src/lib.rs | 11 cargo-mozilla-0.57.0/tests/testsuite/mock-std/library/compiler_builtins/Cargo.toml | 5 cargo-mozilla-0.57.0/tests/testsuite/mock-std/library/compiler_builtins/src/lib.rs | 1 cargo-mozilla-0.57.0/tests/testsuite/mock-std/library/core/Cargo.toml | 5 cargo-mozilla-0.57.0/tests/testsuite/mock-std/library/core/src/lib.rs | 9 cargo-mozilla-0.57.0/tests/testsuite/mock-std/library/panic_unwind/Cargo.toml | 5 cargo-mozilla-0.57.0/tests/testsuite/mock-std/library/panic_unwind/src/lib.rs | 5 cargo-mozilla-0.57.0/tests/testsuite/mock-std/library/proc_macro/Cargo.toml | 5 cargo-mozilla-0.57.0/tests/testsuite/mock-std/library/proc_macro/src/lib.rs | 11 cargo-mozilla-0.57.0/tests/testsuite/mock-std/library/rustc-std-workspace-alloc/Cargo.toml | 11 cargo-mozilla-0.57.0/tests/testsuite/mock-std/library/rustc-std-workspace-alloc/lib.rs | 3 cargo-mozilla-0.57.0/tests/testsuite/mock-std/library/rustc-std-workspace-core/Cargo.toml | 11 cargo-mozilla-0.57.0/tests/testsuite/mock-std/library/rustc-std-workspace-core/lib.rs | 3 cargo-mozilla-0.57.0/tests/testsuite/mock-std/library/rustc-std-workspace-std/Cargo.toml | 11 cargo-mozilla-0.57.0/tests/testsuite/mock-std/library/rustc-std-workspace-std/lib.rs | 1 cargo-mozilla-0.57.0/tests/testsuite/mock-std/library/std/Cargo.toml | 11 cargo-mozilla-0.57.0/tests/testsuite/mock-std/library/std/src/lib.rs | 12 cargo-mozilla-0.57.0/tests/testsuite/mock-std/library/test/Cargo.toml | 18 cargo-mozilla-0.57.0/tests/testsuite/mock-std/library/test/src/lib.rs | 10 cargo-mozilla-0.57.0/tests/testsuite/mock-std/src/liballoc/Cargo.toml | 11 cargo-mozilla-0.57.0/tests/testsuite/mock-std/src/liballoc/lib.rs | 11 cargo-mozilla-0.57.0/tests/testsuite/mock-std/src/libcompiler_builtins/Cargo.toml | 8 cargo-mozilla-0.57.0/tests/testsuite/mock-std/src/libcompiler_builtins/lib.rs | 1 cargo-mozilla-0.57.0/tests/testsuite/mock-std/src/libcore/Cargo.toml | 8 cargo-mozilla-0.57.0/tests/testsuite/mock-std/src/libcore/lib.rs | 9 cargo-mozilla-0.57.0/tests/testsuite/mock-std/src/libpanic_unwind/Cargo.toml | 8 cargo-mozilla-0.57.0/tests/testsuite/mock-std/src/libpanic_unwind/lib.rs | 5 cargo-mozilla-0.57.0/tests/testsuite/mock-std/src/libproc_macro/Cargo.toml | 8 cargo-mozilla-0.57.0/tests/testsuite/mock-std/src/libproc_macro/lib.rs | 11 cargo-mozilla-0.57.0/tests/testsuite/mock-std/src/libstd/Cargo.toml | 11 cargo-mozilla-0.57.0/tests/testsuite/mock-std/src/libstd/lib.rs | 9 cargo-mozilla-0.57.0/tests/testsuite/mock-std/src/libtest/Cargo.toml | 18 cargo-mozilla-0.57.0/tests/testsuite/mock-std/src/libtest/lib.rs | 10 cargo-mozilla-0.57.0/tests/testsuite/mock-std/src/tools/rustc-std-workspace-alloc/Cargo.toml | 11 cargo-mozilla-0.57.0/tests/testsuite/mock-std/src/tools/rustc-std-workspace-alloc/lib.rs | 3 cargo-mozilla-0.57.0/tests/testsuite/mock-std/src/tools/rustc-std-workspace-core/Cargo.toml | 11 cargo-mozilla-0.57.0/tests/testsuite/mock-std/src/tools/rustc-std-workspace-core/lib.rs | 3 cargo-mozilla-0.57.0/tests/testsuite/mock-std/src/tools/rustc-std-workspace-std/Cargo.toml | 11 cargo-mozilla-0.57.0/tests/testsuite/mock-std/src/tools/rustc-std-workspace-std/lib.rs | 1 cargo-mozilla-0.57.0/tests/testsuite/multitarget.rs | 4 cargo-mozilla-0.57.0/tests/testsuite/net_config.rs | 44 cargo-mozilla-0.57.0/tests/testsuite/new.rs | 385 cargo-mozilla-0.57.0/tests/testsuite/offline.rs | 152 cargo-mozilla-0.57.0/tests/testsuite/old_cargos.rs | 646 cargo-mozilla-0.57.0/tests/testsuite/out_dir.rs | 97 cargo-mozilla-0.57.0/tests/testsuite/owner.rs | 49 cargo-mozilla-0.57.0/tests/testsuite/package.rs | 658 cargo-mozilla-0.57.0/tests/testsuite/package_features.rs | 400 cargo-mozilla-0.57.0/tests/testsuite/patch.rs | 1053 cargo-mozilla-0.57.0/tests/testsuite/path.rs | 619 cargo-mozilla-0.57.0/tests/testsuite/paths.rs | 162 cargo-mozilla-0.57.0/tests/testsuite/pkgid.rs | 110 cargo-mozilla-0.57.0/tests/testsuite/plugins.rs | 416 cargo-mozilla-0.57.0/tests/testsuite/proc_macro.rs | 394 cargo-mozilla-0.57.0/tests/testsuite/profile_config.rs | 218 cargo-mozilla-0.57.0/tests/testsuite/profile_custom.rs | 481 cargo-mozilla-0.57.0/tests/testsuite/profile_overrides.rs | 80 cargo-mozilla-0.57.0/tests/testsuite/profile_targets.rs | 143 cargo-mozilla-0.57.0/tests/testsuite/profiles.rs | 341 cargo-mozilla-0.57.0/tests/testsuite/progress.rs | 159 cargo-mozilla-0.57.0/tests/testsuite/pub_priv.rs | 81 cargo-mozilla-0.57.0/tests/testsuite/publish.rs | 907 cargo-mozilla-0.57.0/tests/testsuite/publish_lockfile.rs | 26 cargo-mozilla-0.57.0/tests/testsuite/read_manifest.rs | 21 cargo-mozilla-0.57.0/tests/testsuite/registry.rs | 943 cargo-mozilla-0.57.0/tests/testsuite/rename_deps.rs | 93 cargo-mozilla-0.57.0/tests/testsuite/replace.rs | 849 cargo-mozilla-0.57.0/tests/testsuite/required_features.rs | 763 cargo-mozilla-0.57.0/tests/testsuite/run.rs | 579 cargo-mozilla-0.57.0/tests/testsuite/rust_version.rs | 191 cargo-mozilla-0.57.0/tests/testsuite/rustc.rs | 228 cargo-mozilla-0.57.0/tests/testsuite/rustc_info_cache.rs | 156 cargo-mozilla-0.57.0/tests/testsuite/rustdoc.rs | 111 cargo-mozilla-0.57.0/tests/testsuite/rustdoc_extern_html.rs | 37 cargo-mozilla-0.57.0/tests/testsuite/rustdocflags.rs | 38 cargo-mozilla-0.57.0/tests/testsuite/rustflags.rs | 457 cargo-mozilla-0.57.0/tests/testsuite/search.rs | 25 cargo-mozilla-0.57.0/tests/testsuite/standard_lib.rs | 124 cargo-mozilla-0.57.0/tests/testsuite/test.rs | 2338 - cargo-mozilla-0.57.0/tests/testsuite/tool_paths.rs | 123 cargo-mozilla-0.57.0/tests/testsuite/tree.rs | 599 cargo-mozilla-0.57.0/tests/testsuite/unit_graph.rs | 340 cargo-mozilla-0.57.0/tests/testsuite/update.rs | 95 cargo-mozilla-0.57.0/tests/testsuite/vendor.rs | 126 cargo-mozilla-0.57.0/tests/testsuite/verify_project.rs | 12 cargo-mozilla-0.57.0/tests/testsuite/version.rs | 10 cargo-mozilla-0.57.0/tests/testsuite/warn_on_failure.rs | 42 cargo-mozilla-0.57.0/tests/testsuite/weak_dep_features.rs | 740 cargo-mozilla-0.57.0/tests/testsuite/workspaces.rs | 1334 cargo-mozilla-0.57.0/tests/testsuite/yank.rs | 16 cargo-mozilla-0.57.0/triagebot.toml | 11 cargo-mozilla-0.57.0/vendor/adler/.cargo-checksum.json | 2 cargo-mozilla-0.57.0/vendor/adler/CHANGELOG.md | 30 cargo-mozilla-0.57.0/vendor/adler/Cargo.toml | 16 cargo-mozilla-0.57.0/vendor/adler/README.md | 5 cargo-mozilla-0.57.0/vendor/adler/benches/bench.rs | 109 cargo-mozilla-0.57.0/vendor/adler/debian/patches/Avoid-test-using-stdi-io-BufReader-without-default.patch | 37 cargo-mozilla-0.57.0/vendor/adler/debian/patches/drop-criterion.patch | 140 cargo-mozilla-0.57.0/vendor/adler/debian/patches/series | 1 cargo-mozilla-0.57.0/vendor/adler/src/lib.rs | 88 cargo-mozilla-0.57.0/vendor/aho-corasick/.cargo-checksum.json | 2 cargo-mozilla-0.57.0/vendor/aho-corasick/Cargo.toml | 11 cargo-mozilla-0.57.0/vendor/aho-corasick/README.md | 8 cargo-mozilla-0.57.0/vendor/aho-corasick/src/ahocorasick.rs | 74 cargo-mozilla-0.57.0/vendor/aho-corasick/src/automaton.rs | 8 cargo-mozilla-0.57.0/vendor/aho-corasick/src/buffer.rs | 4 cargo-mozilla-0.57.0/vendor/aho-corasick/src/classes.rs | 4 cargo-mozilla-0.57.0/vendor/aho-corasick/src/dfa.rs | 20 cargo-mozilla-0.57.0/vendor/aho-corasick/src/error.rs | 2 cargo-mozilla-0.57.0/vendor/aho-corasick/src/lib.rs | 7 cargo-mozilla-0.57.0/vendor/aho-corasick/src/nfa.rs | 46 cargo-mozilla-0.57.0/vendor/aho-corasick/src/packed/api.rs | 8 cargo-mozilla-0.57.0/vendor/aho-corasick/src/packed/mod.rs | 2 cargo-mozilla-0.57.0/vendor/aho-corasick/src/packed/pattern.rs | 10 cargo-mozilla-0.57.0/vendor/aho-corasick/src/packed/rabinkarp.rs | 4 cargo-mozilla-0.57.0/vendor/aho-corasick/src/packed/teddy/compile.rs | 10 cargo-mozilla-0.57.0/vendor/aho-corasick/src/packed/teddy/mod.rs | 12 cargo-mozilla-0.57.0/vendor/aho-corasick/src/packed/teddy/runtime.rs | 8 cargo-mozilla-0.57.0/vendor/aho-corasick/src/packed/tests.rs | 4 cargo-mozilla-0.57.0/vendor/aho-corasick/src/prefilter.rs | 72 cargo-mozilla-0.57.0/vendor/aho-corasick/src/state_id.rs | 2 cargo-mozilla-0.57.0/vendor/aho-corasick/src/tests.rs | 148 cargo-mozilla-0.57.0/vendor/anyhow/.cargo-checksum.json | 2 cargo-mozilla-0.57.0/vendor/anyhow/Cargo.toml | 18 cargo-mozilla-0.57.0/vendor/anyhow/README.md | 18 cargo-mozilla-0.57.0/vendor/anyhow/build.rs | 70 cargo-mozilla-0.57.0/vendor/anyhow/src/backtrace.rs | 377 cargo-mozilla-0.57.0/vendor/anyhow/src/chain.rs | 1 cargo-mozilla-0.57.0/vendor/anyhow/src/context.rs | 2 cargo-mozilla-0.57.0/vendor/anyhow/src/error.rs | 423 cargo-mozilla-0.57.0/vendor/anyhow/src/fmt.rs | 19 cargo-mozilla-0.57.0/vendor/anyhow/src/kind.rs | 6 cargo-mozilla-0.57.0/vendor/anyhow/src/lib.rs | 69 cargo-mozilla-0.57.0/vendor/anyhow/src/macros.rs | 42 cargo-mozilla-0.57.0/vendor/anyhow/src/ptr.rs | 199 cargo-mozilla-0.57.0/vendor/anyhow/tests/compiletest.rs | 1 cargo-mozilla-0.57.0/vendor/anyhow/tests/drop/mod.rs | 2 cargo-mozilla-0.57.0/vendor/anyhow/tests/test_boxed.rs | 5 cargo-mozilla-0.57.0/vendor/anyhow/tests/test_chain.rs | 25 cargo-mozilla-0.57.0/vendor/anyhow/tests/test_context.rs | 12 cargo-mozilla-0.57.0/vendor/anyhow/tests/test_convert.rs | 22 cargo-mozilla-0.57.0/vendor/anyhow/tests/test_downcast.rs | 17 cargo-mozilla-0.57.0/vendor/anyhow/tests/test_ffi.rs | 18 cargo-mozilla-0.57.0/vendor/anyhow/tests/test_macros.rs | 11 cargo-mozilla-0.57.0/vendor/anyhow/tests/ui/no-impl.stderr | 14 cargo-mozilla-0.57.0/vendor/anyhow/tests/ui/temporary-value.rs | 5 cargo-mozilla-0.57.0/vendor/anyhow/tests/ui/temporary-value.stderr | 8 cargo-mozilla-0.57.0/vendor/arrayvec/.cargo-checksum.json | 1 cargo-mozilla-0.57.0/vendor/arrayvec/CHANGELOG.md | 234 cargo-mozilla-0.57.0/vendor/arrayvec/Cargo.toml | 63 cargo-mozilla-0.57.0/vendor/arrayvec/LICENSE-APACHE | 201 cargo-mozilla-0.57.0/vendor/arrayvec/LICENSE-MIT | 25 cargo-mozilla-0.57.0/vendor/arrayvec/README.md | 24 cargo-mozilla-0.57.0/vendor/arrayvec/benches/arraystring.rs | 90 cargo-mozilla-0.57.0/vendor/arrayvec/benches/extend.rs | 78 cargo-mozilla-0.57.0/vendor/arrayvec/ci/miri.sh | 15 cargo-mozilla-0.57.0/vendor/arrayvec/custom.css | 25 cargo-mozilla-0.57.0/vendor/arrayvec/src/array.rs | 151 cargo-mozilla-0.57.0/vendor/arrayvec/src/array_string.rs | 582 cargo-mozilla-0.57.0/vendor/arrayvec/src/char.rs | 99 cargo-mozilla-0.57.0/vendor/arrayvec/src/errors.rs | 49 cargo-mozilla-0.57.0/vendor/arrayvec/src/lib.rs | 1213 cargo-mozilla-0.57.0/vendor/arrayvec/src/maybe_uninit.rs | 44 cargo-mozilla-0.57.0/vendor/arrayvec/tests/serde.rs | 79 cargo-mozilla-0.57.0/vendor/arrayvec/tests/tests.rs | 688 cargo-mozilla-0.57.0/vendor/atty/.pc/.quilt_patches | 1 cargo-mozilla-0.57.0/vendor/atty/.pc/.quilt_series | 1 cargo-mozilla-0.57.0/vendor/atty/.pc/.version | 1 cargo-mozilla-0.57.0/vendor/atty/.pc/applied-patches | 1 cargo-mozilla-0.57.0/vendor/atty/.pc/no-hermit.patch/Cargo.toml | 34 cargo-mozilla-0.57.0/vendor/bitflags/.cargo-checksum.json | 2 cargo-mozilla-0.57.0/vendor/bitflags/CHANGELOG.md | 57 cargo-mozilla-0.57.0/vendor/bitflags/Cargo.toml | 34 cargo-mozilla-0.57.0/vendor/bitflags/README.md | 12 cargo-mozilla-0.57.0/vendor/bitflags/build.rs | 44 cargo-mozilla-0.57.0/vendor/bitflags/src/lib.rs | 873 cargo-mozilla-0.57.0/vendor/bitflags/tests/basic.rs | 20 cargo-mozilla-0.57.0/vendor/bitflags/tests/compile-fail/impls/copy.rs | 10 cargo-mozilla-0.57.0/vendor/bitflags/tests/compile-fail/impls/copy.stderr.beta | 27 cargo-mozilla-0.57.0/vendor/bitflags/tests/compile-fail/impls/eq.rs | 10 cargo-mozilla-0.57.0/vendor/bitflags/tests/compile-fail/impls/eq.stderr.beta | 55 cargo-mozilla-0.57.0/vendor/bitflags/tests/compile-fail/non_integer_base/all_defined.rs | 123 cargo-mozilla-0.57.0/vendor/bitflags/tests/compile-fail/non_integer_base/all_defined.stderr.beta | 27 cargo-mozilla-0.57.0/vendor/bitflags/tests/compile-fail/non_integer_base/all_missing.rs | 13 cargo-mozilla-0.57.0/vendor/bitflags/tests/compile-fail/non_integer_base/all_missing.stderr.beta | 13 cargo-mozilla-0.57.0/vendor/bitflags/tests/compile-fail/visibility/private_field.rs | 13 cargo-mozilla-0.57.0/vendor/bitflags/tests/compile-fail/visibility/private_field.stderr.beta | 10 cargo-mozilla-0.57.0/vendor/bitflags/tests/compile-fail/visibility/private_flags.rs | 18 cargo-mozilla-0.57.0/vendor/bitflags/tests/compile-fail/visibility/private_flags.stderr.beta | 18 cargo-mozilla-0.57.0/vendor/bitflags/tests/compile-fail/visibility/pub_const.rs | 9 cargo-mozilla-0.57.0/vendor/bitflags/tests/compile-fail/visibility/pub_const.stderr.beta | 5 cargo-mozilla-0.57.0/vendor/bitflags/tests/compile-pass/impls/convert.rs | 17 cargo-mozilla-0.57.0/vendor/bitflags/tests/compile-pass/impls/default.rs | 10 cargo-mozilla-0.57.0/vendor/bitflags/tests/compile-pass/impls/inherent_methods.rs | 15 cargo-mozilla-0.57.0/vendor/bitflags/tests/compile-pass/redefinition/core.rs | 14 cargo-mozilla-0.57.0/vendor/bitflags/tests/compile-pass/redefinition/stringify.rs | 19 cargo-mozilla-0.57.0/vendor/bitflags/tests/compile-pass/repr/c.rs | 10 cargo-mozilla-0.57.0/vendor/bitflags/tests/compile-pass/repr/transparent.rs | 10 cargo-mozilla-0.57.0/vendor/bitflags/tests/compile-pass/visibility/bits_field.rs | 11 cargo-mozilla-0.57.0/vendor/bitflags/tests/compile-pass/visibility/pub_in.rs | 19 cargo-mozilla-0.57.0/vendor/bitflags/tests/compile.rs | 63 cargo-mozilla-0.57.0/vendor/bstr/.cargo-checksum.json | 2 cargo-mozilla-0.57.0/vendor/bstr/.pc/.quilt_patches | 1 cargo-mozilla-0.57.0/vendor/bstr/.pc/.quilt_series | 1 cargo-mozilla-0.57.0/vendor/bstr/.pc/.version | 1 cargo-mozilla-0.57.0/vendor/bstr/.pc/applied-patches | 1 cargo-mozilla-0.57.0/vendor/bstr/.pc/increase-dep-memchr.diff/Cargo.toml | 68 cargo-mozilla-0.57.0/vendor/bstr/Cargo.lock | 190 cargo-mozilla-0.57.0/vendor/bstr/Cargo.toml | 25 cargo-mozilla-0.57.0/vendor/bstr/README.md | 45 cargo-mozilla-0.57.0/vendor/bstr/debian/patches/increase-dep-memchr.diff | 13 cargo-mozilla-0.57.0/vendor/bstr/debian/patches/series | 1 cargo-mozilla-0.57.0/vendor/bstr/examples/graphemes-std.rs | 5 cargo-mozilla-0.57.0/vendor/bstr/examples/graphemes.rs | 2 cargo-mozilla-0.57.0/vendor/bstr/examples/lines.rs | 2 cargo-mozilla-0.57.0/vendor/bstr/examples/uppercase.rs | 2 cargo-mozilla-0.57.0/vendor/bstr/examples/words-std.rs | 2 cargo-mozilla-0.57.0/vendor/bstr/examples/words.rs | 2 cargo-mozilla-0.57.0/vendor/bstr/scripts/generate-unicode-data | 2 cargo-mozilla-0.57.0/vendor/bstr/src/bstr.rs | 12 cargo-mozilla-0.57.0/vendor/bstr/src/bstring.rs | 2 cargo-mozilla-0.57.0/vendor/bstr/src/byteset/mod.rs | 3 cargo-mozilla-0.57.0/vendor/bstr/src/byteset/scalar.rs | 2 cargo-mozilla-0.57.0/vendor/bstr/src/cow.rs | 84 cargo-mozilla-0.57.0/vendor/bstr/src/ext_slice.rs | 180 cargo-mozilla-0.57.0/vendor/bstr/src/ext_vec.rs | 28 cargo-mozilla-0.57.0/vendor/bstr/src/impls.rs | 274 cargo-mozilla-0.57.0/vendor/bstr/src/io.rs | 6 cargo-mozilla-0.57.0/vendor/bstr/src/lib.rs | 73 cargo-mozilla-0.57.0/vendor/bstr/src/search/byte_frequencies.rs | 258 cargo-mozilla-0.57.0/vendor/bstr/src/search/mod.rs | 8 cargo-mozilla-0.57.0/vendor/bstr/src/search/prefilter.rs | 424 cargo-mozilla-0.57.0/vendor/bstr/src/search/tests.rs | 225 cargo-mozilla-0.57.0/vendor/bstr/src/search/twoway.rs | 871 cargo-mozilla-0.57.0/vendor/bstr/src/unicode/fsm/grapheme_break_fwd.rs | 62 cargo-mozilla-0.57.0/vendor/bstr/src/unicode/fsm/grapheme_break_rev.rs | 62 cargo-mozilla-0.57.0/vendor/bstr/src/unicode/fsm/regional_indicator_rev.rs | 62 cargo-mozilla-0.57.0/vendor/bstr/src/unicode/fsm/sentence_break_fwd.rs | 62 cargo-mozilla-0.57.0/vendor/bstr/src/unicode/fsm/simple_word_fwd.rs | 62 cargo-mozilla-0.57.0/vendor/bstr/src/unicode/fsm/whitespace_anchored_fwd.rs | 62 cargo-mozilla-0.57.0/vendor/bstr/src/unicode/fsm/whitespace_anchored_rev.rs | 64 cargo-mozilla-0.57.0/vendor/bstr/src/unicode/fsm/word_break_fwd.rs | 62 cargo-mozilla-0.57.0/vendor/bstr/src/unicode/grapheme.rs | 14 cargo-mozilla-0.57.0/vendor/bstr/src/unicode/sentence.rs | 8 cargo-mozilla-0.57.0/vendor/bstr/src/unicode/whitespace.rs | 4 cargo-mozilla-0.57.0/vendor/bstr/src/unicode/word.rs | 10 cargo-mozilla-0.57.0/vendor/bstr/src/utf8.rs | 139 cargo-mozilla-0.57.0/vendor/bytesize/.cargo-checksum.json | 2 cargo-mozilla-0.57.0/vendor/bytesize/Cargo.toml | 2 cargo-mozilla-0.57.0/vendor/bytesize/README.md | 38 cargo-mozilla-0.57.0/vendor/bytesize/src/lib.rs | 104 cargo-mozilla-0.57.0/vendor/bytesize/src/parse.rs | 218 cargo-mozilla-0.57.0/vendor/cc/.cargo-checksum.json | 2 cargo-mozilla-0.57.0/vendor/cc/Cargo.lock | 62 cargo-mozilla-0.57.0/vendor/cc/Cargo.toml | 13 cargo-mozilla-0.57.0/vendor/cc/README.md | 59 cargo-mozilla-0.57.0/vendor/cc/src/lib.rs | 484 cargo-mozilla-0.57.0/vendor/cc/src/vs_instances.rs | 199 cargo-mozilla-0.57.0/vendor/cc/src/windows_registry.rs | 192 cargo-mozilla-0.57.0/vendor/cfg-if-0.1.10/.cargo-checksum.json | 1 cargo-mozilla-0.57.0/vendor/cfg-if-0.1.10/Cargo.toml | 36 cargo-mozilla-0.57.0/vendor/cfg-if-0.1.10/LICENSE-APACHE | 201 cargo-mozilla-0.57.0/vendor/cfg-if-0.1.10/LICENSE-MIT | 25 cargo-mozilla-0.57.0/vendor/cfg-if-0.1.10/README.md | 47 cargo-mozilla-0.57.0/vendor/cfg-if-0.1.10/src/lib.rs | 176 cargo-mozilla-0.57.0/vendor/cfg-if-0.1.10/tests/xcrate.rs | 14 cargo-mozilla-0.57.0/vendor/cfg-if/.cargo-checksum.json | 2 cargo-mozilla-0.57.0/vendor/cfg-if/.pc/.quilt_patches | 1 cargo-mozilla-0.57.0/vendor/cfg-if/.pc/.quilt_series | 1 cargo-mozilla-0.57.0/vendor/cfg-if/.pc/.version | 1 cargo-mozilla-0.57.0/vendor/cfg-if/.pc/applied-patches | 1 cargo-mozilla-0.57.0/vendor/cfg-if/.pc/drop-compiler-builtins.patch/Cargo.toml | 36 cargo-mozilla-0.57.0/vendor/cfg-if/Cargo.toml | 2 cargo-mozilla-0.57.0/vendor/cfg-if/src/lib.rs | 12 cargo-mozilla-0.57.0/vendor/clap/.pc/.quilt_patches | 1 cargo-mozilla-0.57.0/vendor/clap/.pc/.quilt_series | 1 cargo-mozilla-0.57.0/vendor/clap/.pc/.version | 1 cargo-mozilla-0.57.0/vendor/clap/.pc/applied-patches | 2 cargo-mozilla-0.57.0/vendor/clap/.pc/no-clippy.patch/Cargo.toml | 132 cargo-mozilla-0.57.0/vendor/clap/.pc/relax-dep-versions.patch/Cargo.toml | 128 cargo-mozilla-0.57.0/vendor/commoncrypto-sys/.pc/.quilt_patches | 1 cargo-mozilla-0.57.0/vendor/commoncrypto-sys/.pc/.quilt_series | 1 cargo-mozilla-0.57.0/vendor/commoncrypto-sys/.pc/.version | 1 cargo-mozilla-0.57.0/vendor/commoncrypto-sys/.pc/applied-patches | 1 cargo-mozilla-0.57.0/vendor/commoncrypto-sys/.pc/no-clippy.patch/Cargo.toml | 20 cargo-mozilla-0.57.0/vendor/commoncrypto/.pc/.quilt_patches | 1 cargo-mozilla-0.57.0/vendor/commoncrypto/.pc/.quilt_series | 1 cargo-mozilla-0.57.0/vendor/commoncrypto/.pc/.version | 1 cargo-mozilla-0.57.0/vendor/commoncrypto/.pc/applied-patches | 1 cargo-mozilla-0.57.0/vendor/commoncrypto/.pc/no-clippy.patch/Cargo.toml | 20 cargo-mozilla-0.57.0/vendor/core-foundation-sys/.cargo-checksum.json | 2 cargo-mozilla-0.57.0/vendor/core-foundation-sys/Cargo.toml | 2 cargo-mozilla-0.57.0/vendor/core-foundation-sys/src/base.rs | 14 cargo-mozilla-0.57.0/vendor/core-foundation-sys/src/bundle.rs | 1 cargo-mozilla-0.57.0/vendor/core-foundation-sys/src/data.rs | 6 cargo-mozilla-0.57.0/vendor/core-foundation-sys/src/lib.rs | 1 cargo-mozilla-0.57.0/vendor/core-foundation-sys/src/mach_port.rs | 20 cargo-mozilla-0.57.0/vendor/core-foundation-sys/src/number.rs | 58 cargo-mozilla-0.57.0/vendor/core-foundation-sys/src/string.rs | 6 cargo-mozilla-0.57.0/vendor/core-foundation/.cargo-checksum.json | 2 cargo-mozilla-0.57.0/vendor/core-foundation/.pc/.quilt_patches | 1 cargo-mozilla-0.57.0/vendor/core-foundation/.pc/.quilt_series | 1 cargo-mozilla-0.57.0/vendor/core-foundation/.pc/.version | 1 cargo-mozilla-0.57.0/vendor/core-foundation/.pc/applied-patches | 1 cargo-mozilla-0.57.0/vendor/core-foundation/.pc/update-dep-uuid-version.patch/Cargo.toml | 43 cargo-mozilla-0.57.0/vendor/core-foundation/.pc/update-dep-uuid-version.patch/src/uuid.rs | 118 cargo-mozilla-0.57.0/vendor/core-foundation/Cargo.toml | 2 cargo-mozilla-0.57.0/vendor/core-foundation/src/array.rs | 2 cargo-mozilla-0.57.0/vendor/core-foundation/src/bundle.rs | 18 cargo-mozilla-0.57.0/vendor/core-foundation/src/data.rs | 81 cargo-mozilla-0.57.0/vendor/core-foundation/src/dictionary.rs | 2 cargo-mozilla-0.57.0/vendor/core-foundation/src/lib.rs | 1 cargo-mozilla-0.57.0/vendor/core-foundation/src/mach_port.rs | 28 cargo-mozilla-0.57.0/vendor/core-foundation/src/propertylist.rs | 2 cargo-mozilla-0.57.0/vendor/core-foundation/src/runloop.rs | 2 cargo-mozilla-0.57.0/vendor/crc32fast/.cargo-checksum.json | 2 cargo-mozilla-0.57.0/vendor/crc32fast/Cargo.toml | 10 cargo-mozilla-0.57.0/vendor/crc32fast/README.md | 2 cargo-mozilla-0.57.0/vendor/crc32fast/benches/bench.rs | 2 cargo-mozilla-0.57.0/vendor/crossbeam-utils/.cargo-checksum.json | 2 cargo-mozilla-0.57.0/vendor/crossbeam-utils/.pc/.quilt_patches | 1 cargo-mozilla-0.57.0/vendor/crossbeam-utils/.pc/.quilt_series | 1 cargo-mozilla-0.57.0/vendor/crossbeam-utils/.pc/.version | 1 cargo-mozilla-0.57.0/vendor/crossbeam-utils/.pc/applied-patches | 1 cargo-mozilla-0.57.0/vendor/crossbeam-utils/.pc/relax-dep.diff/Cargo.toml | 40 cargo-mozilla-0.57.0/vendor/crossbeam-utils/CHANGELOG.md | 36 cargo-mozilla-0.57.0/vendor/crossbeam-utils/Cargo.toml | 18 cargo-mozilla-0.57.0/vendor/crossbeam-utils/README.md | 24 cargo-mozilla-0.57.0/vendor/crossbeam-utils/benches/atomic_cell.rs | 9 cargo-mozilla-0.57.0/vendor/crossbeam-utils/build.rs | 44 cargo-mozilla-0.57.0/vendor/crossbeam-utils/debian/patches/relax-dep.diff | 10 cargo-mozilla-0.57.0/vendor/crossbeam-utils/no_atomic.rs | 59 cargo-mozilla-0.57.0/vendor/crossbeam-utils/src/atomic/atomic_cell.rs | 259 cargo-mozilla-0.57.0/vendor/crossbeam-utils/src/atomic/consume.rs | 32 cargo-mozilla-0.57.0/vendor/crossbeam-utils/src/atomic/mod.rs | 9 cargo-mozilla-0.57.0/vendor/crossbeam-utils/src/atomic/seq_lock.rs | 44 cargo-mozilla-0.57.0/vendor/crossbeam-utils/src/atomic/seq_lock_wide.rs | 43 cargo-mozilla-0.57.0/vendor/crossbeam-utils/src/backoff.rs | 42 cargo-mozilla-0.57.0/vendor/crossbeam-utils/src/cache_padded.rs | 72 cargo-mozilla-0.57.0/vendor/crossbeam-utils/src/lib.rs | 94 cargo-mozilla-0.57.0/vendor/crossbeam-utils/src/sync/mod.rs | 6 cargo-mozilla-0.57.0/vendor/crossbeam-utils/src/sync/parker.rs | 238 cargo-mozilla-0.57.0/vendor/crossbeam-utils/src/sync/sharded_lock.rs | 82 cargo-mozilla-0.57.0/vendor/crossbeam-utils/src/sync/wait_group.rs | 35 cargo-mozilla-0.57.0/vendor/crossbeam-utils/src/thread.rs | 154 cargo-mozilla-0.57.0/vendor/crossbeam-utils/tests/atomic_cell.rs | 57 cargo-mozilla-0.57.0/vendor/crossbeam-utils/tests/cache_padded.rs | 7 cargo-mozilla-0.57.0/vendor/crossbeam-utils/tests/parker.rs | 6 cargo-mozilla-0.57.0/vendor/crossbeam-utils/tests/sharded_lock.rs | 12 cargo-mozilla-0.57.0/vendor/crossbeam-utils/tests/thread.rs | 38 cargo-mozilla-0.57.0/vendor/crossbeam-utils/tests/wait_group.rs | 2 cargo-mozilla-0.57.0/vendor/crypto-hash/.pc/.quilt_patches | 1 cargo-mozilla-0.57.0/vendor/crypto-hash/.pc/.quilt_series | 1 cargo-mozilla-0.57.0/vendor/crypto-hash/.pc/.version | 1 cargo-mozilla-0.57.0/vendor/crypto-hash/.pc/applied-patches | 1 cargo-mozilla-0.57.0/vendor/crypto-hash/.pc/update-dep-versions.patch/Cargo.toml | 37 cargo-mozilla-0.57.0/vendor/curl-sys/.cargo-checksum.json | 2 cargo-mozilla-0.57.0/vendor/curl-sys/.pc/.quilt_patches | 1 cargo-mozilla-0.57.0/vendor/curl-sys/.pc/.quilt_series | 1 cargo-mozilla-0.57.0/vendor/curl-sys/.pc/.version | 1 cargo-mozilla-0.57.0/vendor/curl-sys/.pc/applied-patches | 3 cargo-mozilla-0.57.0/vendor/curl-sys/.pc/disable-libz-sys.patch/Cargo.toml | 68 cargo-mozilla-0.57.0/vendor/curl-sys/.pc/disable-mesalink.patch/Cargo.toml | 73 cargo-mozilla-0.57.0/vendor/curl-sys/.pc/disable-vendor.patch/Cargo.toml | 68 cargo-mozilla-0.57.0/vendor/curl-sys/.pc/disable-vendor.patch/build.rs | 535 cargo-mozilla-0.57.0/vendor/curl-sys/Cargo.toml | 13 cargo-mozilla-0.57.0/vendor/curl-sys/build.rs | 140 cargo-mozilla-0.57.0/vendor/curl-sys/debian/patches/disable-libz-sys.patch | 14 cargo-mozilla-0.57.0/vendor/curl-sys/debian/patches/disable-vendor.patch | 6 cargo-mozilla-0.57.0/vendor/curl-sys/lib.rs | 59 cargo-mozilla-0.57.0/vendor/curl/.cargo-checksum.json | 2 cargo-mozilla-0.57.0/vendor/curl/.pc/.quilt_patches | 1 cargo-mozilla-0.57.0/vendor/curl/.pc/.quilt_series | 1 cargo-mozilla-0.57.0/vendor/curl/.pc/.version | 1 cargo-mozilla-0.57.0/vendor/curl/.pc/applied-patches | 1 cargo-mozilla-0.57.0/vendor/curl/.pc/disable-mesalink.patch/Cargo.toml | 80 cargo-mozilla-0.57.0/vendor/curl/Cargo.lock | 154 cargo-mozilla-0.57.0/vendor/curl/Cargo.toml | 29 cargo-mozilla-0.57.0/vendor/curl/README.md | 1 cargo-mozilla-0.57.0/vendor/curl/ci/run.sh | 6 cargo-mozilla-0.57.0/vendor/curl/debian/patches/disable-features.patch | 18 cargo-mozilla-0.57.0/vendor/curl/debian/patches/disable-static-with-ftp-disabled-test.patch | 16 cargo-mozilla-0.57.0/vendor/curl/debian/patches/series | 2 cargo-mozilla-0.57.0/vendor/curl/examples/aws_sigv4.rs | 14 cargo-mozilla-0.57.0/vendor/curl/examples/ssl_cert_blob.rs | 42 cargo-mozilla-0.57.0/vendor/curl/examples/ssl_proxy.rs | 2 cargo-mozilla-0.57.0/vendor/curl/src/easy/form.rs | 13 cargo-mozilla-0.57.0/vendor/curl/src/easy/handle.rs | 74 cargo-mozilla-0.57.0/vendor/curl/src/easy/handler.rs | 330 cargo-mozilla-0.57.0/vendor/curl/src/easy/list.rs | 11 cargo-mozilla-0.57.0/vendor/curl/src/easy/windows.rs | 9 cargo-mozilla-0.57.0/vendor/curl/src/error.rs | 13 cargo-mozilla-0.57.0/vendor/curl/src/lib.rs | 16 cargo-mozilla-0.57.0/vendor/curl/src/multi.rs | 44 cargo-mozilla-0.57.0/vendor/curl/src/version.rs | 132 cargo-mozilla-0.57.0/vendor/curl/tests/atexit.rs | 3 cargo-mozilla-0.57.0/vendor/curl/tests/easy.rs | 58 cargo-mozilla-0.57.0/vendor/curl/tests/multi.rs | 14 cargo-mozilla-0.57.0/vendor/curl/tests/post.rs | 4 cargo-mozilla-0.57.0/vendor/curl/tests/protocols.rs | 12 cargo-mozilla-0.57.0/vendor/either/.cargo-checksum.json | 1 cargo-mozilla-0.57.0/vendor/either/Cargo.toml | 39 cargo-mozilla-0.57.0/vendor/either/LICENSE-APACHE | 201 cargo-mozilla-0.57.0/vendor/either/LICENSE-MIT | 25 cargo-mozilla-0.57.0/vendor/either/README-crates.io.md | 10 cargo-mozilla-0.57.0/vendor/either/README.rst | 129 cargo-mozilla-0.57.0/vendor/either/src/lib.rs | 1146 cargo-mozilla-0.57.0/vendor/either/src/serde_untagged.rs | 73 cargo-mozilla-0.57.0/vendor/either/src/serde_untagged_optional.rs | 78 cargo-mozilla-0.57.0/vendor/env_logger-0.7.1/.cargo-checksum.json | 1 cargo-mozilla-0.57.0/vendor/env_logger-0.7.1/CHANGELOG.md | 3 cargo-mozilla-0.57.0/vendor/env_logger-0.7.1/Cargo.lock | 212 cargo-mozilla-0.57.0/vendor/env_logger-0.7.1/Cargo.toml | 62 cargo-mozilla-0.57.0/vendor/env_logger-0.7.1/LICENSE-APACHE | 201 cargo-mozilla-0.57.0/vendor/env_logger-0.7.1/LICENSE-MIT | 25 cargo-mozilla-0.57.0/vendor/env_logger-0.7.1/README.md | 150 cargo-mozilla-0.57.0/vendor/env_logger-0.7.1/examples/custom_default_format.rs | 41 cargo-mozilla-0.57.0/vendor/env_logger-0.7.1/examples/custom_format.rs | 53 cargo-mozilla-0.57.0/vendor/env_logger-0.7.1/examples/custom_logger.rs | 60 cargo-mozilla-0.57.0/vendor/env_logger-0.7.1/examples/default.rs | 38 cargo-mozilla-0.57.0/vendor/env_logger-0.7.1/examples/direct_logger.rs | 37 cargo-mozilla-0.57.0/vendor/env_logger-0.7.1/examples/filters_from_code.rs | 18 cargo-mozilla-0.57.0/vendor/env_logger-0.7.1/src/filter/mod.rs | 616 cargo-mozilla-0.57.0/vendor/env_logger-0.7.1/src/filter/regex.rs | 29 cargo-mozilla-0.57.0/vendor/env_logger-0.7.1/src/filter/string.rs | 24 cargo-mozilla-0.57.0/vendor/env_logger-0.7.1/src/fmt/humantime/extern_impl.rs | 118 cargo-mozilla-0.57.0/vendor/env_logger-0.7.1/src/fmt/humantime/mod.rs | 11 cargo-mozilla-0.57.0/vendor/env_logger-0.7.1/src/fmt/humantime/shim_impl.rs | 5 cargo-mozilla-0.57.0/vendor/env_logger-0.7.1/src/fmt/mod.rs | 489 cargo-mozilla-0.57.0/vendor/env_logger-0.7.1/src/fmt/writer/atty.rs | 34 cargo-mozilla-0.57.0/vendor/env_logger-0.7.1/src/fmt/writer/mod.rs | 201 cargo-mozilla-0.57.0/vendor/env_logger-0.7.1/src/fmt/writer/termcolor/extern_impl.rs | 486 cargo-mozilla-0.57.0/vendor/env_logger-0.7.1/src/fmt/writer/termcolor/mod.rs | 12 cargo-mozilla-0.57.0/vendor/env_logger-0.7.1/src/fmt/writer/termcolor/shim_impl.rs | 63 cargo-mozilla-0.57.0/vendor/env_logger-0.7.1/src/lib.rs | 1177 cargo-mozilla-0.57.0/vendor/env_logger-0.7.1/tests/init-twice-retains-filter.rs | 40 cargo-mozilla-0.57.0/vendor/env_logger-0.7.1/tests/log-in-log.rs | 39 cargo-mozilla-0.57.0/vendor/env_logger-0.7.1/tests/log_tls_dtors.rs | 66 cargo-mozilla-0.57.0/vendor/env_logger-0.7.1/tests/regexp_filter.rs | 57 cargo-mozilla-0.57.0/vendor/env_logger/.cargo-checksum.json | 2 cargo-mozilla-0.57.0/vendor/env_logger/.pc/.quilt_patches | 1 cargo-mozilla-0.57.0/vendor/env_logger/.pc/.quilt_series | 1 cargo-mozilla-0.57.0/vendor/env_logger/.pc/.version | 1 cargo-mozilla-0.57.0/vendor/env_logger/.pc/applied-patches | 1 cargo-mozilla-0.57.0/vendor/env_logger/.pc/relax-deps.diff/Cargo.toml | 62 cargo-mozilla-0.57.0/vendor/env_logger/CHANGELOG.md | 2 cargo-mozilla-0.57.0/vendor/env_logger/Cargo.lock | 212 cargo-mozilla-0.57.0/vendor/env_logger/Cargo.toml | 9 cargo-mozilla-0.57.0/vendor/env_logger/README.md | 45 cargo-mozilla-0.57.0/vendor/env_logger/debian/patches/relax-deps.diff | 11 cargo-mozilla-0.57.0/vendor/env_logger/debian/patches/series | 1 cargo-mozilla-0.57.0/vendor/env_logger/examples/custom_default_format.rs | 41 cargo-mozilla-0.57.0/vendor/env_logger/examples/custom_format.rs | 53 cargo-mozilla-0.57.0/vendor/env_logger/examples/custom_logger.rs | 60 cargo-mozilla-0.57.0/vendor/env_logger/examples/default.rs | 38 cargo-mozilla-0.57.0/vendor/env_logger/examples/direct_logger.rs | 37 cargo-mozilla-0.57.0/vendor/env_logger/examples/filters_from_code.rs | 18 cargo-mozilla-0.57.0/vendor/env_logger/src/filter/mod.rs | 334 cargo-mozilla-0.57.0/vendor/env_logger/src/fmt/mod.rs | 197 cargo-mozilla-0.57.0/vendor/env_logger/src/fmt/writer/atty.rs | 2 cargo-mozilla-0.57.0/vendor/env_logger/src/fmt/writer/mod.rs | 99 cargo-mozilla-0.57.0/vendor/env_logger/src/fmt/writer/termcolor/extern_impl.rs | 86 cargo-mozilla-0.57.0/vendor/env_logger/src/fmt/writer/termcolor/shim_impl.rs | 32 cargo-mozilla-0.57.0/vendor/env_logger/src/lib.rs | 296 cargo-mozilla-0.57.0/vendor/flate2/.cargo-checksum.json | 2 cargo-mozilla-0.57.0/vendor/flate2/.pc/.quilt_patches | 1 cargo-mozilla-0.57.0/vendor/flate2/.pc/.quilt_series | 1 cargo-mozilla-0.57.0/vendor/flate2/.pc/.version | 1 cargo-mozilla-0.57.0/vendor/flate2/.pc/applied-patches | 1 cargo-mozilla-0.57.0/vendor/flate2/.pc/disable-miniz.patch/Cargo.toml | 89 cargo-mozilla-0.57.0/vendor/flate2/Cargo.lock | 99 cargo-mozilla-0.57.0/vendor/flate2/Cargo.toml | 42 cargo-mozilla-0.57.0/vendor/flate2/README.md | 6 cargo-mozilla-0.57.0/vendor/flate2/debian/patches/disable-cloudflare-zlib.patch | 23 cargo-mozilla-0.57.0/vendor/flate2/debian/patches/disable-miniz.patch | 20 cargo-mozilla-0.57.0/vendor/flate2/debian/patches/disable-zlib-ng.patch | 12 cargo-mozilla-0.57.0/vendor/flate2/debian/patches/eliminate-any-zlib.patch | 241 cargo-mozilla-0.57.0/vendor/flate2/debian/patches/remove-futures-and-tokio.patch | 62 cargo-mozilla-0.57.0/vendor/flate2/debian/patches/series | 4 cargo-mozilla-0.57.0/vendor/flate2/examples/deflateencoder-read.rs | 6 cargo-mozilla-0.57.0/vendor/flate2/examples/gzencoder-read.rs | 6 cargo-mozilla-0.57.0/vendor/flate2/examples/zlibencoder-read.rs | 6 cargo-mozilla-0.57.0/vendor/flate2/src/deflate/bufread.rs | 8 cargo-mozilla-0.57.0/vendor/flate2/src/ffi/c.rs | 190 cargo-mozilla-0.57.0/vendor/flate2/src/ffi/mod.rs | 8 cargo-mozilla-0.57.0/vendor/flate2/src/ffi/rust.rs | 30 cargo-mozilla-0.57.0/vendor/flate2/src/gz/bufread.rs | 461 cargo-mozilla-0.57.0/vendor/flate2/src/gz/mod.rs | 29 cargo-mozilla-0.57.0/vendor/flate2/src/lib.rs | 8 cargo-mozilla-0.57.0/vendor/flate2/src/mem.rs | 196 cargo-mozilla-0.57.0/vendor/flate2/src/zlib/bufread.rs | 8 cargo-mozilla-0.57.0/vendor/flate2/tests/async-reader.rs | 2 cargo-mozilla-0.57.0/vendor/flate2/tests/gunzip.rs | 2 cargo-mozilla-0.57.0/vendor/form_urlencoded/.cargo-checksum.json | 1 cargo-mozilla-0.57.0/vendor/form_urlencoded/Cargo.toml | 28 cargo-mozilla-0.57.0/vendor/form_urlencoded/LICENSE-APACHE | 201 cargo-mozilla-0.57.0/vendor/form_urlencoded/LICENSE-MIT | 25 cargo-mozilla-0.57.0/vendor/form_urlencoded/src/lib.rs | 420 cargo-mozilla-0.57.0/vendor/getrandom/.cargo-checksum.json | 2 cargo-mozilla-0.57.0/vendor/getrandom/.pc/.quilt_patches | 1 cargo-mozilla-0.57.0/vendor/getrandom/.pc/.quilt_series | 1 cargo-mozilla-0.57.0/vendor/getrandom/.pc/.version | 1 cargo-mozilla-0.57.0/vendor/getrandom/.pc/applied-patches | 1 cargo-mozilla-0.57.0/vendor/getrandom/.pc/drop-wasi.patch/Cargo.toml | 63 cargo-mozilla-0.57.0/vendor/getrandom/CHANGELOG.md | 12 cargo-mozilla-0.57.0/vendor/getrandom/Cargo.toml | 18 cargo-mozilla-0.57.0/vendor/getrandom/debian/patches/drop-wasi.patch | 10 cargo-mozilla-0.57.0/vendor/getrandom/src/lib.rs | 56 cargo-mozilla-0.57.0/vendor/getrandom/src/util.rs | 2 cargo-mozilla-0.57.0/vendor/getrandom/src/util_libc.rs | 1 cargo-mozilla-0.57.0/vendor/getrandom/src/wasm32_bindgen.rs | 32 cargo-mozilla-0.57.0/vendor/git2-curl/Cargo.toml | 3 cargo-mozilla-0.57.0/vendor/git2-curl/debian/patches/remove-zlib-ng-compat.patch | 11 cargo-mozilla-0.57.0/vendor/git2-curl/debian/patches/series | 1 cargo-mozilla-0.57.0/vendor/git2/.cargo-checksum.json | 2 cargo-mozilla-0.57.0/vendor/git2/.pc/.quilt_patches | 1 cargo-mozilla-0.57.0/vendor/git2/.pc/.quilt_series | 1 cargo-mozilla-0.57.0/vendor/git2/.pc/.version | 1 cargo-mozilla-0.57.0/vendor/git2/.pc/applied-patches | 1 cargo-mozilla-0.57.0/vendor/git2/.pc/disable-vendor.patch/Cargo.toml | 65 cargo-mozilla-0.57.0/vendor/git2/Cargo.lock | 221 cargo-mozilla-0.57.0/vendor/git2/Cargo.toml | 17 cargo-mozilla-0.57.0/vendor/git2/README.md | 5 cargo-mozilla-0.57.0/vendor/git2/debian/patches/disable-vendor.patch | 11 cargo-mozilla-0.57.0/vendor/git2/debian/patches/remove-zlib-ng-compat.patch | 10 cargo-mozilla-0.57.0/vendor/git2/debian/patches/series | 2 cargo-mozilla-0.57.0/vendor/git2/debian/patches/skip-credential_helper5-if-no-git.patch | 13 cargo-mozilla-0.57.0/vendor/git2/src/apply.rs | 4 cargo-mozilla-0.57.0/vendor/git2/src/attr.rs | 175 cargo-mozilla-0.57.0/vendor/git2/src/blame.rs | 30 cargo-mozilla-0.57.0/vendor/git2/src/blob.rs | 4 cargo-mozilla-0.57.0/vendor/git2/src/branch.rs | 25 cargo-mozilla-0.57.0/vendor/git2/src/build.rs | 106 cargo-mozilla-0.57.0/vendor/git2/src/call.rs | 16 cargo-mozilla-0.57.0/vendor/git2/src/cert.rs | 2 cargo-mozilla-0.57.0/vendor/git2/src/commit.rs | 51 cargo-mozilla-0.57.0/vendor/git2/src/config.rs | 37 cargo-mozilla-0.57.0/vendor/git2/src/cred.rs | 70 cargo-mozilla-0.57.0/vendor/git2/src/describe.rs | 2 cargo-mozilla-0.57.0/vendor/git2/src/diff.rs | 213 cargo-mozilla-0.57.0/vendor/git2/src/error.rs | 8 cargo-mozilla-0.57.0/vendor/git2/src/index.rs | 22 cargo-mozilla-0.57.0/vendor/git2/src/lib.rs | 144 cargo-mozilla-0.57.0/vendor/git2/src/mailmap.rs | 134 cargo-mozilla-0.57.0/vendor/git2/src/mempack.rs | 2 cargo-mozilla-0.57.0/vendor/git2/src/merge.rs | 2 cargo-mozilla-0.57.0/vendor/git2/src/note.rs | 4 cargo-mozilla-0.57.0/vendor/git2/src/object.rs | 2 cargo-mozilla-0.57.0/vendor/git2/src/odb.rs | 9 cargo-mozilla-0.57.0/vendor/git2/src/oid.rs | 4 cargo-mozilla-0.57.0/vendor/git2/src/oid_array.rs | 2 cargo-mozilla-0.57.0/vendor/git2/src/opts.rs | 92 cargo-mozilla-0.57.0/vendor/git2/src/packbuilder.rs | 8 cargo-mozilla-0.57.0/vendor/git2/src/panic.rs | 2 cargo-mozilla-0.57.0/vendor/git2/src/patch.rs | 2 cargo-mozilla-0.57.0/vendor/git2/src/pathspec.rs | 4 cargo-mozilla-0.57.0/vendor/git2/src/rebase.rs | 16 cargo-mozilla-0.57.0/vendor/git2/src/reference.rs | 131 cargo-mozilla-0.57.0/vendor/git2/src/reflog.rs | 4 cargo-mozilla-0.57.0/vendor/git2/src/refspec.rs | 2 cargo-mozilla-0.57.0/vendor/git2/src/remote.rs | 159 cargo-mozilla-0.57.0/vendor/git2/src/repo.rs | 540 cargo-mozilla-0.57.0/vendor/git2/src/revspec.rs | 6 cargo-mozilla-0.57.0/vendor/git2/src/revwalk.rs | 103 cargo-mozilla-0.57.0/vendor/git2/src/signature.rs | 2 cargo-mozilla-0.57.0/vendor/git2/src/stash.rs | 4 cargo-mozilla-0.57.0/vendor/git2/src/status.rs | 6 cargo-mozilla-0.57.0/vendor/git2/src/string_array.rs | 2 cargo-mozilla-0.57.0/vendor/git2/src/submodule.rs | 14 cargo-mozilla-0.57.0/vendor/git2/src/tag.rs | 4 cargo-mozilla-0.57.0/vendor/git2/src/tagforeach.rs | 4 cargo-mozilla-0.57.0/vendor/git2/src/test.rs | 14 cargo-mozilla-0.57.0/vendor/git2/src/time.rs | 23 cargo-mozilla-0.57.0/vendor/git2/src/tracing.rs | 82 cargo-mozilla-0.57.0/vendor/git2/src/transaction.rs | 285 cargo-mozilla-0.57.0/vendor/git2/src/transport.rs | 53 cargo-mozilla-0.57.0/vendor/git2/src/tree.rs | 4 cargo-mozilla-0.57.0/vendor/git2/src/treebuilder.rs | 2 cargo-mozilla-0.57.0/vendor/git2/src/util.rs | 2 cargo-mozilla-0.57.0/vendor/git2/src/version.rs | 95 cargo-mozilla-0.57.0/vendor/git2/src/worktree.rs | 331 cargo-mozilla-0.57.0/vendor/git2/tests/global_state.rs | 47 cargo-mozilla-0.57.0/vendor/globset/.cargo-checksum.json | 2 cargo-mozilla-0.57.0/vendor/globset/.pc/.quilt_patches | 1 cargo-mozilla-0.57.0/vendor/globset/.pc/.quilt_series | 1 cargo-mozilla-0.57.0/vendor/globset/.pc/.version | 1 cargo-mozilla-0.57.0/vendor/globset/.pc/applied-patches | 2 cargo-mozilla-0.57.0/vendor/globset/.pc/disable-feature-serde.diff/Cargo.toml | 59 cargo-mozilla-0.57.0/vendor/globset/.pc/relax-test-dep.diff/Cargo.toml | 59 cargo-mozilla-0.57.0/vendor/globset/Cargo.toml | 7 cargo-mozilla-0.57.0/vendor/globset/README.md | 11 cargo-mozilla-0.57.0/vendor/globset/benches/bench.rs | 3 cargo-mozilla-0.57.0/vendor/globset/debian/patches/disable-feature-serde.diff | 10 cargo-mozilla-0.57.0/vendor/globset/debian/patches/relax-test-dep.diff | 13 cargo-mozilla-0.57.0/vendor/globset/src/glob.rs | 45 cargo-mozilla-0.57.0/vendor/globset/src/lib.rs | 116 cargo-mozilla-0.57.0/vendor/globset/src/pathutil.rs | 2 cargo-mozilla-0.57.0/vendor/globset/src/serde_impl.rs | 2 cargo-mozilla-0.57.0/vendor/hex/.cargo-checksum.json | 2 cargo-mozilla-0.57.0/vendor/hex/Cargo.toml | 17 cargo-mozilla-0.57.0/vendor/hex/README.md | 18 cargo-mozilla-0.57.0/vendor/hex/benches/hex.rs | 27 cargo-mozilla-0.57.0/vendor/hex/src/error.rs | 6 cargo-mozilla-0.57.0/vendor/hex/src/lib.rs | 92 cargo-mozilla-0.57.0/vendor/hex/src/serde.rs | 54 cargo-mozilla-0.57.0/vendor/hex/tests/serde.rs | 3 cargo-mozilla-0.57.0/vendor/hex/tests/version-number.rs | 2 cargo-mozilla-0.57.0/vendor/humantime-1.3.0/.cargo-checksum.json | 1 cargo-mozilla-0.57.0/vendor/humantime-1.3.0/Cargo.toml | 37 cargo-mozilla-0.57.0/vendor/humantime-1.3.0/LICENSE-APACHE | 202 cargo-mozilla-0.57.0/vendor/humantime-1.3.0/LICENSE-MIT | 26 cargo-mozilla-0.57.0/vendor/humantime-1.3.0/README.md | 68 cargo-mozilla-0.57.0/vendor/humantime-1.3.0/benches/datetime_format.rs | 58 cargo-mozilla-0.57.0/vendor/humantime-1.3.0/benches/datetime_parse.rs | 50 cargo-mozilla-0.57.0/vendor/humantime-1.3.0/bulk.yaml | 8 cargo-mozilla-0.57.0/vendor/humantime-1.3.0/src/date.rs | 614 cargo-mozilla-0.57.0/vendor/humantime-1.3.0/src/duration.rs | 411 cargo-mozilla-0.57.0/vendor/humantime-1.3.0/src/lib.rs | 33 cargo-mozilla-0.57.0/vendor/humantime-1.3.0/src/wrapper.rs | 107 cargo-mozilla-0.57.0/vendor/humantime-1.3.0/vagga.yaml | 92 cargo-mozilla-0.57.0/vendor/humantime/.cargo-checksum.json | 2 cargo-mozilla-0.57.0/vendor/humantime/Cargo.toml | 2 cargo-mozilla-0.57.0/vendor/humantime/src/date.rs | 7 cargo-mozilla-0.57.0/vendor/humantime/src/duration.rs | 7 cargo-mozilla-0.57.0/vendor/idna/.cargo-checksum.json | 2 cargo-mozilla-0.57.0/vendor/idna/Cargo.toml | 16 cargo-mozilla-0.57.0/vendor/idna/benches/all.rs | 53 cargo-mozilla-0.57.0/vendor/idna/src/IdnaMappingTable.txt |17132 +++---- cargo-mozilla-0.57.0/vendor/idna/src/lib.rs | 4 cargo-mozilla-0.57.0/vendor/idna/src/make_uts46_mapping_table.py | 47 cargo-mozilla-0.57.0/vendor/idna/src/punycode.rs | 261 cargo-mozilla-0.57.0/vendor/idna/src/uts46.rs | 684 cargo-mozilla-0.57.0/vendor/idna/src/uts46_mapping_table.rs |12869 ++--- cargo-mozilla-0.57.0/vendor/idna/tests/IdnaTest.txt | 7848 --- cargo-mozilla-0.57.0/vendor/idna/tests/IdnaTestV2.txt | 6334 ++ cargo-mozilla-0.57.0/vendor/idna/tests/punycode.rs | 20 cargo-mozilla-0.57.0/vendor/idna/tests/tests.rs | 4 cargo-mozilla-0.57.0/vendor/idna/tests/unit.rs | 143 cargo-mozilla-0.57.0/vendor/idna/tests/uts46.rs | 201 cargo-mozilla-0.57.0/vendor/ignore/.cargo-checksum.json | 2 cargo-mozilla-0.57.0/vendor/ignore/Cargo.lock | 76 cargo-mozilla-0.57.0/vendor/ignore/Cargo.toml | 9 cargo-mozilla-0.57.0/vendor/ignore/README.md | 11 cargo-mozilla-0.57.0/vendor/ignore/examples/walk.rs | 6 cargo-mozilla-0.57.0/vendor/ignore/src/default_types.rs | 23 cargo-mozilla-0.57.0/vendor/ignore/src/dir.rs | 24 cargo-mozilla-0.57.0/vendor/ignore/src/gitignore.rs | 6 cargo-mozilla-0.57.0/vendor/ignore/src/lib.rs | 82 cargo-mozilla-0.57.0/vendor/ignore/src/overrides.rs | 4 cargo-mozilla-0.57.0/vendor/ignore/src/pathutil.rs | 2 cargo-mozilla-0.57.0/vendor/ignore/src/types.rs | 10 cargo-mozilla-0.57.0/vendor/ignore/src/walk.rs | 49 cargo-mozilla-0.57.0/vendor/ignore/tests/gitignore_matched_path_or_any_parents_tests.rs | 2 cargo-mozilla-0.57.0/vendor/itertools/.cargo-checksum.json | 1 cargo-mozilla-0.57.0/vendor/itertools/CHANGELOG.md | 362 cargo-mozilla-0.57.0/vendor/itertools/Cargo.lock | 724 cargo-mozilla-0.57.0/vendor/itertools/Cargo.toml | 87 cargo-mozilla-0.57.0/vendor/itertools/LICENSE-APACHE | 201 cargo-mozilla-0.57.0/vendor/itertools/LICENSE-MIT | 25 cargo-mozilla-0.57.0/vendor/itertools/README.rst | 55 cargo-mozilla-0.57.0/vendor/itertools/benches/bench1.rs | 877 cargo-mozilla-0.57.0/vendor/itertools/benches/combinations.rs | 125 cargo-mozilla-0.57.0/vendor/itertools/benches/combinations_with_replacement.rs | 40 cargo-mozilla-0.57.0/vendor/itertools/benches/extra/mod.rs | 2 cargo-mozilla-0.57.0/vendor/itertools/benches/extra/zipslices.rs | 188 cargo-mozilla-0.57.0/vendor/itertools/benches/fold_specialization.rs | 73 cargo-mozilla-0.57.0/vendor/itertools/benches/powerset.rs | 44 cargo-mozilla-0.57.0/vendor/itertools/benches/tree_fold1.rs | 144 cargo-mozilla-0.57.0/vendor/itertools/benches/tuple_combinations.rs | 113 cargo-mozilla-0.57.0/vendor/itertools/benches/tuples.rs | 213 cargo-mozilla-0.57.0/vendor/itertools/examples/iris.data | 150 cargo-mozilla-0.57.0/vendor/itertools/examples/iris.rs | 137 cargo-mozilla-0.57.0/vendor/itertools/src/adaptors/coalesce.rs | 233 cargo-mozilla-0.57.0/vendor/itertools/src/adaptors/map.rs | 120 cargo-mozilla-0.57.0/vendor/itertools/src/adaptors/mod.rs | 1131 cargo-mozilla-0.57.0/vendor/itertools/src/adaptors/multi_product.rs | 222 cargo-mozilla-0.57.0/vendor/itertools/src/combinations.rs | 128 cargo-mozilla-0.57.0/vendor/itertools/src/combinations_with_replacement.rs | 109 cargo-mozilla-0.57.0/vendor/itertools/src/concat_impl.rs | 22 cargo-mozilla-0.57.0/vendor/itertools/src/cons_tuples_impl.rs | 64 cargo-mozilla-0.57.0/vendor/itertools/src/diff.rs | 61 cargo-mozilla-0.57.0/vendor/itertools/src/duplicates_impl.rs | 206 cargo-mozilla-0.57.0/vendor/itertools/src/either_or_both.rs | 205 cargo-mozilla-0.57.0/vendor/itertools/src/exactly_one_err.rs | 110 cargo-mozilla-0.57.0/vendor/itertools/src/flatten_ok.rs | 166 cargo-mozilla-0.57.0/vendor/itertools/src/format.rs | 113 cargo-mozilla-0.57.0/vendor/itertools/src/free.rs | 241 cargo-mozilla-0.57.0/vendor/itertools/src/group_map.rs | 32 cargo-mozilla-0.57.0/vendor/itertools/src/groupbylazy.rs | 571 cargo-mozilla-0.57.0/vendor/itertools/src/grouping_map.rs | 536 cargo-mozilla-0.57.0/vendor/itertools/src/impl_macros.rs | 28 cargo-mozilla-0.57.0/vendor/itertools/src/intersperse.rs | 119 cargo-mozilla-0.57.0/vendor/itertools/src/k_smallest.rs | 20 cargo-mozilla-0.57.0/vendor/itertools/src/kmerge_impl.rs | 227 cargo-mozilla-0.57.0/vendor/itertools/src/lazy_buffer.rs | 67 cargo-mozilla-0.57.0/vendor/itertools/src/lib.rs | 3539 + cargo-mozilla-0.57.0/vendor/itertools/src/merge_join.rs | 167 cargo-mozilla-0.57.0/vendor/itertools/src/minmax.rs | 115 cargo-mozilla-0.57.0/vendor/itertools/src/multipeek_impl.rs | 98 cargo-mozilla-0.57.0/vendor/itertools/src/pad_tail.rs | 89 cargo-mozilla-0.57.0/vendor/itertools/src/peek_nth.rs | 102 cargo-mozilla-0.57.0/vendor/itertools/src/peeking_take_while.rs | 147 cargo-mozilla-0.57.0/vendor/itertools/src/permutations.rs | 280 cargo-mozilla-0.57.0/vendor/itertools/src/powerset.rs | 90 cargo-mozilla-0.57.0/vendor/itertools/src/process_results_impl.rs | 80 cargo-mozilla-0.57.0/vendor/itertools/src/put_back_n_impl.rs | 61 cargo-mozilla-0.57.0/vendor/itertools/src/rciter_impl.rs | 100 cargo-mozilla-0.57.0/vendor/itertools/src/repeatn.rs | 59 cargo-mozilla-0.57.0/vendor/itertools/src/size_hint.rs | 119 cargo-mozilla-0.57.0/vendor/itertools/src/sources.rs | 183 cargo-mozilla-0.57.0/vendor/itertools/src/tee.rs | 78 cargo-mozilla-0.57.0/vendor/itertools/src/tuple_impl.rs | 331 cargo-mozilla-0.57.0/vendor/itertools/src/unique_impl.rs | 178 cargo-mozilla-0.57.0/vendor/itertools/src/with_position.rs | 100 cargo-mozilla-0.57.0/vendor/itertools/src/zip_eq_impl.rs | 60 cargo-mozilla-0.57.0/vendor/itertools/src/zip_longest.rs | 83 cargo-mozilla-0.57.0/vendor/itertools/src/ziptuple.rs | 137 cargo-mozilla-0.57.0/vendor/itertools/tests/adaptors_no_collect.rs | 47 cargo-mozilla-0.57.0/vendor/itertools/tests/flatten_ok.rs | 76 cargo-mozilla-0.57.0/vendor/itertools/tests/fold_specialization.rs | 13 cargo-mozilla-0.57.0/vendor/itertools/tests/macros_hygiene.rs | 13 cargo-mozilla-0.57.0/vendor/itertools/tests/merge_join.rs | 108 cargo-mozilla-0.57.0/vendor/itertools/tests/peeking_take_while.rs | 50 cargo-mozilla-0.57.0/vendor/itertools/tests/quick.rs | 1695 cargo-mozilla-0.57.0/vendor/itertools/tests/specializations.rs | 100 cargo-mozilla-0.57.0/vendor/itertools/tests/test_core.rs | 303 cargo-mozilla-0.57.0/vendor/itertools/tests/test_std.rs | 1082 cargo-mozilla-0.57.0/vendor/itertools/tests/tuples.rs | 86 cargo-mozilla-0.57.0/vendor/itertools/tests/zip.rs | 77 cargo-mozilla-0.57.0/vendor/itoa/.cargo-checksum.json | 2 cargo-mozilla-0.57.0/vendor/itoa/Cargo.toml | 13 cargo-mozilla-0.57.0/vendor/itoa/benches/bench.rs | 2 cargo-mozilla-0.57.0/vendor/itoa/src/lib.rs | 9 cargo-mozilla-0.57.0/vendor/itoa/src/udiv128.rs | 92 cargo-mozilla-0.57.0/vendor/itoa/tests/test.rs | 7 cargo-mozilla-0.57.0/vendor/jobserver/.cargo-checksum.json | 2 cargo-mozilla-0.57.0/vendor/jobserver/Cargo.toml | 2 cargo-mozilla-0.57.0/vendor/jobserver/README.md | 2 cargo-mozilla-0.57.0/vendor/jobserver/src/lib.rs | 8 cargo-mozilla-0.57.0/vendor/jobserver/src/unix.rs | 45 cargo-mozilla-0.57.0/vendor/jobserver/tests/client-of-myself.rs | 2 cargo-mozilla-0.57.0/vendor/jobserver/tests/client.rs | 15 cargo-mozilla-0.57.0/vendor/jobserver/tests/helper.rs | 2 cargo-mozilla-0.57.0/vendor/jobserver/tests/make-as-a-client.rs | 5 cargo-mozilla-0.57.0/vendor/jobserver/tests/server.rs | 7 cargo-mozilla-0.57.0/vendor/lazycell/Cargo.toml | 4 cargo-mozilla-0.57.0/vendor/lazycell/debian/patches/drop-clippy.diff | 19 cargo-mozilla-0.57.0/vendor/lazycell/debian/patches/series | 1 cargo-mozilla-0.57.0/vendor/libc/.cargo-checksum.json | 2 cargo-mozilla-0.57.0/vendor/libc/CONTRIBUTING.md | 40 cargo-mozilla-0.57.0/vendor/libc/Cargo.toml | 24 cargo-mozilla-0.57.0/vendor/libc/README.md | 8 cargo-mozilla-0.57.0/vendor/libc/build.rs | 9 cargo-mozilla-0.57.0/vendor/libc/rustfmt.toml | 4 cargo-mozilla-0.57.0/vendor/libc/src/cloudabi/aarch64.rs | 4 cargo-mozilla-0.57.0/vendor/libc/src/cloudabi/arm.rs | 4 cargo-mozilla-0.57.0/vendor/libc/src/cloudabi/mod.rs | 375 cargo-mozilla-0.57.0/vendor/libc/src/cloudabi/x86.rs | 4 cargo-mozilla-0.57.0/vendor/libc/src/cloudabi/x86_64.rs | 4 cargo-mozilla-0.57.0/vendor/libc/src/fuchsia/mod.rs | 619 cargo-mozilla-0.57.0/vendor/libc/src/lib.rs | 24 cargo-mozilla-0.57.0/vendor/libc/src/macros.rs | 28 cargo-mozilla-0.57.0/vendor/libc/src/psp.rs | 886 cargo-mozilla-0.57.0/vendor/libc/src/solid/aarch64.rs | 4 cargo-mozilla-0.57.0/vendor/libc/src/solid/arm.rs | 4 cargo-mozilla-0.57.0/vendor/libc/src/solid/mod.rs | 904 cargo-mozilla-0.57.0/vendor/libc/src/unix/bsd/apple/b32/mod.rs | 4 cargo-mozilla-0.57.0/vendor/libc/src/unix/bsd/apple/b64/aarch64/align.rs | 48 cargo-mozilla-0.57.0/vendor/libc/src/unix/bsd/apple/b64/aarch64/mod.rs | 14 cargo-mozilla-0.57.0/vendor/libc/src/unix/bsd/apple/b64/mod.rs | 114 cargo-mozilla-0.57.0/vendor/libc/src/unix/bsd/apple/b64/x86_64/align.rs | 7 cargo-mozilla-0.57.0/vendor/libc/src/unix/bsd/apple/b64/x86_64/mod.rs | 180 cargo-mozilla-0.57.0/vendor/libc/src/unix/bsd/apple/mod.rs | 1905 cargo-mozilla-0.57.0/vendor/libc/src/unix/bsd/freebsdlike/dragonfly/errno.rs | 2 cargo-mozilla-0.57.0/vendor/libc/src/unix/bsd/freebsdlike/dragonfly/mod.rs | 388 cargo-mozilla-0.57.0/vendor/libc/src/unix/bsd/freebsdlike/freebsd/aarch64.rs | 125 cargo-mozilla-0.57.0/vendor/libc/src/unix/bsd/freebsdlike/freebsd/freebsd11/mod.rs | 12 cargo-mozilla-0.57.0/vendor/libc/src/unix/bsd/freebsdlike/freebsd/freebsd12/mod.rs | 58 cargo-mozilla-0.57.0/vendor/libc/src/unix/bsd/freebsdlike/freebsd/freebsd12/x86_64.rs | 5 cargo-mozilla-0.57.0/vendor/libc/src/unix/bsd/freebsdlike/freebsd/freebsd13/b64.rs | 34 cargo-mozilla-0.57.0/vendor/libc/src/unix/bsd/freebsdlike/freebsd/freebsd13/mod.rs | 313 cargo-mozilla-0.57.0/vendor/libc/src/unix/bsd/freebsdlike/freebsd/freebsd13/x86_64.rs | 5 cargo-mozilla-0.57.0/vendor/libc/src/unix/bsd/freebsdlike/freebsd/mod.rs | 1271 cargo-mozilla-0.57.0/vendor/libc/src/unix/bsd/freebsdlike/freebsd/powerpc.rs | 47 cargo-mozilla-0.57.0/vendor/libc/src/unix/bsd/freebsdlike/freebsd/x86_64/mod.rs | 63 cargo-mozilla-0.57.0/vendor/libc/src/unix/bsd/freebsdlike/mod.rs | 391 cargo-mozilla-0.57.0/vendor/libc/src/unix/bsd/mod.rs | 112 cargo-mozilla-0.57.0/vendor/libc/src/unix/bsd/netbsdlike/mod.rs | 97 cargo-mozilla-0.57.0/vendor/libc/src/unix/bsd/netbsdlike/netbsd/aarch64.rs | 81 cargo-mozilla-0.57.0/vendor/libc/src/unix/bsd/netbsdlike/netbsd/mod.rs | 658 cargo-mozilla-0.57.0/vendor/libc/src/unix/bsd/netbsdlike/netbsd/x86_64.rs | 17 cargo-mozilla-0.57.0/vendor/libc/src/unix/bsd/netbsdlike/openbsd/aarch64.rs | 14 cargo-mozilla-0.57.0/vendor/libc/src/unix/bsd/netbsdlike/openbsd/mod.rs | 174 cargo-mozilla-0.57.0/vendor/libc/src/unix/bsd/netbsdlike/openbsd/x86_64.rs | 106 cargo-mozilla-0.57.0/vendor/libc/src/unix/haiku/mod.rs | 443 cargo-mozilla-0.57.0/vendor/libc/src/unix/haiku/native.rs | 1200 cargo-mozilla-0.57.0/vendor/libc/src/unix/haiku/x86_64.rs | 264 cargo-mozilla-0.57.0/vendor/libc/src/unix/hermit/mod.rs | 29 cargo-mozilla-0.57.0/vendor/libc/src/unix/linux_like/android/b32/arm.rs | 18 cargo-mozilla-0.57.0/vendor/libc/src/unix/linux_like/android/b32/mod.rs | 21 cargo-mozilla-0.57.0/vendor/libc/src/unix/linux_like/android/b32/x86/mod.rs | 29 cargo-mozilla-0.57.0/vendor/libc/src/unix/linux_like/android/b64/aarch64/mod.rs | 49 cargo-mozilla-0.57.0/vendor/libc/src/unix/linux_like/android/b64/mod.rs | 61 cargo-mozilla-0.57.0/vendor/libc/src/unix/linux_like/android/b64/x86_64/mod.rs | 1 cargo-mozilla-0.57.0/vendor/libc/src/unix/linux_like/android/mod.rs | 572 cargo-mozilla-0.57.0/vendor/libc/src/unix/linux_like/emscripten/mod.rs | 118 cargo-mozilla-0.57.0/vendor/libc/src/unix/linux_like/linux/align.rs | 29 cargo-mozilla-0.57.0/vendor/libc/src/unix/linux_like/linux/arch/generic/mod.rs | 100 cargo-mozilla-0.57.0/vendor/libc/src/unix/linux_like/linux/arch/mips/mod.rs | 96 cargo-mozilla-0.57.0/vendor/libc/src/unix/linux_like/linux/arch/mod.rs | 15 cargo-mozilla-0.57.0/vendor/libc/src/unix/linux_like/linux/arch/powerpc/mod.rs | 91 cargo-mozilla-0.57.0/vendor/libc/src/unix/linux_like/linux/arch/sparc/mod.rs | 88 cargo-mozilla-0.57.0/vendor/libc/src/unix/linux_like/linux/gnu/b32/arm/mod.rs | 44 cargo-mozilla-0.57.0/vendor/libc/src/unix/linux_like/linux/gnu/b32/mips/mod.rs | 66 cargo-mozilla-0.57.0/vendor/libc/src/unix/linux_like/linux/gnu/b32/mod.rs | 209 cargo-mozilla-0.57.0/vendor/libc/src/unix/linux_like/linux/gnu/b32/powerpc.rs | 45 cargo-mozilla-0.57.0/vendor/libc/src/unix/linux_like/linux/gnu/b32/riscv32/mod.rs | 796 cargo-mozilla-0.57.0/vendor/libc/src/unix/linux_like/linux/gnu/b32/sparc/mod.rs | 111 cargo-mozilla-0.57.0/vendor/libc/src/unix/linux_like/linux/gnu/b32/x86/mod.rs | 57 cargo-mozilla-0.57.0/vendor/libc/src/unix/linux_like/linux/gnu/b64/aarch64/ilp32.rs | 62 cargo-mozilla-0.57.0/vendor/libc/src/unix/linux_like/linux/gnu/b64/aarch64/lp64.rs | 71 cargo-mozilla-0.57.0/vendor/libc/src/unix/linux_like/linux/gnu/b64/aarch64/mod.rs | 129 cargo-mozilla-0.57.0/vendor/libc/src/unix/linux_like/linux/gnu/b64/mips64/mod.rs | 74 cargo-mozilla-0.57.0/vendor/libc/src/unix/linux_like/linux/gnu/b64/mod.rs | 41 cargo-mozilla-0.57.0/vendor/libc/src/unix/linux_like/linux/gnu/b64/powerpc64/mod.rs | 75 cargo-mozilla-0.57.0/vendor/libc/src/unix/linux_like/linux/gnu/b64/riscv64/mod.rs | 74 cargo-mozilla-0.57.0/vendor/libc/src/unix/linux_like/linux/gnu/b64/s390x.rs | 63 cargo-mozilla-0.57.0/vendor/libc/src/unix/linux_like/linux/gnu/b64/sparc64/mod.rs | 51 cargo-mozilla-0.57.0/vendor/libc/src/unix/linux_like/linux/gnu/b64/x86_64/mod.rs | 75 cargo-mozilla-0.57.0/vendor/libc/src/unix/linux_like/linux/gnu/b64/x86_64/not_x32.rs | 17 cargo-mozilla-0.57.0/vendor/libc/src/unix/linux_like/linux/gnu/b64/x86_64/x32.rs | 17 cargo-mozilla-0.57.0/vendor/libc/src/unix/linux_like/linux/gnu/mod.rs | 671 cargo-mozilla-0.57.0/vendor/libc/src/unix/linux_like/linux/mod.rs | 1368 cargo-mozilla-0.57.0/vendor/libc/src/unix/linux_like/linux/musl/b32/arm/mod.rs | 74 cargo-mozilla-0.57.0/vendor/libc/src/unix/linux_like/linux/musl/b32/hexagon.rs | 48 cargo-mozilla-0.57.0/vendor/libc/src/unix/linux_like/linux/musl/b32/mips/mod.rs | 66 cargo-mozilla-0.57.0/vendor/libc/src/unix/linux_like/linux/musl/b32/powerpc.rs | 54 cargo-mozilla-0.57.0/vendor/libc/src/unix/linux_like/linux/musl/b32/x86/mod.rs | 74 cargo-mozilla-0.57.0/vendor/libc/src/unix/linux_like/linux/musl/b64/aarch64/align.rs | 12 cargo-mozilla-0.57.0/vendor/libc/src/unix/linux_like/linux/musl/b64/aarch64/mod.rs | 81 cargo-mozilla-0.57.0/vendor/libc/src/unix/linux_like/linux/musl/b64/mips64.rs | 148 cargo-mozilla-0.57.0/vendor/libc/src/unix/linux_like/linux/musl/b64/mod.rs | 9 cargo-mozilla-0.57.0/vendor/libc/src/unix/linux_like/linux/musl/b64/powerpc64.rs | 49 cargo-mozilla-0.57.0/vendor/libc/src/unix/linux_like/linux/musl/b64/s390x.rs | 758 cargo-mozilla-0.57.0/vendor/libc/src/unix/linux_like/linux/musl/b64/x86_64/mod.rs | 67 cargo-mozilla-0.57.0/vendor/libc/src/unix/linux_like/linux/musl/mod.rs | 274 cargo-mozilla-0.57.0/vendor/libc/src/unix/linux_like/linux/no_align.rs | 2 cargo-mozilla-0.57.0/vendor/libc/src/unix/linux_like/linux/uclibc/align.rs | 28 cargo-mozilla-0.57.0/vendor/libc/src/unix/linux_like/linux/uclibc/arm/align.rs | 13 cargo-mozilla-0.57.0/vendor/libc/src/unix/linux_like/linux/uclibc/arm/mod.rs | 908 cargo-mozilla-0.57.0/vendor/libc/src/unix/linux_like/linux/uclibc/arm/no_align.rs | 10 cargo-mozilla-0.57.0/vendor/libc/src/unix/linux_like/linux/uclibc/mips/mips32/align.rs | 13 cargo-mozilla-0.57.0/vendor/libc/src/unix/linux_like/linux/uclibc/mips/mips32/mod.rs | 668 cargo-mozilla-0.57.0/vendor/libc/src/unix/linux_like/linux/uclibc/mips/mips32/no_align.rs | 10 cargo-mozilla-0.57.0/vendor/libc/src/unix/linux_like/linux/uclibc/mips/mips64/align.rs | 10 cargo-mozilla-0.57.0/vendor/libc/src/unix/linux_like/linux/uclibc/mips/mips64/mod.rs | 213 cargo-mozilla-0.57.0/vendor/libc/src/unix/linux_like/linux/uclibc/mips/mips64/no_align.rs | 7 cargo-mozilla-0.57.0/vendor/libc/src/unix/linux_like/linux/uclibc/mips/mod.rs | 302 cargo-mozilla-0.57.0/vendor/libc/src/unix/linux_like/linux/uclibc/mod.rs | 450 cargo-mozilla-0.57.0/vendor/libc/src/unix/linux_like/linux/uclibc/no_align.rs | 53 cargo-mozilla-0.57.0/vendor/libc/src/unix/linux_like/linux/uclibc/x86_64/l4re.rs | 53 cargo-mozilla-0.57.0/vendor/libc/src/unix/linux_like/linux/uclibc/x86_64/mod.rs | 342 cargo-mozilla-0.57.0/vendor/libc/src/unix/linux_like/linux/uclibc/x86_64/other.rs | 5 cargo-mozilla-0.57.0/vendor/libc/src/unix/linux_like/mod.rs | 437 cargo-mozilla-0.57.0/vendor/libc/src/unix/mod.rs | 510 cargo-mozilla-0.57.0/vendor/libc/src/unix/newlib/espidf/mod.rs | 103 cargo-mozilla-0.57.0/vendor/libc/src/unix/newlib/mod.rs | 114 cargo-mozilla-0.57.0/vendor/libc/src/unix/newlib/no_align.rs | 2 cargo-mozilla-0.57.0/vendor/libc/src/unix/newlib/xtensa/mod.rs | 106 cargo-mozilla-0.57.0/vendor/libc/src/unix/redox/mod.rs | 258 cargo-mozilla-0.57.0/vendor/libc/src/unix/solarish/compat.rs | 20 cargo-mozilla-0.57.0/vendor/libc/src/unix/solarish/illumos.rs | 27 cargo-mozilla-0.57.0/vendor/libc/src/unix/solarish/mod.rs | 430 cargo-mozilla-0.57.0/vendor/libc/src/unix/solarish/solaris.rs | 12 cargo-mozilla-0.57.0/vendor/libc/src/unix/solarish/x86_64.rs | 129 cargo-mozilla-0.57.0/vendor/libc/src/unix/uclibc/align.rs | 66 cargo-mozilla-0.57.0/vendor/libc/src/unix/uclibc/arm/align.rs | 13 cargo-mozilla-0.57.0/vendor/libc/src/unix/uclibc/arm/mod.rs | 1049 cargo-mozilla-0.57.0/vendor/libc/src/unix/uclibc/arm/no_align.rs | 10 cargo-mozilla-0.57.0/vendor/libc/src/unix/uclibc/mips/mips32/align.rs | 13 cargo-mozilla-0.57.0/vendor/libc/src/unix/uclibc/mips/mips32/mod.rs | 633 cargo-mozilla-0.57.0/vendor/libc/src/unix/uclibc/mips/mips32/no_align.rs | 10 cargo-mozilla-0.57.0/vendor/libc/src/unix/uclibc/mips/mips64/align.rs | 10 cargo-mozilla-0.57.0/vendor/libc/src/unix/uclibc/mips/mips64/mod.rs | 213 cargo-mozilla-0.57.0/vendor/libc/src/unix/uclibc/mips/mips64/no_align.rs | 7 cargo-mozilla-0.57.0/vendor/libc/src/unix/uclibc/mips/mod.rs | 479 cargo-mozilla-0.57.0/vendor/libc/src/unix/uclibc/mod.rs | 2280 - cargo-mozilla-0.57.0/vendor/libc/src/unix/uclibc/no_align.rs | 53 cargo-mozilla-0.57.0/vendor/libc/src/unix/uclibc/x86_64/align.rs | 77 cargo-mozilla-0.57.0/vendor/libc/src/unix/uclibc/x86_64/l4re.rs | 48 cargo-mozilla-0.57.0/vendor/libc/src/unix/uclibc/x86_64/mod.rs | 312 cargo-mozilla-0.57.0/vendor/libc/src/unix/uclibc/x86_64/no_align.rs | 59 cargo-mozilla-0.57.0/vendor/libc/src/unix/uclibc/x86_64/other.rs | 5 cargo-mozilla-0.57.0/vendor/libc/src/vxworks/mod.rs | 451 cargo-mozilla-0.57.0/vendor/libc/src/wasi.rs | 338 cargo-mozilla-0.57.0/vendor/libc/src/windows/gnu/mod.rs | 12 cargo-mozilla-0.57.0/vendor/libc/src/windows/mod.rs | 211 cargo-mozilla-0.57.0/vendor/libc/src/windows/msvc.rs | 17 cargo-mozilla-0.57.0/vendor/libc/src/windows/msvc/mod.rs | 29 cargo-mozilla-0.57.0/vendor/libc/src/windows/msvc/x86_64/align.rs | 150 cargo-mozilla-0.57.0/vendor/libc/src/windows/msvc/x86_64/mod.rs | 6 cargo-mozilla-0.57.0/vendor/libc/triagebot.toml | 1 cargo-mozilla-0.57.0/vendor/libgit2-sys/.cargo-checksum.json | 2 cargo-mozilla-0.57.0/vendor/libgit2-sys/.pc/.quilt_patches | 1 cargo-mozilla-0.57.0/vendor/libgit2-sys/.pc/.quilt_series | 1 cargo-mozilla-0.57.0/vendor/libgit2-sys/.pc/.version | 1 cargo-mozilla-0.57.0/vendor/libgit2-sys/.pc/applied-patches | 1 cargo-mozilla-0.57.0/vendor/libgit2-sys/.pc/no-special-snowflake-env.patch/build.rs | 211 cargo-mozilla-0.57.0/vendor/libgit2-sys/Cargo.toml | 14 cargo-mozilla-0.57.0/vendor/libgit2-sys/build.rs | 33 cargo-mozilla-0.57.0/vendor/libgit2-sys/debian/patches/disable-vendor.patch | 11 cargo-mozilla-0.57.0/vendor/libgit2-sys/debian/patches/no-special-snowflake-env.patch | 15 cargo-mozilla-0.57.0/vendor/libgit2-sys/debian/patches/remove-zlib-ng-compat.patch | 10 cargo-mozilla-0.57.0/vendor/libgit2-sys/debian/patches/series | 2 cargo-mozilla-0.57.0/vendor/libgit2-sys/lib.rs | 297 cargo-mozilla-0.57.0/vendor/libnghttp2-sys/.cargo-checksum.json | 2 cargo-mozilla-0.57.0/vendor/libnghttp2-sys/.pc/.quilt_patches | 1 cargo-mozilla-0.57.0/vendor/libnghttp2-sys/.pc/.quilt_series | 1 cargo-mozilla-0.57.0/vendor/libnghttp2-sys/.pc/.version | 1 cargo-mozilla-0.57.0/vendor/libnghttp2-sys/.pc/applied-patches | 1 cargo-mozilla-0.57.0/vendor/libnghttp2-sys/.pc/use-system-lib.patch/Cargo.toml | 29 cargo-mozilla-0.57.0/vendor/libnghttp2-sys/Cargo.lock | 18 cargo-mozilla-0.57.0/vendor/libnghttp2-sys/Cargo.toml | 11 cargo-mozilla-0.57.0/vendor/libnghttp2-sys/build.rs.orig | 36 cargo-mozilla-0.57.0/vendor/libssh2-sys/.cargo-checksum.json | 2 cargo-mozilla-0.57.0/vendor/libssh2-sys/.pc/.quilt_patches | 1 cargo-mozilla-0.57.0/vendor/libssh2-sys/.pc/.quilt_series | 1 cargo-mozilla-0.57.0/vendor/libssh2-sys/.pc/.version | 1 cargo-mozilla-0.57.0/vendor/libssh2-sys/.pc/applied-patches | 2 cargo-mozilla-0.57.0/vendor/libssh2-sys/.pc/disable-vendored.patch/Cargo.toml | 46 cargo-mozilla-0.57.0/vendor/libssh2-sys/.pc/no-special-snowflake-env.patch/build.rs | 220 cargo-mozilla-0.57.0/vendor/libssh2-sys/Cargo.toml | 10 cargo-mozilla-0.57.0/vendor/libssh2-sys/build.rs | 22 cargo-mozilla-0.57.0/vendor/libssh2-sys/debian/patches/combine-dup-deps.patch | 17 cargo-mozilla-0.57.0/vendor/libssh2-sys/debian/patches/disable-vendored.patch | 5 cargo-mozilla-0.57.0/vendor/libssh2-sys/debian/patches/no-special-snowflake-env.patch | 4 cargo-mozilla-0.57.0/vendor/libssh2-sys/debian/patches/remove-zlib-ng-compat.patch | 10 cargo-mozilla-0.57.0/vendor/libssh2-sys/debian/patches/series | 2 cargo-mozilla-0.57.0/vendor/libssh2-sys/lib.rs | 15 cargo-mozilla-0.57.0/vendor/libz-sys/.cargo-checksum.json | 2 cargo-mozilla-0.57.0/vendor/libz-sys/Cargo.toml | 2 cargo-mozilla-0.57.0/vendor/libz-sys/build.rs | 17 cargo-mozilla-0.57.0/vendor/log/.cargo-checksum.json | 2 cargo-mozilla-0.57.0/vendor/log/.pc/.quilt_patches | 1 cargo-mozilla-0.57.0/vendor/log/.pc/.quilt_series | 1 cargo-mozilla-0.57.0/vendor/log/.pc/.version | 1 cargo-mozilla-0.57.0/vendor/log/.pc/applied-patches | 1 cargo-mozilla-0.57.0/vendor/log/.pc/ignore-sval.diff/Cargo.toml | 70 cargo-mozilla-0.57.0/vendor/log/CHANGELOG.md | 31 cargo-mozilla-0.57.0/vendor/log/Cargo.toml | 37 cargo-mozilla-0.57.0/vendor/log/benches/value.rs | 30 cargo-mozilla-0.57.0/vendor/log/build.rs | 33 cargo-mozilla-0.57.0/vendor/log/debian/patches/ignore-sval.diff | 53 cargo-mozilla-0.57.0/vendor/log/src/kv/key.rs | 33 cargo-mozilla-0.57.0/vendor/log/src/kv/mod.rs | 2 cargo-mozilla-0.57.0/vendor/log/src/kv/source.rs | 419 cargo-mozilla-0.57.0/vendor/log/src/kv/value.rs | 655 cargo-mozilla-0.57.0/vendor/log/src/kv/value/fill.rs | 164 cargo-mozilla-0.57.0/vendor/log/src/kv/value/impls.rs | 159 cargo-mozilla-0.57.0/vendor/log/src/kv/value/internal/cast.rs | 475 cargo-mozilla-0.57.0/vendor/log/src/kv/value/internal/fmt.rs | 249 cargo-mozilla-0.57.0/vendor/log/src/kv/value/internal/mod.rs | 181 cargo-mozilla-0.57.0/vendor/log/src/kv/value/internal/sval.rs | 210 cargo-mozilla-0.57.0/vendor/log/src/kv/value/mod.rs | 56 cargo-mozilla-0.57.0/vendor/log/src/kv/value/test.rs | 81 cargo-mozilla-0.57.0/vendor/log/src/lib.rs | 144 cargo-mozilla-0.57.0/vendor/log/src/macros.rs | 32 cargo-mozilla-0.57.0/vendor/log/src/serde.rs | 71 cargo-mozilla-0.57.0/vendor/log/tests/filters.rs | 72 cargo-mozilla-0.57.0/vendor/log/tests/macros.rs | 36 cargo-mozilla-0.57.0/vendor/matches/.cargo-checksum.json | 2 cargo-mozilla-0.57.0/vendor/matches/Cargo.toml | 4 cargo-mozilla-0.57.0/vendor/matches/lib.rs | 2 cargo-mozilla-0.57.0/vendor/matches/tests/use_star.rs | 10 cargo-mozilla-0.57.0/vendor/memchr/.cargo-checksum.json | 2 cargo-mozilla-0.57.0/vendor/memchr/Cargo.toml | 37 cargo-mozilla-0.57.0/vendor/memchr/README.md | 90 cargo-mozilla-0.57.0/vendor/memchr/build.rs | 17 cargo-mozilla-0.57.0/vendor/memchr/scripts/make-byte-frequency-table | 74 cargo-mozilla-0.57.0/vendor/memchr/src/c.rs | 44 cargo-mozilla-0.57.0/vendor/memchr/src/cow.rs | 97 cargo-mozilla-0.57.0/vendor/memchr/src/fallback.rs | 330 cargo-mozilla-0.57.0/vendor/memchr/src/iter.rs | 173 cargo-mozilla-0.57.0/vendor/memchr/src/lib.rs | 592 cargo-mozilla-0.57.0/vendor/memchr/src/memchr/c.rs | 44 cargo-mozilla-0.57.0/vendor/memchr/src/memchr/fallback.rs | 329 cargo-mozilla-0.57.0/vendor/memchr/src/memchr/iter.rs | 173 cargo-mozilla-0.57.0/vendor/memchr/src/memchr/mod.rs | 410 cargo-mozilla-0.57.0/vendor/memchr/src/memchr/naive.rs | 25 cargo-mozilla-0.57.0/vendor/memchr/src/memchr/x86/avx.rs | 755 cargo-mozilla-0.57.0/vendor/memchr/src/memchr/x86/mod.rs | 148 cargo-mozilla-0.57.0/vendor/memchr/src/memchr/x86/sse2.rs | 791 cargo-mozilla-0.57.0/vendor/memchr/src/memchr/x86/sse42.rs | 72 cargo-mozilla-0.57.0/vendor/memchr/src/memmem/byte_frequencies.rs | 258 cargo-mozilla-0.57.0/vendor/memchr/src/memmem/genericsimd.rs | 266 cargo-mozilla-0.57.0/vendor/memchr/src/memmem/mod.rs | 1296 cargo-mozilla-0.57.0/vendor/memchr/src/memmem/prefilter/fallback.rs | 122 cargo-mozilla-0.57.0/vendor/memchr/src/memmem/prefilter/genericsimd.rs | 207 cargo-mozilla-0.57.0/vendor/memchr/src/memmem/prefilter/mod.rs | 562 cargo-mozilla-0.57.0/vendor/memchr/src/memmem/prefilter/x86/avx.rs | 46 cargo-mozilla-0.57.0/vendor/memchr/src/memmem/prefilter/x86/mod.rs | 5 cargo-mozilla-0.57.0/vendor/memchr/src/memmem/prefilter/x86/sse.rs | 55 cargo-mozilla-0.57.0/vendor/memchr/src/memmem/rabinkarp.rs | 233 cargo-mozilla-0.57.0/vendor/memchr/src/memmem/rarebytes.rs | 136 cargo-mozilla-0.57.0/vendor/memchr/src/memmem/twoway.rs | 878 cargo-mozilla-0.57.0/vendor/memchr/src/memmem/util.rs | 88 cargo-mozilla-0.57.0/vendor/memchr/src/memmem/vector.rs | 98 cargo-mozilla-0.57.0/vendor/memchr/src/memmem/x86/avx.rs | 139 cargo-mozilla-0.57.0/vendor/memchr/src/memmem/x86/mod.rs | 2 cargo-mozilla-0.57.0/vendor/memchr/src/memmem/x86/sse.rs | 89 cargo-mozilla-0.57.0/vendor/memchr/src/naive.rs | 25 cargo-mozilla-0.57.0/vendor/memchr/src/tests/iter.rs | 229 cargo-mozilla-0.57.0/vendor/memchr/src/tests/memchr.rs | 131 cargo-mozilla-0.57.0/vendor/memchr/src/tests/memchr/iter.rs | 230 cargo-mozilla-0.57.0/vendor/memchr/src/tests/memchr/memchr.rs | 134 cargo-mozilla-0.57.0/vendor/memchr/src/tests/memchr/mod.rs | 7 cargo-mozilla-0.57.0/vendor/memchr/src/tests/memchr/simple.rs | 23 cargo-mozilla-0.57.0/vendor/memchr/src/tests/memchr/testdata.rs | 351 cargo-mozilla-0.57.0/vendor/memchr/src/tests/miri.rs | 19 cargo-mozilla-0.57.0/vendor/memchr/src/tests/mod.rs | 355 cargo-mozilla-0.57.0/vendor/memchr/src/tests/x86_64-soft_float.json | 15 cargo-mozilla-0.57.0/vendor/memchr/src/x86/avx.rs | 703 cargo-mozilla-0.57.0/vendor/memchr/src/x86/mod.rs | 119 cargo-mozilla-0.57.0/vendor/memchr/src/x86/sse2.rs | 793 cargo-mozilla-0.57.0/vendor/memchr/src/x86/sse42.rs | 75 cargo-mozilla-0.57.0/vendor/miniz_oxide/.cargo-checksum.json | 2 cargo-mozilla-0.57.0/vendor/miniz_oxide/Cargo.toml | 20 cargo-mozilla-0.57.0/vendor/miniz_oxide/LICENSE-APACHE.md | 177 cargo-mozilla-0.57.0/vendor/miniz_oxide/LICENSE-MIT.md | 21 cargo-mozilla-0.57.0/vendor/miniz_oxide/LICENSE-ZLIB.md | 11 cargo-mozilla-0.57.0/vendor/miniz_oxide/build.rs | 1 cargo-mozilla-0.57.0/vendor/miniz_oxide/debian/patches/remove-compiler-builtins.patch | 18 cargo-mozilla-0.57.0/vendor/miniz_oxide/debian/patches/remove-rustc-dep-of-std-etc.patch | 25 cargo-mozilla-0.57.0/vendor/miniz_oxide/debian/patches/series | 2 cargo-mozilla-0.57.0/vendor/miniz_oxide/debian/patches/use-adler32.patch | 36 cargo-mozilla-0.57.0/vendor/miniz_oxide/src/deflate/core.rs | 8 cargo-mozilla-0.57.0/vendor/miniz_oxide/src/inflate/core.rs | 2 cargo-mozilla-0.57.0/vendor/miniz_oxide/src/inflate/mod.rs | 4 cargo-mozilla-0.57.0/vendor/miniz_oxide/src/inflate/output_buffer.rs | 4 cargo-mozilla-0.57.0/vendor/miniz_oxide/src/inflate/stream.rs | 2 cargo-mozilla-0.57.0/vendor/miniz_oxide/src/lib.rs | 7 cargo-mozilla-0.57.0/vendor/miow/.cargo-checksum.json | 2 cargo-mozilla-0.57.0/vendor/miow/CHANGELOG.md | 5 cargo-mozilla-0.57.0/vendor/miow/Cargo.toml | 10 cargo-mozilla-0.57.0/vendor/miow/LICENSE-APACHE | 402 cargo-mozilla-0.57.0/vendor/miow/LICENSE-MIT | 50 cargo-mozilla-0.57.0/vendor/miow/README.md | 62 cargo-mozilla-0.57.0/vendor/miow/appveyor.yml | 40 cargo-mozilla-0.57.0/vendor/miow/src/handle.rs | 354 cargo-mozilla-0.57.0/vendor/miow/src/iocp.rs | 656 cargo-mozilla-0.57.0/vendor/miow/src/lib.rs | 110 cargo-mozilla-0.57.0/vendor/miow/src/net.rs | 2574 - cargo-mozilla-0.57.0/vendor/miow/src/overlapped.rs | 184 cargo-mozilla-0.57.0/vendor/miow/src/pipe.rs | 1572 cargo-mozilla-0.57.0/vendor/num_cpus/.pc/.quilt_patches | 1 cargo-mozilla-0.57.0/vendor/num_cpus/.pc/.quilt_series | 1 cargo-mozilla-0.57.0/vendor/num_cpus/.pc/.version | 1 cargo-mozilla-0.57.0/vendor/num_cpus/.pc/applied-patches | 1 cargo-mozilla-0.57.0/vendor/num_cpus/.pc/disable-hermit-os.diff/Cargo.toml | 27 cargo-mozilla-0.57.0/vendor/once_cell/.cargo-checksum.json | 1 cargo-mozilla-0.57.0/vendor/once_cell/CHANGELOG.md | 155 cargo-mozilla-0.57.0/vendor/once_cell/Cargo.lock | 204 cargo-mozilla-0.57.0/vendor/once_cell/Cargo.toml | 74 cargo-mozilla-0.57.0/vendor/once_cell/LICENSE-APACHE | 201 cargo-mozilla-0.57.0/vendor/once_cell/LICENSE-MIT | 23 cargo-mozilla-0.57.0/vendor/once_cell/README.md | 56 cargo-mozilla-0.57.0/vendor/once_cell/bors.toml | 2 cargo-mozilla-0.57.0/vendor/once_cell/debian/patches/series | 1 cargo-mozilla-0.57.0/vendor/once_cell/debian/patches/update-parking-lot.patch | 13 cargo-mozilla-0.57.0/vendor/once_cell/examples/bench.rs | 28 cargo-mozilla-0.57.0/vendor/once_cell/examples/bench_acquire.rs | 39 cargo-mozilla-0.57.0/vendor/once_cell/examples/bench_vs_lazy_static.rs | 51 cargo-mozilla-0.57.0/vendor/once_cell/examples/lazy_static.rs | 36 cargo-mozilla-0.57.0/vendor/once_cell/examples/reentrant_init_deadlocks.rs | 14 cargo-mozilla-0.57.0/vendor/once_cell/examples/regex.rs | 49 cargo-mozilla-0.57.0/vendor/once_cell/examples/test_synchronization.rs | 38 cargo-mozilla-0.57.0/vendor/once_cell/src/imp_pl.rs | 133 cargo-mozilla-0.57.0/vendor/once_cell/src/imp_std.rs | 366 cargo-mozilla-0.57.0/vendor/once_cell/src/lib.rs | 1172 cargo-mozilla-0.57.0/vendor/once_cell/src/race.rs | 285 cargo-mozilla-0.57.0/vendor/once_cell/tests/it.rs | 870 cargo-mozilla-0.57.0/vendor/opener/.cargo-checksum.json | 2 cargo-mozilla-0.57.0/vendor/opener/.pc/.quilt_patches | 1 cargo-mozilla-0.57.0/vendor/opener/.pc/.quilt_series | 1 cargo-mozilla-0.57.0/vendor/opener/.pc/.version | 1 cargo-mozilla-0.57.0/vendor/opener/.pc/applied-patches | 1 cargo-mozilla-0.57.0/vendor/opener/.pc/disable-vendor.patch/src/lib.rs | 225 cargo-mozilla-0.57.0/vendor/opener/Cargo.toml | 9 cargo-mozilla-0.57.0/vendor/opener/Drakefile.ts | 79 cargo-mozilla-0.57.0/vendor/opener/Makefile.toml | 10 cargo-mozilla-0.57.0/vendor/opener/debian/patches/disable-vendor.patch | 30 cargo-mozilla-0.57.0/vendor/opener/debian/patches/series | 1 cargo-mozilla-0.57.0/vendor/opener/release.toml | 4 cargo-mozilla-0.57.0/vendor/opener/src/lib.rs | 239 cargo-mozilla-0.57.0/vendor/opener/src/linux_and_more.rs | 108 cargo-mozilla-0.57.0/vendor/opener/src/macos.rs | 15 cargo-mozilla-0.57.0/vendor/opener/src/windows.rs | 41 cargo-mozilla-0.57.0/vendor/opener/src/xdg-open | 1066 cargo-mozilla-0.57.0/vendor/opener/tests/version-numbers.rs | 4 cargo-mozilla-0.57.0/vendor/openssl-probe/.cargo-checksum.json | 2 cargo-mozilla-0.57.0/vendor/openssl-probe/Cargo.toml | 4 cargo-mozilla-0.57.0/vendor/openssl-probe/LICENSE-APACHE | 402 cargo-mozilla-0.57.0/vendor/openssl-probe/LICENSE-MIT | 50 cargo-mozilla-0.57.0/vendor/openssl-probe/README.md | 66 cargo-mozilla-0.57.0/vendor/openssl-probe/src/lib.rs | 215 cargo-mozilla-0.57.0/vendor/openssl-sys/.cargo-checksum.json | 2 cargo-mozilla-0.57.0/vendor/openssl-sys/.pc/.quilt_patches | 1 cargo-mozilla-0.57.0/vendor/openssl-sys/.pc/.quilt_series | 1 cargo-mozilla-0.57.0/vendor/openssl-sys/.pc/.version | 1 cargo-mozilla-0.57.0/vendor/openssl-sys/.pc/applied-patches | 1 cargo-mozilla-0.57.0/vendor/openssl-sys/.pc/disable-vendor.patch/Cargo.toml | 44 cargo-mozilla-0.57.0/vendor/openssl-sys/.pc/disable-vendor.patch/build/main.rs | 333 cargo-mozilla-0.57.0/vendor/openssl-sys/CHANGELOG.md | 94 cargo-mozilla-0.57.0/vendor/openssl-sys/Cargo.toml | 11 cargo-mozilla-0.57.0/vendor/openssl-sys/README.md | 2 cargo-mozilla-0.57.0/vendor/openssl-sys/build/cfgs.rs | 10 cargo-mozilla-0.57.0/vendor/openssl-sys/build/expando.c | 33 cargo-mozilla-0.57.0/vendor/openssl-sys/build/find_normal.rs | 87 cargo-mozilla-0.57.0/vendor/openssl-sys/build/main.rs | 41 cargo-mozilla-0.57.0/vendor/openssl-sys/debian/patches/disable-vendor.patch | 9 cargo-mozilla-0.57.0/vendor/openssl-sys/src/asn1.rs | 39 cargo-mozilla-0.57.0/vendor/openssl-sys/src/bio.rs | 39 cargo-mozilla-0.57.0/vendor/openssl-sys/src/cms.rs | 11 cargo-mozilla-0.57.0/vendor/openssl-sys/src/crypto.rs | 4 cargo-mozilla-0.57.0/vendor/openssl-sys/src/dh.rs | 33 cargo-mozilla-0.57.0/vendor/openssl-sys/src/dtls1.rs | 8 cargo-mozilla-0.57.0/vendor/openssl-sys/src/ec.rs | 17 cargo-mozilla-0.57.0/vendor/openssl-sys/src/err.rs | 101 cargo-mozilla-0.57.0/vendor/openssl-sys/src/evp.rs | 184 cargo-mozilla-0.57.0/vendor/openssl-sys/src/lib.rs | 11 cargo-mozilla-0.57.0/vendor/openssl-sys/src/macros.rs | 209 cargo-mozilla-0.57.0/vendor/openssl-sys/src/obj_mac.rs | 12 cargo-mozilla-0.57.0/vendor/openssl-sys/src/object.rs | 6 cargo-mozilla-0.57.0/vendor/openssl-sys/src/ocsp.rs | 44 cargo-mozilla-0.57.0/vendor/openssl-sys/src/ossl_typ.rs | 42 cargo-mozilla-0.57.0/vendor/openssl-sys/src/pem.rs | 126 cargo-mozilla-0.57.0/vendor/openssl-sys/src/pkcs12.rs | 59 cargo-mozilla-0.57.0/vendor/openssl-sys/src/pkcs7.rs | 16 cargo-mozilla-0.57.0/vendor/openssl-sys/src/rand.rs | 2 cargo-mozilla-0.57.0/vendor/openssl-sys/src/rsa.rs | 101 cargo-mozilla-0.57.0/vendor/openssl-sys/src/sha.rs | 256 cargo-mozilla-0.57.0/vendor/openssl-sys/src/srtp.rs | 6 cargo-mozilla-0.57.0/vendor/openssl-sys/src/ssl.rs | 287 cargo-mozilla-0.57.0/vendor/openssl-sys/src/types.rs | 2 cargo-mozilla-0.57.0/vendor/openssl-sys/src/x509.rs | 515 cargo-mozilla-0.57.0/vendor/openssl-sys/src/x509_vfy.rs | 112 cargo-mozilla-0.57.0/vendor/openssl-sys/src/x509v3.rs | 167 cargo-mozilla-0.57.0/vendor/openssl/.cargo-checksum.json | 2 cargo-mozilla-0.57.0/vendor/openssl/.pc/.quilt_patches | 1 cargo-mozilla-0.57.0/vendor/openssl/.pc/.quilt_series | 1 cargo-mozilla-0.57.0/vendor/openssl/.pc/.version | 1 cargo-mozilla-0.57.0/vendor/openssl/.pc/applied-patches | 1 cargo-mozilla-0.57.0/vendor/openssl/.pc/disable-vendor.patch/Cargo.toml | 51 cargo-mozilla-0.57.0/vendor/openssl/CHANGELOG.md | 94 cargo-mozilla-0.57.0/vendor/openssl/Cargo.lock | 54 cargo-mozilla-0.57.0/vendor/openssl/Cargo.toml | 17 cargo-mozilla-0.57.0/vendor/openssl/README.md | 1 cargo-mozilla-0.57.0/vendor/openssl/build.rs | 13 cargo-mozilla-0.57.0/vendor/openssl/debian/patches/disable-vendor.patch | 5 cargo-mozilla-0.57.0/vendor/openssl/examples/mk_certs.rs | 32 cargo-mozilla-0.57.0/vendor/openssl/src/aes.rs | 34 cargo-mozilla-0.57.0/vendor/openssl/src/asn1.rs | 167 cargo-mozilla-0.57.0/vendor/openssl/src/base64.rs | 10 cargo-mozilla-0.57.0/vendor/openssl/src/bio.rs | 6 cargo-mozilla-0.57.0/vendor/openssl/src/bn.rs | 48 cargo-mozilla-0.57.0/vendor/openssl/src/cms.rs | 94 cargo-mozilla-0.57.0/vendor/openssl/src/conf.rs | 5 cargo-mozilla-0.57.0/vendor/openssl/src/derive.rs | 21 cargo-mozilla-0.57.0/vendor/openssl/src/dh.rs | 302 cargo-mozilla-0.57.0/vendor/openssl/src/dsa.rs | 35 cargo-mozilla-0.57.0/vendor/openssl/src/ec.rs | 145 cargo-mozilla-0.57.0/vendor/openssl/src/ecdsa.rs | 92 cargo-mozilla-0.57.0/vendor/openssl/src/encrypt.rs | 530 cargo-mozilla-0.57.0/vendor/openssl/src/envelope.rs | 38 cargo-mozilla-0.57.0/vendor/openssl/src/error.rs | 73 cargo-mozilla-0.57.0/vendor/openssl/src/fips.rs | 6 cargo-mozilla-0.57.0/vendor/openssl/src/hash.rs | 57 cargo-mozilla-0.57.0/vendor/openssl/src/lib.rs | 35 cargo-mozilla-0.57.0/vendor/openssl/src/macros.rs | 48 cargo-mozilla-0.57.0/vendor/openssl/src/memcmp.rs | 5 cargo-mozilla-0.57.0/vendor/openssl/src/nid.rs | 5 cargo-mozilla-0.57.0/vendor/openssl/src/ocsp.rs | 23 cargo-mozilla-0.57.0/vendor/openssl/src/pkcs12.rs | 39 cargo-mozilla-0.57.0/vendor/openssl/src/pkcs5.rs | 17 cargo-mozilla-0.57.0/vendor/openssl/src/pkcs7.rs | 122 cargo-mozilla-0.57.0/vendor/openssl/src/pkey.rs | 403 cargo-mozilla-0.57.0/vendor/openssl/src/rand.rs | 5 cargo-mozilla-0.57.0/vendor/openssl/src/rsa.rs | 64 cargo-mozilla-0.57.0/vendor/openssl/src/sha.rs | 525 cargo-mozilla-0.57.0/vendor/openssl/src/sign.rs | 29 cargo-mozilla-0.57.0/vendor/openssl/src/srtp.rs | 7 cargo-mozilla-0.57.0/vendor/openssl/src/ssl/bio.rs | 42 cargo-mozilla-0.57.0/vendor/openssl/src/ssl/callbacks.rs | 38 cargo-mozilla-0.57.0/vendor/openssl/src/ssl/connector.rs | 125 cargo-mozilla-0.57.0/vendor/openssl/src/ssl/error.rs | 11 cargo-mozilla-0.57.0/vendor/openssl/src/ssl/mod.rs | 548 cargo-mozilla-0.57.0/vendor/openssl/src/ssl/test/mod.rs | 80 cargo-mozilla-0.57.0/vendor/openssl/src/ssl/test/server.rs | 2 cargo-mozilla-0.57.0/vendor/openssl/src/stack.rs | 28 cargo-mozilla-0.57.0/vendor/openssl/src/string.rs | 13 cargo-mozilla-0.57.0/vendor/openssl/src/symm.rs | 115 cargo-mozilla-0.57.0/vendor/openssl/src/util.rs | 29 cargo-mozilla-0.57.0/vendor/openssl/src/version.rs | 1 cargo-mozilla-0.57.0/vendor/openssl/src/x509/extension.rs | 28 cargo-mozilla-0.57.0/vendor/openssl/src/x509/mod.rs | 218 cargo-mozilla-0.57.0/vendor/openssl/src/x509/store.rs | 146 cargo-mozilla-0.57.0/vendor/openssl/src/x509/tests.rs | 99 cargo-mozilla-0.57.0/vendor/openssl/src/x509/verify.rs | 77 cargo-mozilla-0.57.0/vendor/openssl/test/aia_test_cert.pem | 22 cargo-mozilla-0.57.0/vendor/pkg-config/.cargo-checksum.json | 2 cargo-mozilla-0.57.0/vendor/pkg-config/.pc/.quilt_patches | 1 cargo-mozilla-0.57.0/vendor/pkg-config/.pc/.quilt_series | 1 cargo-mozilla-0.57.0/vendor/pkg-config/.pc/.version | 1 cargo-mozilla-0.57.0/vendor/pkg-config/.pc/applied-patches | 3 cargo-mozilla-0.57.0/vendor/pkg-config/.pc/debian-auto-cross-compile.patch/src/lib.rs | 676 cargo-mozilla-0.57.0/vendor/pkg-config/.pc/disable-test.diff/tests/test.rs | 307 cargo-mozilla-0.57.0/vendor/pkg-config/.pc/no-special-snowflake-env.patch/src/lib.rs | 682 cargo-mozilla-0.57.0/vendor/pkg-config/.pc/no-special-snowflake-env.patch/tests/test.rs | 309 cargo-mozilla-0.57.0/vendor/pkg-config/CHANGELOG.md | 36 cargo-mozilla-0.57.0/vendor/pkg-config/Cargo.toml | 12 cargo-mozilla-0.57.0/vendor/pkg-config/README.md | 14 cargo-mozilla-0.57.0/vendor/pkg-config/debian/patches/debian-auto-cross-compile.patch | 4 cargo-mozilla-0.57.0/vendor/pkg-config/debian/patches/disable-test.diff | 27 cargo-mozilla-0.57.0/vendor/pkg-config/debian/patches/no-special-snowflake-env.patch | 69 cargo-mozilla-0.57.0/vendor/pkg-config/debian/patches/series | 1 cargo-mozilla-0.57.0/vendor/pkg-config/src/lib.rs | 128 cargo-mozilla-0.57.0/vendor/pkg-config/tests/foo.pc | 2 cargo-mozilla-0.57.0/vendor/pkg-config/tests/test.rs | 4 cargo-mozilla-0.57.0/vendor/ppv-lite86/.cargo-checksum.json | 2 cargo-mozilla-0.57.0/vendor/ppv-lite86/Cargo.toml | 11 cargo-mozilla-0.57.0/vendor/ppv-lite86/debian/patches/fix_build_on_s390x.diff | 14 cargo-mozilla-0.57.0/vendor/ppv-lite86/debian/patches/series | 1 cargo-mozilla-0.57.0/vendor/ppv-lite86/src/generic.rs | 125 cargo-mozilla-0.57.0/vendor/ppv-lite86/src/lib.rs | 8 cargo-mozilla-0.57.0/vendor/ppv-lite86/src/soft.rs | 22 cargo-mozilla-0.57.0/vendor/ppv-lite86/src/types.rs | 342 cargo-mozilla-0.57.0/vendor/ppv-lite86/src/x86_64/mod.rs | 6 cargo-mozilla-0.57.0/vendor/ppv-lite86/src/x86_64/sse2.rs | 156 cargo-mozilla-0.57.0/vendor/proc-macro2/.cargo-checksum.json | 2 cargo-mozilla-0.57.0/vendor/proc-macro2/Cargo.toml | 14 cargo-mozilla-0.57.0/vendor/proc-macro2/build.rs | 51 cargo-mozilla-0.57.0/vendor/proc-macro2/src/detection.rs | 9 cargo-mozilla-0.57.0/vendor/proc-macro2/src/fallback.rs | 43 cargo-mozilla-0.57.0/vendor/proc-macro2/src/lib.rs | 74 cargo-mozilla-0.57.0/vendor/proc-macro2/src/parse.rs | 202 cargo-mozilla-0.57.0/vendor/proc-macro2/src/wrapper.rs | 59 cargo-mozilla-0.57.0/vendor/proc-macro2/tests/comments.rs | 18 cargo-mozilla-0.57.0/vendor/proc-macro2/tests/marker.rs | 12 cargo-mozilla-0.57.0/vendor/proc-macro2/tests/test.rs | 40 cargo-mozilla-0.57.0/vendor/proc-macro2/tests/test_fmt.rs | 4 cargo-mozilla-0.57.0/vendor/quick-error/.cargo-checksum.json | 1 cargo-mozilla-0.57.0/vendor/quick-error/Cargo.lock | 6 cargo-mozilla-0.57.0/vendor/quick-error/Cargo.toml | 23 cargo-mozilla-0.57.0/vendor/quick-error/LICENSE-APACHE | 202 cargo-mozilla-0.57.0/vendor/quick-error/LICENSE-MIT | 19 cargo-mozilla-0.57.0/vendor/quick-error/README.rst | 66 cargo-mozilla-0.57.0/vendor/quick-error/bulk.yaml | 8 cargo-mozilla-0.57.0/vendor/quick-error/examples/context.rs | 48 cargo-mozilla-0.57.0/vendor/quick-error/src/lib.rs | 1262 cargo-mozilla-0.57.0/vendor/quick-error/vagga.yaml | 36 cargo-mozilla-0.57.0/vendor/quote/.cargo-checksum.json | 2 cargo-mozilla-0.57.0/vendor/quote/Cargo.toml | 15 cargo-mozilla-0.57.0/vendor/quote/benches/bench.rs | 192 cargo-mozilla-0.57.0/vendor/quote/src/ident_fragment.rs | 2 cargo-mozilla-0.57.0/vendor/quote/src/lib.rs | 39 cargo-mozilla-0.57.0/vendor/quote/src/runtime.rs | 37 cargo-mozilla-0.57.0/vendor/quote/src/to_tokens.rs | 14 cargo-mozilla-0.57.0/vendor/quote/tests/test.rs | 57 cargo-mozilla-0.57.0/vendor/quote/tests/ui/does-not-have-iter-interpolated-dup.stderr | 10 cargo-mozilla-0.57.0/vendor/quote/tests/ui/does-not-have-iter-interpolated.stderr | 10 cargo-mozilla-0.57.0/vendor/quote/tests/ui/does-not-have-iter-separated.stderr | 10 cargo-mozilla-0.57.0/vendor/quote/tests/ui/does-not-have-iter.stderr | 10 cargo-mozilla-0.57.0/vendor/quote/tests/ui/not-quotable.stderr | 15 cargo-mozilla-0.57.0/vendor/quote/tests/ui/not-repeatable.rs | 5 cargo-mozilla-0.57.0/vendor/quote/tests/ui/not-repeatable.stderr | 25 cargo-mozilla-0.57.0/vendor/quote/tests/ui/wrong-type-span.stderr | 8 cargo-mozilla-0.57.0/vendor/rand/debian/patches/Remove-__m64-support.diff | 51 cargo-mozilla-0.57.0/vendor/rand/debian/patches/series | 1 cargo-mozilla-0.57.0/vendor/rand/src/distributions/integer.rs | 2 cargo-mozilla-0.57.0/vendor/rand/src/distributions/utils.rs | 3 cargo-mozilla-0.57.0/vendor/redox_syscall/.pc/.quilt_patches | 1 cargo-mozilla-0.57.0/vendor/redox_syscall/.pc/.quilt_series | 1 cargo-mozilla-0.57.0/vendor/redox_syscall/.pc/.version | 1 cargo-mozilla-0.57.0/vendor/redox_syscall/.pc/applied-patches | 1 cargo-mozilla-0.57.0/vendor/redox_syscall/.pc/no-nightly.patch/src/lib.rs | 59 cargo-mozilla-0.57.0/vendor/regex-automata/.cargo-checksum.json | 1 cargo-mozilla-0.57.0/vendor/regex-automata/COPYING | 3 cargo-mozilla-0.57.0/vendor/regex-automata/Cargo.toml | 86 cargo-mozilla-0.57.0/vendor/regex-automata/LICENSE-MIT | 21 cargo-mozilla-0.57.0/vendor/regex-automata/README.md | 223 cargo-mozilla-0.57.0/vendor/regex-automata/TODO | 10 cargo-mozilla-0.57.0/vendor/regex-automata/UNLICENSE | 24 cargo-mozilla-0.57.0/vendor/regex-automata/data/fowler-tests/LICENSE | 19 cargo-mozilla-0.57.0/vendor/regex-automata/data/fowler-tests/README | 17 cargo-mozilla-0.57.0/vendor/regex-automata/data/fowler-tests/basic.dat | 221 cargo-mozilla-0.57.0/vendor/regex-automata/data/fowler-tests/nullsubexpr.dat | 79 cargo-mozilla-0.57.0/vendor/regex-automata/data/fowler-tests/repetition.dat | 163 cargo-mozilla-0.57.0/vendor/regex-automata/data/tests/crazy.toml | 177 cargo-mozilla-0.57.0/vendor/regex-automata/data/tests/flags.toml | 59 cargo-mozilla-0.57.0/vendor/regex-automata/data/tests/fowler/LICENSE | 19 cargo-mozilla-0.57.0/vendor/regex-automata/data/tests/fowler/README | 23 cargo-mozilla-0.57.0/vendor/regex-automata/data/tests/fowler/basic.dat | 221 cargo-mozilla-0.57.0/vendor/regex-automata/data/tests/fowler/basic.toml | 1428 cargo-mozilla-0.57.0/vendor/regex-automata/data/tests/fowler/fowler-to-toml | 76 cargo-mozilla-0.57.0/vendor/regex-automata/data/tests/fowler/nullsubexpr.dat | 79 cargo-mozilla-0.57.0/vendor/regex-automata/data/tests/fowler/nullsubexpr.toml | 350 cargo-mozilla-0.57.0/vendor/regex-automata/data/tests/fowler/repetition-long.dat | 85 cargo-mozilla-0.57.0/vendor/regex-automata/data/tests/fowler/repetition-long.toml | 294 cargo-mozilla-0.57.0/vendor/regex-automata/data/tests/fowler/repetition.dat | 83 cargo-mozilla-0.57.0/vendor/regex-automata/data/tests/fowler/repetition.toml | 343 cargo-mozilla-0.57.0/vendor/regex-automata/data/tests/iter.toml | 92 cargo-mozilla-0.57.0/vendor/regex-automata/data/tests/no-unicode.toml | 138 cargo-mozilla-0.57.0/vendor/regex-automata/data/tests/unicode.toml | 489 cargo-mozilla-0.57.0/vendor/regex-automata/rustfmt.toml | 2 cargo-mozilla-0.57.0/vendor/regex-automata/src/byteorder.rs | 76 cargo-mozilla-0.57.0/vendor/regex-automata/src/classes.rs | 271 cargo-mozilla-0.57.0/vendor/regex-automata/src/codegen.rs | 104 cargo-mozilla-0.57.0/vendor/regex-automata/src/dense.rs | 2332 + cargo-mozilla-0.57.0/vendor/regex-automata/src/determinize.rs | 286 cargo-mozilla-0.57.0/vendor/regex-automata/src/dfa.rs | 363 cargo-mozilla-0.57.0/vendor/regex-automata/src/error.rs | 150 cargo-mozilla-0.57.0/vendor/regex-automata/src/lib.rs | 360 cargo-mozilla-0.57.0/vendor/regex-automata/src/minimize.rs | 373 cargo-mozilla-0.57.0/vendor/regex-automata/src/nfa/compiler.rs | 1193 cargo-mozilla-0.57.0/vendor/regex-automata/src/nfa/map.rs | 282 cargo-mozilla-0.57.0/vendor/regex-automata/src/nfa/mod.rs | 252 cargo-mozilla-0.57.0/vendor/regex-automata/src/nfa/range_trie.rs | 1048 cargo-mozilla-0.57.0/vendor/regex-automata/src/regex.rs | 771 cargo-mozilla-0.57.0/vendor/regex-automata/src/sparse.rs | 1256 cargo-mozilla-0.57.0/vendor/regex-automata/src/sparse_set.rs | 60 cargo-mozilla-0.57.0/vendor/regex-automata/src/state_id.rs | 291 cargo-mozilla-0.57.0/vendor/regex-automata/src/transducer.rs | 107 cargo-mozilla-0.57.0/vendor/regex-automata/tests/collection.rs | 461 cargo-mozilla-0.57.0/vendor/regex-automata/tests/regression.rs | 42 cargo-mozilla-0.57.0/vendor/regex-automata/tests/suite.rs | 250 cargo-mozilla-0.57.0/vendor/regex-automata/tests/tests.rs | 25 cargo-mozilla-0.57.0/vendor/regex-automata/tests/unescape.rs | 84 cargo-mozilla-0.57.0/vendor/regex-syntax/.cargo-checksum.json | 2 cargo-mozilla-0.57.0/vendor/regex-syntax/Cargo.toml | 3 cargo-mozilla-0.57.0/vendor/regex-syntax/src/ast/mod.rs | 16 cargo-mozilla-0.57.0/vendor/regex-syntax/src/ast/parse.rs | 75 cargo-mozilla-0.57.0/vendor/regex-syntax/src/ast/print.rs | 32 cargo-mozilla-0.57.0/vendor/regex-syntax/src/ast/visitor.rs | 6 cargo-mozilla-0.57.0/vendor/regex-syntax/src/error.rs | 12 cargo-mozilla-0.57.0/vendor/regex-syntax/src/hir/interval.rs | 6 cargo-mozilla-0.57.0/vendor/regex-syntax/src/hir/literal/mod.rs | 12 cargo-mozilla-0.57.0/vendor/regex-syntax/src/hir/mod.rs | 28 cargo-mozilla-0.57.0/vendor/regex-syntax/src/hir/print.rs | 8 cargo-mozilla-0.57.0/vendor/regex-syntax/src/hir/translate.rs | 54 cargo-mozilla-0.57.0/vendor/regex-syntax/src/hir/visitor.rs | 2 cargo-mozilla-0.57.0/vendor/regex-syntax/src/lib.rs | 13 cargo-mozilla-0.57.0/vendor/regex-syntax/src/parser.rs | 6 cargo-mozilla-0.57.0/vendor/regex-syntax/src/unicode.rs | 60 cargo-mozilla-0.57.0/vendor/regex-syntax/src/utf8.rs | 28 cargo-mozilla-0.57.0/vendor/regex-syntax/test | 2 cargo-mozilla-0.57.0/vendor/regex/.pc/.quilt_patches | 1 cargo-mozilla-0.57.0/vendor/regex/.pc/.quilt_series | 1 cargo-mozilla-0.57.0/vendor/regex/.pc/.version | 1 cargo-mozilla-0.57.0/vendor/regex/.pc/applied-patches | 1 cargo-mozilla-0.57.0/vendor/regex/.pc/relax-test-dep.diff/Cargo.toml | 117 cargo-mozilla-0.57.0/vendor/rustfix/.cargo-checksum.json | 2 cargo-mozilla-0.57.0/vendor/rustfix/Cargo.toml | 8 cargo-mozilla-0.57.0/vendor/rustfix/Readme.md | 2 cargo-mozilla-0.57.0/vendor/rustfix/src/lib.rs | 3 cargo-mozilla-0.57.0/vendor/rustfix/src/replace.rs | 6 cargo-mozilla-0.57.0/vendor/semver-parser/.cargo-checksum.json | 1 cargo-mozilla-0.57.0/vendor/semver-parser/Cargo.toml | 11 cargo-mozilla-0.57.0/vendor/semver-parser/LICENSE-APACHE | 201 cargo-mozilla-0.57.0/vendor/semver-parser/LICENSE-MIT | 25 cargo-mozilla-0.57.0/vendor/semver-parser/src/common.rs | 66 cargo-mozilla-0.57.0/vendor/semver-parser/src/lib.rs | 8 cargo-mozilla-0.57.0/vendor/semver-parser/src/range.rs | 696 cargo-mozilla-0.57.0/vendor/semver-parser/src/recognize.rs | 154 cargo-mozilla-0.57.0/vendor/semver-parser/src/version.rs | 365 cargo-mozilla-0.57.0/vendor/semver/.cargo-checksum.json | 2 cargo-mozilla-0.57.0/vendor/semver/Cargo.toml | 45 cargo-mozilla-0.57.0/vendor/semver/LICENSE-APACHE | 402 cargo-mozilla-0.57.0/vendor/semver/LICENSE-MIT | 48 cargo-mozilla-0.57.0/vendor/semver/README.md | 187 cargo-mozilla-0.57.0/vendor/semver/benches/parse.rs | 24 cargo-mozilla-0.57.0/vendor/semver/build.rs | 79 cargo-mozilla-0.57.0/vendor/semver/src/backport.rs | 63 cargo-mozilla-0.57.0/vendor/semver/src/diesel_impls.rs | 45 cargo-mozilla-0.57.0/vendor/semver/src/display.rs | 165 cargo-mozilla-0.57.0/vendor/semver/src/error.rs | 90 cargo-mozilla-0.57.0/vendor/semver/src/eval.rs | 181 cargo-mozilla-0.57.0/vendor/semver/src/identifier.rs | 356 cargo-mozilla-0.57.0/vendor/semver/src/impls.rs | 156 cargo-mozilla-0.57.0/vendor/semver/src/lib.rs | 745 cargo-mozilla-0.57.0/vendor/semver/src/parse.rs | 391 cargo-mozilla-0.57.0/vendor/semver/src/serde.rs | 74 cargo-mozilla-0.57.0/vendor/semver/src/version.rs | 871 cargo-mozilla-0.57.0/vendor/semver/src/version_req.rs | 1031 cargo-mozilla-0.57.0/vendor/semver/tests/deprecation.rs | 25 cargo-mozilla-0.57.0/vendor/semver/tests/diesel.rs | 209 cargo-mozilla-0.57.0/vendor/semver/tests/node/mod.rs | 43 cargo-mozilla-0.57.0/vendor/semver/tests/serde.rs | 93 cargo-mozilla-0.57.0/vendor/semver/tests/test_identifier.rs | 38 cargo-mozilla-0.57.0/vendor/semver/tests/test_version.rs | 235 cargo-mozilla-0.57.0/vendor/semver/tests/test_version_req.rs | 408 cargo-mozilla-0.57.0/vendor/semver/tests/util/mod.rs | 39 cargo-mozilla-0.57.0/vendor/serde/.cargo-checksum.json | 2 cargo-mozilla-0.57.0/vendor/serde/Cargo.toml | 13 cargo-mozilla-0.57.0/vendor/serde/build.rs | 19 cargo-mozilla-0.57.0/vendor/serde/src/de/from_primitive.rs | 260 cargo-mozilla-0.57.0/vendor/serde/src/de/ignored_any.rs | 16 cargo-mozilla-0.57.0/vendor/serde/src/de/impls.rs | 490 cargo-mozilla-0.57.0/vendor/serde/src/de/mod.rs | 9 cargo-mozilla-0.57.0/vendor/serde/src/de/seed.rs | 19 cargo-mozilla-0.57.0/vendor/serde/src/de/value.rs | 194 cargo-mozilla-0.57.0/vendor/serde/src/export.rs | 39 cargo-mozilla-0.57.0/vendor/serde/src/integer128.rs | 2 cargo-mozilla-0.57.0/vendor/serde/src/lib.rs | 36 cargo-mozilla-0.57.0/vendor/serde/src/macros.rs | 2 cargo-mozilla-0.57.0/vendor/serde/src/private/de.rs | 205 cargo-mozilla-0.57.0/vendor/serde/src/private/doc.rs | 159 cargo-mozilla-0.57.0/vendor/serde/src/private/macros.rs | 140 cargo-mozilla-0.57.0/vendor/serde/src/private/mod.rs | 50 cargo-mozilla-0.57.0/vendor/serde/src/private/ser.rs | 28 cargo-mozilla-0.57.0/vendor/serde/src/private/size_hint.rs | 21 cargo-mozilla-0.57.0/vendor/serde/src/ser/impls.rs | 60 cargo-mozilla-0.57.0/vendor/serde/src/ser/impossible.rs | 2 cargo-mozilla-0.57.0/vendor/serde/src/ser/mod.rs | 32 cargo-mozilla-0.57.0/vendor/serde_derive/.cargo-checksum.json | 2 cargo-mozilla-0.57.0/vendor/serde_derive/Cargo.toml | 14 cargo-mozilla-0.57.0/vendor/serde_derive/build.rs | 6 cargo-mozilla-0.57.0/vendor/serde_derive/src/bound.rs | 101 cargo-mozilla-0.57.0/vendor/serde_derive/src/de.rs | 711 cargo-mozilla-0.57.0/vendor/serde_derive/src/dummy.rs | 2 cargo-mozilla-0.57.0/vendor/serde_derive/src/internals/ast.rs | 2 cargo-mozilla-0.57.0/vendor/serde_derive/src/internals/attr.rs | 131 cargo-mozilla-0.57.0/vendor/serde_derive/src/internals/case.rs | 61 cargo-mozilla-0.57.0/vendor/serde_derive/src/internals/check.rs | 4 cargo-mozilla-0.57.0/vendor/serde_derive/src/internals/mod.rs | 4 cargo-mozilla-0.57.0/vendor/serde_derive/src/internals/receiver.rs | 287 cargo-mozilla-0.57.0/vendor/serde_derive/src/internals/respan.rs | 16 cargo-mozilla-0.57.0/vendor/serde_derive/src/internals/symbol.rs | 1 cargo-mozilla-0.57.0/vendor/serde_derive/src/lib.rs | 22 cargo-mozilla-0.57.0/vendor/serde_derive/src/pretend.rs | 143 cargo-mozilla-0.57.0/vendor/serde_derive/src/ser.rs | 58 cargo-mozilla-0.57.0/vendor/serde_derive/src/try.rs | 6 cargo-mozilla-0.57.0/vendor/serde_json/.cargo-checksum.json | 2 cargo-mozilla-0.57.0/vendor/serde_json/Cargo.toml | 12 cargo-mozilla-0.57.0/vendor/serde_json/README.md | 22 cargo-mozilla-0.57.0/vendor/serde_json/src/de.rs | 21 cargo-mozilla-0.57.0/vendor/serde_json/src/error.rs | 2 cargo-mozilla-0.57.0/vendor/serde_json/src/iter.rs | 2 cargo-mozilla-0.57.0/vendor/serde_json/src/lib.rs | 11 cargo-mozilla-0.57.0/vendor/serde_json/src/map.rs | 37 cargo-mozilla-0.57.0/vendor/serde_json/src/number.rs | 2 cargo-mozilla-0.57.0/vendor/serde_json/src/raw.rs | 2 cargo-mozilla-0.57.0/vendor/serde_json/src/read.rs | 15 cargo-mozilla-0.57.0/vendor/serde_json/src/ser.rs | 27 cargo-mozilla-0.57.0/vendor/serde_json/src/value/de.rs | 120 cargo-mozilla-0.57.0/vendor/serde_json/src/value/from.rs | 36 cargo-mozilla-0.57.0/vendor/serde_json/src/value/mod.rs | 104 cargo-mozilla-0.57.0/vendor/sized-chunks/.cargo-checksum.json | 2 cargo-mozilla-0.57.0/vendor/sized-chunks/.pc/.quilt_patches | 1 cargo-mozilla-0.57.0/vendor/sized-chunks/.pc/.quilt_series | 1 cargo-mozilla-0.57.0/vendor/sized-chunks/.pc/.version | 1 cargo-mozilla-0.57.0/vendor/sized-chunks/.pc/applied-patches | 1 cargo-mozilla-0.57.0/vendor/sized-chunks/.pc/disable-features.diff/Cargo.toml | 55 cargo-mozilla-0.57.0/vendor/sized-chunks/CHANGELOG.md | 27 cargo-mozilla-0.57.0/vendor/sized-chunks/Cargo.toml | 18 cargo-mozilla-0.57.0/vendor/sized-chunks/benches/sized_chunk.rs | 65 cargo-mozilla-0.57.0/vendor/sized-chunks/debian/patches/disable-features.diff | 25 cargo-mozilla-0.57.0/vendor/sized-chunks/src/arbitrary.rs | 86 cargo-mozilla-0.57.0/vendor/sized-chunks/src/inline_array/mod.rs | 257 cargo-mozilla-0.57.0/vendor/sized-chunks/src/ring_buffer/mod.rs | 38 cargo-mozilla-0.57.0/vendor/sized-chunks/src/sized_chunk/mod.rs | 259 cargo-mozilla-0.57.0/vendor/socket2/.cargo-checksum.json | 2 cargo-mozilla-0.57.0/vendor/socket2/Cargo.toml | 44 cargo-mozilla-0.57.0/vendor/socket2/README.md | 70 cargo-mozilla-0.57.0/vendor/socket2/src/lib.rs | 335 cargo-mozilla-0.57.0/vendor/socket2/src/sockaddr.rs | 463 cargo-mozilla-0.57.0/vendor/socket2/src/socket.rs | 1955 cargo-mozilla-0.57.0/vendor/socket2/src/sockref.rs | 147 cargo-mozilla-0.57.0/vendor/socket2/src/sys/unix.rs | 2474 - cargo-mozilla-0.57.0/vendor/socket2/src/sys/windows.rs | 1566 cargo-mozilla-0.57.0/vendor/socket2/src/tests.rs | 62 cargo-mozilla-0.57.0/vendor/socket2/src/utils.rs | 48 cargo-mozilla-0.57.0/vendor/strip-ansi-escapes/.cargo-checksum.json | 2 cargo-mozilla-0.57.0/vendor/strip-ansi-escapes/Cargo.lock | 65 cargo-mozilla-0.57.0/vendor/strip-ansi-escapes/Cargo.toml | 6 cargo-mozilla-0.57.0/vendor/strip-ansi-escapes/README.md | 2 cargo-mozilla-0.57.0/vendor/strip-ansi-escapes/src/lib.rs | 68 cargo-mozilla-0.57.0/vendor/syn/.cargo-checksum.json | 2 cargo-mozilla-0.57.0/vendor/syn/Cargo.toml | 26 cargo-mozilla-0.57.0/vendor/syn/README.md | 6 cargo-mozilla-0.57.0/vendor/syn/benches/file.rs | 2 cargo-mozilla-0.57.0/vendor/syn/benches/rust.rs | 2 cargo-mozilla-0.57.0/vendor/syn/build.rs | 4 cargo-mozilla-0.57.0/vendor/syn/debian/patches/relax-deps.patch | 42 cargo-mozilla-0.57.0/vendor/syn/debian/patches/remove_test_feature.patch | 29 cargo-mozilla-0.57.0/vendor/syn/debian/patches/series | 1 cargo-mozilla-0.57.0/vendor/syn/src/attr.rs | 64 cargo-mozilla-0.57.0/vendor/syn/src/await.rs | 2 cargo-mozilla-0.57.0/vendor/syn/src/custom_keyword.rs | 47 cargo-mozilla-0.57.0/vendor/syn/src/custom_punctuation.rs | 37 cargo-mozilla-0.57.0/vendor/syn/src/data.rs | 91 cargo-mozilla-0.57.0/vendor/syn/src/derive.rs | 32 cargo-mozilla-0.57.0/vendor/syn/src/discouraged.rs | 2 cargo-mozilla-0.57.0/vendor/syn/src/error.rs | 50 cargo-mozilla-0.57.0/vendor/syn/src/export.rs | 3 cargo-mozilla-0.57.0/vendor/syn/src/expr.rs | 629 cargo-mozilla-0.57.0/vendor/syn/src/file.rs | 37 cargo-mozilla-0.57.0/vendor/syn/src/gen/clone.rs | 183 cargo-mozilla-0.57.0/vendor/syn/src/gen/debug.rs | 178 cargo-mozilla-0.57.0/vendor/syn/src/gen/eq.rs | 358 cargo-mozilla-0.57.0/vendor/syn/src/gen/hash.rs | 176 cargo-mozilla-0.57.0/vendor/syn/src/gen/visit.rs | 756 cargo-mozilla-0.57.0/vendor/syn/src/gen/visit_mut.rs | 756 cargo-mozilla-0.57.0/vendor/syn/src/generics.rs | 165 cargo-mozilla-0.57.0/vendor/syn/src/group.rs | 21 cargo-mozilla-0.57.0/vendor/syn/src/ident.rs | 1 cargo-mozilla-0.57.0/vendor/syn/src/item.rs | 606 cargo-mozilla-0.57.0/vendor/syn/src/lib.rs | 64 cargo-mozilla-0.57.0/vendor/syn/src/lifetime.rs | 18 cargo-mozilla-0.57.0/vendor/syn/src/lit.rs | 99 cargo-mozilla-0.57.0/vendor/syn/src/mac.rs | 6 cargo-mozilla-0.57.0/vendor/syn/src/macros.rs | 17 cargo-mozilla-0.57.0/vendor/syn/src/op.rs | 6 cargo-mozilla-0.57.0/vendor/syn/src/parse.rs | 59 cargo-mozilla-0.57.0/vendor/syn/src/parse_macro_input.rs | 13 cargo-mozilla-0.57.0/vendor/syn/src/parse_quote.rs | 7 cargo-mozilla-0.57.0/vendor/syn/src/pat.rs | 149 cargo-mozilla-0.57.0/vendor/syn/src/path.rs | 182 cargo-mozilla-0.57.0/vendor/syn/src/punctuated.rs | 63 cargo-mozilla-0.57.0/vendor/syn/src/reserved.rs | 2 cargo-mozilla-0.57.0/vendor/syn/src/spanned.rs | 4 cargo-mozilla-0.57.0/vendor/syn/src/stmt.rs | 101 cargo-mozilla-0.57.0/vendor/syn/src/token.rs | 240 cargo-mozilla-0.57.0/vendor/syn/src/ty.rs | 265 cargo-mozilla-0.57.0/vendor/syn/tests/common/eq.rs | 444 cargo-mozilla-0.57.0/vendor/syn/tests/common/mod.rs | 1 cargo-mozilla-0.57.0/vendor/syn/tests/debug/gen.rs | 24 cargo-mozilla-0.57.0/vendor/syn/tests/debug/mod.rs | 2 cargo-mozilla-0.57.0/vendor/syn/tests/repo/mod.rs | 75 cargo-mozilla-0.57.0/vendor/syn/tests/test_derive_input.rs | 2 cargo-mozilla-0.57.0/vendor/syn/tests/test_expr.rs | 18 cargo-mozilla-0.57.0/vendor/syn/tests/test_generics.rs | 2 cargo-mozilla-0.57.0/vendor/syn/tests/test_item.rs | 293 cargo-mozilla-0.57.0/vendor/syn/tests/test_lit.rs | 14 cargo-mozilla-0.57.0/vendor/syn/tests/test_meta.rs | 39 cargo-mozilla-0.57.0/vendor/syn/tests/test_parse_buffer.rs | 4 cargo-mozilla-0.57.0/vendor/syn/tests/test_pat.rs | 39 cargo-mozilla-0.57.0/vendor/syn/tests/test_precedence.rs | 101 cargo-mozilla-0.57.0/vendor/syn/tests/test_round_trip.rs | 224 cargo-mozilla-0.57.0/vendor/syn/tests/test_size.rs | 2 cargo-mozilla-0.57.0/vendor/syn/tests/test_stmt.rs | 32 cargo-mozilla-0.57.0/vendor/syn/tests/test_ty.rs | 298 cargo-mozilla-0.57.0/vendor/syn/tests/test_visibility.rs | 5 cargo-mozilla-0.57.0/vendor/tar/.cargo-checksum.json | 2 cargo-mozilla-0.57.0/vendor/tar/Cargo.lock | 63 cargo-mozilla-0.57.0/vendor/tar/Cargo.toml | 4 cargo-mozilla-0.57.0/vendor/tar/src/archive.rs | 17 cargo-mozilla-0.57.0/vendor/tar/src/builder.rs | 84 cargo-mozilla-0.57.0/vendor/tar/src/entry.rs | 49 cargo-mozilla-0.57.0/vendor/tar/src/header.rs | 43 cargo-mozilla-0.57.0/vendor/tar/tests/all.rs | 125 cargo-mozilla-0.57.0/vendor/tar/tests/entry.rs | 32 cargo-mozilla-0.57.0/vendor/tar/tests/header/mod.rs | 4 cargo-mozilla-0.57.0/vendor/termcolor/.cargo-checksum.json | 2 cargo-mozilla-0.57.0/vendor/termcolor/Cargo.toml | 6 cargo-mozilla-0.57.0/vendor/termcolor/src/lib.rs | 49 cargo-mozilla-0.57.0/vendor/thread_local/.cargo-checksum.json | 2 cargo-mozilla-0.57.0/vendor/thread_local/Cargo.toml | 20 cargo-mozilla-0.57.0/vendor/thread_local/README.md | 18 cargo-mozilla-0.57.0/vendor/thread_local/benches/thread_local.rs | 36 cargo-mozilla-0.57.0/vendor/thread_local/debian/patches/disable-criteron.diff | 52 cargo-mozilla-0.57.0/vendor/thread_local/debian/patches/series | 1 cargo-mozilla-0.57.0/vendor/thread_local/src/cached.rs | 103 cargo-mozilla-0.57.0/vendor/thread_local/src/lib.rs | 573 cargo-mozilla-0.57.0/vendor/thread_local/src/thread_id.rs | 114 cargo-mozilla-0.57.0/vendor/thread_local/src/unreachable.rs | 35 cargo-mozilla-0.57.0/vendor/tinyvec/.cargo-checksum.json | 2 cargo-mozilla-0.57.0/vendor/tinyvec/CHANGELOG.md | 60 cargo-mozilla-0.57.0/vendor/tinyvec/Cargo.toml | 53 cargo-mozilla-0.57.0/vendor/tinyvec/LICENSE-APACHE.md | 202 cargo-mozilla-0.57.0/vendor/tinyvec/LICENSE-MIT.md | 5 cargo-mozilla-0.57.0/vendor/tinyvec/LICENSE-ZLIB.md | 22 cargo-mozilla-0.57.0/vendor/tinyvec/README.md | 33 cargo-mozilla-0.57.0/vendor/tinyvec/appveyor.yml | 32 cargo-mozilla-0.57.0/vendor/tinyvec/benches/macros.rs | 100 cargo-mozilla-0.57.0/vendor/tinyvec/gen-array-impls.sh | 53 cargo-mozilla-0.57.0/vendor/tinyvec/rustfmt.toml | 22 cargo-mozilla-0.57.0/vendor/tinyvec/src-backup/arrayset.rs | 303 cargo-mozilla-0.57.0/vendor/tinyvec/src/array.rs | 128 cargo-mozilla-0.57.0/vendor/tinyvec/src/array/const_generic_impl.rs | 23 cargo-mozilla-0.57.0/vendor/tinyvec/src/array/generated_impl.rs | 9616 ++++ cargo-mozilla-0.57.0/vendor/tinyvec/src/arrayvec.rs | 3011 - cargo-mozilla-0.57.0/vendor/tinyvec/src/arrayvec_drain.rs | 93 cargo-mozilla-0.57.0/vendor/tinyvec/src/lib.rs | 203 cargo-mozilla-0.57.0/vendor/tinyvec/src/slicevec.rs | 1080 cargo-mozilla-0.57.0/vendor/tinyvec/src/tinyvec.rs | 2695 - cargo-mozilla-0.57.0/vendor/tinyvec/tests/arrayvec.rs | 655 cargo-mozilla-0.57.0/vendor/tinyvec/tests/tinyvec.rs | 504 cargo-mozilla-0.57.0/vendor/tinyvec_macros/.cargo-checksum.json | 1 cargo-mozilla-0.57.0/vendor/tinyvec_macros/Cargo.toml | 22 cargo-mozilla-0.57.0/vendor/tinyvec_macros/LICENSE | 21 cargo-mozilla-0.57.0/vendor/tinyvec_macros/src/lib.rs | 24 cargo-mozilla-0.57.0/vendor/toml/.cargo-checksum.json | 2 cargo-mozilla-0.57.0/vendor/toml/Cargo.lock | 76 cargo-mozilla-0.57.0/vendor/toml/Cargo.toml | 2 cargo-mozilla-0.57.0/vendor/toml/src/de.rs | 33 cargo-mozilla-0.57.0/vendor/toml/src/lib.rs | 22 cargo-mozilla-0.57.0/vendor/toml/src/map.rs | 2 cargo-mozilla-0.57.0/vendor/toml/src/ser.rs | 9 cargo-mozilla-0.57.0/vendor/toml/src/tokens.rs | 10 cargo-mozilla-0.57.0/vendor/typenum/.cargo-checksum.json | 2 cargo-mozilla-0.57.0/vendor/typenum/CHANGELOG.md | 46 cargo-mozilla-0.57.0/vendor/typenum/Cargo.toml | 7 cargo-mozilla-0.57.0/vendor/typenum/LICENSE | 22 cargo-mozilla-0.57.0/vendor/typenum/LICENSE-APACHE | 201 cargo-mozilla-0.57.0/vendor/typenum/LICENSE-MIT | 21 cargo-mozilla-0.57.0/vendor/typenum/README.md | 50 cargo-mozilla-0.57.0/vendor/typenum/build/main.rs | 8 cargo-mozilla-0.57.0/vendor/typenum/build/op.rs | 4 cargo-mozilla-0.57.0/vendor/typenum/rustfmt.toml | 1 cargo-mozilla-0.57.0/vendor/typenum/src/bit.rs | 38 cargo-mozilla-0.57.0/vendor/typenum/src/int.rs | 192 cargo-mozilla-0.57.0/vendor/typenum/src/lib.rs | 63 cargo-mozilla-0.57.0/vendor/typenum/src/marker_traits.rs | 47 cargo-mozilla-0.57.0/vendor/typenum/src/operator_aliases.rs | 18 cargo-mozilla-0.57.0/vendor/typenum/src/private.rs | 69 cargo-mozilla-0.57.0/vendor/typenum/src/type_operators.rs | 64 cargo-mozilla-0.57.0/vendor/typenum/src/uint.rs | 398 cargo-mozilla-0.57.0/vendor/unicode-bidi/.cargo-checksum.json | 2 cargo-mozilla-0.57.0/vendor/unicode-bidi/.pc/.quilt_patches | 1 cargo-mozilla-0.57.0/vendor/unicode-bidi/.pc/.quilt_series | 1 cargo-mozilla-0.57.0/vendor/unicode-bidi/.pc/.version | 1 cargo-mozilla-0.57.0/vendor/unicode-bidi/.pc/applied-patches | 1 cargo-mozilla-0.57.0/vendor/unicode-bidi/.pc/no-flamegraphs.patch/Cargo.toml | 49 cargo-mozilla-0.57.0/vendor/unicode-bidi/Cargo.toml | 32 cargo-mozilla-0.57.0/vendor/unicode-bidi/README.md | 2 cargo-mozilla-0.57.0/vendor/unicode-bidi/debian/patches/no-flamegraphs.patch | 16 cargo-mozilla-0.57.0/vendor/unicode-bidi/src/char_data/mod.rs | 6 cargo-mozilla-0.57.0/vendor/unicode-bidi/src/deprecated.rs | 3 cargo-mozilla-0.57.0/vendor/unicode-bidi/src/explicit.rs | 13 cargo-mozilla-0.57.0/vendor/unicode-bidi/src/implicit.rs | 18 cargo-mozilla-0.57.0/vendor/unicode-bidi/src/level.rs | 9 cargo-mozilla-0.57.0/vendor/unicode-bidi/src/lib.rs | 108 cargo-mozilla-0.57.0/vendor/unicode-bidi/src/prepare.rs | 24 cargo-mozilla-0.57.0/vendor/unicode-normalization/.cargo-checksum.json | 2 cargo-mozilla-0.57.0/vendor/unicode-normalization/Cargo.toml | 6 cargo-mozilla-0.57.0/vendor/unicode-normalization/README.md | 2 cargo-mozilla-0.57.0/vendor/unicode-normalization/scripts/unicode.py | 119 cargo-mozilla-0.57.0/vendor/unicode-normalization/src/decompose.rs | 8 cargo-mozilla-0.57.0/vendor/unicode-normalization/src/lib.rs | 35 cargo-mozilla-0.57.0/vendor/unicode-normalization/src/lookups.rs | 11 cargo-mozilla-0.57.0/vendor/unicode-normalization/src/normalize.rs | 36 cargo-mozilla-0.57.0/vendor/unicode-normalization/src/replace.rs | 61 cargo-mozilla-0.57.0/vendor/unicode-normalization/src/stream_safe.rs | 29 cargo-mozilla-0.57.0/vendor/unicode-normalization/src/tables.rs |22512 +++++----- cargo-mozilla-0.57.0/vendor/unicode-width/.cargo-checksum.json | 2 cargo-mozilla-0.57.0/vendor/unicode-width/.pc/.quilt_patches | 1 cargo-mozilla-0.57.0/vendor/unicode-width/.pc/.quilt_series | 1 cargo-mozilla-0.57.0/vendor/unicode-width/.pc/.version | 1 cargo-mozilla-0.57.0/vendor/unicode-width/.pc/applied-patches | 1 cargo-mozilla-0.57.0/vendor/unicode-width/.pc/drop-uninstallable-featuresets.patch/Cargo.toml | 43 cargo-mozilla-0.57.0/vendor/unicode-width/Cargo.toml | 11 cargo-mozilla-0.57.0/vendor/unicode-width/src/tables.rs | 349 cargo-mozilla-0.57.0/vendor/unicode-xid/.cargo-checksum.json | 2 cargo-mozilla-0.57.0/vendor/unicode-xid/Cargo.toml | 10 cargo-mozilla-0.57.0/vendor/unicode-xid/README.md | 9 cargo-mozilla-0.57.0/vendor/unicode-xid/benches/xid.rs | 60 cargo-mozilla-0.57.0/vendor/unicode-xid/src/lib.rs | 12 cargo-mozilla-0.57.0/vendor/url/.cargo-checksum.json | 2 cargo-mozilla-0.57.0/vendor/url/Cargo.toml | 25 cargo-mozilla-0.57.0/vendor/url/README.md | 10 cargo-mozilla-0.57.0/vendor/url/UPGRADING.md | 367 cargo-mozilla-0.57.0/vendor/url/appveyor.yml | 13 cargo-mozilla-0.57.0/vendor/url/benches/parse_url.rs | 18 cargo-mozilla-0.57.0/vendor/url/debian/patches/remove-benchmarks.diff | 22 cargo-mozilla-0.57.0/vendor/url/debian/patches/series | 1 cargo-mozilla-0.57.0/vendor/url/src/form_urlencoded.rs | 347 cargo-mozilla-0.57.0/vendor/url/src/host.rs | 147 cargo-mozilla-0.57.0/vendor/url/src/lib.rs | 334 cargo-mozilla-0.57.0/vendor/url/src/origin.rs | 10 cargo-mozilla-0.57.0/vendor/url/src/parser.rs | 155 cargo-mozilla-0.57.0/vendor/url/src/path_segments.rs | 22 cargo-mozilla-0.57.0/vendor/url/src/query_encoding.rs | 35 cargo-mozilla-0.57.0/vendor/url/src/quirks.rs | 34 cargo-mozilla-0.57.0/vendor/url/src/slicing.rs | 2 cargo-mozilla-0.57.0/vendor/url/tests/data.rs | 323 cargo-mozilla-0.57.0/vendor/url/tests/setters_tests.json | 64 cargo-mozilla-0.57.0/vendor/url/tests/unit.rs | 511 cargo-mozilla-0.57.0/vendor/url/tests/urltestdata.json | 389 cargo-mozilla-0.57.0/vendor/utf8parse/.cargo-checksum.json | 2 cargo-mozilla-0.57.0/vendor/utf8parse/Cargo.toml | 12 cargo-mozilla-0.57.0/vendor/utf8parse/src/UTF-8-demo.txt | 212 cargo-mozilla-0.57.0/vendor/utf8parse/src/lib.rs | 84 cargo-mozilla-0.57.0/vendor/utf8parse/src/table.rs | 184 cargo-mozilla-0.57.0/vendor/utf8parse/src/table.rs.in | 60 cargo-mozilla-0.57.0/vendor/utf8parse/src/types.rs | 124 cargo-mozilla-0.57.0/vendor/utf8parse/tests/UTF-8-demo.txt | 212 cargo-mozilla-0.57.0/vendor/utf8parse/tests/utf-8-demo.rs | 31 cargo-mozilla-0.57.0/vendor/vcpkg/.cargo-checksum.json | 2 cargo-mozilla-0.57.0/vendor/vcpkg/CHANGELOG.md | 112 cargo-mozilla-0.57.0/vendor/vcpkg/Cargo.toml | 4 cargo-mozilla-0.57.0/vendor/vcpkg/LICENSE-APACHE | 202 cargo-mozilla-0.57.0/vendor/vcpkg/LICENSE-MIT | 26 cargo-mozilla-0.57.0/vendor/vcpkg/README.md | 23 cargo-mozilla-0.57.0/vendor/vcpkg/notes.md | 81 cargo-mozilla-0.57.0/vendor/vcpkg/rustfmt.toml | 2 cargo-mozilla-0.57.0/vendor/vcpkg/setup_vcp.sh | 32 cargo-mozilla-0.57.0/vendor/vcpkg/src/lib.rs | 3333 - cargo-mozilla-0.57.0/vendor/vcpkg/test-data/multiline-description/installed/vcpkg/updates/status | 8 cargo-mozilla-0.57.0/vendor/vcpkg/test-data/no-status/installed/vcpkg/info/boost-algorithm_1.67.0_x64-windows.list | 98 cargo-mozilla-0.57.0/vendor/vcpkg/test-data/no-status/installed/vcpkg/info/boost-any_1.67.0_x64-windows.list | 7 cargo-mozilla-0.57.0/vendor/vcpkg/test-data/no-status/installed/vcpkg/info/boost-array_1.67.0_x64-windows.list | 7 cargo-mozilla-0.57.0/vendor/vcpkg/test-data/no-status/installed/vcpkg/info/boost-assert_1.67.0_x64-windows.list | 8 cargo-mozilla-0.57.0/vendor/vcpkg/test-data/no-status/installed/vcpkg/info/boost-atomic_1.67.0_x64-windows.list | 104 cargo-mozilla-0.57.0/vendor/vcpkg/test-data/no-status/installed/vcpkg/info/boost-bimap_1.67.0_x64-windows.list | 119 cargo-mozilla-0.57.0/vendor/vcpkg/test-data/no-status/installed/vcpkg/info/boost-bind_1.67.0_x64-windows.list | 25 cargo-mozilla-0.57.0/vendor/vcpkg/test-data/no-status/installed/vcpkg/info/boost-build_1.67.0_x64-windows.list | 1389 cargo-mozilla-0.57.0/vendor/vcpkg/test-data/no-status/installed/vcpkg/info/boost-chrono_1.67.0_x64-windows.list | 78 cargo-mozilla-0.57.0/vendor/vcpkg/test-data/no-status/installed/vcpkg/info/boost-compatibility_1.67.0_x64-windows.list | 25 cargo-mozilla-0.57.0/vendor/vcpkg/test-data/no-status/installed/vcpkg/info/boost-concept-check_1.67.0_x64-windows.list | 25 cargo-mozilla-0.57.0/vendor/vcpkg/test-data/no-status/installed/vcpkg/info/boost-config_1.67.0_x64-windows.list | 115 cargo-mozilla-0.57.0/vendor/vcpkg/test-data/no-status/installed/vcpkg/info/boost-container-hash_1.67.0_x64-windows.list | 21 cargo-mozilla-0.57.0/vendor/vcpkg/test-data/no-status/installed/vcpkg/info/boost-container_1.67.0_x64-windows.list | 120 cargo-mozilla-0.57.0/vendor/vcpkg/test-data/no-status/installed/vcpkg/info/boost-conversion_1.67.0_x64-windows.list | 9 cargo-mozilla-0.57.0/vendor/vcpkg/test-data/no-status/installed/vcpkg/info/boost-core_1.67.0_x64-windows.list | 45 cargo-mozilla-0.57.0/vendor/vcpkg/test-data/no-status/installed/vcpkg/info/boost-date-time_1.67.0_x64-windows.list | 125 cargo-mozilla-0.57.0/vendor/vcpkg/test-data/no-status/installed/vcpkg/info/boost-detail_1.67.0_x64-windows.list | 31 cargo-mozilla-0.57.0/vendor/vcpkg/test-data/no-status/installed/vcpkg/info/boost-endian_1.67.0_x64-windows.list | 19 cargo-mozilla-0.57.0/vendor/vcpkg/test-data/no-status/installed/vcpkg/info/boost-exception_1.67.0_x64-windows.list | 40 cargo-mozilla-0.57.0/vendor/vcpkg/test-data/no-status/installed/vcpkg/info/boost-filesystem_1.67.0_x64-windows.list | 30 cargo-mozilla-0.57.0/vendor/vcpkg/test-data/no-status/installed/vcpkg/info/boost-foreach_1.67.0_x64-windows.list | 8 cargo-mozilla-0.57.0/vendor/vcpkg/test-data/no-status/installed/vcpkg/info/boost-format_1.67.0_x64-windows.list | 27 cargo-mozilla-0.57.0/vendor/vcpkg/test-data/no-status/installed/vcpkg/info/boost-function-types_1.67.0_x64-windows.list | 93 cargo-mozilla-0.57.0/vendor/vcpkg/test-data/no-status/installed/vcpkg/info/boost-function_1.67.0_x64-windows.list | 30 cargo-mozilla-0.57.0/vendor/vcpkg/test-data/no-status/installed/vcpkg/info/boost-functional_1.67.0_x64-windows.list | 18 cargo-mozilla-0.57.0/vendor/vcpkg/test-data/no-status/installed/vcpkg/info/boost-fusion_1.67.0_x64-windows.list | 1125 cargo-mozilla-0.57.0/vendor/vcpkg/test-data/no-status/installed/vcpkg/info/boost-geometry_1.67.0_x64-windows.list | 986 cargo-mozilla-0.57.0/vendor/vcpkg/test-data/no-status/installed/vcpkg/info/boost-graph_1.67.0_x64-windows.list | 216 cargo-mozilla-0.57.0/vendor/vcpkg/test-data/no-status/installed/vcpkg/info/boost-integer_1.67.0_x64-windows.list | 19 cargo-mozilla-0.57.0/vendor/vcpkg/test-data/no-status/installed/vcpkg/info/boost-intrusive_1.67.0_x64-windows.list | 100 cargo-mozilla-0.57.0/vendor/vcpkg/test-data/no-status/installed/vcpkg/info/boost-io_1.67.0_x64-windows.list | 11 cargo-mozilla-0.57.0/vendor/vcpkg/test-data/no-status/installed/vcpkg/info/boost-iostreams_1.67.0-1_x64-windows.list | 151 cargo-mozilla-0.57.0/vendor/vcpkg/test-data/no-status/installed/vcpkg/info/boost-iterator_1.67.0_x64-windows.list | 48 cargo-mozilla-0.57.0/vendor/vcpkg/test-data/no-status/installed/vcpkg/info/boost-lambda_1.67.0_x64-windows.list | 41 cargo-mozilla-0.57.0/vendor/vcpkg/test-data/no-status/installed/vcpkg/info/boost-lexical-cast_1.67.0_x64-windows.list | 23 cargo-mozilla-0.57.0/vendor/vcpkg/test-data/no-status/installed/vcpkg/info/boost-locale_1.67.0_x64-windows.list | 48 cargo-mozilla-0.57.0/vendor/vcpkg/test-data/no-status/installed/vcpkg/info/boost-math_1.67.0_x64-windows.list | 398 cargo-mozilla-0.57.0/vendor/vcpkg/test-data/no-status/installed/vcpkg/info/boost-modular-build-helper_2018-05-14_x64-windows.list | 8 cargo-mozilla-0.57.0/vendor/vcpkg/test-data/no-status/installed/vcpkg/info/boost-move_1.67.0_x64-windows.list | 53 cargo-mozilla-0.57.0/vendor/vcpkg/test-data/no-status/installed/vcpkg/info/boost-mpl_1.67.0_x64-windows.list | 1093 cargo-mozilla-0.57.0/vendor/vcpkg/test-data/no-status/installed/vcpkg/info/boost-multi-index_1.67.0_x64-windows.list | 83 cargo-mozilla-0.57.0/vendor/vcpkg/test-data/no-status/installed/vcpkg/info/boost-multiprecision_1.67.0_x64-windows.list | 68 cargo-mozilla-0.57.0/vendor/vcpkg/test-data/no-status/installed/vcpkg/info/boost-numeric-conversion_1.67.0_x64-windows.list | 36 cargo-mozilla-0.57.0/vendor/vcpkg/test-data/no-status/installed/vcpkg/info/boost-optional_1.67.0_x64-windows.list | 24 cargo-mozilla-0.57.0/vendor/vcpkg/test-data/no-status/installed/vcpkg/info/boost-parameter_1.67.0_x64-windows.list | 41 cargo-mozilla-0.57.0/vendor/vcpkg/test-data/no-status/installed/vcpkg/info/boost-phoenix_1.67.0_x64-windows.list | 393 cargo-mozilla-0.57.0/vendor/vcpkg/test-data/no-status/installed/vcpkg/info/boost-polygon_1.67.0_x64-windows.list | 71 cargo-mozilla-0.57.0/vendor/vcpkg/test-data/no-status/installed/vcpkg/info/boost-pool_1.67.0_x64-windows.list | 25 cargo-mozilla-0.57.0/vendor/vcpkg/test-data/no-status/installed/vcpkg/info/boost-predef_1.67.0_x64-windows.list | 176 cargo-mozilla-0.57.0/vendor/vcpkg/test-data/no-status/installed/vcpkg/info/boost-preprocessor_1.67.0_x64-windows.list | 318 cargo-mozilla-0.57.0/vendor/vcpkg/test-data/no-status/installed/vcpkg/info/boost-property-map_1.67.0_x64-windows.list | 30 cargo-mozilla-0.57.0/vendor/vcpkg/test-data/no-status/installed/vcpkg/info/boost-property-tree_1.67.0_x64-windows.list | 44 cargo-mozilla-0.57.0/vendor/vcpkg/test-data/no-status/installed/vcpkg/info/boost-proto_1.67.0_x64-windows.list | 169 cargo-mozilla-0.57.0/vendor/vcpkg/test-data/no-status/installed/vcpkg/info/boost-qvm_1.67.0_x64-windows.list | 87 cargo-mozilla-0.57.0/vendor/vcpkg/test-data/no-status/installed/vcpkg/info/boost-random_1.67.0_x64-windows.list | 90 cargo-mozilla-0.57.0/vendor/vcpkg/test-data/no-status/installed/vcpkg/info/boost-range_1.67.0_x64-windows.list | 173 cargo-mozilla-0.57.0/vendor/vcpkg/test-data/no-status/installed/vcpkg/info/boost-ratio_1.67.0_x64-windows.list | 42 cargo-mozilla-0.57.0/vendor/vcpkg/test-data/no-status/installed/vcpkg/info/boost-rational_1.67.0_x64-windows.list | 7 cargo-mozilla-0.57.0/vendor/vcpkg/test-data/no-status/installed/vcpkg/info/boost-regex_1.67.0_x64-windows.list | 80 cargo-mozilla-0.57.0/vendor/vcpkg/test-data/no-status/installed/vcpkg/info/boost-serialization_1.67.0_x64-windows.list | 220 cargo-mozilla-0.57.0/vendor/vcpkg/test-data/no-status/installed/vcpkg/info/boost-smart-ptr_1.67.0_x64-windows.list | 103 cargo-mozilla-0.57.0/vendor/vcpkg/test-data/no-status/installed/vcpkg/info/boost-spirit_1.67.0_x64-windows.list | 1207 cargo-mozilla-0.57.0/vendor/vcpkg/test-data/no-status/installed/vcpkg/info/boost-static-assert_1.67.0_x64-windows.list | 7 cargo-mozilla-0.57.0/vendor/vcpkg/test-data/no-status/installed/vcpkg/info/boost-system_1.67.0_x64-windows.list | 29 cargo-mozilla-0.57.0/vendor/vcpkg/test-data/no-status/installed/vcpkg/info/boost-test_1.67.0-2_x64-windows.list | 195 cargo-mozilla-0.57.0/vendor/vcpkg/test-data/no-status/installed/vcpkg/info/boost-thread_1.67.0_x64-windows.list | 197 cargo-mozilla-0.57.0/vendor/vcpkg/test-data/no-status/installed/vcpkg/info/boost-throw-exception_1.67.0_x64-windows.list | 9 cargo-mozilla-0.57.0/vendor/vcpkg/test-data/no-status/installed/vcpkg/info/boost-timer_1.67.0_x64-windows.list | 22 cargo-mozilla-0.57.0/vendor/vcpkg/test-data/no-status/installed/vcpkg/info/boost-tokenizer_1.67.0_x64-windows.list | 9 cargo-mozilla-0.57.0/vendor/vcpkg/test-data/no-status/installed/vcpkg/info/boost-tti_1.67.0_x64-windows.list | 51 cargo-mozilla-0.57.0/vendor/vcpkg/test-data/no-status/installed/vcpkg/info/boost-tuple_1.67.0_x64-windows.list | 12 cargo-mozilla-0.57.0/vendor/vcpkg/test-data/no-status/installed/vcpkg/info/boost-type-index_1.67.0_x64-windows.list | 24 cargo-mozilla-0.57.0/vendor/vcpkg/test-data/no-status/installed/vcpkg/info/boost-type-traits_1.67.0_x64-windows.list | 190 cargo-mozilla-0.57.0/vendor/vcpkg/test-data/no-status/installed/vcpkg/info/boost-typeof_1.67.0_x64-windows.list | 60 cargo-mozilla-0.57.0/vendor/vcpkg/test-data/no-status/installed/vcpkg/info/boost-unordered_1.67.0_x64-windows.list | 18 cargo-mozilla-0.57.0/vendor/vcpkg/test-data/no-status/installed/vcpkg/info/boost-utility_1.67.0_x64-windows.list | 33 cargo-mozilla-0.57.0/vendor/vcpkg/test-data/no-status/installed/vcpkg/info/boost-variant_1.67.0_x64-windows.list | 45 cargo-mozilla-0.57.0/vendor/vcpkg/test-data/no-status/installed/vcpkg/info/boost-vcpkg-helpers_4_x64-windows.list | 4 cargo-mozilla-0.57.0/vendor/vcpkg/test-data/no-status/installed/vcpkg/info/boost-winapi_1.67.0_x64-windows.list | 126 cargo-mozilla-0.57.0/vendor/vcpkg/test-data/no-status/installed/vcpkg/info/boost-xpressive_1.67.0_x64-windows.list | 141 cargo-mozilla-0.57.0/vendor/vcpkg/test-data/no-status/installed/vcpkg/info/bzip2_1.0.6-2_x64-windows.list | 21 cargo-mozilla-0.57.0/vendor/vcpkg/test-data/no-status/installed/vcpkg/info/icu_61.1-1_x64-windows.list | 217 cargo-mozilla-0.57.0/vendor/vcpkg/test-data/no-status/installed/vcpkg/info/libevent_2.1.8-3_x64-windows.list | 51 cargo-mozilla-0.57.0/vendor/vcpkg/test-data/no-status/installed/vcpkg/info/liblzma_5.2.3-2_x64-windows.list | 33 cargo-mozilla-0.57.0/vendor/vcpkg/test-data/no-status/installed/vcpkg/info/libmysql_8.0.4-2_x64-windows.list | 31 cargo-mozilla-0.57.0/vendor/vcpkg/test-data/no-status/installed/vcpkg/info/lz4_1.8.2_x64-windows.list | 19 cargo-mozilla-0.57.0/vendor/vcpkg/test-data/no-status/installed/vcpkg/info/openssl_1.0.2o-3_x64-windows.list | 105 cargo-mozilla-0.57.0/vendor/vcpkg/test-data/no-status/installed/vcpkg/info/zlib_1.2.11-3_x64-windows.list | 19 cargo-mozilla-0.57.0/vendor/vcpkg/test-data/no-status/installed/vcpkg/updates/0000000000 | 6 cargo-mozilla-0.57.0/vendor/vcpkg/test-data/no-status/installed/vcpkg/updates/0000000001 | 6 cargo-mozilla-0.57.0/vendor/vcpkg/test-data/no-status/installed/vcpkg/updates/0000000002 | 7 cargo-mozilla-0.57.0/vendor/vcpkg/test-data/no-status/installed/vcpkg/updates/0000000003 | 7 cargo-mozilla-0.57.0/vendor/vcpkg/test-data/no-status/installed/vcpkg/updates/0000000004 | 7 cargo-mozilla-0.57.0/vendor/vcpkg/test-data/no-status/installed/vcpkg/updates/0000000005 | 7 cargo-mozilla-0.57.0/vendor/vcpkg/test-data/no-status/installed/vcpkg/updates/0000000006 | 7 cargo-mozilla-0.57.0/vendor/vcpkg/test-data/no-status/installed/vcpkg/updates/0000000007 | 7 cargo-mozilla-0.57.0/vendor/vcpkg/test-data/no-status/installed/vcpkg/updates/0000000008 | 5 cargo-mozilla-0.57.0/vendor/vcpkg/test-data/no-status/installed/vcpkg/updates/0000000009 | 5 cargo-mozilla-0.57.0/vendor/vcpkg/test-data/no-status/installed/vcpkg/updates/0000000010 | 7 cargo-mozilla-0.57.0/vendor/vcpkg/test-data/no-status/installed/vcpkg/updates/0000000011 | 7 cargo-mozilla-0.57.0/vendor/vcpkg/test-data/no-status/installed/vcpkg/updates/0000000012 | 7 cargo-mozilla-0.57.0/vendor/vcpkg/test-data/no-status/installed/vcpkg/updates/0000000013 | 7 cargo-mozilla-0.57.0/vendor/vcpkg/test-data/no-status/installed/vcpkg/updates/0000000014 | 7 cargo-mozilla-0.57.0/vendor/vcpkg/test-data/no-status/installed/vcpkg/updates/0000000015 | 7 cargo-mozilla-0.57.0/vendor/vcpkg/test-data/no-status/installed/vcpkg/updates/0000000016 | 7 cargo-mozilla-0.57.0/vendor/vcpkg/test-data/no-status/installed/vcpkg/updates/0000000017 | 7 cargo-mozilla-0.57.0/vendor/vcpkg/test-data/no-status/installed/vcpkg/updates/0000000018 | 7 cargo-mozilla-0.57.0/vendor/vcpkg/test-data/no-status/installed/vcpkg/updates/0000000019 | 7 cargo-mozilla-0.57.0/vendor/vcpkg/test-data/no-status/installed/vcpkg/updates/0000000020 | 7 cargo-mozilla-0.57.0/vendor/vcpkg/test-data/no-status/installed/vcpkg/updates/0000000021 | 7 cargo-mozilla-0.57.0/vendor/vcpkg/test-data/no-status/installed/vcpkg/updates/0000000022 | 7 cargo-mozilla-0.57.0/vendor/vcpkg/test-data/no-status/installed/vcpkg/updates/0000000023 | 7 cargo-mozilla-0.57.0/vendor/vcpkg/test-data/no-status/installed/vcpkg/updates/0000000024 | 7 cargo-mozilla-0.57.0/vendor/vcpkg/test-data/no-status/installed/vcpkg/updates/0000000025 | 7 cargo-mozilla-0.57.0/vendor/vcpkg/test-data/no-status/installed/vcpkg/updates/0000000026 | 7 cargo-mozilla-0.57.0/vendor/vcpkg/test-data/no-status/installed/vcpkg/updates/0000000027 | 7 cargo-mozilla-0.57.0/vendor/vcpkg/test-data/no-status/installed/vcpkg/updates/0000000028 | 7 cargo-mozilla-0.57.0/vendor/vcpkg/test-data/no-status/installed/vcpkg/updates/0000000029 | 7 cargo-mozilla-0.57.0/vendor/vcpkg/test-data/no-status/installed/vcpkg/updates/0000000030 | 6 cargo-mozilla-0.57.0/vendor/vcpkg/test-data/no-status/installed/vcpkg/updates/0000000031 | 6 cargo-mozilla-0.57.0/vendor/vcpkg/test-data/no-status/installed/vcpkg/updates/0000000032 | 7 cargo-mozilla-0.57.0/vendor/vcpkg/test-data/no-status/installed/vcpkg/updates/0000000033 | 7 cargo-mozilla-0.57.0/vendor/vcpkg/test-data/no-status/installed/vcpkg/updates/0000000034 | 7 cargo-mozilla-0.57.0/vendor/vcpkg/test-data/no-status/installed/vcpkg/updates/0000000035 | 7 cargo-mozilla-0.57.0/vendor/vcpkg/test-data/no-status/installed/vcpkg/updates/0000000036 | 6 cargo-mozilla-0.57.0/vendor/vcpkg/test-data/no-status/installed/vcpkg/updates/0000000037 | 6 cargo-mozilla-0.57.0/vendor/vcpkg/test-data/no-status/installed/vcpkg/updates/0000000038 | 7 cargo-mozilla-0.57.0/vendor/vcpkg/test-data/no-status/installed/vcpkg/updates/0000000039 | 7 cargo-mozilla-0.57.0/vendor/vcpkg/test-data/no-status/installed/vcpkg/updates/0000000040 | 7 cargo-mozilla-0.57.0/vendor/vcpkg/test-data/no-status/installed/vcpkg/updates/0000000041 | 7 cargo-mozilla-0.57.0/vendor/vcpkg/test-data/no-status/installed/vcpkg/updates/0000000042 | 7 cargo-mozilla-0.57.0/vendor/vcpkg/test-data/no-status/installed/vcpkg/updates/0000000043 | 7 cargo-mozilla-0.57.0/vendor/vcpkg/test-data/no-status/installed/vcpkg/updates/0000000044 | 7 cargo-mozilla-0.57.0/vendor/vcpkg/test-data/no-status/installed/vcpkg/updates/0000000045 | 7 cargo-mozilla-0.57.0/vendor/vcpkg/test-data/no-status/installed/vcpkg/updates/0000000046 | 7 cargo-mozilla-0.57.0/vendor/vcpkg/test-data/no-status/installed/vcpkg/updates/0000000047 | 7 cargo-mozilla-0.57.0/vendor/vcpkg/test-data/no-status/installed/vcpkg/updates/0000000048 | 7 cargo-mozilla-0.57.0/vendor/vcpkg/test-data/no-status/installed/vcpkg/updates/0000000049 | 7 cargo-mozilla-0.57.0/vendor/vcpkg/test-data/no-status/installed/vcpkg/updates/0000000050 | 7 cargo-mozilla-0.57.0/vendor/vcpkg/test-data/no-status/installed/vcpkg/updates/0000000051 | 7 cargo-mozilla-0.57.0/vendor/vcpkg/test-data/no-status/installed/vcpkg/updates/0000000052 | 7 cargo-mozilla-0.57.0/vendor/vcpkg/test-data/no-status/installed/vcpkg/updates/0000000053 | 7 cargo-mozilla-0.57.0/vendor/vcpkg/test-data/no-status/installed/vcpkg/updates/0000000054 | 7 cargo-mozilla-0.57.0/vendor/vcpkg/test-data/no-status/installed/vcpkg/updates/0000000055 | 7 cargo-mozilla-0.57.0/vendor/vcpkg/test-data/no-status/installed/vcpkg/updates/0000000056 | 7 cargo-mozilla-0.57.0/vendor/vcpkg/test-data/no-status/installed/vcpkg/updates/0000000057 | 7 cargo-mozilla-0.57.0/vendor/vcpkg/test-data/no-status/installed/vcpkg/updates/0000000058 | 7 cargo-mozilla-0.57.0/vendor/vcpkg/test-data/no-status/installed/vcpkg/updates/0000000059 | 7 cargo-mozilla-0.57.0/vendor/vcpkg/test-data/no-status/installed/vcpkg/updates/0000000060 | 7 cargo-mozilla-0.57.0/vendor/vcpkg/test-data/no-status/installed/vcpkg/updates/0000000061 | 7 cargo-mozilla-0.57.0/vendor/vcpkg/test-data/no-status/installed/vcpkg/updates/0000000062 | 7 cargo-mozilla-0.57.0/vendor/vcpkg/test-data/no-status/installed/vcpkg/updates/0000000063 | 7 cargo-mozilla-0.57.0/vendor/vcpkg/test-data/no-status/installed/vcpkg/updates/0000000064 | 7 cargo-mozilla-0.57.0/vendor/vcpkg/test-data/no-status/installed/vcpkg/updates/0000000065 | 7 cargo-mozilla-0.57.0/vendor/vcpkg/test-data/no-status/installed/vcpkg/updates/0000000066 | 7 cargo-mozilla-0.57.0/vendor/vcpkg/test-data/no-status/installed/vcpkg/updates/0000000067 | 7 cargo-mozilla-0.57.0/vendor/vcpkg/test-data/no-status/installed/vcpkg/updates/0000000068 | 7 cargo-mozilla-0.57.0/vendor/vcpkg/test-data/no-status/installed/vcpkg/updates/0000000069 | 7 cargo-mozilla-0.57.0/vendor/vcpkg/test-data/no-status/installed/vcpkg/updates/0000000070 | 7 cargo-mozilla-0.57.0/vendor/vcpkg/test-data/no-status/installed/vcpkg/updates/0000000071 | 7 cargo-mozilla-0.57.0/vendor/vcpkg/test-data/no-status/installed/vcpkg/updates/0000000072 | 7 cargo-mozilla-0.57.0/vendor/vcpkg/test-data/no-status/installed/vcpkg/updates/0000000073 | 7 cargo-mozilla-0.57.0/vendor/vcpkg/test-data/no-status/installed/vcpkg/updates/0000000074 | 7 cargo-mozilla-0.57.0/vendor/vcpkg/test-data/no-status/installed/vcpkg/updates/0000000075 | 7 cargo-mozilla-0.57.0/vendor/vcpkg/test-data/no-status/installed/vcpkg/updates/0000000076 | 7 cargo-mozilla-0.57.0/vendor/vcpkg/test-data/no-status/installed/vcpkg/updates/0000000077 | 7 cargo-mozilla-0.57.0/vendor/vcpkg/test-data/no-status/installed/vcpkg/updates/0000000078 | 7 cargo-mozilla-0.57.0/vendor/vcpkg/test-data/no-status/installed/vcpkg/updates/0000000079 | 7 cargo-mozilla-0.57.0/vendor/vcpkg/test-data/no-status/installed/vcpkg/updates/0000000080 | 7 cargo-mozilla-0.57.0/vendor/vcpkg/test-data/no-status/installed/vcpkg/updates/0000000081 | 7 cargo-mozilla-0.57.0/vendor/vcpkg/test-data/no-status/installed/vcpkg/updates/0000000082 | 6 cargo-mozilla-0.57.0/vendor/vcpkg/test-data/no-status/installed/vcpkg/updates/0000000083 | 6 cargo-mozilla-0.57.0/vendor/vcpkg/test-data/no-status/installed/vcpkg/updates/0000000084 | 7 cargo-mozilla-0.57.0/vendor/vcpkg/test-data/no-status/installed/vcpkg/updates/0000000085 | 7 cargo-mozilla-0.57.0/vendor/vcpkg/test-data/no-status/installed/vcpkg/updates/0000000086 | 7 cargo-mozilla-0.57.0/vendor/vcpkg/test-data/no-status/installed/vcpkg/updates/0000000087 | 7 cargo-mozilla-0.57.0/vendor/vcpkg/test-data/no-status/installed/vcpkg/updates/0000000088 | 7 cargo-mozilla-0.57.0/vendor/vcpkg/test-data/no-status/installed/vcpkg/updates/0000000089 | 7 cargo-mozilla-0.57.0/vendor/vcpkg/test-data/no-status/installed/vcpkg/updates/0000000090 | 7 cargo-mozilla-0.57.0/vendor/vcpkg/test-data/no-status/installed/vcpkg/updates/0000000091 | 7 cargo-mozilla-0.57.0/vendor/vcpkg/test-data/no-status/installed/vcpkg/updates/0000000092 | 7 cargo-mozilla-0.57.0/vendor/vcpkg/test-data/no-status/installed/vcpkg/updates/0000000093 | 7 cargo-mozilla-0.57.0/vendor/vcpkg/test-data/no-status/installed/vcpkg/updates/0000000094 | 7 cargo-mozilla-0.57.0/vendor/vcpkg/test-data/no-status/installed/vcpkg/updates/0000000095 | 7 cargo-mozilla-0.57.0/vendor/vcpkg/test-data/no-status/installed/vcpkg/updates/0000000096 | 7 cargo-mozilla-0.57.0/vendor/vcpkg/test-data/no-status/installed/vcpkg/updates/0000000097 | 7 cargo-mozilla-0.57.0/vendor/vcpkg/test-data/no-status/installed/vcpkg/updates/0000000098 | 7 cargo-mozilla-0.57.0/vendor/vcpkg/test-data/no-status/installed/vcpkg/updates/0000000099 | 7 cargo-mozilla-0.57.0/vendor/vcpkg/test-data/no-status/installed/vcpkg/updates/0000000100 | 7 cargo-mozilla-0.57.0/vendor/vcpkg/test-data/no-status/installed/vcpkg/updates/0000000101 | 7 cargo-mozilla-0.57.0/vendor/vcpkg/test-data/no-status/installed/vcpkg/updates/0000000102 | 7 cargo-mozilla-0.57.0/vendor/vcpkg/test-data/no-status/installed/vcpkg/updates/0000000103 | 7 cargo-mozilla-0.57.0/vendor/vcpkg/test-data/no-status/installed/vcpkg/updates/0000000104 | 7 cargo-mozilla-0.57.0/vendor/vcpkg/test-data/no-status/installed/vcpkg/updates/0000000105 | 7 cargo-mozilla-0.57.0/vendor/vcpkg/test-data/no-status/installed/vcpkg/updates/0000000106 | 7 cargo-mozilla-0.57.0/vendor/vcpkg/test-data/no-status/installed/vcpkg/updates/0000000107 | 7 cargo-mozilla-0.57.0/vendor/vcpkg/test-data/no-status/installed/vcpkg/updates/0000000108 | 6 cargo-mozilla-0.57.0/vendor/vcpkg/test-data/no-status/installed/vcpkg/updates/0000000109 | 6 cargo-mozilla-0.57.0/vendor/vcpkg/test-data/no-status/installed/vcpkg/updates/0000000110 | 6 cargo-mozilla-0.57.0/vendor/vcpkg/test-data/no-status/installed/vcpkg/updates/0000000111 | 6 cargo-mozilla-0.57.0/vendor/vcpkg/test-data/no-status/installed/vcpkg/updates/0000000112 | 7 cargo-mozilla-0.57.0/vendor/vcpkg/test-data/no-status/installed/vcpkg/updates/0000000113 | 7 cargo-mozilla-0.57.0/vendor/vcpkg/test-data/no-status/installed/vcpkg/updates/0000000114 | 7 cargo-mozilla-0.57.0/vendor/vcpkg/test-data/no-status/installed/vcpkg/updates/0000000115 | 7 cargo-mozilla-0.57.0/vendor/vcpkg/test-data/no-status/installed/vcpkg/updates/0000000116 | 7 cargo-mozilla-0.57.0/vendor/vcpkg/test-data/no-status/installed/vcpkg/updates/0000000117 | 7 cargo-mozilla-0.57.0/vendor/vcpkg/test-data/no-status/installed/vcpkg/updates/0000000118 | 7 cargo-mozilla-0.57.0/vendor/vcpkg/test-data/no-status/installed/vcpkg/updates/0000000119 | 7 cargo-mozilla-0.57.0/vendor/vcpkg/test-data/no-status/installed/vcpkg/updates/0000000120 | 7 cargo-mozilla-0.57.0/vendor/vcpkg/test-data/no-status/installed/vcpkg/updates/0000000121 | 7 cargo-mozilla-0.57.0/vendor/vcpkg/test-data/no-status/installed/vcpkg/updates/0000000122 | 7 cargo-mozilla-0.57.0/vendor/vcpkg/test-data/no-status/installed/vcpkg/updates/0000000123 | 7 cargo-mozilla-0.57.0/vendor/vcpkg/test-data/no-status/installed/vcpkg/updates/0000000124 | 7 cargo-mozilla-0.57.0/vendor/vcpkg/test-data/no-status/installed/vcpkg/updates/0000000125 | 7 cargo-mozilla-0.57.0/vendor/vcpkg/test-data/no-status/installed/vcpkg/updates/0000000126 | 7 cargo-mozilla-0.57.0/vendor/vcpkg/test-data/no-status/installed/vcpkg/updates/0000000127 | 7 cargo-mozilla-0.57.0/vendor/vcpkg/test-data/no-status/installed/vcpkg/updates/0000000128 | 7 cargo-mozilla-0.57.0/vendor/vcpkg/test-data/no-status/installed/vcpkg/updates/0000000129 | 7 cargo-mozilla-0.57.0/vendor/vcpkg/test-data/no-status/installed/vcpkg/updates/0000000130 | 7 cargo-mozilla-0.57.0/vendor/vcpkg/test-data/no-status/installed/vcpkg/updates/0000000131 | 7 cargo-mozilla-0.57.0/vendor/vcpkg/test-data/no-status/installed/vcpkg/updates/0000000132 | 7 cargo-mozilla-0.57.0/vendor/vcpkg/test-data/no-status/installed/vcpkg/updates/0000000133 | 7 cargo-mozilla-0.57.0/vendor/vcpkg/test-data/no-status/installed/vcpkg/updates/0000000134 | 7 cargo-mozilla-0.57.0/vendor/vcpkg/test-data/no-status/installed/vcpkg/updates/0000000135 | 7 cargo-mozilla-0.57.0/vendor/vcpkg/test-data/no-status/installed/vcpkg/updates/0000000136 | 7 cargo-mozilla-0.57.0/vendor/vcpkg/test-data/no-status/installed/vcpkg/updates/0000000137 | 7 cargo-mozilla-0.57.0/vendor/vcpkg/test-data/no-status/installed/vcpkg/updates/0000000138 | 7 cargo-mozilla-0.57.0/vendor/vcpkg/test-data/no-status/installed/vcpkg/updates/0000000139 | 7 cargo-mozilla-0.57.0/vendor/vcpkg/test-data/no-status/installed/vcpkg/updates/0000000140 | 7 cargo-mozilla-0.57.0/vendor/vcpkg/test-data/no-status/installed/vcpkg/updates/0000000141 | 7 cargo-mozilla-0.57.0/vendor/vcpkg/test-data/no-status/installed/vcpkg/updates/0000000142 | 7 cargo-mozilla-0.57.0/vendor/vcpkg/test-data/no-status/installed/vcpkg/updates/0000000143 | 7 cargo-mozilla-0.57.0/vendor/vcpkg/test-data/no-status/installed/vcpkg/updates/0000000144 | 7 cargo-mozilla-0.57.0/vendor/vcpkg/test-data/no-status/installed/vcpkg/updates/0000000145 | 7 cargo-mozilla-0.57.0/vendor/vcpkg/test-data/no-status/installed/vcpkg/updates/0000000146 | 6 cargo-mozilla-0.57.0/vendor/vcpkg/test-data/no-status/installed/vcpkg/updates/0000000147 | 6 cargo-mozilla-0.57.0/vendor/vcpkg/test-data/no-status/installed/vcpkg/updates/0000000148 | 7 cargo-mozilla-0.57.0/vendor/vcpkg/test-data/no-status/installed/vcpkg/updates/0000000149 | 7 cargo-mozilla-0.57.0/vendor/vcpkg/test-data/no-status/installed/vcpkg/updates/0000000150 | 7 cargo-mozilla-0.57.0/vendor/vcpkg/test-data/no-status/installed/vcpkg/updates/0000000151 | 7 cargo-mozilla-0.57.0/vendor/vcpkg/test-data/no-status/installed/vcpkg/updates/0000000152 | 7 cargo-mozilla-0.57.0/vendor/vcpkg/test-data/no-status/installed/vcpkg/updates/0000000153 | 7 cargo-mozilla-0.57.0/vendor/vcpkg/test-data/no-status/installed/vcpkg/updates/0000000154 | 7 cargo-mozilla-0.57.0/vendor/vcpkg/test-data/no-status/installed/vcpkg/updates/0000000155 | 7 cargo-mozilla-0.57.0/vendor/vcpkg/test-data/no-status/installed/vcpkg/updates/0000000156 | 7 cargo-mozilla-0.57.0/vendor/vcpkg/test-data/no-status/installed/vcpkg/updates/0000000157 | 7 cargo-mozilla-0.57.0/vendor/vcpkg/test-data/no-status/installed/vcpkg/updates/0000000158 | 7 cargo-mozilla-0.57.0/vendor/vcpkg/test-data/no-status/installed/vcpkg/updates/0000000159 | 7 cargo-mozilla-0.57.0/vendor/vcpkg/test-data/no-status/installed/vcpkg/updates/0000000160 | 7 cargo-mozilla-0.57.0/vendor/vcpkg/test-data/no-status/installed/vcpkg/updates/0000000161 | 7 cargo-mozilla-0.57.0/vendor/vcpkg/test-data/no-status/installed/vcpkg/updates/0000000162 | 7 cargo-mozilla-0.57.0/vendor/vcpkg/test-data/no-status/installed/vcpkg/updates/0000000163 | 7 cargo-mozilla-0.57.0/vendor/vcpkg/test-data/no-status/installed/vcpkg/updates/0000000164 | 7 cargo-mozilla-0.57.0/vendor/vcpkg/test-data/no-status/installed/vcpkg/updates/0000000165 | 7 cargo-mozilla-0.57.0/vendor/vcpkg/test-data/no-status/installed/vcpkg/updates/0000000166 | 7 cargo-mozilla-0.57.0/vendor/vcpkg/test-data/no-status/installed/vcpkg/updates/0000000167 | 7 cargo-mozilla-0.57.0/vendor/vcpkg/test-data/no-status/installed/vcpkg/updates/0000000168 | 7 cargo-mozilla-0.57.0/vendor/vcpkg/test-data/no-status/installed/vcpkg/updates/0000000169 | 7 cargo-mozilla-0.57.0/vendor/vcpkg/test-data/no-status/installed/vcpkg/updates/0000000170 | 7 cargo-mozilla-0.57.0/vendor/vcpkg/test-data/no-status/installed/vcpkg/updates/0000000171 | 7 cargo-mozilla-0.57.0/vendor/vcpkg/test-data/no-status/installed/vcpkg/updates/0000000172 | 7 cargo-mozilla-0.57.0/vendor/vcpkg/test-data/no-status/installed/vcpkg/updates/0000000173 | 7 cargo-mozilla-0.57.0/vendor/vcpkg/test-data/no-status/installed/vcpkg/updates/0000000174 | 6 cargo-mozilla-0.57.0/vendor/vcpkg/test-data/no-status/installed/vcpkg/updates/0000000175 | 6 cargo-mozilla-0.57.0/vendor/vcpkg/test-data/no-status/installed/vcpkg/updates/0000000176 | 7 cargo-mozilla-0.57.0/vendor/vcpkg/test-data/no-status/installed/vcpkg/updates/0000000177 | 7 cargo-mozilla-0.57.0/vendor/vcpkg/test-data/normalized/installed/vcpkg/info/boost-algorithm_1.67.0_x64-windows-static.list | 98 cargo-mozilla-0.57.0/vendor/vcpkg/test-data/normalized/installed/vcpkg/info/boost-algorithm_1.67.0_x64-windows.list | 98 cargo-mozilla-0.57.0/vendor/vcpkg/test-data/normalized/installed/vcpkg/info/boost-any_1.67.0_x64-windows-static.list | 7 cargo-mozilla-0.57.0/vendor/vcpkg/test-data/normalized/installed/vcpkg/info/boost-any_1.67.0_x64-windows.list | 7 cargo-mozilla-0.57.0/vendor/vcpkg/test-data/normalized/installed/vcpkg/info/boost-array_1.67.0_x64-windows-static.list | 7 cargo-mozilla-0.57.0/vendor/vcpkg/test-data/normalized/installed/vcpkg/info/boost-array_1.67.0_x64-windows.list | 7 cargo-mozilla-0.57.0/vendor/vcpkg/test-data/normalized/installed/vcpkg/info/boost-assert_1.67.0_x64-windows-static.list | 8 cargo-mozilla-0.57.0/vendor/vcpkg/test-data/normalized/installed/vcpkg/info/boost-assert_1.67.0_x64-windows.list | 8 cargo-mozilla-0.57.0/vendor/vcpkg/test-data/normalized/installed/vcpkg/info/boost-atomic_1.67.0_x64-windows-static.list | 98 cargo-mozilla-0.57.0/vendor/vcpkg/test-data/normalized/installed/vcpkg/info/boost-atomic_1.67.0_x64-windows.list | 104 cargo-mozilla-0.57.0/vendor/vcpkg/test-data/normalized/installed/vcpkg/info/boost-bimap_1.67.0_x64-windows-static.list | 119 cargo-mozilla-0.57.0/vendor/vcpkg/test-data/normalized/installed/vcpkg/info/boost-bimap_1.67.0_x64-windows.list | 119 cargo-mozilla-0.57.0/vendor/vcpkg/test-data/normalized/installed/vcpkg/info/boost-bind_1.67.0_x64-windows-static.list | 25 cargo-mozilla-0.57.0/vendor/vcpkg/test-data/normalized/installed/vcpkg/info/boost-bind_1.67.0_x64-windows.list | 25 cargo-mozilla-0.57.0/vendor/vcpkg/test-data/normalized/installed/vcpkg/info/boost-build_1.67.0_x64-windows-static.list | 1389 cargo-mozilla-0.57.0/vendor/vcpkg/test-data/normalized/installed/vcpkg/info/boost-build_1.67.0_x64-windows.list | 1389 cargo-mozilla-0.57.0/vendor/vcpkg/test-data/normalized/installed/vcpkg/info/boost-chrono_1.67.0_x64-windows-static.list | 72 cargo-mozilla-0.57.0/vendor/vcpkg/test-data/normalized/installed/vcpkg/info/boost-chrono_1.67.0_x64-windows.list | 78 cargo-mozilla-0.57.0/vendor/vcpkg/test-data/normalized/installed/vcpkg/info/boost-compatibility_1.67.0_x64-windows-static.list | 25 cargo-mozilla-0.57.0/vendor/vcpkg/test-data/normalized/installed/vcpkg/info/boost-compatibility_1.67.0_x64-windows.list | 25 cargo-mozilla-0.57.0/vendor/vcpkg/test-data/normalized/installed/vcpkg/info/boost-concept-check_1.67.0_x64-windows-static.list | 25 cargo-mozilla-0.57.0/vendor/vcpkg/test-data/normalized/installed/vcpkg/info/boost-concept-check_1.67.0_x64-windows.list | 25 cargo-mozilla-0.57.0/vendor/vcpkg/test-data/normalized/installed/vcpkg/info/boost-config_1.67.0_x64-windows-static.list | 115 cargo-mozilla-0.57.0/vendor/vcpkg/test-data/normalized/installed/vcpkg/info/boost-config_1.67.0_x64-windows.list | 115 cargo-mozilla-0.57.0/vendor/vcpkg/test-data/normalized/installed/vcpkg/info/boost-container-hash_1.67.0_x64-windows-static.list | 21 cargo-mozilla-0.57.0/vendor/vcpkg/test-data/normalized/installed/vcpkg/info/boost-container-hash_1.67.0_x64-windows.list | 21 cargo-mozilla-0.57.0/vendor/vcpkg/test-data/normalized/installed/vcpkg/info/boost-container_1.67.0_x64-windows-static.list | 114 cargo-mozilla-0.57.0/vendor/vcpkg/test-data/normalized/installed/vcpkg/info/boost-container_1.67.0_x64-windows.list | 120 cargo-mozilla-0.57.0/vendor/vcpkg/test-data/normalized/installed/vcpkg/info/boost-conversion_1.67.0_x64-windows-static.list | 9 cargo-mozilla-0.57.0/vendor/vcpkg/test-data/normalized/installed/vcpkg/info/boost-conversion_1.67.0_x64-windows.list | 9 cargo-mozilla-0.57.0/vendor/vcpkg/test-data/normalized/installed/vcpkg/info/boost-core_1.67.0_x64-windows-static.list | 45 cargo-mozilla-0.57.0/vendor/vcpkg/test-data/normalized/installed/vcpkg/info/boost-core_1.67.0_x64-windows.list | 45 cargo-mozilla-0.57.0/vendor/vcpkg/test-data/normalized/installed/vcpkg/info/boost-date-time_1.67.0_x64-windows-static.list | 119 cargo-mozilla-0.57.0/vendor/vcpkg/test-data/normalized/installed/vcpkg/info/boost-date-time_1.67.0_x64-windows.list | 125 cargo-mozilla-0.57.0/vendor/vcpkg/test-data/normalized/installed/vcpkg/info/boost-detail_1.67.0_x64-windows-static.list | 31 cargo-mozilla-0.57.0/vendor/vcpkg/test-data/normalized/installed/vcpkg/info/boost-detail_1.67.0_x64-windows.list | 31 cargo-mozilla-0.57.0/vendor/vcpkg/test-data/normalized/installed/vcpkg/info/boost-endian_1.67.0_x64-windows-static.list | 19 cargo-mozilla-0.57.0/vendor/vcpkg/test-data/normalized/installed/vcpkg/info/boost-endian_1.67.0_x64-windows.list | 19 cargo-mozilla-0.57.0/vendor/vcpkg/test-data/normalized/installed/vcpkg/info/boost-exception_1.67.0_x64-windows-static.list | 40 cargo-mozilla-0.57.0/vendor/vcpkg/test-data/normalized/installed/vcpkg/info/boost-exception_1.67.0_x64-windows.list | 40 cargo-mozilla-0.57.0/vendor/vcpkg/test-data/normalized/installed/vcpkg/info/boost-filesystem_1.67.0_x64-windows-static.list | 24 cargo-mozilla-0.57.0/vendor/vcpkg/test-data/normalized/installed/vcpkg/info/boost-filesystem_1.67.0_x64-windows.list | 30 cargo-mozilla-0.57.0/vendor/vcpkg/test-data/normalized/installed/vcpkg/info/boost-foreach_1.67.0_x64-windows-static.list | 8 cargo-mozilla-0.57.0/vendor/vcpkg/test-data/normalized/installed/vcpkg/info/boost-foreach_1.67.0_x64-windows.list | 8 cargo-mozilla-0.57.0/vendor/vcpkg/test-data/normalized/installed/vcpkg/info/boost-format_1.67.0_x64-windows-static.list | 27 cargo-mozilla-0.57.0/vendor/vcpkg/test-data/normalized/installed/vcpkg/info/boost-format_1.67.0_x64-windows.list | 27 cargo-mozilla-0.57.0/vendor/vcpkg/test-data/normalized/installed/vcpkg/info/boost-function-types_1.67.0_x64-windows-static.list | 93 cargo-mozilla-0.57.0/vendor/vcpkg/test-data/normalized/installed/vcpkg/info/boost-function-types_1.67.0_x64-windows.list | 93 cargo-mozilla-0.57.0/vendor/vcpkg/test-data/normalized/installed/vcpkg/info/boost-function_1.67.0_x64-windows-static.list | 30 cargo-mozilla-0.57.0/vendor/vcpkg/test-data/normalized/installed/vcpkg/info/boost-function_1.67.0_x64-windows.list | 30 cargo-mozilla-0.57.0/vendor/vcpkg/test-data/normalized/installed/vcpkg/info/boost-functional_1.67.0_x64-windows-static.list | 18 cargo-mozilla-0.57.0/vendor/vcpkg/test-data/normalized/installed/vcpkg/info/boost-functional_1.67.0_x64-windows.list | 18 cargo-mozilla-0.57.0/vendor/vcpkg/test-data/normalized/installed/vcpkg/info/boost-fusion_1.67.0_x64-windows-static.list | 1125 cargo-mozilla-0.57.0/vendor/vcpkg/test-data/normalized/installed/vcpkg/info/boost-fusion_1.67.0_x64-windows.list | 1125 cargo-mozilla-0.57.0/vendor/vcpkg/test-data/normalized/installed/vcpkg/info/boost-geometry_1.67.0_x64-windows-static.list | 986 cargo-mozilla-0.57.0/vendor/vcpkg/test-data/normalized/installed/vcpkg/info/boost-geometry_1.67.0_x64-windows.list | 986 cargo-mozilla-0.57.0/vendor/vcpkg/test-data/normalized/installed/vcpkg/info/boost-graph_1.67.0_x64-windows-static.list | 210 cargo-mozilla-0.57.0/vendor/vcpkg/test-data/normalized/installed/vcpkg/info/boost-graph_1.67.0_x64-windows.list | 216 cargo-mozilla-0.57.0/vendor/vcpkg/test-data/normalized/installed/vcpkg/info/boost-integer_1.67.0_x64-windows-static.list | 19 cargo-mozilla-0.57.0/vendor/vcpkg/test-data/normalized/installed/vcpkg/info/boost-integer_1.67.0_x64-windows.list | 19 cargo-mozilla-0.57.0/vendor/vcpkg/test-data/normalized/installed/vcpkg/info/boost-intrusive_1.67.0_x64-windows-static.list | 100 cargo-mozilla-0.57.0/vendor/vcpkg/test-data/normalized/installed/vcpkg/info/boost-intrusive_1.67.0_x64-windows.list | 100 cargo-mozilla-0.57.0/vendor/vcpkg/test-data/normalized/installed/vcpkg/info/boost-io_1.67.0_x64-windows-static.list | 11 cargo-mozilla-0.57.0/vendor/vcpkg/test-data/normalized/installed/vcpkg/info/boost-io_1.67.0_x64-windows.list | 11 cargo-mozilla-0.57.0/vendor/vcpkg/test-data/normalized/installed/vcpkg/info/boost-iostreams_1.67.0-1_x64-windows-static.list | 145 cargo-mozilla-0.57.0/vendor/vcpkg/test-data/normalized/installed/vcpkg/info/boost-iostreams_1.67.0-1_x64-windows.list | 151 cargo-mozilla-0.57.0/vendor/vcpkg/test-data/normalized/installed/vcpkg/info/boost-iterator_1.67.0_x64-windows-static.list | 48 cargo-mozilla-0.57.0/vendor/vcpkg/test-data/normalized/installed/vcpkg/info/boost-iterator_1.67.0_x64-windows.list | 48 cargo-mozilla-0.57.0/vendor/vcpkg/test-data/normalized/installed/vcpkg/info/boost-lambda_1.67.0_x64-windows-static.list | 41 cargo-mozilla-0.57.0/vendor/vcpkg/test-data/normalized/installed/vcpkg/info/boost-lambda_1.67.0_x64-windows.list | 41 cargo-mozilla-0.57.0/vendor/vcpkg/test-data/normalized/installed/vcpkg/info/boost-lexical-cast_1.67.0_x64-windows-static.list | 23 cargo-mozilla-0.57.0/vendor/vcpkg/test-data/normalized/installed/vcpkg/info/boost-lexical-cast_1.67.0_x64-windows.list | 23 cargo-mozilla-0.57.0/vendor/vcpkg/test-data/normalized/installed/vcpkg/info/boost-locale_1.67.0_x64-windows-static.list | 42 cargo-mozilla-0.57.0/vendor/vcpkg/test-data/normalized/installed/vcpkg/info/boost-locale_1.67.0_x64-windows.list | 48 cargo-mozilla-0.57.0/vendor/vcpkg/test-data/normalized/installed/vcpkg/info/boost-math_1.67.0_x64-windows-static.list | 372 cargo-mozilla-0.57.0/vendor/vcpkg/test-data/normalized/installed/vcpkg/info/boost-math_1.67.0_x64-windows.list | 398 cargo-mozilla-0.57.0/vendor/vcpkg/test-data/normalized/installed/vcpkg/info/boost-modular-build-helper_2018-05-14_x64-windows-static.list | 8 cargo-mozilla-0.57.0/vendor/vcpkg/test-data/normalized/installed/vcpkg/info/boost-modular-build-helper_2018-05-14_x64-windows.list | 8 cargo-mozilla-0.57.0/vendor/vcpkg/test-data/normalized/installed/vcpkg/info/boost-move_1.67.0_x64-windows-static.list | 53 cargo-mozilla-0.57.0/vendor/vcpkg/test-data/normalized/installed/vcpkg/info/boost-move_1.67.0_x64-windows.list | 53 cargo-mozilla-0.57.0/vendor/vcpkg/test-data/normalized/installed/vcpkg/info/boost-mpl_1.67.0_x64-windows-static.list | 1093 cargo-mozilla-0.57.0/vendor/vcpkg/test-data/normalized/installed/vcpkg/info/boost-mpl_1.67.0_x64-windows.list | 1093 cargo-mozilla-0.57.0/vendor/vcpkg/test-data/normalized/installed/vcpkg/info/boost-multi-index_1.67.0_x64-windows-static.list | 83 cargo-mozilla-0.57.0/vendor/vcpkg/test-data/normalized/installed/vcpkg/info/boost-multi-index_1.67.0_x64-windows.list | 83 cargo-mozilla-0.57.0/vendor/vcpkg/test-data/normalized/installed/vcpkg/info/boost-multiprecision_1.67.0_x64-windows-static.list | 68 cargo-mozilla-0.57.0/vendor/vcpkg/test-data/normalized/installed/vcpkg/info/boost-multiprecision_1.67.0_x64-windows.list | 68 cargo-mozilla-0.57.0/vendor/vcpkg/test-data/normalized/installed/vcpkg/info/boost-numeric-conversion_1.67.0_x64-windows-static.list | 36 cargo-mozilla-0.57.0/vendor/vcpkg/test-data/normalized/installed/vcpkg/info/boost-numeric-conversion_1.67.0_x64-windows.list | 36 cargo-mozilla-0.57.0/vendor/vcpkg/test-data/normalized/installed/vcpkg/info/boost-optional_1.67.0_x64-windows-static.list | 24 cargo-mozilla-0.57.0/vendor/vcpkg/test-data/normalized/installed/vcpkg/info/boost-optional_1.67.0_x64-windows.list | 24 cargo-mozilla-0.57.0/vendor/vcpkg/test-data/normalized/installed/vcpkg/info/boost-parameter_1.67.0_x64-windows-static.list | 41 cargo-mozilla-0.57.0/vendor/vcpkg/test-data/normalized/installed/vcpkg/info/boost-parameter_1.67.0_x64-windows.list | 41 cargo-mozilla-0.57.0/vendor/vcpkg/test-data/normalized/installed/vcpkg/info/boost-phoenix_1.67.0_x64-windows-static.list | 393 cargo-mozilla-0.57.0/vendor/vcpkg/test-data/normalized/installed/vcpkg/info/boost-phoenix_1.67.0_x64-windows.list | 393 cargo-mozilla-0.57.0/vendor/vcpkg/test-data/normalized/installed/vcpkg/info/boost-polygon_1.67.0_x64-windows-static.list | 71 cargo-mozilla-0.57.0/vendor/vcpkg/test-data/normalized/installed/vcpkg/info/boost-polygon_1.67.0_x64-windows.list | 71 cargo-mozilla-0.57.0/vendor/vcpkg/test-data/normalized/installed/vcpkg/info/boost-pool_1.67.0_x64-windows-static.list | 25 cargo-mozilla-0.57.0/vendor/vcpkg/test-data/normalized/installed/vcpkg/info/boost-pool_1.67.0_x64-windows.list | 25 cargo-mozilla-0.57.0/vendor/vcpkg/test-data/normalized/installed/vcpkg/info/boost-predef_1.67.0_x64-windows-static.list | 176 cargo-mozilla-0.57.0/vendor/vcpkg/test-data/normalized/installed/vcpkg/info/boost-predef_1.67.0_x64-windows.list | 176 cargo-mozilla-0.57.0/vendor/vcpkg/test-data/normalized/installed/vcpkg/info/boost-preprocessor_1.67.0_x64-windows-static.list | 318 cargo-mozilla-0.57.0/vendor/vcpkg/test-data/normalized/installed/vcpkg/info/boost-preprocessor_1.67.0_x64-windows.list | 318 cargo-mozilla-0.57.0/vendor/vcpkg/test-data/normalized/installed/vcpkg/info/boost-property-map_1.67.0_x64-windows-static.list | 30 cargo-mozilla-0.57.0/vendor/vcpkg/test-data/normalized/installed/vcpkg/info/boost-property-map_1.67.0_x64-windows.list | 30 cargo-mozilla-0.57.0/vendor/vcpkg/test-data/normalized/installed/vcpkg/info/boost-property-tree_1.67.0_x64-windows-static.list | 44 cargo-mozilla-0.57.0/vendor/vcpkg/test-data/normalized/installed/vcpkg/info/boost-property-tree_1.67.0_x64-windows.list | 44 cargo-mozilla-0.57.0/vendor/vcpkg/test-data/normalized/installed/vcpkg/info/boost-proto_1.67.0_x64-windows-static.list | 169 cargo-mozilla-0.57.0/vendor/vcpkg/test-data/normalized/installed/vcpkg/info/boost-proto_1.67.0_x64-windows.list | 169 cargo-mozilla-0.57.0/vendor/vcpkg/test-data/normalized/installed/vcpkg/info/boost-qvm_1.67.0_x64-windows-static.list | 87 cargo-mozilla-0.57.0/vendor/vcpkg/test-data/normalized/installed/vcpkg/info/boost-qvm_1.67.0_x64-windows.list | 87 cargo-mozilla-0.57.0/vendor/vcpkg/test-data/normalized/installed/vcpkg/info/boost-random_1.67.0_x64-windows-static.list | 84 cargo-mozilla-0.57.0/vendor/vcpkg/test-data/normalized/installed/vcpkg/info/boost-random_1.67.0_x64-windows.list | 90 cargo-mozilla-0.57.0/vendor/vcpkg/test-data/normalized/installed/vcpkg/info/boost-range_1.67.0_x64-windows-static.list | 173 cargo-mozilla-0.57.0/vendor/vcpkg/test-data/normalized/installed/vcpkg/info/boost-range_1.67.0_x64-windows.list | 173 cargo-mozilla-0.57.0/vendor/vcpkg/test-data/normalized/installed/vcpkg/info/boost-ratio_1.67.0_x64-windows-static.list | 42 cargo-mozilla-0.57.0/vendor/vcpkg/test-data/normalized/installed/vcpkg/info/boost-ratio_1.67.0_x64-windows.list | 42 cargo-mozilla-0.57.0/vendor/vcpkg/test-data/normalized/installed/vcpkg/info/boost-rational_1.67.0_x64-windows-static.list | 7 cargo-mozilla-0.57.0/vendor/vcpkg/test-data/normalized/installed/vcpkg/info/boost-rational_1.67.0_x64-windows.list | 7 cargo-mozilla-0.57.0/vendor/vcpkg/test-data/normalized/installed/vcpkg/info/boost-regex_1.67.0_x64-windows-static.list | 74 cargo-mozilla-0.57.0/vendor/vcpkg/test-data/normalized/installed/vcpkg/info/boost-regex_1.67.0_x64-windows.list | 80 cargo-mozilla-0.57.0/vendor/vcpkg/test-data/normalized/installed/vcpkg/info/boost-serialization_1.67.0_x64-windows-static.list | 210 cargo-mozilla-0.57.0/vendor/vcpkg/test-data/normalized/installed/vcpkg/info/boost-serialization_1.67.0_x64-windows.list | 220 cargo-mozilla-0.57.0/vendor/vcpkg/test-data/normalized/installed/vcpkg/info/boost-smart-ptr_1.67.0_x64-windows-static.list | 103 cargo-mozilla-0.57.0/vendor/vcpkg/test-data/normalized/installed/vcpkg/info/boost-smart-ptr_1.67.0_x64-windows.list | 103 cargo-mozilla-0.57.0/vendor/vcpkg/test-data/normalized/installed/vcpkg/info/boost-spirit_1.67.0_x64-windows-static.list | 1207 cargo-mozilla-0.57.0/vendor/vcpkg/test-data/normalized/installed/vcpkg/info/boost-spirit_1.67.0_x64-windows.list | 1207 cargo-mozilla-0.57.0/vendor/vcpkg/test-data/normalized/installed/vcpkg/info/boost-static-assert_1.67.0_x64-windows-static.list | 7 cargo-mozilla-0.57.0/vendor/vcpkg/test-data/normalized/installed/vcpkg/info/boost-static-assert_1.67.0_x64-windows.list | 7 cargo-mozilla-0.57.0/vendor/vcpkg/test-data/normalized/installed/vcpkg/info/boost-system_1.67.0_x64-windows-static.list | 23 cargo-mozilla-0.57.0/vendor/vcpkg/test-data/normalized/installed/vcpkg/info/boost-system_1.67.0_x64-windows.list | 29 cargo-mozilla-0.57.0/vendor/vcpkg/test-data/normalized/installed/vcpkg/info/boost-test_1.67.0-2_x64-windows-static.list | 185 cargo-mozilla-0.57.0/vendor/vcpkg/test-data/normalized/installed/vcpkg/info/boost-test_1.67.0-2_x64-windows.list | 195 cargo-mozilla-0.57.0/vendor/vcpkg/test-data/normalized/installed/vcpkg/info/boost-thread_1.67.0_x64-windows-static.list | 191 cargo-mozilla-0.57.0/vendor/vcpkg/test-data/normalized/installed/vcpkg/info/boost-thread_1.67.0_x64-windows.list | 197 cargo-mozilla-0.57.0/vendor/vcpkg/test-data/normalized/installed/vcpkg/info/boost-throw-exception_1.67.0_x64-windows-static.list | 9 cargo-mozilla-0.57.0/vendor/vcpkg/test-data/normalized/installed/vcpkg/info/boost-throw-exception_1.67.0_x64-windows.list | 9 cargo-mozilla-0.57.0/vendor/vcpkg/test-data/normalized/installed/vcpkg/info/boost-timer_1.67.0_x64-windows-static.list | 16 cargo-mozilla-0.57.0/vendor/vcpkg/test-data/normalized/installed/vcpkg/info/boost-timer_1.67.0_x64-windows.list | 22 cargo-mozilla-0.57.0/vendor/vcpkg/test-data/normalized/installed/vcpkg/info/boost-tokenizer_1.67.0_x64-windows-static.list | 9 cargo-mozilla-0.57.0/vendor/vcpkg/test-data/normalized/installed/vcpkg/info/boost-tokenizer_1.67.0_x64-windows.list | 9 cargo-mozilla-0.57.0/vendor/vcpkg/test-data/normalized/installed/vcpkg/info/boost-tti_1.67.0_x64-windows-static.list | 51 cargo-mozilla-0.57.0/vendor/vcpkg/test-data/normalized/installed/vcpkg/info/boost-tti_1.67.0_x64-windows.list | 51 cargo-mozilla-0.57.0/vendor/vcpkg/test-data/normalized/installed/vcpkg/info/boost-tuple_1.67.0_x64-windows-static.list | 12 cargo-mozilla-0.57.0/vendor/vcpkg/test-data/normalized/installed/vcpkg/info/boost-tuple_1.67.0_x64-windows.list | 12 cargo-mozilla-0.57.0/vendor/vcpkg/test-data/normalized/installed/vcpkg/info/boost-type-index_1.67.0_x64-windows-static.list | 24 cargo-mozilla-0.57.0/vendor/vcpkg/test-data/normalized/installed/vcpkg/info/boost-type-index_1.67.0_x64-windows.list | 24 cargo-mozilla-0.57.0/vendor/vcpkg/test-data/normalized/installed/vcpkg/info/boost-type-traits_1.67.0_x64-windows-static.list | 190 cargo-mozilla-0.57.0/vendor/vcpkg/test-data/normalized/installed/vcpkg/info/boost-type-traits_1.67.0_x64-windows.list | 190 cargo-mozilla-0.57.0/vendor/vcpkg/test-data/normalized/installed/vcpkg/info/boost-typeof_1.67.0_x64-windows-static.list | 60 cargo-mozilla-0.57.0/vendor/vcpkg/test-data/normalized/installed/vcpkg/info/boost-typeof_1.67.0_x64-windows.list | 60 cargo-mozilla-0.57.0/vendor/vcpkg/test-data/normalized/installed/vcpkg/info/boost-unordered_1.67.0_x64-windows-static.list | 18 cargo-mozilla-0.57.0/vendor/vcpkg/test-data/normalized/installed/vcpkg/info/boost-unordered_1.67.0_x64-windows.list | 18 cargo-mozilla-0.57.0/vendor/vcpkg/test-data/normalized/installed/vcpkg/info/boost-utility_1.67.0_x64-windows-static.list | 33 cargo-mozilla-0.57.0/vendor/vcpkg/test-data/normalized/installed/vcpkg/info/boost-utility_1.67.0_x64-windows.list | 33 cargo-mozilla-0.57.0/vendor/vcpkg/test-data/normalized/installed/vcpkg/info/boost-variant_1.67.0_x64-windows-static.list | 45 cargo-mozilla-0.57.0/vendor/vcpkg/test-data/normalized/installed/vcpkg/info/boost-variant_1.67.0_x64-windows.list | 45 cargo-mozilla-0.57.0/vendor/vcpkg/test-data/normalized/installed/vcpkg/info/boost-vcpkg-helpers_4_x64-windows-static.list | 4 cargo-mozilla-0.57.0/vendor/vcpkg/test-data/normalized/installed/vcpkg/info/boost-vcpkg-helpers_4_x64-windows.list | 4 cargo-mozilla-0.57.0/vendor/vcpkg/test-data/normalized/installed/vcpkg/info/boost-winapi_1.67.0_x64-windows-static.list | 126 cargo-mozilla-0.57.0/vendor/vcpkg/test-data/normalized/installed/vcpkg/info/boost-winapi_1.67.0_x64-windows.list | 126 cargo-mozilla-0.57.0/vendor/vcpkg/test-data/normalized/installed/vcpkg/info/boost-xpressive_1.67.0_x64-windows-static.list | 141 cargo-mozilla-0.57.0/vendor/vcpkg/test-data/normalized/installed/vcpkg/info/boost-xpressive_1.67.0_x64-windows.list | 141 cargo-mozilla-0.57.0/vendor/vcpkg/test-data/normalized/installed/vcpkg/info/bzip2_1.0.6-2_arm64-ios.list | 15 cargo-mozilla-0.57.0/vendor/vcpkg/test-data/normalized/installed/vcpkg/info/bzip2_1.0.6-2_x64-osx.list | 15 cargo-mozilla-0.57.0/vendor/vcpkg/test-data/normalized/installed/vcpkg/info/bzip2_1.0.6-2_x64-windows-static.list | 15 cargo-mozilla-0.57.0/vendor/vcpkg/test-data/normalized/installed/vcpkg/info/bzip2_1.0.6-2_x64-windows.list | 21 cargo-mozilla-0.57.0/vendor/vcpkg/test-data/normalized/installed/vcpkg/info/bzip2_1.0.6-2_x86-windows.list | 21 cargo-mozilla-0.57.0/vendor/vcpkg/test-data/normalized/installed/vcpkg/info/freetype_2.8.1-3_arm64-ios.list | 71 cargo-mozilla-0.57.0/vendor/vcpkg/test-data/normalized/installed/vcpkg/info/freetype_2.8.1-3_x64-osx.list | 71 cargo-mozilla-0.57.0/vendor/vcpkg/test-data/normalized/installed/vcpkg/info/freetype_2.8.1-3_x86-windows.list | 76 cargo-mozilla-0.57.0/vendor/vcpkg/test-data/normalized/installed/vcpkg/info/graphite2_1.3.10_x86-windows.list | 29 cargo-mozilla-0.57.0/vendor/vcpkg/test-data/normalized/installed/vcpkg/info/harfbuzz_1.8.4_arm64-ios.list | 33 cargo-mozilla-0.57.0/vendor/vcpkg/test-data/normalized/installed/vcpkg/info/harfbuzz_1.8.4_x64-osx.list | 33 cargo-mozilla-0.57.0/vendor/vcpkg/test-data/normalized/installed/vcpkg/info/harfbuzz_1.8.4_x86-windows.list | 39 cargo-mozilla-0.57.0/vendor/vcpkg/test-data/normalized/installed/vcpkg/info/icu_61.1-1_x64-windows-static.list | 197 cargo-mozilla-0.57.0/vendor/vcpkg/test-data/normalized/installed/vcpkg/info/icu_61.1-1_x64-windows.list | 217 cargo-mozilla-0.57.0/vendor/vcpkg/test-data/normalized/installed/vcpkg/info/icu_61.1-1_x86-windows.list | 217 cargo-mozilla-0.57.0/vendor/vcpkg/test-data/normalized/installed/vcpkg/info/icu_61.1-2_x64-osx.list | 216 cargo-mozilla-0.57.0/vendor/vcpkg/test-data/normalized/installed/vcpkg/info/libevent_2.1.8-3_x64-windows-static.list | 51 cargo-mozilla-0.57.0/vendor/vcpkg/test-data/normalized/installed/vcpkg/info/libevent_2.1.8-3_x64-windows.list | 51 cargo-mozilla-0.57.0/vendor/vcpkg/test-data/normalized/installed/vcpkg/info/liblzma_5.2.3-2_x64-windows-static.list | 27 cargo-mozilla-0.57.0/vendor/vcpkg/test-data/normalized/installed/vcpkg/info/liblzma_5.2.3-2_x64-windows.list | 33 cargo-mozilla-0.57.0/vendor/vcpkg/test-data/normalized/installed/vcpkg/info/libmysql_8.0.4-2_x64-windows-static.list | 25 cargo-mozilla-0.57.0/vendor/vcpkg/test-data/normalized/installed/vcpkg/info/libmysql_8.0.4-2_x64-windows.list | 31 cargo-mozilla-0.57.0/vendor/vcpkg/test-data/normalized/installed/vcpkg/info/libpng_1.6.35_arm64-ios.list | 20 cargo-mozilla-0.57.0/vendor/vcpkg/test-data/normalized/installed/vcpkg/info/libpng_1.6.35_x64-osx.list | 20 cargo-mozilla-0.57.0/vendor/vcpkg/test-data/normalized/installed/vcpkg/info/libpng_1.6.35_x86-windows.list | 24 cargo-mozilla-0.57.0/vendor/vcpkg/test-data/normalized/installed/vcpkg/info/lz4_1.8.2_x64-windows-static.list | 13 cargo-mozilla-0.57.0/vendor/vcpkg/test-data/normalized/installed/vcpkg/info/lz4_1.8.2_x64-windows.list | 19 cargo-mozilla-0.57.0/vendor/vcpkg/test-data/normalized/installed/vcpkg/info/openssl_1.0.2o-3_x64-windows-static.list | 92 cargo-mozilla-0.57.0/vendor/vcpkg/test-data/normalized/installed/vcpkg/info/openssl_1.0.2o-3_x64-windows.list | 105 cargo-mozilla-0.57.0/vendor/vcpkg/test-data/normalized/installed/vcpkg/info/ragel_6.10-1_arm64-ios.list | 6 cargo-mozilla-0.57.0/vendor/vcpkg/test-data/normalized/installed/vcpkg/info/ragel_6.10-1_x64-osx.list | 6 cargo-mozilla-0.57.0/vendor/vcpkg/test-data/normalized/installed/vcpkg/info/ragel_6.10-1_x86-windows.list | 6 cargo-mozilla-0.57.0/vendor/vcpkg/test-data/normalized/installed/vcpkg/info/zlib_1.2.11-3_arm64-ios.list | 13 cargo-mozilla-0.57.0/vendor/vcpkg/test-data/normalized/installed/vcpkg/info/zlib_1.2.11-3_x64-osx.list | 13 cargo-mozilla-0.57.0/vendor/vcpkg/test-data/normalized/installed/vcpkg/info/zlib_1.2.11-3_x64-windows-static.list | 13 cargo-mozilla-0.57.0/vendor/vcpkg/test-data/normalized/installed/vcpkg/info/zlib_1.2.11-3_x64-windows.list | 19 cargo-mozilla-0.57.0/vendor/vcpkg/test-data/normalized/installed/vcpkg/info/zlib_1.2.11-3_x86-windows.list | 19 cargo-mozilla-0.57.0/vendor/vcpkg/test-data/normalized/installed/vcpkg/updates/status | 1574 cargo-mozilla-0.57.0/vendor/vcpkg/tests/README.md | 5 cargo-mozilla-0.57.0/vendor/vcpkg/tests/run.sh | 20 cargo-mozilla-0.57.0/vendor/vcpkg/tests/vcpkgrs_target.sh | 22 cargo-mozilla-0.57.0/vendor/version_check/.cargo-checksum.json | 2 cargo-mozilla-0.57.0/vendor/version_check/Cargo.toml | 2 cargo-mozilla-0.57.0/vendor/version_check/src/lib.rs | 160 cargo-mozilla-0.57.0/vendor/vte/.cargo-checksum.json | 2 cargo-mozilla-0.57.0/vendor/vte/CHANGELOG.md | 43 cargo-mozilla-0.57.0/vendor/vte/Cargo.lock | 58 cargo-mozilla-0.57.0/vendor/vte/Cargo.toml | 25 cargo-mozilla-0.57.0/vendor/vte/README.md | 8 cargo-mozilla-0.57.0/vendor/vte/debian/patches/00-remove-nightly-feature | 8 cargo-mozilla-0.57.0/vendor/vte/debian/patches/series | 1 cargo-mozilla-0.57.0/vendor/vte/examples/parselog.rs | 49 cargo-mozilla-0.57.0/vendor/vte/examples/vim10m.rs | 67 cargo-mozilla-0.57.0/vendor/vte/foos/large_vim_scroll.recording | 977 cargo-mozilla-0.57.0/vendor/vte/rustfmt.toml | 13 cargo-mozilla-0.57.0/vendor/vte/src/definitions.rs | 113 cargo-mozilla-0.57.0/vendor/vte/src/lib.rs | 855 cargo-mozilla-0.57.0/vendor/vte/src/params.rs | 142 cargo-mozilla-0.57.0/vendor/vte/src/table.rs | 559 cargo-mozilla-0.57.0/vendor/vte/src/table.rs.in | 210 cargo-mozilla-0.57.0/vendor/vte/tests/demo.vte | 2052 cargo-mozilla-0.57.0/vendor/vte_generate_state_changes/.cargo-checksum.json | 1 cargo-mozilla-0.57.0/vendor/vte_generate_state_changes/Cargo.toml | 28 cargo-mozilla-0.57.0/vendor/vte_generate_state_changes/src/lib.rs | 174 cargo-mozilla-0.57.0/vendor/walkdir/.cargo-checksum.json | 2 cargo-mozilla-0.57.0/vendor/walkdir/Cargo.toml | 2 cargo-mozilla-0.57.0/vendor/walkdir/README.md | 4 cargo-mozilla-0.57.0/vendor/walkdir/src/error.rs | 2 cargo-mozilla-0.57.0/vendor/walkdir/src/lib.rs | 42 cargo-mozilla-0.57.0/vendor/walkdir/src/tests/recursive.rs | 45 2888 files changed, 305244 insertions(+), 136881 deletions(-) diff -Nru cargo-mozilla-0.47.0/.github/ISSUE_TEMPLATE/tracking_issue.md cargo-mozilla-0.57.0/.github/ISSUE_TEMPLATE/tracking_issue.md --- cargo-mozilla-0.47.0/.github/ISSUE_TEMPLATE/tracking_issue.md 1970-01-01 00:00:00.000000000 +0000 +++ cargo-mozilla-0.57.0/.github/ISSUE_TEMPLATE/tracking_issue.md 2021-10-04 17:24:20.000000000 +0000 @@ -0,0 +1,35 @@ +--- +name: Tracking Issue +about: A tracking issue for an accepted feature or RFC in Cargo. +title: Tracking Issue for XXX +labels: C-tracking-issue +--- + + +**Summary** + +RFC: [#NNNN](https://github.com/rust-lang/rfcs/pull/NNNN) +Original issue: #NNNN +Implementation: #NNNN +Documentation: https://doc.rust-lang.org/nightly/cargo/reference/unstable.html#my-feature + + + +**Unresolved issues** + +* [ ] Make a list of any known implementation or design issues. + +**Future extensions** + + + +**About tracking issues** + +Tracking issues are used to record the overall progress of implementation. +They are also used as hubs connecting to other relevant issues, e.g., bugs or open design questions. +A tracking issue is however *not* meant for large scale discussion, questions, or bug reports about a feature. +Instead, open a dedicated issue for the specific matter and add the relevant feature gate label. diff -Nru cargo-mozilla-0.47.0/.github/dependabot.yml cargo-mozilla-0.57.0/.github/dependabot.yml --- cargo-mozilla-0.47.0/.github/dependabot.yml 1970-01-01 00:00:00.000000000 +0000 +++ cargo-mozilla-0.57.0/.github/dependabot.yml 2021-10-04 17:24:20.000000000 +0000 @@ -0,0 +1,15 @@ +version: 2 +updates: +- package-ecosystem: cargo + directory: "/" + schedule: + interval: daily + open-pull-requests-limit: 10 + reviewers: + - alexcrichton + assignees: + - alexcrichton + ignore: + - dependency-name: proptest + versions: + - ">= 0.9.a, < 0.10" diff -Nru cargo-mozilla-0.47.0/.github/workflows/contrib.yml cargo-mozilla-0.57.0/.github/workflows/contrib.yml --- cargo-mozilla-0.47.0/.github/workflows/contrib.yml 1970-01-01 00:00:00.000000000 +0000 +++ cargo-mozilla-0.57.0/.github/workflows/contrib.yml 2021-10-04 17:24:20.000000000 +0000 @@ -0,0 +1,33 @@ +name: Contrib Deploy +on: + push: + branches: + - master + +jobs: + deploy: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v2 + with: + fetch-depth: 0 + - name: Install mdbook + run: | + mkdir mdbook + curl -Lf https://github.com/rust-lang/mdBook/releases/download/v0.4.9/mdbook-v0.4.9-x86_64-unknown-linux-gnu.tar.gz | tar -xz --directory=./mdbook + echo `pwd`/mdbook >> $GITHUB_PATH + - name: Deploy docs + run: | + cd src/doc/contrib + mdbook build + git worktree add gh-pages gh-pages + git config user.name "Deploy from CI" + git config user.email "" + cd gh-pages + # Delete the ref to avoid keeping history. + git update-ref -d refs/heads/gh-pages + rm -rf contrib + mv ../book contrib + git add contrib + git commit -m "Deploy $GITHUB_SHA to gh-pages" + git push --force diff -Nru cargo-mozilla-0.47.0/.github/workflows/main.yml cargo-mozilla-0.57.0/.github/workflows/main.yml --- cargo-mozilla-0.47.0/.github/workflows/main.yml 1970-01-01 00:00:00.000000000 +0000 +++ cargo-mozilla-0.57.0/.github/workflows/main.yml 2021-10-04 17:24:20.000000000 +0000 @@ -0,0 +1,134 @@ +name: CI +on: + push: + branches-ignore: [master] + pull_request: + branches: ['*'] + +defaults: + run: + shell: bash + +jobs: + # Check Code style quickly by running `rustfmt` over all code + rustfmt: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v2 + - run: rustup update stable && rustup default stable + - run: rustup component add rustfmt + - run: cargo fmt --all -- --check + - run: | + for manifest in `find crates -name Cargo.toml` + do + echo check fmt for $manifest + cargo fmt --all --manifest-path $manifest -- --check + done + + test: + runs-on: ${{ matrix.os }} + env: + CARGO_PROFILE_DEV_DEBUG: 1 + CARGO_PROFILE_TEST_DEBUG: 1 + CARGO_INCREMENTAL: 0 + strategy: + matrix: + include: + - os: ubuntu-latest + rust: stable + other: i686-unknown-linux-gnu + - os: ubuntu-latest + rust: beta + other: i686-unknown-linux-gnu + - os: ubuntu-latest + rust: nightly + other: i686-unknown-linux-gnu + - os: macos-latest + rust: stable + other: x86_64-apple-ios + - os: windows-latest + rust: stable-msvc + other: i686-pc-windows-msvc + - os: windows-latest + rust: nightly-gnu + other: i686-pc-windows-gnu + steps: + - uses: actions/checkout@v2 + - name: Update Rustup (temporary workaround) + run: rustup self update + shell: bash + if: startsWith(matrix.os, 'windows') + - run: rustup update --no-self-update ${{ matrix.rust }} && rustup default ${{ matrix.rust }} + - run: rustup target add ${{ matrix.other }} + - run: rustup component add rustc-dev llvm-tools-preview rust-docs + if: startsWith(matrix.rust, 'nightly') + - run: sudo apt update -y && sudo apt install gcc-multilib libsecret-1-0 libsecret-1-dev -y + if: matrix.os == 'ubuntu-latest' + - run: rustup component add rustfmt || echo "rustfmt not available" + + # Deny warnings on CI to avoid warnings getting into the codebase. + - run: cargo test --features 'deny-warnings' + - run: cargo test --features 'deny-warnings' -p cargo-test-support + - run: cargo test -p cargo-platform + - run: cargo test -p cargo-util + - run: cargo test --manifest-path crates/mdman/Cargo.toml + - run: cargo build --manifest-path crates/credential/cargo-credential-1password/Cargo.toml + - run: cargo build --manifest-path crates/credential/cargo-credential-gnome-secret/Cargo.toml + if: matrix.os == 'ubuntu-latest' + - run: cargo build --manifest-path crates/credential/cargo-credential-macos-keychain/Cargo.toml + if: matrix.os == 'macos-latest' + - run: cargo build --manifest-path crates/credential/cargo-credential-wincred/Cargo.toml + if: matrix.os == 'windows-latest' + + resolver: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v2 + - run: rustup update stable && rustup default stable + - run: cargo test --manifest-path crates/resolver-tests/Cargo.toml + + build_std: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v2 + - run: rustup update nightly && rustup default nightly + - run: rustup component add rust-src + - run: cargo build + - run: cargo test --test build-std + env: + CARGO_RUN_BUILD_STD_TESTS: 1 + docs: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v2 + - run: rustup update nightly && rustup default nightly + - run: rustup component add rust-docs + - run: ci/validate-man.sh + # This requires rustfmt, use stable. + - run: cd src/doc/semver-check && cargo +stable run + - run: | + mkdir mdbook + curl -Lf https://github.com/rust-lang/mdBook/releases/download/v0.4.5/mdbook-v0.4.5-x86_64-unknown-linux-gnu.tar.gz | tar -xz --directory=./mdbook + echo `pwd`/mdbook >> $GITHUB_PATH + - run: cargo doc --no-deps + - run: cd src/doc && mdbook build --dest-dir ../../target/doc + - run: | + cd src/doc + curl -sSLo linkcheck.sh \ + https://raw.githubusercontent.com/rust-lang/rust/master/src/tools/linkchecker/linkcheck.sh + sh linkcheck.sh --all cargo + + success: + name: bors build finished + needs: [docs, rustfmt, test, resolver, build_std] + runs-on: ubuntu-latest + if: "success() && github.event_name == 'push' && github.ref == 'refs/heads/auto-cargo'" + steps: + - run: echo ok + failure: + name: bors build finished + needs: [docs, rustfmt, test, resolver, build_std] + runs-on: ubuntu-latest + if: "!success() && github.event_name == 'push' && github.ref == 'refs/heads/auto-cargo'" + steps: + - run: exit 1 diff -Nru cargo-mozilla-0.47.0/ARCHITECTURE.md cargo-mozilla-0.57.0/ARCHITECTURE.md --- cargo-mozilla-0.47.0/ARCHITECTURE.md 2020-07-17 20:39:39.000000000 +0000 +++ cargo-mozilla-0.57.0/ARCHITECTURE.md 1970-01-01 00:00:00.000000000 +0000 @@ -1,150 +0,0 @@ -# Cargo Architecture - -This document gives a high level overview of Cargo internals. You may -find it useful if you want to contribute to Cargo or if you are -interested in the inner workings of Cargo. - -The purpose of Cargo is to formalize a canonical Rust workflow, by automating -the standard tasks associated with distributing software. Cargo simplifies -structuring a new project, adding dependencies, writing and running unit tests, -and more. - - -## Subcommands - -Cargo is a single binary composed of a set of [`clap`] subcommands. All subcommands live in -`src/bin/cargo/commands` directory. `src/bin/cargo/main.rs` is the entry point. - -Each subcommand, such as [`src/bin/cargo/commands/build.rs`], has its own API -interface, similarly to Git's, parsing command line options, reading the -configuration files, discovering the Cargo project in the current directory and -delegating the actual implementation to one -of the functions in [`src/cargo/ops/mod.rs`]. This short file is a good -place to find out about most of the things that Cargo can do. -Subcommands are designed to pipe to one another, and custom subcommands make -Cargo easy to extend and attach tools to. - -[`clap`]: https://clap.rs/ -[`src/bin/cargo/commands/build.rs`]: src/bin/cargo/commands/build.rs -[`src/cargo/ops/mod.rs`]: src/cargo/ops/mod.rs - - -## Important Data Structures - -There are some important data structures which are used throughout -Cargo. - -[`Config`] is available almost everywhere and holds "global" -information, such as `CARGO_HOME` or configuration from -`.cargo/config` files. The [`shell`] method of [`Config`] is the entry -point for printing status messages and other info to the console. - -[`Workspace`] is the description of the workspace for the current -working directory. Each workspace contains at least one -[`Package`]. Each package corresponds to a single `Cargo.toml`, and may -define several [`Target`]s, such as the library, binaries, integration -test or examples. Targets are crates (each target defines a crate -root, like `src/lib.rs` or `examples/foo.rs`) and are what is actually -compiled by `rustc`. - -A typical package defines the single library target and several -auxiliary ones. Packages are a unit of dependency in Cargo, and when -package `foo` depends on package `bar`, that means that each target -from `foo` needs the library target from `bar`. - -[`PackageId`] is the unique identifier of a (possibly remote) -package. It consist of three components: name, version and source -id. Source is the place where the source code for package comes -from. Typical sources are crates.io, a git repository or a folder on -the local hard drive. - -[`Resolve`] is the representation of a directed acyclic graph of package -dependencies, which uses [`PackageId`]s for nodes. This is the data -structure that is saved to the lock file. If there is no lock file, -Cargo constructs a resolve by finding a graph of packages which -matches declared dependency specification according to semver. - -[`Config`]: https://docs.rs/cargo/latest/cargo/util/config/struct.Config.html -[`shell`]: https://docs.rs/cargo/latest/cargo/util/config/struct.Config.html#method.shell -[`Workspace`]: https://docs.rs/cargo/latest/cargo/core/struct.Workspace.html -[`Package`]: https://docs.rs/cargo/latest/cargo/core/package/struct.Package.html -[`Target`]: https://docs.rs/cargo/latest/cargo/core/manifest/struct.Target.html -[`PackageId`]: https://docs.rs/cargo/latest/cargo/core/package_id/struct.PackageId.html -[`Resolve`]: https://docs.rs/cargo/latest/cargo/core/struct.Resolve.html - - -## Persistence - -Cargo is a non-daemon command line application, which means that all -the information used by Cargo must be persisted on the hard drive. The -main sources of information are `Cargo.toml` and `Cargo.lock` files, -`.cargo/config` configuration files and the globally shared registry -of packages downloaded from crates.io, usually located at -`~/.cargo/registry`. See [`src/cargo/sources/registry`] for the specifics of -the registry storage format. - -[`src/cargo/sources/registry`]: src/cargo/sources/registry - - -## Concurrency - -Cargo is mostly single threaded. The only concurrency inside a single -instance of Cargo happens during compilation, when several instances -of `rustc` are invoked in parallel to build independent -targets. However there can be several different instances of Cargo -process running concurrently on the system. Cargo guarantees that this -is always safe by using file locks when accessing potentially shared -data like the registry or the target directory. - - -## Tests - -Cargo has an impressive test suite located in the `tests` folder. Most -of the test are integration: a project structure with `Cargo.toml` and -rust source code is created in a temporary directory, `cargo` binary -is invoked via `std::process::Command` and then stdout and stderr are -verified against the expected output. To simplify testing, several -macros of the form `[MACRO]` are used in the expected output. For -example, `[..]` matches any string. - -To see stdout and stderr streams of the subordinate process, add `.stream()` -call to the built-up `Execs`: - -```rust -// Before -p.cargo("run").run(); - -// After -p.cargo("run").stream().run(); -``` - -Alternatively to build and run a custom version of cargo simply run `cargo build` -and execute `target/debug/cargo`. Note that `+nightly`/`+stable` (and variants), -being [rustup] features, won't work when executing the locally -built cargo binary directly, you have to instead build with `cargo +nightly build` -and run with `rustup run` (e.g `rustup run nightly -/target/debug/cargo ..`) (or set the `RUSTC` env var to point -to nightly rustc). - -[rustup]: https://rustup.rs/ - - -## Logging - -Cargo uses [`env_logger`], so you can set -`CARGO_LOG` environment variable to get the logs. This is useful both for diagnosing -bugs in stable Cargo and for local development. Cargo also has internal hierarchical -profiling infrastructure, which is activated via `CARGO_PROFILE` variable - -``` -# Outputs all logs with levels debug and higher -$ CARGO_LOG=debug cargo generate-lockfile - -# Don't forget that you can filter by module as well -$ CARGO_LOG=cargo::core::resolver=trace cargo generate-lockfile - -# Output first three levels of profiling info -$ CARGO_PROFILE=3 cargo generate-lockfile -``` - -[`env_logger`]: https://docs.rs/env_logger/*/env_logger/ diff -Nru cargo-mozilla-0.47.0/CHANGELOG.md cargo-mozilla-0.57.0/CHANGELOG.md --- cargo-mozilla-0.47.0/CHANGELOG.md 2020-07-17 20:39:39.000000000 +0000 +++ cargo-mozilla-0.57.0/CHANGELOG.md 2021-10-04 17:24:20.000000000 +0000 @@ -1,9 +1,769 @@ # Changelog +## Cargo 1.56 (2021-10-21) +[cebef295...HEAD](https://github.com/rust-lang/cargo/compare/cebef295...HEAD) + +### Added + +- Added support for the [`rust-version`](https://doc.rust-lang.org/nightly/cargo/reference/manifest.html#the-rust-version-field) + field in a crate's metadata and the `--ignore-rust-version` command line option. +- Build scripts can now pass additional linker arguments for binaries or all + linkable targets. [docs](https://doc.rust-lang.org/nightly/cargo/reference/build-scripts.html#outputs-of-the-build-script) + [#9557](https://github.com/rust-lang/cargo/pull/9557) +- Added support for the `-p` flag for `cargo publish` to publish a specific + package in a workspace. `cargo package` also now supports `-p` and + `--workspace`. + [#9559](https://github.com/rust-lang/cargo/pull/9559) + +### Changed + +- Doc tests now support the `-q` flag to show terse test output. + [#9730](https://github.com/rust-lang/cargo/pull/9730) +- `features` used in a `[replace]` table now issues a warning, as they are ignored. + [#9681](https://github.com/rust-lang/cargo/pull/9681) +- Changed so that only `wasm32-unknown-emscripten` executables are built + without a hash in the filename. Previously it was all `wasm32` targets. + Additionally, all `apple` binaries are now built with a hash in the + filename. This allows multiple copies to be cached at once, and matches the + behavior on other platforms (except `msvc`). + [#9653](https://github.com/rust-lang/cargo/pull/9653) + +### Fixed + +### Nightly only + + +## Cargo 1.55 (2021-09-09) +[aa8b0929...rust-1.55.0](https://github.com/rust-lang/cargo/compare/aa8b0929...rust-1.55.0) + +### Added + +- The package definition in `cargo metadata` now includes the `"default_run"` + field from the manifest. + [#9550](https://github.com/rust-lang/cargo/pull/9550) +- Build scripts now have access to the following environment variables: + `RUSTC_WRAPPER`, `RUSTC_WORKSPACE_WRAPPER`, `CARGO_ENCODED_RUSTFLAGS`. + [docs](https://doc.rust-lang.org/nightly/cargo/reference/environment-variables.html#environment-variables-cargo-sets-for-build-scripts) + [#9601](https://github.com/rust-lang/cargo/pull/9601) +- Added `cargo d` as an alias for `cargo doc`. + [#9680](https://github.com/rust-lang/cargo/pull/9680) +- Added `{lib}` to the `cargo tree --format` option to display the library + name of a package. + [#9663](https://github.com/rust-lang/cargo/pull/9663) +- Added `members_mut` method to the `Workspace` API. + [#9547](https://github.com/rust-lang/cargo/pull/9547) + +### Changed + +- If a build command does not match any targets when using the + `--all-targets`, `--bins`, `--tests`, `--examples`, or `--benches` flags, a + warning is now displayed to inform you that there were no matching targets. + [#9549](https://github.com/rust-lang/cargo/pull/9549) +- The way `cargo init` detects whether or not existing source files represent + a binary or library has been changed to respect the command-line flags + instead of trying to guess which type it is. + [#9522](https://github.com/rust-lang/cargo/pull/9522) +- Registry names are now displayed instead of registry URLs when possible. + [#9632](https://github.com/rust-lang/cargo/pull/9632) +- Duplicate compiler diagnostics are no longer shown. This can often happen + with `cargo test` which builds multiple copies of the same code in parallel. + This also updates the warning summary to provide more context. + [#9675](https://github.com/rust-lang/cargo/pull/9675) +- The output for warnings or errors is now improved to be leaner, cleaner, and + show more context. + [#9655](https://github.com/rust-lang/cargo/pull/9655) +- Network send errors are now treated as "spurious" which means they will be retried. + [#9695](https://github.com/rust-lang/cargo/pull/9695) +- Git keys (`branch`, `tag`, `rev`) on a non-git dependency are now an error. + Additionally, specifying both `git` and `path` is now an error. + [#9689](https://github.com/rust-lang/cargo/pull/9689) +- Specifying a dependency without any keys is now an error. + [#9686](https://github.com/rust-lang/cargo/pull/9686) +- The resolver now prefers to use `[patch]` table entries of dependencies when + possible. + [#9639](https://github.com/rust-lang/cargo/pull/9639) +- Package name typo errors in dependencies are now displayed aligned with the + original to help make it easier to see the difference. + [#9665](https://github.com/rust-lang/cargo/pull/9665) +- Windows platforms may now warn on environment variables that have the wrong case. + [#9654](https://github.com/rust-lang/cargo/pull/9654) +- `features` used in a `[patch]` table now issues a warning, as they are ignored. + [#9666](https://github.com/rust-lang/cargo/pull/9666) +- The `target` directory is now excluded from content indexing on Windows. + [#9635](https://github.com/rust-lang/cargo/pull/9635) +- When `Cargo.toml` is not found, the error message now detects if it was + misnamed with a lowercase `c` to suggest the correct form. + [#9607](https://github.com/rust-lang/cargo/pull/9607) +- Building `diesel` with the new resolver displays a compatibility notice. + [#9602](https://github.com/rust-lang/cargo/pull/9602) +- Updated the `opener` dependency, which handles opening a web browser, which + includes several changes, such as new behavior when run on WSL, and using + the system `xdg-open` on Linux. + [#9583](https://github.com/rust-lang/cargo/pull/9583) + +### Fixed + +- Fixed dep-info files including non-local build script paths. + [#9596](https://github.com/rust-lang/cargo/pull/9596) +- Handle "jobs = 0" case in cargo config files + [#9584](https://github.com/rust-lang/cargo/pull/9584) +- Implement warning for ignored trailing arguments after `--` + [#9561](https://github.com/rust-lang/cargo/pull/9561) +- Fixed rustc/rustdoc config values to be config-relative. + [#9566](https://github.com/rust-lang/cargo/pull/9566) +- `cargo fix` now supports rustc's suggestions with multiple spans. + [#9567](https://github.com/rust-lang/cargo/pull/9567) +- `cargo fix` now fixes each target serially instead of in parallel to avoid + problems with fixing the same file concurrently. + [#9677](https://github.com/rust-lang/cargo/pull/9677) +- Changes to the target `linker` config value now trigger a rebuild. + [#9647](https://github.com/rust-lang/cargo/pull/9647) +- Git unstaged deleted files are now ignored when using the `--allow-dirty` + flag with `cargo publish` or `cargo package`. + [#9645](https://github.com/rust-lang/cargo/pull/9645) + +### Nightly only + +- Enabled support for `cargo fix --edition` for 2021. + [#9588](https://github.com/rust-lang/cargo/pull/9588) +- Several changes to named profiles. + [#9685](https://github.com/rust-lang/cargo/pull/9685) +- Extended instructions on what to do when running `cargo fix --edition` on + the 2021 edition. + [#9694](https://github.com/rust-lang/cargo/pull/9694) +- Multiple updates to error messages using nightly features to help better + explain the situation. + [#9657](https://github.com/rust-lang/cargo/pull/9657) +- Adjusted the edition 2021 resolver diff report. + [#9649](https://github.com/rust-lang/cargo/pull/9649) +- Fixed error using `cargo doc --open` with `doc.extern-map`. + [#9531](https://github.com/rust-lang/cargo/pull/9531) +- Unified weak and namespaced features. + [#9574](https://github.com/rust-lang/cargo/pull/9574) +- Various updates to future-incompatible reporting. + [#9606](https://github.com/rust-lang/cargo/pull/9606) +- `[env]` environment variables are not allowed to set vars set by Cargo. + [#9579](https://github.com/rust-lang/cargo/pull/9579) + +## Cargo 1.54 (2021-07-29) +[4369396c...rust-1.54.0](https://github.com/rust-lang/cargo/compare/4369396c...rust-1.54.0) + +### Added + +- Fetching from a git repository (such as the crates.io index) now displays + the network transfer rate. + [#9395](https://github.com/rust-lang/cargo/pull/9395) +- Added `--prune` option for `cargo tree` to limit what is displayed. + [#9520](https://github.com/rust-lang/cargo/pull/9520) +- Added `--depth` option for `cargo tree` to limit what is displayed. + [#9499](https://github.com/rust-lang/cargo/pull/9499) +- Added `cargo tree -e no-proc-macro` to hide procedural macro dependencies. + [#9488](https://github.com/rust-lang/cargo/pull/9488) +- Added `doc.browser` config option to set which browser to open with `cargo doc --open`. + [#9473](https://github.com/rust-lang/cargo/pull/9473) +- Added `CARGO_TARGET_TMPDIR` environment variable set for integration tests & + benches. This provides a temporary or "scratch" directory in the `target` + directory for tests and benches to use. + [#9375](https://github.com/rust-lang/cargo/pull/9375) + +### Changed + +- `--features` CLI flags now provide typo suggestions with the new feature resolver. + [#9420](https://github.com/rust-lang/cargo/pull/9420) +- Cargo now uses a new parser for SemVer versions. This should behave mostly + the same as before with some minor exceptions where invalid syntax for + version requirements is now rejected. + [#9508](https://github.com/rust-lang/cargo/pull/9508) +- Mtime handling of `.crate` published packages has changed slightly to avoid + mtime values of 0. This was causing problems with lldb which refused to read + those files. + [#9517](https://github.com/rust-lang/cargo/pull/9517) +- Improved performance of git status check in `cargo package`. + [#9478](https://github.com/rust-lang/cargo/pull/9478) +- `cargo new` with fossil now places the ignore settings in the new repository + instead of using `fossil settings` to set them globally. This also includes + several other cleanups to make it more consistent with other VCS + configurations. + [#9469](https://github.com/rust-lang/cargo/pull/9469) +- `rustc-cdylib-link-arg` applying transitively displays a warning that this + was not intended, and may be an error in the future. + [#9563](https://github.com/rust-lang/cargo/pull/9563) + +### Fixed + +- Fixed `package.exclude` in `Cargo.toml` using inverted exclusions + (`!somefile`) when not in a git repository or when vendoring a dependency. + [#9186](https://github.com/rust-lang/cargo/pull/9186) +- Dep-info files now adjust build script `rerun-if-changed` paths to be + absolute paths. + [#9421](https://github.com/rust-lang/cargo/pull/9421) +- Fixed a bug when with resolver = "1" non-virtual package was allowing + unknown features. + [#9437](https://github.com/rust-lang/cargo/pull/9437) +- Fixed an issue with the index cache mishandling versions that only + differed in build metadata (such as `110.0.0` and `110.0.0+1.1.0f`). + [#9476](https://github.com/rust-lang/cargo/pull/9476) +- Fixed `cargo install` with a semver metadata version. + [#9467](https://github.com/rust-lang/cargo/pull/9467) + +### Nightly only + +- Added `report` subcommand, and changed `cargo + describe-future-incompatibilitie` to `cargo report + future-incompatibilities`. + [#9438](https://github.com/rust-lang/cargo/pull/9438) +- Added a `[host]` table to the config files to be able to set build flags for + host target. Also added `target-applies-to-host` to control how the + `[target]` tables behave. + [#9322](https://github.com/rust-lang/cargo/pull/9322) +- Added some validation to build script `rustc-link-arg-*` instructions to + return an error if the target doesn't exist. + [#9523](https://github.com/rust-lang/cargo/pull/9523) +- Added `cargo:rustc-link-arg-bin` instruction for build scripts. + [#9486](https://github.com/rust-lang/cargo/pull/9486) + + +## Cargo 1.53 (2021-06-17) +[90691f2b...rust-1.53.0](https://github.com/rust-lang/cargo/compare/90691f2b...rust-1.53.0) + +### Added + +### Changed +- 🔥 Cargo now supports git repositories where the default `HEAD` branch is not + "master". This also includes a switch to the version 3 `Cargo.lock` format + which can handle default branches correctly. + [#9133](https://github.com/rust-lang/cargo/pull/9133) + [#9397](https://github.com/rust-lang/cargo/pull/9397) + [#9384](https://github.com/rust-lang/cargo/pull/9384) + [#9392](https://github.com/rust-lang/cargo/pull/9392) +- 🔥 macOS targets now default to `unpacked` split-debuginfo. + [#9298](https://github.com/rust-lang/cargo/pull/9298) +- ❗ The `authors` field is no longer included in `Cargo.toml` for new + projects. + [#9282](https://github.com/rust-lang/cargo/pull/9282) +- `cargo update` may now work with the `--offline` flag. + [#9279](https://github.com/rust-lang/cargo/pull/9279) +- `cargo doc` will now erase the `doc` directory when switching between + different toolchain versions. There are shared, unversioned files (such as + the search index) that can become broken when using different versions. + [#8640](https://github.com/rust-lang/cargo/pull/8640) + [#9404](https://github.com/rust-lang/cargo/pull/9404) +- Improved error messages when path dependency/workspace member is missing. + [#9368](https://github.com/rust-lang/cargo/pull/9368) + +### Fixed +- Fixed `cargo doc` detecting if the documentation needs to be rebuilt when + changing some settings such as features. + [#9419](https://github.com/rust-lang/cargo/pull/9419) +- `cargo doc` now deletes the output directory for the package before running + rustdoc to clear out any stale files. + [#9419](https://github.com/rust-lang/cargo/pull/9419) +- Fixed the `-C metadata` value to always include all information for all + builds. Previously, in some situations, the hash only included the package + name and version. This fixes some issues, such as incremental builds with + split-debuginfo on macOS corrupting the incremental cache in some cases. + [#9418](https://github.com/rust-lang/cargo/pull/9418) +- Fixed man pages not working on Windows if `man` is in `PATH`. + [#9378](https://github.com/rust-lang/cargo/pull/9378) +- The `rustc` cache is now aware of `RUSTC_WRAPPER` and `RUSTC_WORKSPACE_WRAPPER`. + [#9348](https://github.com/rust-lang/cargo/pull/9348) +- Track the `CARGO` environment variable in the rebuild fingerprint if the + code uses `env!("CARGO")`. + [#9363](https://github.com/rust-lang/cargo/pull/9363) + +### Nightly only +- Fixed config includes not working. + [#9299](https://github.com/rust-lang/cargo/pull/9299) +- Emit note when `--future-incompat-report` had nothing to report. + [#9263](https://github.com/rust-lang/cargo/pull/9263) +- Error messages for nightly features flags (like `-Z` and `cargo-features`) + now provides more information. + [#9290](https://github.com/rust-lang/cargo/pull/9290) +- Added the ability to set the target for an individual package in `Cargo.toml`. + [docs](https://doc.rust-lang.org/nightly/cargo/reference/unstable.html#per-package-target) + [#9030](https://github.com/rust-lang/cargo/pull/9030) +- Fixed build-std updating the index on every build. + [#9393](https://github.com/rust-lang/cargo/pull/9393) +- `-Z help` now displays all the `-Z` options. + [#9369](https://github.com/rust-lang/cargo/pull/9369) +- Added `-Zallow-features` to specify which nightly features are allowed to be used. + [#9283](https://github.com/rust-lang/cargo/pull/9283) +- Added `cargo config` subcommand. + [#9302](https://github.com/rust-lang/cargo/pull/9302) + +## Cargo 1.52 (2021-05-06) +[34170fcd...rust-1.52.0](https://github.com/rust-lang/cargo/compare/34170fcd...rust-1.52.0) + +### Added +- Added the `"manifest_path"` field to JSON messages for a package. + [#9022](https://github.com/rust-lang/cargo/pull/9022) + [#9247](https://github.com/rust-lang/cargo/pull/9247) + +### Changed +- Build scripts are now forbidden from setting `RUSTC_BOOTSTRAP` on stable. + [#9181](https://github.com/rust-lang/cargo/pull/9181) + [#9385](https://github.com/rust-lang/cargo/pull/9385) +- crates.io now supports SPDX 3.11 licenses. + [#9209](https://github.com/rust-lang/cargo/pull/9209) +- An error is now reported if `CARGO_TARGET_DIR` is an empty string. + [#8939](https://github.com/rust-lang/cargo/pull/8939) +- Doc tests now pass the `--message-format` flag into the test so that the + "short" format can now be used for doc tests. + [#9128](https://github.com/rust-lang/cargo/pull/9128) +- `cargo test` now prints a clearer indicator of which target is currently running. + [#9195](https://github.com/rust-lang/cargo/pull/9195) +- The `CARGO_TARGET_` environment variable will now issue a warning if + it is using lowercase letters. + [#9169](https://github.com/rust-lang/cargo/pull/9169) + +### Fixed +- Fixed publication of packages with metadata and resolver fields in `Cargo.toml`. + [#9300](https://github.com/rust-lang/cargo/pull/9300) + [#9304](https://github.com/rust-lang/cargo/pull/9304) +- Fixed logic for determining prefer-dynamic for a dylib which differed in a + workspace vs a single package. + [#9252](https://github.com/rust-lang/cargo/pull/9252) +- Fixed an issue where exclusive target-specific dependencies that overlapped + across dependency kinds (like regular and build-dependencies) would + incorrectly include the dependencies in both. + [#9255](https://github.com/rust-lang/cargo/pull/9255) +- Fixed panic with certain styles of Package IDs when passed to the `-p` flag. + [#9188](https://github.com/rust-lang/cargo/pull/9188) +- When running cargo with output not going to a TTY, and with the progress bar + and color force-enabled, the output will now correctly clear the progress + line. + [#9231](https://github.com/rust-lang/cargo/pull/9231) +- Error instead of panic when JSON may contain non-utf8 paths. + [#9226](https://github.com/rust-lang/cargo/pull/9226) +- Fixed a hang that can happen on broken stderr. + [#9201](https://github.com/rust-lang/cargo/pull/9201) +- Fixed thin-local LTO not being disabled correctly when `lto=off` is set. + [#9182](https://github.com/rust-lang/cargo/pull/9182) + +### Nightly only +- The `strip` profile option now supports `true` and `false` values. + [#9153](https://github.com/rust-lang/cargo/pull/9153) +- `cargo fix --edition` now displays a report when switching to 2021 if the + new resolver changes features. + [#9268](https://github.com/rust-lang/cargo/pull/9268) +- Added `[patch]` table support in `.cargo/config` files. + [#9204](https://github.com/rust-lang/cargo/pull/9204) +- Added `cargo describe-future-incompatibilities` for generating a report on + dependencies that contain future-incompatible warnings. + [#8825](https://github.com/rust-lang/cargo/pull/8825) +- Added easier support for testing the 2021 edition. + [#9184](https://github.com/rust-lang/cargo/pull/9184) +- Switch the default resolver to "2" in the 2021 edition. + [#9184](https://github.com/rust-lang/cargo/pull/9184) +- `cargo fix --edition` now supports 2021. + [#9184](https://github.com/rust-lang/cargo/pull/9184) +- Added `--print` flag to `cargo rustc` to pass along to `rustc` to display + information from rustc. + [#9002](https://github.com/rust-lang/cargo/pull/9002) +- Added `-Zdoctest-in-workspace` for changing the directory where doctests are + *run* versus where they are *compiled*. + [#9105](https://github.com/rust-lang/cargo/pull/9105) +- Added support for an `[env]` section in `.cargo/config.toml` to set + environment variables when running cargo. + [#9175](https://github.com/rust-lang/cargo/pull/9175) +- Added a schema field and `features2` field to the index. + [#9161](https://github.com/rust-lang/cargo/pull/9161) +- Changes to JSON spec targets will now trigger a rebuild. + [#9223](https://github.com/rust-lang/cargo/pull/9223) + +## Cargo 1.51 (2021-03-25) +[75d5d8cf...rust-1.51.0](https://github.com/rust-lang/cargo/compare/75d5d8cf...rust-1.51.0) + +### Added +- 🔥 Added the `split-debuginfo` profile option. + [docs](https://doc.rust-lang.org/nightly/cargo/reference/profiles.html#split-debuginfo) + [#9112](https://github.com/rust-lang/cargo/pull/9112) +- Added the `path` field to `cargo metadata` for the package dependencies list + to show the path for "path" dependencies. + [#8994](https://github.com/rust-lang/cargo/pull/8994) +- 🔥 Added a new feature resolver, and new CLI feature flag behavior. See the + new [features](https://doc.rust-lang.org/nightly/cargo/reference/features.html#feature-resolver-version-2) + and [resolver](https://doc.rust-lang.org/nightly/cargo/reference/resolver.html#feature-resolver-version-2) + documentation for the `resolver = "2"` option. See the + [CLI](https://doc.rust-lang.org/nightly/cargo/reference/features.html#command-line-feature-options) + and [resolver 2 CLI](https://doc.rust-lang.org/nightly/cargo/reference/features.html#resolver-version-2-command-line-flags) + options for the new CLI behavior. And, finally, see + [RFC 2957](https://github.com/rust-lang/rfcs/blob/master/text/2957-cargo-features2.md) + for a detailed look at what has changed. + [#8997](https://github.com/rust-lang/cargo/pull/8997) + +### Changed +- `cargo install --locked` now emits a warning if `Cargo.lock` is not found. + [#9108](https://github.com/rust-lang/cargo/pull/9108) +- Unknown or ambiguous package IDs passed on the command-line now display + suggestions for the correct package ID. + [#9095](https://github.com/rust-lang/cargo/pull/9095) +- Slightly optimize `cargo vendor` + [#8937](https://github.com/rust-lang/cargo/pull/8937) + [#9131](https://github.com/rust-lang/cargo/pull/9131) + [#9132](https://github.com/rust-lang/cargo/pull/9132) + +### Fixed +- Fixed environment variables and cfg settings emitted by a build script that + are set for `cargo test` and `cargo run` when the build script runs multiple + times during the same build session. + [#9122](https://github.com/rust-lang/cargo/pull/9122) +- Fixed a panic with `cargo doc` and the new feature resolver. This also + introduces some heuristics to try to avoid path collisions with `rustdoc` by + only documenting one variant of a package if there are multiple (such as + multiple versions, or the same package shared for host and target + platforms). + [#9077](https://github.com/rust-lang/cargo/pull/9077) +- Fixed a bug in Cargo's cyclic dep graph detection that caused a stack + overflow. + [#9075](https://github.com/rust-lang/cargo/pull/9075) +- Fixed build script `links` environment variables (`DEP_*`) not showing up + for testing packages in some cases. + [#9065](https://github.com/rust-lang/cargo/pull/9065) +- Fixed features being selected in a nondeterministic way for a specific + scenario when building an entire workspace with all targets with a + proc-macro in the workspace with `resolver="2"`. + [#9059](https://github.com/rust-lang/cargo/pull/9059) +- Fixed to use `http.proxy` setting in `~/.gitconfig`. + [#8986](https://github.com/rust-lang/cargo/pull/8986) +- Fixed --feature pkg/feat for V1 resolver for non-member. + [#9275](https://github.com/rust-lang/cargo/pull/9275) + [#9277](https://github.com/rust-lang/cargo/pull/9277) +- Fixed panic in `cargo doc` when there are colliding output filenames in a workspace. + [#9276](https://github.com/rust-lang/cargo/pull/9276) + [#9277](https://github.com/rust-lang/cargo/pull/9277) +- Fixed `cargo install` from exiting with success if one of several packages + did not install successfully. + [#9185](https://github.com/rust-lang/cargo/pull/9185) + [#9196](https://github.com/rust-lang/cargo/pull/9196) +- Fix panic with doc collision orphan. + [#9142](https://github.com/rust-lang/cargo/pull/9142) + [#9196](https://github.com/rust-lang/cargo/pull/9196) + +### Nightly only +- Removed the `publish-lockfile` unstable feature, it was stabilized without + the need for an explicit flag 1.5 years ago. + [#9092](https://github.com/rust-lang/cargo/pull/9092) +- Added better diagnostics, help messages, and documentation for nightly + features (such as those passed with the `-Z` flag, or specified with + `cargo-features` in `Cargo.toml`). + [#9092](https://github.com/rust-lang/cargo/pull/9092) +- Added support for Rust edition 2021. + [#8922](https://github.com/rust-lang/cargo/pull/8922) +- Added support for the `rust-version` field in project metadata. + [#8037](https://github.com/rust-lang/cargo/pull/8037) +- Added a schema field to the index. + [#9161](https://github.com/rust-lang/cargo/pull/9161) + [#9196](https://github.com/rust-lang/cargo/pull/9196) + +## Cargo 1.50 (2021-02-11) +[8662ab42...rust-1.50.0](https://github.com/rust-lang/cargo/compare/8662ab42...rust-1.50.0) + +### Added +- Added the `doc` field to `cargo metadata`, which indicates if a target is + documented. + [#8869](https://github.com/rust-lang/cargo/pull/8869) +- Added `RUSTC_WORKSPACE_WRAPPER`, an alternate RUSTC wrapper that only runs + for the local workspace packages, and caches its artifacts independently of + non-wrapped builds. + [#8976](https://github.com/rust-lang/cargo/pull/8976) +- Added `--workspace` to `cargo update` to update only the workspace members, + and not their dependencies. This is particularly useful if you update the + version in `Cargo.toml` and want to update `Cargo.lock` without running any + other commands. + [#8725](https://github.com/rust-lang/cargo/pull/8725) + +### Changed +- `.crate` files uploaded to a registry are now built with reproducible + settings, so that the same `.crate` file created on different machines + should be identical. + [#8864](https://github.com/rust-lang/cargo/pull/8864) +- Git dependencies that specify more than one of `branch`, `tag`, or `rev` are + now rejected. + [#8984](https://github.com/rust-lang/cargo/pull/8984) +- The `rerun-if-changed` build script directive can now point to a directory, + in which case Cargo will check if any file in that directory changes. + [#8973](https://github.com/rust-lang/cargo/pull/8973) +- If Cargo cannot determine the username or email address, `cargo new` will no + longer fail, and instead create an empty authors list. + [#8912](https://github.com/rust-lang/cargo/pull/8912) +- The progress bar width has been reduced to provide more room to display the + crates currently being built. + [#8892](https://github.com/rust-lang/cargo/pull/8892) +- `cargo new` will now support `includeIf` directives in `.gitconfig` to match + the correct directory when determining the username and email address. + [#8886](https://github.com/rust-lang/cargo/pull/8886) + +### Fixed +- Fixed `cargo metadata` and `cargo tree` to only download packages for the + requested target. + [#8987](https://github.com/rust-lang/cargo/pull/8987) +- Updated libgit2, which brings in many fixes, particularly fixing a zlib + error that occasionally appeared on 32-bit systems. + [#8998](https://github.com/rust-lang/cargo/pull/8998) +- Fixed stack overflow with a circular dev-dependency that uses the `links` + field. + [#8969](https://github.com/rust-lang/cargo/pull/8969) +- Fixed `cargo publish` failing on some filesystems, particularly 9p on WSL2. + [#8950](https://github.com/rust-lang/cargo/pull/8950) + +### Nightly only +- Allow `resolver="1"` to specify the original feature resolution behavior. + [#8857](https://github.com/rust-lang/cargo/pull/8857) +- Added `-Z extra-link-arg` which adds the `cargo:rustc-link-arg-bins` + and `cargo:rustc-link-arg` build script options. + [docs](https://doc.rust-lang.org/nightly/cargo/reference/unstable.html#extra-link-arg) + [#8441](https://github.com/rust-lang/cargo/pull/8441) +- Implemented external credential process support, and added `cargo logout`. + ([RFC 2730](https://github.com/rust-lang/rfcs/blob/master/text/2730-cargo-token-from-process.md)) + ([docs](https://doc.rust-lang.org/nightly/cargo/reference/unstable.html#credential-process)) + [#8934](https://github.com/rust-lang/cargo/pull/8934) +- Fix panic with `-Zbuild-std` and no roots. + [#8942](https://github.com/rust-lang/cargo/pull/8942) +- Set docs.rs as the default extern-map for crates.io + [#8877](https://github.com/rust-lang/cargo/pull/8877) + +## Cargo 1.49 (2020-12-31) +[75615f8e...rust-1.49.0](https://github.com/rust-lang/cargo/compare/75615f8e...rust-1.49.0) + +### Added +- Added `homepage` and `documentation` fields to `cargo metadata`. + [#8744](https://github.com/rust-lang/cargo/pull/8744) +- Added the `CARGO_PRIMARY_PACKAGE` environment variable which is set when + running `rustc` if the package is one of the "root" packages selected on the + command line. + [#8758](https://github.com/rust-lang/cargo/pull/8758) +- Added support for Unix-style glob patterns for package and target selection + flags on the command-line (such as `-p 'serde*'` or `--test '*'`). + [#8752](https://github.com/rust-lang/cargo/pull/8752) + +### Changed +- Computed LTO flags are now included in the filename metadata hash so that + changes in LTO settings will independently cache build artifacts instead of + overwriting previous ones. This prevents rebuilds in some situations such as + switching between `cargo build` and `cargo test` in some circumstances. + [#8755](https://github.com/rust-lang/cargo/pull/8755) +- `cargo tree` now displays `(proc-macro)` next to proc-macro packages. + [#8765](https://github.com/rust-lang/cargo/pull/8765) +- Added a warning that the allowed characters for a feature name have been + restricted to letters, digits, `_`, `-`, and `+` to accommodate future + syntax changes. This is still a superset of the allowed syntax on crates.io, + which requires ASCII. This is intended to be changed to an error in the + future. + [#8814](https://github.com/rust-lang/cargo/pull/8814) +- `-p` without a value will now print a list of workspace package names. + [#8808](https://github.com/rust-lang/cargo/pull/8808) +- Add period to allowed feature name characters. + [#8932](https://github.com/rust-lang/cargo/pull/8932) + [#8943](https://github.com/rust-lang/cargo/pull/8943) + +### Fixed +- Fixed building a library with both "dylib" and "rlib" crate types with LTO enabled. + [#8754](https://github.com/rust-lang/cargo/pull/8754) +- Fixed paths in Cargo's dep-info files. + [#8819](https://github.com/rust-lang/cargo/pull/8819) +- Fixed inconsistent source IDs in `cargo metadata` for git dependencies that + explicitly specify `branch="master"`. + [#8824](https://github.com/rust-lang/cargo/pull/8824) +- Fixed re-extracting dependencies which contained a `.cargo-ok` file. + [#8835](https://github.com/rust-lang/cargo/pull/8835) + +### Nightly only +- Fixed a panic with `cargo doc -Zfeatures=itarget` in some situations. + [#8777](https://github.com/rust-lang/cargo/pull/8777) +- New implementation for namespaced features, using the syntax `dep:serde`. + [docs](https://doc.rust-lang.org/nightly/cargo/reference/unstable.html#namespaced-features) + [#8799](https://github.com/rust-lang/cargo/pull/8799) +- Added support for "weak" dependency features, using the syntax + `dep_name?/feat_name`, which will enable a feature for a dependency without + also enabling the dependency. + [#8818](https://github.com/rust-lang/cargo/pull/8818) +- Fixed the new feature resolver downloading extra dependencies that weren't + strictly necessary. + [#8823](https://github.com/rust-lang/cargo/pull/8823) + +## Cargo 1.48 (2020-11-19) +[51b66125...rust-1.48.0](https://github.com/rust-lang/cargo/compare/51b66125...rust-1.48.0) + +### Added +- Added `term.progress` configuration option to control when and how the + progress bar is displayed. + [docs](https://doc.rust-lang.org/nightly/cargo/reference/config.html#termprogresswhen) + [#8165](https://github.com/rust-lang/cargo/pull/8165) +- Added `--message-format plain` option to `cargo locate-project` to display + the project location without JSON to make it easier to use in a script. + [#8707](https://github.com/rust-lang/cargo/pull/8707) +- Added `--workspace` option to `cargo locate-project` to display the path to + the workspace manifest. + [#8712](https://github.com/rust-lang/cargo/pull/8712) +- A new contributor guide has been added for contributing to Cargo itself. + This is published at . + [#8715](https://github.com/rust-lang/cargo/pull/8715) +- Zsh `--target` completion will now complete with the built-in rustc targets. + [#8740](https://github.com/rust-lang/cargo/pull/8740) + +### Changed + +### Fixed +- Fixed `cargo new` creating a fossil repository to properly ignore the `target` directory. + [#8671](https://github.com/rust-lang/cargo/pull/8671) +- Don't show warnings about the workspace in the current directory when using `cargo install` + of a remote package. + [#8681](https://github.com/rust-lang/cargo/pull/8681) +- Automatically reinitialize the index when an "Object not found" error is + encountered in the git repository. + [#8735](https://github.com/rust-lang/cargo/pull/8735) +- Updated libgit2, which brings in several fixes for git repository handling. + [#8778](https://github.com/rust-lang/cargo/pull/8778) + [#8780](https://github.com/rust-lang/cargo/pull/8780) + +### Nightly only +- Fixed `cargo install` so that it will ignore the `[unstable]` table in local config files. + [#8656](https://github.com/rust-lang/cargo/pull/8656) +- Fixed nondeterministic behavior of the new feature resolver. + [#8701](https://github.com/rust-lang/cargo/pull/8701) +- Fixed running `cargo test` on a proc-macro with the new feature resolver + under a specific combination of circumstances. + [#8742](https://github.com/rust-lang/cargo/pull/8742) + +## Cargo 1.47 (2020-10-08) +[4f74d9b2...rust-1.47.0](https://github.com/rust-lang/cargo/compare/4f74d9b2...rust-1.47.0) + +### Added +- `cargo doc` will now include the package's version in the left sidebar. + [#8509](https://github.com/rust-lang/cargo/pull/8509) +- Added the `test` field to `cargo metadata` targets. + [#8478](https://github.com/rust-lang/cargo/pull/8478) +- Cargo's man pages are now displayed via the `cargo help` command (such as + `cargo help build`). + [#8456](https://github.com/rust-lang/cargo/pull/8456) + [#8577](https://github.com/rust-lang/cargo/pull/8577) +- Added new documentation chapters on [how dependency resolution + works](https://doc.rust-lang.org/nightly/cargo/reference/resolver.html) and + [SemVer + compatibility](https://doc.rust-lang.org/nightly/cargo/reference/semver.html), + along with suggestions on how to version your project and work with + dependencies. + [#8609](https://github.com/rust-lang/cargo/pull/8609) + +### Changed +- The comments added to `.gitignore` when it is modified have been tweaked to + add some spacing. + [#8476](https://github.com/rust-lang/cargo/pull/8476) +- `cargo metadata` output should now be sorted to be deterministic. + [#8489](https://github.com/rust-lang/cargo/pull/8489) +- By default, build scripts and proc-macros are now built with `opt-level=0` + and the default codegen units, even in release mode. + [#8500](https://github.com/rust-lang/cargo/pull/8500) +- `workspace.default-members` is now filtered by `workspace.exclude`. + [#8485](https://github.com/rust-lang/cargo/pull/8485) +- `workspace.members` globs now ignore non-directory paths. + [#8511](https://github.com/rust-lang/cargo/pull/8511) +- git zlib errors now trigger a retry. + [#8520](https://github.com/rust-lang/cargo/pull/8520) +- "http" class git errors now trigger a retry. + [#8553](https://github.com/rust-lang/cargo/pull/8553) +- git dependencies now override the `core.autocrlf` git configuration value to + ensure they behave consistently across platforms, particularly when + vendoring git dependencies on Windows. + [#8523](https://github.com/rust-lang/cargo/pull/8523) +- If `Cargo.lock` needs to be updated, then it will be automatically + transitioned to the new V2 format. This format removes the `[metadata]` + table, and should be easier to merge changes in source control systems. This + format was introduced in 1.38, and made the default for new projects in + 1.41. + [#8554](https://github.com/rust-lang/cargo/pull/8554) +- Added preparation for support of git repositories with a non-"master" + default branch. Actual support will arrive in a future version. This + introduces some warnings: + - Warn if a git dependency does not specify a branch, and the default branch + on the repository is not "master". In the future, Cargo will fetch the + default branch. In this scenario, the branch should be explicitly + specified. + - Warn if a workspace has multiple dependencies to the same git repository, + one without a `branch` and one with `branch="master"`. Dependencies should + all use one form or the other. + [#8522](https://github.com/rust-lang/cargo/pull/8522) +- Warnings are now issued if a `required-features` entry lists a feature that + does not exist. + [#7950](https://github.com/rust-lang/cargo/pull/7950) +- Built-in aliases are now included in `cargo --list`. + [#8542](https://github.com/rust-lang/cargo/pull/8542) +- `cargo install` with a specific version that has been yanked will now + display an error message that it has been yanked, instead of "could not + find". + [#8565](https://github.com/rust-lang/cargo/pull/8565) +- `cargo publish` with a package that has the `publish` field set to a single + registry, and no `--registry` flag has been given, will now publish to that + registry instead of generating an error. + [#8571](https://github.com/rust-lang/cargo/pull/8571) + +### Fixed +- Fixed issue where if a project directory was moved, and one of the + build scripts did not use the `rerun-if-changed` directive, then that + build script was being rebuilt when it shouldn't. + [#8497](https://github.com/rust-lang/cargo/pull/8497) +- Console colors should now work on Windows 7 and 8. + [#8540](https://github.com/rust-lang/cargo/pull/8540) +- The `CARGO_TARGET_{triplet}_RUNNER` environment variable will now correctly + override the config file instead of trying to merge the commands. + [#8629](https://github.com/rust-lang/cargo/pull/8629) +- Fixed LTO with doctests. + [#8657](https://github.com/rust-lang/cargo/pull/8657) + [#8658](https://github.com/rust-lang/cargo/pull/8658) + +### Nightly only +- Added support for `-Z terminal-width` which tells `rustc` the width of the + terminal so that it can format diagnostics better. + [docs](https://doc.rust-lang.org/nightly/cargo/reference/unstable.html#terminal-width) + [#8427](https://github.com/rust-lang/cargo/pull/8427) +- Added ability to configure `-Z` unstable flags in config files via the + `[unstable]` table. + [docs](https://doc.rust-lang.org/nightly/cargo/reference/unstable.html) + [#8393](https://github.com/rust-lang/cargo/pull/8393) +- Added `-Z build-std-features` flag to set features for the standard library. + [docs](https://doc.rust-lang.org/nightly/cargo/reference/unstable.html#build-std-features) + [#8490](https://github.com/rust-lang/cargo/pull/8490) + ## Cargo 1.46 (2020-08-27) -[9fcb8c1d...HEAD](https://github.com/rust-lang/cargo/compare/9fcb8c1d...HEAD) +[9fcb8c1d...rust-1.46.0](https://github.com/rust-lang/cargo/compare/9fcb8c1d...rust-1.46.0) ### Added +- The `dl` key in `config.json` of a registry index now supports the + replacement markers `{prefix}` and `{lowerprefix}` to allow spreading crates + across directories similar to how the index itself is structured. + [docs](https://doc.rust-lang.org/nightly/cargo/reference/registries.html#index-format) + [#8267](https://github.com/rust-lang/cargo/pull/8267) +- Added new environment variables that are set during compilation: + - `CARGO_CRATE_NAME`: The name of the crate being built. + - `CARGO_BIN_NAME`: The name of the executable binary (if this is a binary crate). + - `CARGO_PKG_LICENSE`: The `license` field from the manifest. + - `CARGO_PKG_LICENSE_FILE`: The `license-file` field from the manifest. + [#8270](https://github.com/rust-lang/cargo/pull/8270) + [#8325](https://github.com/rust-lang/cargo/pull/8325) + [#8387](https://github.com/rust-lang/cargo/pull/8387) +- If the value for `readme` is not specified in `Cargo.toml`, it is now + automatically inferred from the existence of a file named `README`, + `README.md`, or `README.txt`. This can be suppressed by setting + `readme = false`. + [#8277](https://github.com/rust-lang/cargo/pull/8277) +- `cargo install` now supports the `--index` flag to install directly from an index. + [#8344](https://github.com/rust-lang/cargo/pull/8344) +- Added the `metadata` table to the `workspace` definition in `Cargo.toml`. + This can be used for arbitrary data similar to the `package.metadata` table. + [#8323](https://github.com/rust-lang/cargo/pull/8323) +- Added the `--target-dir` flag to `cargo install` to set the target directory. + [#8391](https://github.com/rust-lang/cargo/pull/8391) +- Changes to environment variables used by the + [`env!`](https://doc.rust-lang.org/std/macro.env.html) or + [`option_env!`](https://doc.rust-lang.org/std/macro.option_env.html) macros + are now automatically detected to trigger a rebuild. + [#8421](https://github.com/rust-lang/cargo/pull/8421) +- The `target` directory now includes the `CACHEDIR.TAG` file which is used by + some tools to exclude the directory from backups. + [#8378](https://github.com/rust-lang/cargo/pull/8378) +- Added docs about rustup's `+toolchain` syntax. + [#8455](https://github.com/rust-lang/cargo/pull/8455) ### Changed - A warning is now displayed if a git dependency includes a `#` fragment in @@ -11,6 +771,17 @@ URLs with this syntax, but it does not have any meaning outside of the `Cargo.lock` file, and would not work properly. [#8297](https://github.com/rust-lang/cargo/pull/8297) +- Various optimizations and fixes for bitcode embedding and LTO. + [#8349](https://github.com/rust-lang/cargo/pull/8349) +- Reduced the amount of data fetched for git dependencies. If Cargo knows the + branch or tag to fetch, it will now only fetch that branch or tag instead of + all branches and tags. + [#8363](https://github.com/rust-lang/cargo/pull/8363) +- Enhanced git fetch error messages. + [#8409](https://github.com/rust-lang/cargo/pull/8409) +- `.crate` files are now generated with GNU tar format instead of UStar, which + supports longer file names. + [#8453](https://github.com/rust-lang/cargo/pull/8453) ### Fixed - Fixed a rare situation where an update to `Cargo.lock` failed once, but then @@ -22,6 +793,27 @@ - Updated libgit2, which brings in a fix for zlib errors for some remote git servers like googlesource.com. [#8320](https://github.com/rust-lang/cargo/pull/8320) +- Fixed the GitHub fast-path check for up-to-date git dependencies on + non-master branches. + [#8363](https://github.com/rust-lang/cargo/pull/8363) +- Fixed issue when enabling a feature with `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 registry summary, then + the optional dependency would not get activated. + [#8395](https://github.com/rust-lang/cargo/pull/8395) +- Fixed `clean -p` deleting the build directory if there is a test named + `build`. + [#8398](https://github.com/rust-lang/cargo/pull/8398) +- Fixed indentation of multi-line Cargo error messages. + [#8409](https://github.com/rust-lang/cargo/pull/8409) +- Fixed issue where the automatic inclusion of the `--document-private-items` + flag for rustdoc would override any flags passed to the `cargo rustdoc` + command. + [#8449](https://github.com/rust-lang/cargo/pull/8449) +- Cargo will now include a version in the hash of the fingerprint directories + to support backwards-incompatible changes to the fingerprint structure. + [#8473](https://github.com/rust-lang/cargo/pull/8473) + [#8488](https://github.com/rust-lang/cargo/pull/8488) ### Nightly only - Added `-Zrustdoc-map` feature which provides external mappings for rustdoc @@ -31,7 +823,10 @@ - Fixed feature calculation when a proc-macro is declared in `Cargo.toml` with an underscore (like `proc_macro = true`). [#8319](https://github.com/rust-lang/cargo/pull/8319) - +- Added support for setting `-Clinker` with `-Zdoctest-xcompile`. + [#8359](https://github.com/rust-lang/cargo/pull/8359) +- Fixed setting the `strip` profile field in config files. + [#8454](https://github.com/rust-lang/cargo/pull/8454) ## Cargo 1.45 (2020-07-16) [ebda5065e...rust-1.45.0](https://github.com/rust-lang/cargo/compare/ebda5065...rust-1.45.0) diff -Nru cargo-mozilla-0.47.0/CONTRIBUTING.md cargo-mozilla-0.57.0/CONTRIBUTING.md --- cargo-mozilla-0.47.0/CONTRIBUTING.md 2020-07-17 20:39:39.000000000 +0000 +++ cargo-mozilla-0.57.0/CONTRIBUTING.md 2021-10-04 17:24:20.000000000 +0000 @@ -1,232 +1,5 @@ # Contributing to Cargo -Thank you for your interest in contributing to Cargo! Good places to -start are this document, [ARCHITECTURE.md](ARCHITECTURE.md), which -describes the high-level structure of Cargo and [E-easy] bugs on the -issue tracker. +Contributing documentation has moved to the **[Cargo Contributor Guide]**. -If you have a general question about Cargo or it's internals, feel free to ask -on [Zulip]. - -## Code of Conduct - -All contributors are expected to follow our [Code of Conduct]. - -## Bug reports - -We can't fix what we don't know about, so please report problems liberally. This -includes problems with understanding the documentation, unhelpful error messages -and unexpected behavior. - -**If you think that you have identified an issue with Cargo that might compromise -its users' security, please do not open a public issue on GitHub. Instead, -we ask you to refer to Rust's [security policy].** - -Opening an issue is as easy as following [this link][new-issues] and filling out -the fields. Here's a template that you can use to file an issue, though it's not -necessary to use it exactly: - - - - I tried this: - - I expected to see this happen: - - Instead, this happened: - - I'm using - -All three components are important: what you did, what you expected, what -happened instead. Please use https://gist.github.com/ if your examples run long. - - -## Feature requests - -Cargo follows the general Rust model of evolution. All major features go through -an RFC process. Therefore, before opening a feature request issue create a -Pre-RFC thread on the [internals][irlo] forum to get preliminary feedback. -Implementing a feature as a [custom subcommand][subcommands] is encouraged as it -helps demonstrate the demand for the functionality and is a great way to deliver -a working solution faster as it can iterate outside of cargo's release cadence. - -## Working on issues - -If you're looking for somewhere to start, check out the [E-easy][E-Easy] and -[E-mentor][E-mentor] tags. - -Feel free to ask for guidelines on how to tackle a problem on [Zulip] or open a -[new issue][new-issues]. This is especially important if you want to add new -features to Cargo or make large changes to the already existing code-base. -Cargo's core developers will do their best to provide help. - -If you start working on an already-filed issue, post a comment on this issue to -let people know that somebody is working it. Feel free to ask for comments if -you are unsure about the solution you would like to submit. - -While Cargo does make use of some Rust-features available only through the -`nightly` toolchain, it must compile on stable Rust. Code added to Cargo -is encouraged to make use of the latest stable features of the language and -`stdlib`. - -We use the "fork and pull" model [described here][development-models], where -contributors push changes to their personal fork and create pull requests to -bring those changes into the source repository. This process is partly -automated: Pull requests are made against Cargo's master-branch, tested and -reviewed. Once a change is approved to be merged, a friendly bot merges the -changes into an internal branch, runs the full test-suite on that branch -and only then merges into master. This ensures that Cargo's master branch -passes the test-suite at all times. - -Your basic steps to get going: - -* Fork Cargo and create a branch from master for the issue you are working on. -* Please adhere to the code style that you see around the location you are -working on. -* [Commit as you go][githelp]. -* Include tests that cover all non-trivial code. The existing tests -in `test/` provide templates on how to test Cargo's behavior in a -sandbox-environment. The internal module `crates/cargo-test-support` provides a vast amount -of helpers to minimize boilerplate. See [`crates/cargo-test-support/src/lib.rs`] for an -introduction to writing tests. -* Make sure `cargo test` passes. See [Running tests](#running-tests) below -for details on running tests. -* All code changes are expected to comply with the formatting suggested by `rustfmt`. -You can use `rustup component add rustfmt` to install `rustfmt` and use -`cargo fmt` to automatically format your code. -* Push your commits to GitHub and create a pull request against Cargo's -`master` branch. - -## Running tests - -Most of the tests are found in the `testsuite` integration test. This can be -run with a simple `cargo test`. - -Some tests only run on the nightly toolchain, and will be ignored on other -channels. It is recommended that you run tests with both nightly and stable to -ensure everything is working as expected. - -Some tests exercise cross compiling to a different target. This will require -you to install the appropriate target. This typically is the 32-bit target of -your host platform. For example, if your host is a 64-bit -`x86_64-unknown-linux-gnu`, then you should install the 32-bit target with -`rustup target add i686-unknown-linux-gnu`. If you don't have the alternate -target installed, there should be an error message telling you what to do. You -may also need to install additional tools for the target. For example, on Ubuntu -you should install the `gcc-multilib` package. - -If you can't install an alternate target, you can set the -`CFG_DISABLE_CROSS_TESTS=1` environment variable to disable these tests. The -Windows cross tests only support the MSVC toolchain. - -Some of the nightly tests require the `rustc-dev` and `llvm-tools-preview` -rustup components installed. These components include the compiler as a -library. This may already be installed with your nightly toolchain, but if it -isn't, run `rustup component add rustc-dev llvm-tools-preview ---toolchain=nightly`. - -There are several other packages in the repo for running specialized tests, -and you will need to run these tests separately by changing into its directory -and running `cargo test`: - -* [`crates/resolver-tests`] – This package runs tests on the dependency resolver. -* [`crates/cargo-platform`] – This is a standalone `cfg()` expression parser. - -The `build-std` tests are disabled by default, but you can run them by setting -the `CARGO_RUN_BUILD_STD_TESTS=1` environment variable and running `cargo test ---test build-std`. This requires the nightly channel, and also requires the -`rust-src` component installed with `rustup component add rust-src ---toolchain=nightly`. - -[`crates/resolver-tests`]: crates/resolver-tests -[`crates/cargo-platform`]: crates/cargo-platform - -## Pull requests - -After the pull request is made, a friendly bot will automatically assign a -reviewer; the review-process will make sure that the proposed changes are -sound. Please give the assigned reviewer sufficient time, especially during -weekends. If you don't get a reply, you may poke the core developers on [Zulip]. - -A merge of Cargo's master-branch and your changes is immediately queued -to be tested after the pull request is made. In case unforeseen -problems are discovered during this step (e.g., a failure on a platform you -originally did not develop on), you may ask for guidance. Push additional -commits to your branch to tackle these problems. - -The reviewer might point out changes deemed necessary. Please add them as -extra commits; this ensures that the reviewer can see what has changed since -the code was previously reviewed. Large or tricky changes may require several -passes of review and changes. - -Once the reviewer approves your pull request, a friendly bot picks it up -and [merges][mergequeue] it into Cargo's `master` branch. - -## Contributing to the documentation - -See the [documentation README](src/doc/README.md) for details on building the -documentation. - -## Issue Triage - -Sometimes an issue will stay open, even though the bug has been fixed. And -sometimes, the original bug may go stale because something has changed in the -meantime. - -It can be helpful to go through older bug reports and make sure that they are -still valid. Load up an older issue, double check that it's still true, and -leave a comment letting us know if it is or is not. The [least recently -updated sort][lru] is good for finding issues like this. - -Contributors with sufficient permissions on the Rust-repository can help by -adding labels to triage issues: - -* Yellow, **A**-prefixed labels state which **area** of the project an issue - relates to. - -* Magenta, **B**-prefixed labels identify bugs which are **blockers**. - -* Light purple, **C**-prefixed labels represent the **category** of an issue. - In particular, **C-feature-request** marks *proposals* for new features. If - an issue is **C-feature-request**, but is not **Feature accepted** or **I-nominated**, - then it was not thoroughly discussed, and might need some additional design - or perhaps should be implemented as an external subcommand first. Ping - @rust-lang/cargo if you want to send a PR for such issue. - -* Dark purple, **Command**-prefixed labels mean the issue has to do with a - specific cargo command. - -* Green, **E**-prefixed labels explain the level of **experience** or - **effort** necessary to fix the issue. [**E-mentor**][E-mentor] issues also - have some instructions on how to get started. - -* Red, **I**-prefixed labels indicate the **importance** of the issue. The - **[I-nominated][]** label indicates that an issue has been nominated for - prioritizing at the next triage meeting. - -* Purple gray, **O**-prefixed labels are the **operating system** or platform - that this issue is specific to. - -* Orange, **P**-prefixed labels indicate a bug's **priority**. These labels - are only assigned during triage meetings and replace the **[I-nominated][]** - label. - -* The light orange **relnotes** label marks issues that should be documented in - the release notes of the next release. - -* Dark blue, **Z**-prefixed labels are for unstable, nightly features. - -[githelp]: https://dont-be-afraid-to-commit.readthedocs.io/en/latest/git/commandlinegit.html -[development-models]: https://help.github.com/articles/about-collaborative-development-models/ -[gist]: https://gist.github.com/ -[new-issues]: https://github.com/rust-lang/cargo/issues/new -[mergequeue]: https://buildbot2.rust-lang.org/homu/queue/cargo -[security policy]: https://www.rust-lang.org/security.html -[lru]: https://github.com/rust-lang/cargo/issues?q=is%3Aissue+is%3Aopen+sort%3Aupdated-asc -[E-easy]: https://github.com/rust-lang/cargo/labels/E-easy -[E-mentor]: https://github.com/rust-lang/cargo/labels/E-mentor -[I-nominated]: https://github.com/rust-lang/cargo/labels/I-nominated -[Code of Conduct]: https://www.rust-lang.org/conduct.html -[Zulip]: https://rust-lang.zulipchat.com/#narrow/stream/246057-t-cargo -[`crates/cargo-test-support/src/lib.rs`]: crates/cargo-test-support/src/lib.rs -[irlo]: https://internals.rust-lang.org/ -[subcommands]: https://doc.rust-lang.org/cargo/reference/external-tools.html#custom-subcommands +[Cargo Contributor Guide]: https://rust-lang.github.io/cargo/contrib/ diff -Nru cargo-mozilla-0.47.0/Cargo.toml cargo-mozilla-0.57.0/Cargo.toml --- cargo-mozilla-0.47.0/Cargo.toml 2020-07-17 20:39:39.000000000 +0000 +++ cargo-mozilla-0.57.0/Cargo.toml 2021-10-04 17:24:20.000000000 +0000 @@ -1,6 +1,6 @@ [package] name = "cargo" -version = "0.47.0" +version = "0.57.0" edition = "2018" authors = ["Yehuda Katz ", "Carl Lerche ", @@ -21,65 +21,61 @@ [dependencies] atty = "0.2" bytesize = "1.0" -cargo-platform = { path = "crates/cargo-platform", version = "0.1.1" } -crates-io = { path = "crates/crates-io", version = "0.31.1" } -crossbeam-utils = "0.7" -crypto-hash = "0.3.1" -curl = { version = "0.4.23", features = ["http2"] } -curl-sys = "0.4.22" -env_logger = "0.7.0" +cargo-platform = { path = "crates/cargo-platform", version = "0.1.2" } +cargo-util = { path = "crates/cargo-util", version = "0.1.1" } +crates-io = { path = "crates/crates-io", version = "0.33.0" } +crossbeam-utils = "0.8" +curl = { version = "0.4.38", features = ["http2"] } +curl-sys = "0.4.48" +env_logger = "0.9.0" pretty_env_logger = { version = "0.4", optional = true } anyhow = "1.0" filetime = "0.2.9" flate2 = { version = "1.0.3", default-features = false, features = ["zlib"] } -git2 = "0.13.5" -git2-curl = "0.14.0" +git2 = "0.13.16" +git2-curl = "0.14.1" glob = "0.3.0" hex = "0.4" home = "0.5" humantime = "2.0.0" ignore = "0.4.7" lazy_static = "1.2.0" -jobserver = "0.1.21" +jobserver = "0.1.24" lazycell = "1.2.0" libc = "0.2" log = "0.4.6" -libgit2-sys = "0.12.7" +libgit2-sys = "0.12.18" memchr = "2.1.3" num_cpus = "1.0" -opener = "0.4" +opener = "0.5" percent-encoding = "2.0" -rustfix = "0.5.0" -same-file = "1" -semver = { version = "0.10", features = ["serde"] } -serde = { version = "1.0.82", features = ["derive"] } +rustfix = "0.6.0" +semver = { version = "1.0.3", features = ["serde"] } +serde = { version = "1.0.123", features = ["derive"] } serde_ignored = "0.1.0" serde_json = { version = "1.0.30", features = ["raw_value"] } shell-escape = "0.1.4" strip-ansi-escapes = "0.1.0" -tar = { version = "0.4.26", default-features = false } +tar = { version = "0.4.35", default-features = false } tempfile = "3.0" -termcolor = "1.0" -toml = "0.5.3" +termcolor = "1.1" +toml = "0.5.7" unicode-xid = "0.2.0" -url = "2.0" +url = "2.2.2" walkdir = "2.2" clap = "2.31.2" unicode-width = "0.1.5" openssl = { version = '0.10.11', optional = true } im-rc = "15.0.0" +itertools = "0.10.0" # A noop dependency that changes in the Rust repository, it's a bit of a hack. # See the `src/tools/rustc-workspace-hack/README.md` file in `rust-lang/rust` # for more information. rustc-workspace-hack = "1.0.0" -[target.'cfg(target_os = "macos")'.dependencies] -core-foundation = { version = "0.9.0", features = ["mac_os_10_7_support"] } - [target.'cfg(windows)'.dependencies] -miow = "0.3.1" -fwdansi = "1" +fwdansi = "1.1.0" [target.'cfg(windows)'.dependencies.winapi] version = "0.3" @@ -103,8 +99,12 @@ ] [dev-dependencies] -cargo-test-macro = { path = "crates/cargo-test-macro", version = "0.1.0" } -cargo-test-support = { path = "crates/cargo-test-support", version = "0.1.0" } +cargo-test-macro = { path = "crates/cargo-test-macro" } +cargo-test-support = { path = "crates/cargo-test-support" } + +[build-dependencies] +flate2 = { version = "1.0.3", default-features = false, features = ["zlib"] } +tar = { version = "0.4.26", default-features = false } [[bin]] name = "cargo" diff -Nru cargo-mozilla-0.47.0/README.md cargo-mozilla-0.57.0/README.md --- cargo-mozilla-0.47.0/README.md 2020-07-17 20:39:39.000000000 +0000 +++ cargo-mozilla-0.57.0/README.md 2021-10-04 17:24:20.000000000 +0000 @@ -66,8 +66,10 @@ ## Contributing -See [CONTRIBUTING.md](CONTRIBUTING.md). You may also find the architecture -documentation useful ([ARCHITECTURE.md](ARCHITECTURE.md)). +See the **[Cargo Contributor Guide]** for a complete introduction +to contributing to Cargo. + +[Cargo Contributor Guide]: https://rust-lang.github.io/cargo/contrib/ ## License diff -Nru cargo-mozilla-0.47.0/azure-pipelines.yml cargo-mozilla-0.57.0/azure-pipelines.yml --- cargo-mozilla-0.47.0/azure-pipelines.yml 2020-07-17 20:39:39.000000000 +0000 +++ cargo-mozilla-0.57.0/azure-pipelines.yml 1970-01-01 00:00:00.000000000 +0000 @@ -1,118 +0,0 @@ -trigger: - branches: - include: - - '*' - exclude: - - master - -jobs: -- job: Linux - pool: - vmImage: ubuntu-16.04 - steps: - - template: ci/azure-test-all.yml - strategy: - matrix: - stable: - TOOLCHAIN: stable - beta: - TOOLCHAIN: beta - nightly: - TOOLCHAIN: nightly - variables: - OTHER_TARGET: i686-unknown-linux-gnu - -- job: macOS - pool: - vmImage: macos-10.15 - steps: - - template: ci/azure-test-all.yml - variables: - TOOLCHAIN: stable - OTHER_TARGET: x86_64-apple-ios - -- job: Windows - pool: - vmImage: windows-2019 - steps: - - template: ci/azure-test-all.yml - strategy: - matrix: - x86_64-msvc: - TOOLCHAIN: stable-x86_64-pc-windows-msvc - OTHER_TARGET: i686-pc-windows-msvc - x86_64-gnu: - TOOLCHAIN: nightly-x86_64-pc-windows-gnu - OTHER_TARGET: i686-pc-windows-gnu - -- job: rustfmt - pool: - vmImage: ubuntu-16.04 - steps: - - template: ci/azure-install-rust.yml - - bash: rustup component add rustfmt - displayName: "Install rustfmt" - - bash: cargo fmt --all -- --check - displayName: "Check rustfmt (cargo)" - - bash: cd crates/cargo-test-macro && cargo fmt --all -- --check - displayName: "Check rustfmt (cargo-test-macro)" - - bash: cd crates/cargo-test-support && cargo fmt --all -- --check - displayName: "Check rustfmt (cargo-test-support)" - - bash: cd crates/crates-io && cargo fmt --all -- --check - displayName: "Check rustfmt (crates-io)" - - bash: cd crates/resolver-tests && cargo fmt --all -- --check - displayName: "Check rustfmt (resolver-tests)" - - bash: cd crates/cargo-platform && cargo fmt --all -- --check - displayName: "Check rustfmt (cargo-platform)" - variables: - TOOLCHAIN: stable - -- job: resolver - pool: - vmImage: ubuntu-16.04 - steps: - - template: ci/azure-install-rust.yml - - bash: cargo test --manifest-path crates/resolver-tests/Cargo.toml - displayName: "Resolver tests" - variables: - TOOLCHAIN: stable - -- job: build_std - pool: - vmImage: ubuntu-16.04 - steps: - - template: ci/azure-install-rust.yml - - bash: rustup component add rust-src - displayName: "Install rust-src" - - bash: cargo build - - bash: cargo test --test build-std - displayName: "tests" - variables: - TOOLCHAIN: nightly - CARGO_RUN_BUILD_STD_TESTS: 1 - -- job: docs - pool: - vmImage: ubuntu-16.04 - variables: - TOOLCHAIN: nightly - steps: - - template: ci/azure-install-rust.yml - - bash: | - set -e - mkdir mdbook - curl -Lf https://github.com/rust-lang/mdBook/releases/download/v0.3.7/mdbook-v0.3.7-x86_64-unknown-linux-gnu.tar.gz | tar -xz --directory=./mdbook - echo "##vso[task.prependpath]`pwd`/mdbook" - displayName: "Install mdbook" - - bash: cargo doc --no-deps - displayName: "Build documentation" - - bash: cd src/doc && mdbook build --dest-dir ../../target/doc - displayName: "Build mdbook documentation" - - bash: | - set -e - rustup component add rust-docs - cd src/doc - curl -sSLo linkcheck.sh \ - https://raw.githubusercontent.com/rust-lang/rust/master/src/tools/linkchecker/linkcheck.sh - sh linkcheck.sh --all cargo - displayName: "Check for broken links" diff -Nru cargo-mozilla-0.47.0/build.rs cargo-mozilla-0.57.0/build.rs --- cargo-mozilla-0.47.0/build.rs 1970-01-01 00:00:00.000000000 +0000 +++ cargo-mozilla-0.57.0/build.rs 2021-10-04 17:24:20.000000000 +0000 @@ -0,0 +1,39 @@ +use flate2::{Compression, GzBuilder}; +use std::ffi::OsStr; +use std::fs; +use std::path::Path; + +fn main() { + compress_man(); +} + +fn compress_man() { + let out_path = Path::new(&std::env::var("OUT_DIR").unwrap()).join("man.tgz"); + let dst = fs::File::create(out_path).unwrap(); + let encoder = GzBuilder::new() + .filename("man.tar") + .write(dst, Compression::best()); + let mut ar = tar::Builder::new(encoder); + ar.mode(tar::HeaderMode::Deterministic); + + let mut add_files = |dir, extension| { + let mut files = fs::read_dir(dir) + .unwrap() + .map(|e| e.unwrap().path()) + .collect::>(); + files.sort(); + for path in files { + if path.extension() != Some(extension) { + continue; + } + println!("cargo:rerun-if-changed={}", path.display()); + ar.append_path_with_name(&path, path.file_name().unwrap()) + .unwrap(); + } + }; + + add_files(Path::new("src/etc/man"), OsStr::new("1")); + add_files(Path::new("src/doc/man/generated_txt"), OsStr::new("txt")); + let encoder = ar.into_inner().unwrap(); + encoder.finish().unwrap(); +} diff -Nru cargo-mozilla-0.47.0/ci/azure-install-rust.yml cargo-mozilla-0.57.0/ci/azure-install-rust.yml --- cargo-mozilla-0.47.0/ci/azure-install-rust.yml 2020-07-17 20:39:39.000000000 +0000 +++ cargo-mozilla-0.57.0/ci/azure-install-rust.yml 1970-01-01 00:00:00.000000000 +0000 @@ -1,18 +0,0 @@ -steps: - - bash: | - set -e - rustup set profile minimal - rustup component remove --toolchain=$TOOLCHAIN rust-docs || echo "already removed" - rustup update --no-self-update $TOOLCHAIN - if [[ "$TOOLCHAIN" == "nightly"* ]]; then - rustup component add --toolchain=$TOOLCHAIN rustc-dev llvm-tools-preview rust-docs - fi - rustup default $TOOLCHAIN - displayName: Install rust - - - bash: | - set -ex - rustup -V - rustc -Vv - cargo -V - displayName: Query rust and cargo versions diff -Nru cargo-mozilla-0.47.0/ci/azure-test-all.yml cargo-mozilla-0.57.0/ci/azure-test-all.yml --- cargo-mozilla-0.47.0/ci/azure-test-all.yml 2020-07-17 20:39:39.000000000 +0000 +++ cargo-mozilla-0.57.0/ci/azure-test-all.yml 1970-01-01 00:00:00.000000000 +0000 @@ -1,33 +0,0 @@ -steps: -- checkout: self - fetchDepth: 1 - -- template: azure-install-rust.yml - -- bash: rustup target add $OTHER_TARGET - displayName: "Install cross-compile target" - -- bash: sudo apt update -y && sudo apt install gcc-multilib -y - displayName: "Install gcc-multilib (linux)" - condition: and(succeeded(), eq(variables['Agent.OS'], 'Linux')) - -# Some tests also rely on rustfmt -- bash: rustup component add rustfmt || echo "rustfmt not available" - displayName: "Install rustfmt (maybe)" - -# Deny warnings on CI to avoid warnings getting into the codebase, and note the -# `force-system-lib-on-osx` which is intended to fix compile issues on OSX where -# compiling curl from source on OSX yields linker errors on Azure. -# -# Note that the curl issue is traced back to alexcrichton/curl-rust#279 where it -# looks like the OSX version we're actually running on is such that a symbol is -# emitted that's never worked. For now force the system library to be used to -# fix the link errors. -- bash: cargo test --features 'deny-warnings curl/force-system-lib-on-osx' - displayName: "cargo test" - -- bash: cargo test -p cargo-test-support - displayName: "cargo test -p cargo-test-support" - -- bash: cargo test -p cargo-platform - displayName: "cargo test -p cargo-platform" diff -Nru cargo-mozilla-0.47.0/ci/validate-man.sh cargo-mozilla-0.57.0/ci/validate-man.sh --- cargo-mozilla-0.47.0/ci/validate-man.sh 1970-01-01 00:00:00.000000000 +0000 +++ cargo-mozilla-0.57.0/ci/validate-man.sh 2021-10-04 17:24:20.000000000 +0000 @@ -0,0 +1,26 @@ +#!/bin/bash +# This script validates that there aren't any changes to the man pages. + +set -e + +cd src/doc + +changes=$(git status --porcelain) +if [ -n "$changes" ] +then + echo "git directory must be clean before running this script." + exit 1 +fi + +./build-man.sh + +changes=$(git status --porcelain) +if [ -n "$changes" ] +then + echo "Detected changes in man pages:" + echo "$changes" + echo + echo "Please run './build-man.sh' in the src/doc directory to rebuild the" + echo "man pages, and commit the changes." + exit 1 +fi diff -Nru cargo-mozilla-0.47.0/crates/cargo-platform/Cargo.toml cargo-mozilla-0.57.0/crates/cargo-platform/Cargo.toml --- cargo-mozilla-0.47.0/crates/cargo-platform/Cargo.toml 2020-07-17 20:39:39.000000000 +0000 +++ cargo-mozilla-0.57.0/crates/cargo-platform/Cargo.toml 2021-10-04 17:24:20.000000000 +0000 @@ -1,6 +1,6 @@ [package] name = "cargo-platform" -version = "0.1.1" +version = "0.1.2" authors = ["The Cargo Project Developers"] edition = "2018" license = "MIT OR Apache-2.0" diff -Nru cargo-mozilla-0.47.0/crates/cargo-platform/src/cfg.rs cargo-mozilla-0.57.0/crates/cargo-platform/src/cfg.rs --- cargo-mozilla-0.47.0/crates/cargo-platform/src/cfg.rs 2020-07-17 20:39:39.000000000 +0000 +++ cargo-mozilla-0.57.0/crates/cargo-platform/src/cfg.rs 2021-10-04 17:24:20.000000000 +0000 @@ -298,11 +298,11 @@ } fn is_ident_start(ch: char) -> bool { - ch == '_' || ('a' <= ch && ch <= 'z') || ('A' <= ch && ch <= 'Z') + ch == '_' || ch.is_ascii_alphabetic() } fn is_ident_rest(ch: char) -> bool { - is_ident_start(ch) || ('0' <= ch && ch <= '9') + is_ident_start(ch) || ch.is_ascii_digit() } impl<'a> Token<'a> { diff -Nru cargo-mozilla-0.47.0/crates/cargo-test-macro/src/lib.rs cargo-mozilla-0.57.0/crates/cargo-test-macro/src/lib.rs --- cargo-mozilla-0.47.0/crates/cargo-test-macro/src/lib.rs 2020-07-17 20:39:39.000000000 +0000 +++ cargo-mozilla-0.57.0/crates/cargo-test-macro/src/lib.rs 2021-10-04 17:24:20.000000000 +0000 @@ -31,8 +31,12 @@ } }; - let mut new_body = - to_token_stream("let _test_guard = cargo_test_support::paths::init_root();"); + let mut new_body = to_token_stream( + r#"let _test_guard = { + let tmp_dir = option_env!("CARGO_TARGET_TMPDIR"); + cargo_test_support::paths::init_root(tmp_dir) + };"#, + ); // If this is a `build_std` test (aka `tests/build-std/*.rs`) then they // only run on nightly and they only run when specifically instructed to diff -Nru cargo-mozilla-0.47.0/crates/cargo-test-support/Cargo.toml cargo-mozilla-0.57.0/crates/cargo-test-support/Cargo.toml --- cargo-mozilla-0.47.0/crates/cargo-test-support/Cargo.toml 2020-07-17 20:39:39.000000000 +0000 +++ cargo-mozilla-0.57.0/crates/cargo-test-support/Cargo.toml 2021-10-04 17:24:20.000000000 +0000 @@ -9,14 +9,18 @@ doctest = false [dependencies] -cargo = { path = "../.." } +anyhow = "1.0.34" cargo-test-macro = { path = "../cargo-test-macro" } +cargo-util = { path = "../cargo-util" } filetime = "0.2" flate2 = { version = "1.0", default-features = false, features = ["zlib"] } -git2 = "0.13" +git2 = "0.13.16" glob = "0.3" +itertools = "0.10.0" lazy_static = "1.0" remove_dir_all = "0.5" serde_json = "1.0" tar = { version = "0.4.18", default-features = false } -url = "2.0" +termcolor = "1.1.2" +toml = "0.5.7" +url = "2.2.2" diff -Nru cargo-mozilla-0.47.0/crates/cargo-test-support/build.rs cargo-mozilla-0.57.0/crates/cargo-test-support/build.rs --- cargo-mozilla-0.47.0/crates/cargo-test-support/build.rs 1970-01-01 00:00:00.000000000 +0000 +++ cargo-mozilla-0.57.0/crates/cargo-test-support/build.rs 2021-10-04 17:24:20.000000000 +0000 @@ -0,0 +1,6 @@ +fn main() { + println!( + "cargo:rustc-env=NATIVE_ARCH={}", + std::env::var("TARGET").unwrap() + ); +} diff -Nru cargo-mozilla-0.47.0/crates/cargo-test-support/src/compare.rs cargo-mozilla-0.57.0/crates/cargo-test-support/src/compare.rs --- cargo-mozilla-0.47.0/crates/cargo-test-support/src/compare.rs 1970-01-01 00:00:00.000000000 +0000 +++ cargo-mozilla-0.57.0/crates/cargo-test-support/src/compare.rs 2021-10-04 17:24:20.000000000 +0000 @@ -0,0 +1,583 @@ +//! Routines for comparing and diffing output. +//! +//! # Patterns +//! +//! Many of these functions support special markup to assist with comparing +//! text that may vary or is otherwise uninteresting for the test at hand. The +//! supported patterns are: +//! +//! - `[..]` is a wildcard that matches 0 or more characters on the same line +//! (similar to `.*` in a regex). It is non-greedy. +//! - `[EXE]` optionally adds `.exe` on Windows (empty string on other +//! platforms). +//! - `[ROOT]` is the path to the test directory's root. +//! - `[CWD]` is the working directory of the process that was run. +//! - There is a wide range of substitutions (such as `[COMPILING]` or +//! `[WARNING]`) to match cargo's "status" output and allows you to ignore +//! the alignment. See the source of `substitute_macros` for a complete list +//! of substitutions. +//! +//! # Normalization +//! +//! In addition to the patterns described above, the strings are normalized +//! in such a way to avoid unwanted differences. The normalizations are: +//! +//! - Raw tab characters are converted to the string ``. This is helpful +//! so that raw tabs do not need to be written in the expected string, and +//! to avoid confusion of tabs vs spaces. +//! - Backslashes are converted to forward slashes to deal with Windows paths. +//! This helps so that all tests can be written assuming forward slashes. +//! Other heuristics are applied to try to ensure Windows-style paths aren't +//! a problem. +//! - Carriage returns are removed, which can help when running on Windows. + +use crate::diff; +use crate::paths; +use anyhow::{bail, Context, Result}; +use serde_json::Value; +use std::env; +use std::fmt; +use std::path::Path; +use std::str; +use url::Url; + +/// Normalizes the output so that it can be compared against the expected value. +fn normalize_actual(actual: &str, cwd: Option<&Path>) -> String { + // It's easier to read tabs in outputs if they don't show up as literal + // hidden characters + let actual = actual.replace('\t', ""); + if cfg!(windows) { + // Let's not deal with \r\n vs \n on windows... + let actual = actual.replace('\r', ""); + normalize_windows(&actual, cwd) + } else { + actual + } +} + +/// Normalizes the expected string so that it can be compared against the actual output. +fn normalize_expected(expected: &str, cwd: Option<&Path>) -> String { + let expected = substitute_macros(expected); + if cfg!(windows) { + normalize_windows(&expected, cwd) + } else { + let expected = match cwd { + None => expected, + Some(cwd) => expected.replace("[CWD]", &cwd.display().to_string()), + }; + let expected = expected.replace("[ROOT]", &paths::root().display().to_string()); + expected + } +} + +/// Normalizes text for both actual and expected strings on Windows. +fn normalize_windows(text: &str, cwd: Option<&Path>) -> String { + // Let's not deal with / vs \ (windows...) + let text = text.replace('\\', "/"); + + // Weirdness for paths on Windows extends beyond `/` vs `\` apparently. + // Namely paths like `c:\` and `C:\` are equivalent and that can cause + // issues. The return value of `env::current_dir()` may return a + // lowercase drive name, but we round-trip a lot of values through `Url` + // which will auto-uppercase the drive name. To just ignore this + // distinction we try to canonicalize as much as possible, taking all + // forms of a path and canonicalizing them to one. + let replace_path = |s: &str, path: &Path, with: &str| { + let path_through_url = Url::from_file_path(path).unwrap().to_file_path().unwrap(); + let path1 = path.display().to_string().replace('\\', "/"); + let path2 = path_through_url.display().to_string().replace('\\', "/"); + s.replace(&path1, with) + .replace(&path2, with) + .replace(with, &path1) + }; + + let text = match cwd { + None => text, + Some(p) => replace_path(&text, p, "[CWD]"), + }; + + // Similar to cwd above, perform similar treatment to the root path + // which in theory all of our paths should otherwise get rooted at. + let root = paths::root(); + let text = replace_path(&text, &root, "[ROOT]"); + + text +} + +fn substitute_macros(input: &str) -> String { + let macros = [ + ("[RUNNING]", " Running"), + ("[COMPILING]", " Compiling"), + ("[CHECKING]", " Checking"), + ("[COMPLETED]", " Completed"), + ("[CREATED]", " Created"), + ("[FINISHED]", " Finished"), + ("[ERROR]", "error:"), + ("[WARNING]", "warning:"), + ("[NOTE]", "note:"), + ("[HELP]", "help:"), + ("[DOCUMENTING]", " Documenting"), + ("[FRESH]", " Fresh"), + ("[UPDATING]", " Updating"), + ("[ADDING]", " Adding"), + ("[REMOVING]", " Removing"), + ("[DOCTEST]", " Doc-tests"), + ("[PACKAGING]", " Packaging"), + ("[DOWNLOADING]", " Downloading"), + ("[DOWNLOADED]", " Downloaded"), + ("[UPLOADING]", " Uploading"), + ("[VERIFYING]", " Verifying"), + ("[ARCHIVING]", " Archiving"), + ("[INSTALLING]", " Installing"), + ("[REPLACING]", " Replacing"), + ("[UNPACKING]", " Unpacking"), + ("[SUMMARY]", " Summary"), + ("[FIXED]", " Fixed"), + ("[FIXING]", " Fixing"), + ("[EXE]", env::consts::EXE_SUFFIX), + ("[IGNORED]", " Ignored"), + ("[INSTALLED]", " Installed"), + ("[REPLACED]", " Replaced"), + ("[BUILDING]", " Building"), + ("[LOGIN]", " Login"), + ("[LOGOUT]", " Logout"), + ("[YANK]", " Yank"), + ("[OWNER]", " Owner"), + ("[MIGRATING]", " Migrating"), + ]; + let mut result = input.to_owned(); + for &(pat, subst) in ¯os { + result = result.replace(pat, subst) + } + result +} + +/// Compares one string against another, checking that they both match. +/// +/// See [Patterns](index.html#patterns) for more information on pattern matching. +/// +/// - `description` explains where the output is from (usually "stdout" or "stderr"). +/// - `other_output` is other output to display in the error (usually stdout or stderr). +pub fn match_exact( + expected: &str, + actual: &str, + description: &str, + other_output: &str, + cwd: Option<&Path>, +) -> Result<()> { + let expected = normalize_expected(expected, cwd); + let actual = normalize_actual(actual, cwd); + let e: Vec<_> = expected.lines().map(WildStr::new).collect(); + let a: Vec<_> = actual.lines().map(WildStr::new).collect(); + if e == a { + return Ok(()); + } + let diff = diff::colored_diff(&e, &a); + bail!( + "{} did not match:\n\ + {}\n\n\ + other output:\n\ + {}\n", + description, + diff, + other_output, + ); +} + +/// Convenience wrapper around [`match_exact`] which will panic on error. +#[track_caller] +pub fn assert_match_exact(expected: &str, actual: &str) { + if let Err(e) = match_exact(expected, actual, "", "", None) { + crate::panic_error("", e); + } +} + +/// Checks that the given string contains the given lines, ignoring the order +/// of the lines. +/// +/// See [Patterns](index.html#patterns) for more information on pattern matching. +pub fn match_unordered(expected: &str, actual: &str, cwd: Option<&Path>) -> Result<()> { + let expected = normalize_expected(expected, cwd); + let actual = normalize_actual(actual, cwd); + let e: Vec<_> = expected.lines().map(|line| WildStr::new(line)).collect(); + let mut a: Vec<_> = actual.lines().map(|line| WildStr::new(line)).collect(); + // match more-constrained lines first, although in theory we'll + // need some sort of recursive match here. This handles the case + // that you expect "a\n[..]b" and two lines are printed out, + // "ab\n"a", where technically we do match unordered but a naive + // search fails to find this. This simple sort at least gets the + // test suite to pass for now, but we may need to get more fancy + // if tests start failing again. + a.sort_by_key(|s| s.line.len()); + let mut changes = Vec::new(); + let mut a_index = 0; + let mut failure = false; + + use crate::diff::Change; + for (e_i, e_line) in e.into_iter().enumerate() { + match a.iter().position(|a_line| e_line == *a_line) { + Some(index) => { + let a_line = a.remove(index); + changes.push(Change::Keep(e_i, index, a_line)); + a_index += 1; + } + None => { + failure = true; + changes.push(Change::Remove(e_i, e_line)); + } + } + } + for unmatched in a { + failure = true; + changes.push(Change::Add(a_index, unmatched)); + a_index += 1; + } + if failure { + bail!( + "Expected lines did not match (ignoring order):\n{}\n", + diff::render_colored_changes(&changes) + ); + } else { + Ok(()) + } +} + +/// Checks that the given string contains the given contiguous lines +/// somewhere. +/// +/// See [Patterns](index.html#patterns) for more information on pattern matching. +pub fn match_contains(expected: &str, actual: &str, cwd: Option<&Path>) -> Result<()> { + let expected = normalize_expected(expected, cwd); + let actual = normalize_actual(actual, cwd); + let e: Vec<_> = expected.lines().map(|line| WildStr::new(line)).collect(); + let a: Vec<_> = actual.lines().map(|line| WildStr::new(line)).collect(); + if e.len() == 0 { + bail!("expected length must not be zero"); + } + for window in a.windows(e.len()) { + if window == e { + return Ok(()); + } + } + bail!( + "expected to find:\n\ + {}\n\n\ + did not find in output:\n\ + {}", + expected, + actual + ); +} + +/// Checks that the given string does not contain the given contiguous lines +/// anywhere. +/// +/// See [Patterns](index.html#patterns) for more information on pattern matching. +pub fn match_does_not_contain(expected: &str, actual: &str, cwd: Option<&Path>) -> Result<()> { + if match_contains(expected, actual, cwd).is_ok() { + bail!( + "expected not to find:\n\ + {}\n\n\ + but found in output:\n\ + {}", + expected, + actual + ); + } else { + Ok(()) + } +} + +/// Checks that the given string contains the given contiguous lines +/// somewhere, and should be repeated `number` times. +/// +/// See [Patterns](index.html#patterns) for more information on pattern matching. +pub fn match_contains_n( + expected: &str, + number: usize, + actual: &str, + cwd: Option<&Path>, +) -> Result<()> { + let expected = normalize_expected(expected, cwd); + let actual = normalize_actual(actual, cwd); + let e: Vec<_> = expected.lines().map(|line| WildStr::new(line)).collect(); + let a: Vec<_> = actual.lines().map(|line| WildStr::new(line)).collect(); + if e.len() == 0 { + bail!("expected length must not be zero"); + } + let matches = a.windows(e.len()).filter(|window| *window == e).count(); + if matches == number { + Ok(()) + } else { + bail!( + "expected to find {} occurrences of:\n\ + {}\n\n\ + but found {} matches in the output:\n\ + {}", + number, + expected, + matches, + actual + ) + } +} + +/// Checks that the given string has a line that contains the given patterns, +/// and that line also does not contain the `without` patterns. +/// +/// See [Patterns](index.html#patterns) for more information on pattern matching. +/// +/// See [`crate::Execs::with_stderr_line_without`] for an example and cautions +/// against using. +pub fn match_with_without( + actual: &str, + with: &[String], + without: &[String], + cwd: Option<&Path>, +) -> Result<()> { + let actual = normalize_actual(actual, cwd); + let norm = |s: &String| format!("[..]{}[..]", normalize_expected(s, cwd)); + let with: Vec<_> = with.iter().map(norm).collect(); + let without: Vec<_> = without.iter().map(norm).collect(); + let with_wild: Vec<_> = with.iter().map(|w| WildStr::new(w)).collect(); + let without_wild: Vec<_> = without.iter().map(|w| WildStr::new(w)).collect(); + + let matches: Vec<_> = actual + .lines() + .map(WildStr::new) + .filter(|line| with_wild.iter().all(|with| with == line)) + .filter(|line| !without_wild.iter().any(|without| without == line)) + .collect(); + match matches.len() { + 0 => bail!( + "Could not find expected line in output.\n\ + With contents: {:?}\n\ + Without contents: {:?}\n\ + Actual stderr:\n\ + {}\n", + with, + without, + actual + ), + 1 => Ok(()), + _ => bail!( + "Found multiple matching lines, but only expected one.\n\ + With contents: {:?}\n\ + Without contents: {:?}\n\ + Matching lines:\n\ + {}\n", + with, + without, + itertools::join(matches, "\n") + ), + } +} + +/// Checks that the given string of JSON objects match the given set of +/// expected JSON objects. +/// +/// See [`crate::Execs::with_json`] for more details. +pub fn match_json(expected: &str, actual: &str, cwd: Option<&Path>) -> Result<()> { + let (exp_objs, act_objs) = collect_json_objects(expected, actual)?; + if exp_objs.len() != act_objs.len() { + bail!( + "expected {} json lines, got {}, stdout:\n{}", + exp_objs.len(), + act_objs.len(), + actual + ); + } + for (exp_obj, act_obj) in exp_objs.iter().zip(act_objs) { + find_json_mismatch(exp_obj, &act_obj, cwd)?; + } + Ok(()) +} + +/// Checks that the given string of JSON objects match the given set of +/// expected JSON objects, ignoring their order. +/// +/// See [`crate::Execs::with_json_contains_unordered`] for more details and +/// cautions when using. +pub fn match_json_contains_unordered( + expected: &str, + actual: &str, + cwd: Option<&Path>, +) -> Result<()> { + let (exp_objs, mut act_objs) = collect_json_objects(expected, actual)?; + for exp_obj in exp_objs { + match act_objs + .iter() + .position(|act_obj| find_json_mismatch(&exp_obj, act_obj, cwd).is_ok()) + { + Some(index) => act_objs.remove(index), + None => { + bail!( + "Did not find expected JSON:\n\ + {}\n\ + Remaining available output:\n\ + {}\n", + serde_json::to_string_pretty(&exp_obj).unwrap(), + itertools::join( + act_objs.iter().map(|o| serde_json::to_string(o).unwrap()), + "\n" + ) + ); + } + }; + } + Ok(()) +} + +fn collect_json_objects( + expected: &str, + actual: &str, +) -> Result<(Vec, Vec)> { + let expected_objs: Vec<_> = expected + .split("\n\n") + .map(|expect| { + expect + .parse() + .with_context(|| format!("failed to parse expected JSON object:\n{}", expect)) + }) + .collect::>()?; + let actual_objs: Vec<_> = actual + .lines() + .filter(|line| line.starts_with('{')) + .map(|line| { + line.parse() + .with_context(|| format!("failed to parse JSON object:\n{}", line)) + }) + .collect::>()?; + Ok((expected_objs, actual_objs)) +} + +/// Compares JSON object for approximate equality. +/// You can use `[..]` wildcard in strings (useful for OS-dependent things such +/// as paths). You can use a `"{...}"` string literal as a wildcard for +/// arbitrary nested JSON (useful for parts of object emitted by other programs +/// (e.g., rustc) rather than Cargo itself). +pub fn find_json_mismatch(expected: &Value, actual: &Value, cwd: Option<&Path>) -> Result<()> { + match find_json_mismatch_r(expected, actual, cwd) { + Some((expected_part, actual_part)) => bail!( + "JSON mismatch\nExpected:\n{}\nWas:\n{}\nExpected part:\n{}\nActual part:\n{}\n", + serde_json::to_string_pretty(expected).unwrap(), + serde_json::to_string_pretty(&actual).unwrap(), + serde_json::to_string_pretty(expected_part).unwrap(), + serde_json::to_string_pretty(actual_part).unwrap(), + ), + None => Ok(()), + } +} + +fn find_json_mismatch_r<'a>( + expected: &'a Value, + actual: &'a Value, + cwd: Option<&Path>, +) -> Option<(&'a Value, &'a Value)> { + use serde_json::Value::*; + match (expected, actual) { + (&Number(ref l), &Number(ref r)) if l == r => None, + (&Bool(l), &Bool(r)) if l == r => None, + (&String(ref l), _) if l == "{...}" => None, + (&String(ref l), &String(ref r)) => { + if match_exact(l, r, "", "", cwd).is_err() { + Some((expected, actual)) + } else { + None + } + } + (&Array(ref l), &Array(ref r)) => { + if l.len() != r.len() { + return Some((expected, actual)); + } + + l.iter() + .zip(r.iter()) + .filter_map(|(l, r)| find_json_mismatch_r(l, r, cwd)) + .next() + } + (&Object(ref l), &Object(ref r)) => { + let same_keys = l.len() == r.len() && l.keys().all(|k| r.contains_key(k)); + if !same_keys { + return Some((expected, actual)); + } + + l.values() + .zip(r.values()) + .filter_map(|(l, r)| find_json_mismatch_r(l, r, cwd)) + .next() + } + (&Null, &Null) => None, + // Magic string literal `"{...}"` acts as wildcard for any sub-JSON. + _ => Some((expected, actual)), + } +} + +/// A single line string that supports `[..]` wildcard matching. +pub struct WildStr<'a> { + has_meta: bool, + line: &'a str, +} + +impl<'a> WildStr<'a> { + pub fn new(line: &'a str) -> WildStr<'a> { + WildStr { + has_meta: line.contains("[..]"), + line, + } + } +} + +impl<'a> PartialEq for WildStr<'a> { + fn eq(&self, other: &Self) -> bool { + match (self.has_meta, other.has_meta) { + (false, false) => self.line == other.line, + (true, false) => meta_cmp(self.line, other.line), + (false, true) => meta_cmp(other.line, self.line), + (true, true) => panic!("both lines cannot have [..]"), + } + } +} + +fn meta_cmp(a: &str, mut b: &str) -> bool { + for (i, part) in a.split("[..]").enumerate() { + match b.find(part) { + Some(j) => { + if i == 0 && j != 0 { + return false; + } + b = &b[j + part.len()..]; + } + None => return false, + } + } + b.is_empty() || a.ends_with("[..]") +} + +impl fmt::Display for WildStr<'_> { + fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { + f.write_str(&self.line) + } +} + +impl fmt::Debug for WildStr<'_> { + fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { + write!(f, "{:?}", self.line) + } +} + +#[test] +fn wild_str_cmp() { + for (a, b) in &[ + ("a b", "a b"), + ("a[..]b", "a b"), + ("a[..]", "a b"), + ("[..]", "a b"), + ("[..]b", "a b"), + ] { + assert_eq!(WildStr::new(a), WildStr::new(b)); + } + for (a, b) in &[("[..]b", "c"), ("b", "c"), ("b", "cb")] { + assert_ne!(WildStr::new(a), WildStr::new(b)); + } +} diff -Nru cargo-mozilla-0.47.0/crates/cargo-test-support/src/cross_compile.rs cargo-mozilla-0.57.0/crates/cargo-test-support/src/cross_compile.rs --- cargo-mozilla-0.47.0/crates/cargo-test-support/src/cross_compile.rs 2020-07-17 20:39:39.000000000 +0000 +++ cargo-mozilla-0.57.0/crates/cargo-test-support/src/cross_compile.rs 2021-10-04 17:24:20.000000000 +0000 @@ -10,8 +10,7 @@ //! These tests are all disabled on rust-lang/rust's CI, but run in Cargo's CI. use crate::{basic_manifest, main_file, project}; -use cargo::util::ProcessError; -use cargo::CargoResult; +use cargo_util::ProcessError; use std::env; use std::fmt::Write; use std::process::{Command, Output}; @@ -41,7 +40,7 @@ let cross_target = alternate(); - let run_cross_test = || -> CargoResult { + let run_cross_test = || -> anyhow::Result { let p = project() .at("cross_test") .file("Cargo.toml", &basic_manifest("cross_test", "1.0.0")) @@ -177,7 +176,24 @@ }, } - panic!(message); + panic!("{}", message); +} + +/// The arch triple of the test-running host. +pub fn native() -> &'static str { + env!("NATIVE_ARCH") +} + +pub fn native_arch() -> &'static str { + match native() + .split("-") + .next() + .expect("Target triple has unexpected format") + { + "x86_64" => "x86_64", + "i686" => "x86", + _ => panic!("This test should be gated on cross_compile::disabled."), + } } /// The alternate target-triple to build with. @@ -205,6 +221,15 @@ } } +/// A target-triple that is neither the host nor the target. +/// +/// Rustc may not work with it and it's alright, apart from being a +/// valid target triple it is supposed to be used only as a +/// placeholder for targets that should not be considered. +pub fn unused() -> &'static str { + "wasm32-unknown-unknown" +} + /// Whether or not the host can run cross-compiled executables. pub fn can_run_on_host() -> bool { if disabled() { diff -Nru cargo-mozilla-0.47.0/crates/cargo-test-support/src/diff.rs cargo-mozilla-0.57.0/crates/cargo-test-support/src/diff.rs --- cargo-mozilla-0.47.0/crates/cargo-test-support/src/diff.rs 1970-01-01 00:00:00.000000000 +0000 +++ cargo-mozilla-0.57.0/crates/cargo-test-support/src/diff.rs 2021-10-04 17:24:20.000000000 +0000 @@ -0,0 +1,174 @@ +//! A simple Myers diff implementation. +//! +//! This focuses on being short and simple, and the expense of being +//! inefficient. A key characteristic here is that this supports cargotest's +//! `[..]` wildcard matching. That means things like hashing can't be used. +//! Since Cargo's output tends to be small, this should be sufficient. + +use std::fmt; +use std::io::Write; +use termcolor::{Ansi, Color, ColorSpec, NoColor, WriteColor}; + +/// A single line change to be applied to the original. +#[derive(Debug, Eq, PartialEq)] +pub enum Change { + Add(usize, T), + Remove(usize, T), + Keep(usize, usize, T), +} + +pub fn diff<'a, T>(a: &'a [T], b: &'a [T]) -> Vec> +where + T: PartialEq, +{ + if a.is_empty() && b.is_empty() { + return vec![]; + } + let mut diff = vec![]; + for (prev_x, prev_y, x, y) in backtrack(&a, &b) { + if x == prev_x { + diff.push(Change::Add(prev_y + 1, &b[prev_y])); + } else if y == prev_y { + diff.push(Change::Remove(prev_x + 1, &a[prev_x])); + } else { + diff.push(Change::Keep(prev_x + 1, prev_y + 1, &a[prev_x])); + } + } + diff.reverse(); + diff +} + +fn shortest_edit(a: &[T], b: &[T]) -> Vec> +where + T: PartialEq, +{ + let max = a.len() + b.len(); + let mut v = vec![0; 2 * max + 1]; + let mut trace = vec![]; + for d in 0..=max { + trace.push(v.clone()); + for k in (0..=(2 * d)).step_by(2) { + let mut x = if k == 0 || (k != 2 * d && v[max - d + k - 1] < v[max - d + k + 1]) { + // Move down + v[max - d + k + 1] + } else { + // Move right + v[max - d + k - 1] + 1 + }; + let mut y = x + d - k; + // Step diagonally as far as possible. + while x < a.len() && y < b.len() && a[x] == b[y] { + x += 1; + y += 1; + } + v[max - d + k] = x; + // Return if reached the bottom-right position. + if x >= a.len() && y >= b.len() { + return trace; + } + } + } + panic!("finished without hitting end?"); +} + +fn backtrack(a: &[T], b: &[T]) -> Vec<(usize, usize, usize, usize)> +where + T: PartialEq, +{ + let mut result = vec![]; + let mut x = a.len(); + let mut y = b.len(); + let max = x + y; + for (d, v) in shortest_edit(a, b).iter().enumerate().rev() { + let k = x + d - y; + let prev_k = if k == 0 || (k != 2 * d && v[max - d + k - 1] < v[max - d + k + 1]) { + k + 1 + } else { + k - 1 + }; + let prev_x = v[max - d + prev_k]; + let prev_y = (prev_x + d).saturating_sub(prev_k); + while x > prev_x && y > prev_y { + result.push((x - 1, y - 1, x, y)); + x -= 1; + y -= 1; + } + if d > 0 { + result.push((prev_x, prev_y, x, y)); + } + x = prev_x; + y = prev_y; + } + return result; +} + +pub fn colored_diff<'a, T>(a: &'a [T], b: &'a [T]) -> String +where + T: PartialEq + fmt::Display, +{ + let changes = diff(a, b); + render_colored_changes(&changes) +} + +pub fn render_colored_changes(changes: &[Change]) -> String { + // termcolor is not very ergonomic, but I don't want to bring in another dependency. + let mut red = ColorSpec::new(); + red.set_fg(Some(Color::Red)); + let mut green = ColorSpec::new(); + green.set_fg(Some(Color::Green)); + let mut dim = ColorSpec::new(); + dim.set_dimmed(true); + let mut v = Vec::new(); + let mut result: Box = if crate::is_ci() { + // Don't use color on CI. Even though GitHub can display colors, it + // makes reading the raw logs more difficult. + Box::new(NoColor::new(&mut v)) + } else { + Box::new(Ansi::new(&mut v)) + }; + + for change in changes { + let (nums, sign, color, text) = match change { + Change::Add(i, s) => (format!(" {:<4} ", i), '+', &green, s), + Change::Remove(i, s) => (format!("{:<4} ", i), '-', &red, s), + Change::Keep(x, y, s) => (format!("{:<4}{:<4} ", x, y), ' ', &dim, s), + }; + result.set_color(&dim).unwrap(); + write!(result, "{}", nums).unwrap(); + let mut bold = color.clone(); + bold.set_bold(true); + result.set_color(&bold).unwrap(); + write!(result, "{}", sign).unwrap(); + result.reset().unwrap(); + result.set_color(&color).unwrap(); + write!(result, "{}", text).unwrap(); + result.reset().unwrap(); + writeln!(result).unwrap(); + } + drop(result); + String::from_utf8(v).unwrap() +} + +#[cfg(test)] +pub fn compare(a: &str, b: &str) { + let a: Vec<_> = a.chars().collect(); + let b: Vec<_> = b.chars().collect(); + let changes = diff(&a, &b); + let mut result = vec![]; + for change in changes { + match change { + Change::Add(_, s) => result.push(*s), + Change::Remove(_, _s) => {} + Change::Keep(_, _, s) => result.push(*s), + } + } + assert_eq!(b, result); +} + +#[test] +fn basic_tests() { + compare("", ""); + compare("A", ""); + compare("", "B"); + compare("ABCABBA", "CBABAC"); +} diff -Nru cargo-mozilla-0.47.0/crates/cargo-test-support/src/git.rs cargo-mozilla-0.57.0/crates/cargo-test-support/src/git.rs --- cargo-mozilla-0.47.0/crates/cargo-test-support/src/git.rs 2020-07-17 20:39:39.000000000 +0000 +++ cargo-mozilla-0.57.0/crates/cargo-test-support/src/git.rs 2021-10-04 17:24:20.000000000 +0000 @@ -41,6 +41,7 @@ use crate::{path2url, project, Project, ProjectBuilder}; use std::fs; use std::path::{Path, PathBuf}; +use std::sync::Once; use url::Url; #[must_use] @@ -124,11 +125,26 @@ /// Initialize a new repository at the given path. pub fn init(path: &Path) -> git2::Repository { + default_search_path(); let repo = t!(git2::Repository::init(path)); default_repo_cfg(&repo); repo } +fn default_search_path() { + use crate::paths::global_root; + use git2::{opts::set_search_path, ConfigLevel}; + + static INIT: Once = Once::new(); + INIT.call_once(|| unsafe { + let path = global_root().join("blank_git_search_path"); + t!(set_search_path(ConfigLevel::System, &path)); + t!(set_search_path(ConfigLevel::Global, &path)); + t!(set_search_path(ConfigLevel::XDG, &path)); + t!(set_search_path(ConfigLevel::ProgramData, &path)); + }) +} + fn default_repo_cfg(repo: &git2::Repository) { let mut cfg = t!(repo.config()); t!(cfg.set_str("user.email", "foo@bar.com")); diff -Nru cargo-mozilla-0.47.0/crates/cargo-test-support/src/install.rs cargo-mozilla-0.57.0/crates/cargo-test-support/src/install.rs --- cargo-mozilla-0.47.0/crates/cargo-test-support/src/install.rs 2020-07-17 20:39:39.000000000 +0000 +++ cargo-mozilla-0.57.0/crates/cargo-test-support/src/install.rs 2021-10-04 17:24:20.000000000 +0000 @@ -6,10 +6,12 @@ /// has been installed. Example usage: /// /// assert_has_installed_exe(cargo_home(), "foo"); +#[track_caller] pub fn assert_has_installed_exe>(path: P, name: &'static str) { assert!(check_has_installed_exe(path, name)); } +#[track_caller] pub fn assert_has_not_installed_exe>(path: P, name: &'static str) { assert!(!check_has_installed_exe(path, name)); } diff -Nru cargo-mozilla-0.47.0/crates/cargo-test-support/src/lib.rs cargo-mozilla-0.57.0/crates/cargo-test-support/src/lib.rs --- cargo-mozilla-0.47.0/crates/cargo-test-support/src/lib.rs 2020-07-17 20:39:39.000000000 +0000 +++ cargo-mozilla-0.57.0/crates/cargo-test-support/src/lib.rs 2021-10-04 17:24:20.000000000 +0000 @@ -1,116 +1,14 @@ -/* -# Introduction to `support`. - -Cargo has a wide variety of integration tests that execute the `cargo` binary -and verify its behavior. The `support` module contains many helpers to make -this process easy. - -The general form of a test involves creating a "project", running cargo, and -checking the result. Projects are created with the `ProjectBuilder` where you -specify some files to create. The general form looks like this: - -``` -let p = project() - .file("src/main.rs", r#"fn main() { println!("hi!"); }"#) - .build(); -``` - -If you do not specify a `Cargo.toml` manifest using `file()`, one is -automatically created with a project name of `foo` using `basic_manifest()`. - -To run cargo, call the `cargo` method and make assertions on the execution: - -``` -p.cargo("run --bin foo") - .with_stderr( - "\ -[COMPILING] foo [..] -[FINISHED] [..] -[RUNNING] `target/debug/foo` -", - ) - .with_stdout("hi!") - .run(); -``` - -The project creates a mini sandbox under the "cargo integration test" -directory with each test getting a separate directory such as -`/path/to/cargo/target/cit/t123/`. Each project appears as a separate -directory. There is also an empty `home` directory created that will be used -as a home directory instead of your normal home directory. - -See `support::lines_match` for an explanation of the string pattern matching. - -Browse the `pub` functions in the `support` module for a variety of other -helpful utilities. - -## Testing Nightly Features - -If you are testing a Cargo feature that only works on "nightly" cargo, then -you need to call `masquerade_as_nightly_cargo` on the process builder like -this: - -``` -p.cargo("build").masquerade_as_nightly_cargo() -``` - -If you are testing a feature that only works on *nightly rustc* (such as -benchmarks), then you should exit the test if it is not running with nightly -rust, like this: - -``` -if !is_nightly() { - // Add a comment here explaining why this is necessary. - return; -} -``` - -## Platform-specific Notes - -When checking output, use `/` for paths even on Windows: the actual output -of `\` on Windows will be replaced with `/`. - -Be careful when executing binaries on Windows. You should not rename, delete, -or overwrite a binary immediately after running it. Under some conditions -Windows will fail with errors like "directory not empty" or "failed to remove" -or "access is denied". - -## Specifying Dependencies - -You should not write any tests that use the network such as contacting -crates.io. Typically, simple path dependencies are the easiest way to add a -dependency. Example: - -``` -let p = project() - .file("Cargo.toml", r#" - [package] - name = "foo" - version = "1.0.0" - - [dependencies] - bar = {path = "bar"} - "#) - .file("src/lib.rs", "extern crate bar;") - .file("bar/Cargo.toml", &basic_manifest("bar", "1.0.0")) - .file("bar/src/lib.rs", "") - .build(); -``` - -If you need to test with registry dependencies, see -`support::registry::Package` for creating packages you can depend on. - -If you need to test git dependencies, see `support::git` to create a git -dependency. - -*/ - -#![allow(clippy::needless_doctest_main)] // according to @ehuss this lint is fussy -#![allow(clippy::inefficient_to_string)] // this causes suggestions that result in `(*s).to_string()` +//! # Cargo test support. +//! +//! See for a guide on writing tests. + +#![allow(clippy::all)] +#![warn(clippy::needless_borrow)] +#![warn(clippy::redundant_clone)] use std::env; use std::ffi::OsStr; -use std::fmt; +use std::fmt::Write; use std::fs; use std::os; use std::path::{Path, PathBuf}; @@ -118,8 +16,9 @@ use std::str; use std::time::{self, Duration}; -use cargo::util::{is_ci, CargoResult, ProcessBuilder, ProcessError, Rustc}; -use serde_json::{self, Value}; +use anyhow::{bail, Result}; +use cargo_util::{is_ci, ProcessBuilder, ProcessError}; +use serde_json; use url::Url; use self::paths::CargoPathExt; @@ -129,18 +28,37 @@ ($e:expr) => { match $e { Ok(e) => e, - Err(e) => panic!("{} failed with {}", stringify!($e), e), + Err(e) => $crate::panic_error(&format!("failed running {}", stringify!($e)), e), } }; } +#[track_caller] +pub fn panic_error(what: &str, err: impl Into) -> ! { + let err = err.into(); + pe(what, err); + #[track_caller] + fn pe(what: &str, err: anyhow::Error) -> ! { + let mut result = format!("{}\nerror: {}", what, err); + for cause in err.chain().skip(1) { + drop(writeln!(result, "\nCaused by:")); + drop(write!(result, "{}", cause)); + } + panic!("\n{}", result); + } +} + pub use cargo_test_macro::cargo_test; +pub mod compare; pub mod cross_compile; +mod diff; pub mod git; +pub mod install; pub mod paths; pub mod publish; pub mod registry; +pub mod tools; /* * @@ -152,20 +70,36 @@ struct FileBuilder { path: PathBuf, body: String, + executable: bool, } impl FileBuilder { - pub fn new(path: PathBuf, body: &str) -> FileBuilder { + pub fn new(path: PathBuf, body: &str, executable: bool) -> FileBuilder { FileBuilder { path, body: body.to_string(), + executable: executable, } } - fn mk(&self) { + fn mk(&mut self) { + if self.executable { + self.path.set_extension(env::consts::EXE_EXTENSION); + } + self.dirname().mkdir_p(); fs::write(&self.path, &self.body) .unwrap_or_else(|e| panic!("could not create file {}: {}", self.path.display(), e)); + + #[cfg(unix)] + if self.executable { + use std::os::unix::fs::PermissionsExt; + + let mut perms = fs::metadata(&self.path).unwrap().permissions(); + let mode = perms.mode(); + perms.set_mode(mode | 0o111); + fs::set_permissions(&self.path, perms).unwrap(); + } } fn dirname(&self) -> &Path { @@ -204,11 +138,16 @@ } #[cfg(windows)] - fn mk(&self) { + fn mk(&mut self) { self.dirname().mkdir_p(); if self.src_is_dir { t!(os::windows::fs::symlink_dir(&self.dst, &self.src)); } else { + if let Some(ext) = self.dst.extension() { + if ext == env::consts::EXE_EXTENSION { + self.src.set_extension(ext); + } + } t!(os::windows::fs::symlink_file(&self.dst, &self.src)); } } @@ -259,13 +198,22 @@ /// Adds a file to the project. pub fn file>(mut self, path: B, body: &str) -> Self { - self._file(path.as_ref(), body); + self._file(path.as_ref(), body, false); self } - fn _file(&mut self, path: &Path, body: &str) { - self.files - .push(FileBuilder::new(self.root.root().join(path), body)); + /// Adds an executable file to the project. + pub fn executable>(mut self, path: B, body: &str) -> Self { + self._file(path.as_ref(), body, true); + self + } + + fn _file(&mut self, path: &Path, body: &str, executable: bool) { + self.files.push(FileBuilder::new( + self.root.root().join(path), + body, + executable, + )); } /// Adds a symlink to a file to the project. @@ -301,13 +249,17 @@ let manifest_path = self.root.root().join("Cargo.toml"); if !self.no_manifest && self.files.iter().all(|fb| fb.path != manifest_path) { - self._file(Path::new("Cargo.toml"), &basic_manifest("foo", "0.0.1")) + self._file( + Path::new("Cargo.toml"), + &basic_manifest("foo", "0.0.1"), + false, + ) } let past = time::SystemTime::now() - Duration::new(1, 0); let ftime = filetime::FileTime::from_system_time(past); - for file in self.files.iter() { + for file in self.files.iter_mut() { file.mk(); if is_coarse_mtime() { // Place the entire project 1 second in the past to ensure @@ -319,7 +271,7 @@ } } - for symlink in self.symlinks.iter() { + for symlink in self.symlinks.iter_mut() { symlink.mk(); } @@ -398,7 +350,7 @@ /// Changes the contents of an existing file. pub fn change_file(&self, path: &str, body: &str) { - FileBuilder::new(self.root().join(path), body).mk() + FileBuilder::new(self.root().join(path), body, false).mk() } /// Creates a `ProcessBuilder` to run a program in the project @@ -514,19 +466,6 @@ buf } -trait ErrMsg { - fn with_err_msg(self, val: String) -> Result; -} - -impl ErrMsg for Result { - fn with_err_msg(self, val: String) -> Result { - match self { - Ok(val) => Ok(val), - Err(err) => Err(format!("{}; original={}", val, err)), - } - } -} - // Path to cargo executables pub fn cargo_dir() -> PathBuf { env::var_os("CARGO_BIN_PATH") @@ -547,13 +486,18 @@ cargo_dir().join(format!("cargo{}", env::consts::EXE_SUFFIX)) } -/* - * - * ===== Matchers ===== - * - */ - -pub type MatchResult = Result<(), String>; +/// This is the raw output from the process. +/// +/// This is similar to `std::process::Output`, however the `status` is +/// translated to the raw `code`. This is necessary because `ProcessError` +/// does not have access to the raw `ExitStatus` because `ProcessError` needs +/// to be serializable (for the Rustc cache), and `ExitStatus` does not +/// provide a constructor. +pub struct RawOutput { + pub code: Option, + pub stdout: Vec, + pub stderr: Vec, +} #[must_use] #[derive(Clone)] @@ -566,15 +510,13 @@ expect_exit_code: Option, expect_stdout_contains: Vec, expect_stderr_contains: Vec, - expect_either_contains: Vec, expect_stdout_contains_n: Vec<(String, usize)>, expect_stdout_not_contains: Vec, expect_stderr_not_contains: Vec, expect_stderr_unordered: Vec, - expect_neither_contains: Vec, expect_stderr_with_without: Vec<(Vec, Vec)>, - expect_json: Option>, - expect_json_contains_unordered: Vec, + expect_json: Option, + expect_json_contains_unordered: Option, stream_output: bool, } @@ -585,14 +527,14 @@ } /// Verifies that stdout is equal to the given lines. - /// See `lines_match` for supported patterns. + /// See [`compare`] for supported patterns. pub fn with_stdout(&mut self, expected: S) -> &mut Self { self.expect_stdout = Some(expected.to_string()); self } /// Verifies that stderr is equal to the given lines. - /// See `lines_match` for supported patterns. + /// See [`compare`] for supported patterns. pub fn with_stderr(&mut self, expected: S) -> &mut Self { self.expect_stderr = Some(expected.to_string()); self @@ -616,7 +558,8 @@ /// Verifies that stdout contains the given contiguous lines somewhere in /// its output. - /// See `lines_match` for supported patterns. + /// + /// See [`compare`] for supported patterns. pub fn with_stdout_contains(&mut self, expected: S) -> &mut Self { self.expect_stdout_contains.push(expected.to_string()); self @@ -624,23 +567,17 @@ /// Verifies that stderr contains the given contiguous lines somewhere in /// its output. - /// See `lines_match` for supported patterns. + /// + /// See [`compare`] for supported patterns. pub fn with_stderr_contains(&mut self, expected: S) -> &mut Self { self.expect_stderr_contains.push(expected.to_string()); self } - /// Verifies that either stdout or stderr contains the given contiguous - /// lines somewhere in its output. - /// See `lines_match` for supported patterns. - pub fn with_either_contains(&mut self, expected: S) -> &mut Self { - self.expect_either_contains.push(expected.to_string()); - self - } - /// Verifies that stdout contains the given contiguous lines somewhere in /// its output, and should be repeated `number` times. - /// See `lines_match` for supported patterns. + /// + /// See [`compare`] for supported patterns. pub fn with_stdout_contains_n(&mut self, expected: S, number: usize) -> &mut Self { self.expect_stdout_contains_n .push((expected.to_string(), number)); @@ -648,15 +585,18 @@ } /// Verifies that stdout does not contain the given contiguous lines. - /// See `lines_match` for supported patterns. - /// See note on `with_stderr_does_not_contain`. + /// + /// See [`compare`] for supported patterns. + /// + /// See note on [`Self::with_stderr_does_not_contain`]. pub fn with_stdout_does_not_contain(&mut self, expected: S) -> &mut Self { self.expect_stdout_not_contains.push(expected.to_string()); self } /// Verifies that stderr does not contain the given contiguous lines. - /// See `lines_match` for supported patterns. + /// + /// See [`compare`] for supported patterns. /// /// Care should be taken when using this method because there is a /// limitless number of possible things that *won't* appear. A typo means @@ -670,7 +610,9 @@ /// Verifies that all of the stderr output is equal to the given lines, /// ignoring the order of the lines. - /// See `lines_match` for supported patterns. + /// + /// See [`compare`] for supported patterns. + /// /// This is useful when checking the output of `cargo build -v` since /// the order of the output is not always deterministic. /// Recommend use `with_stderr_contains` instead unless you really want to @@ -680,8 +622,10 @@ /// with multiple lines that might match, and this is not smart enough to /// do anything like longest-match. For example, avoid something like: /// - /// [RUNNING] `rustc [..] - /// [RUNNING] `rustc --crate-name foo [..] + /// ```text + /// [RUNNING] `rustc [..] + /// [RUNNING] `rustc --crate-name foo [..] + /// ``` /// /// This will randomly fail if the other crate name is `bar`, and the /// order changes. @@ -722,28 +666,28 @@ } /// Verifies the JSON output matches the given JSON. - /// Typically used when testing cargo commands that emit JSON. + /// + /// This is typically used when testing cargo commands that emit JSON. /// Each separate JSON object should be separated by a blank line. /// Example: - /// assert_that( - /// p.cargo("metadata"), - /// execs().with_json(r#" - /// {"example": "abc"} - /// - /// {"example": "def"} - /// "#) - /// ); - /// Objects should match in the order given. - /// The order of arrays is ignored. - /// Strings support patterns described in `lines_match`. - /// Use `{...}` to match any object. + /// + /// ```rust,ignore + /// assert_that( + /// p.cargo("metadata"), + /// execs().with_json(r#" + /// {"example": "abc"} + /// + /// {"example": "def"} + /// "#) + /// ); + /// ``` + /// + /// - Objects should match in the order given. + /// - The order of arrays is ignored. + /// - Strings support patterns described in [`compare`]. + /// - Use `"{...}"` to match any object. pub fn with_json(&mut self, expected: &str) -> &mut Self { - self.expect_json = Some( - expected - .split("\n\n") - .map(|line| line.to_string()) - .collect(), - ); + self.expect_json = Some(expected.to_string()); self } @@ -757,8 +701,13 @@ /// /// See `with_json` for more detail. pub fn with_json_contains_unordered(&mut self, expected: &str) -> &mut Self { - self.expect_json_contains_unordered - .extend(expected.split("\n\n").map(|line| line.to_string())); + match &mut self.expect_json_contains_unordered { + None => self.expect_json_contains_unordered = Some(expected.to_string()), + Some(e) => { + e.push_str("\n\n"); + e.push_str(expected); + } + } self } @@ -790,6 +739,10 @@ self } + fn get_cwd(&self) -> Option<&Path> { + self.process_builder.as_ref().and_then(|p| p.get_cwd()) + } + pub fn env>(&mut self, key: &str, val: T) -> &mut Self { if let Some(ref mut p) = self.process_builder { p.env(key, val); @@ -804,7 +757,7 @@ self } - pub fn exec_with_output(&mut self) -> CargoResult { + pub fn exec_with_output(&mut self) -> Result { self.ran = true; // TODO avoid unwrap let p = (&self.process_builder).clone().unwrap(); @@ -825,49 +778,78 @@ self } + pub fn enable_mac_dsym(&mut self) -> &mut Self { + if cfg!(target_os = "macos") { + self.env("CARGO_PROFILE_DEV_SPLIT_DEBUGINFO", "packed") + .env("CARGO_PROFILE_TEST_SPLIT_DEBUGINFO", "packed") + .env("CARGO_PROFILE_RELEASE_SPLIT_DEBUGINFO", "packed") + .env("CARGO_PROFILE_BENCH_SPLIT_DEBUGINFO", "packed"); + } + self + } + + #[track_caller] pub fn run(&mut self) { self.ran = true; let p = (&self.process_builder).clone().unwrap(); if let Err(e) = self.match_process(&p) { - panic!("\nExpected: {:?}\n but: {}", self, e) + panic_error(&format!("test failed running {}", p), e); } } + /// Runs the process, checks the expected output, and returns the first + /// JSON object on stdout. + #[track_caller] + pub fn run_json(&mut self) -> serde_json::Value { + self.ran = true; + let p = (&self.process_builder).clone().unwrap(); + match self.match_process(&p) { + Err(e) => panic_error(&format!("test failed running {}", p), e), + Ok(output) => serde_json::from_slice(&output.stdout).unwrap_or_else(|e| { + panic!( + "\nfailed to parse JSON: {}\n\ + output was:\n{}\n", + e, + String::from_utf8_lossy(&output.stdout) + ); + }), + } + } + + #[track_caller] pub fn run_output(&mut self, output: &Output) { self.ran = true; - if let Err(e) = self.match_output(output) { - panic!("\nExpected: {:?}\n but: {}", self, e) + if let Err(e) = self.match_output(output.status.code(), &output.stdout, &output.stderr) { + panic_error("process did not return the expected result", e) } } - fn verify_checks_output(&self, output: &Output) { + fn verify_checks_output(&self, stdout: &[u8], stderr: &[u8]) { if self.expect_exit_code.unwrap_or(0) != 0 && self.expect_stdout.is_none() && self.expect_stdin.is_none() && self.expect_stderr.is_none() && self.expect_stdout_contains.is_empty() && self.expect_stderr_contains.is_empty() - && self.expect_either_contains.is_empty() && self.expect_stdout_contains_n.is_empty() && self.expect_stdout_not_contains.is_empty() && self.expect_stderr_not_contains.is_empty() && self.expect_stderr_unordered.is_empty() - && self.expect_neither_contains.is_empty() && self.expect_stderr_with_without.is_empty() && self.expect_json.is_none() - && self.expect_json_contains_unordered.is_empty() + && self.expect_json_contains_unordered.is_none() { panic!( "`with_status()` is used, but no output is checked.\n\ The test must check the output to ensure the correct error is triggered.\n\ --- stdout\n{}\n--- stderr\n{}", - String::from_utf8_lossy(&output.stdout), - String::from_utf8_lossy(&output.stderr), + String::from_utf8_lossy(stdout), + String::from_utf8_lossy(stderr), ); } } - fn match_process(&self, process: &ProcessBuilder) -> MatchResult { + fn match_process(&self, process: &ProcessBuilder) -> Result { println!("running {}", process); let res = if self.stream_output { if is_ci() { @@ -889,453 +871,89 @@ }; match res { - Ok(out) => self.match_output(&out), + Ok(out) => { + self.match_output(out.status.code(), &out.stdout, &out.stderr)?; + return Ok(RawOutput { + stdout: out.stdout, + stderr: out.stderr, + code: out.status.code(), + }); + } Err(e) => { - let err = e.downcast_ref::(); - if let Some(&ProcessError { - output: Some(ref out), + if let Some(ProcessError { + stdout: Some(stdout), + stderr: Some(stderr), + code, .. - }) = err + }) = e.downcast_ref::() { - return self.match_output(out); + self.match_output(*code, stdout, stderr)?; + return Ok(RawOutput { + stdout: stdout.to_vec(), + stderr: stderr.to_vec(), + code: *code, + }); } - Err(format!("could not exec process {}: {:?}", process, e)) + bail!("could not exec process {}: {:?}", process, e) } } } - fn match_output(&self, actual: &Output) -> MatchResult { - self.verify_checks_output(actual); - self.match_status(actual) - .and(self.match_stdout(actual)) - .and(self.match_stderr(actual)) - } + fn match_output(&self, code: Option, stdout: &[u8], stderr: &[u8]) -> Result<()> { + self.verify_checks_output(stdout, stderr); + let stdout = str::from_utf8(stdout).expect("stdout is not utf8"); + let stderr = str::from_utf8(stderr).expect("stderr is not utf8"); + let cwd = self.get_cwd(); - fn match_status(&self, actual: &Output) -> MatchResult { match self.expect_exit_code { - None => Ok(()), - Some(code) if actual.status.code() == Some(code) => Ok(()), - Some(_) => Err(format!( - "exited with {}\n--- stdout\n{}\n--- stderr\n{}", - actual.status, - String::from_utf8_lossy(&actual.stdout), - String::from_utf8_lossy(&actual.stderr) - )), + None => {} + Some(expected) if code == Some(expected) => {} + Some(expected) => bail!( + "process exited with code {} (expected {})\n--- stdout\n{}\n--- stderr\n{}", + code.unwrap_or(-1), + expected, + stdout, + stderr + ), } - } - fn match_stdout(&self, actual: &Output) -> MatchResult { - self.match_std( - self.expect_stdout.as_ref(), - &actual.stdout, - "stdout", - &actual.stderr, - MatchKind::Exact, - )?; + if let Some(expect_stdout) = &self.expect_stdout { + compare::match_exact(expect_stdout, stdout, "stdout", stderr, cwd)?; + } + if let Some(expect_stderr) = &self.expect_stderr { + compare::match_exact(expect_stderr, stderr, "stderr", stdout, cwd)?; + } for expect in self.expect_stdout_contains.iter() { - self.match_std( - Some(expect), - &actual.stdout, - "stdout", - &actual.stderr, - MatchKind::Partial, - )?; + compare::match_contains(expect, stdout, cwd)?; } for expect in self.expect_stderr_contains.iter() { - self.match_std( - Some(expect), - &actual.stderr, - "stderr", - &actual.stdout, - MatchKind::Partial, - )?; + compare::match_contains(expect, stderr, cwd)?; } for &(ref expect, number) in self.expect_stdout_contains_n.iter() { - self.match_std( - Some(expect), - &actual.stdout, - "stdout", - &actual.stderr, - MatchKind::PartialN(number), - )?; + compare::match_contains_n(expect, number, stdout, cwd)?; } for expect in self.expect_stdout_not_contains.iter() { - self.match_std( - Some(expect), - &actual.stdout, - "stdout", - &actual.stderr, - MatchKind::NotPresent, - )?; + compare::match_does_not_contain(expect, stdout, cwd)?; } for expect in self.expect_stderr_not_contains.iter() { - self.match_std( - Some(expect), - &actual.stderr, - "stderr", - &actual.stdout, - MatchKind::NotPresent, - )?; + compare::match_does_not_contain(expect, stderr, cwd)?; } for expect in self.expect_stderr_unordered.iter() { - self.match_std( - Some(expect), - &actual.stderr, - "stderr", - &actual.stdout, - MatchKind::Unordered, - )?; - } - for expect in self.expect_neither_contains.iter() { - self.match_std( - Some(expect), - &actual.stdout, - "stdout", - &actual.stdout, - MatchKind::NotPresent, - )?; - - self.match_std( - Some(expect), - &actual.stderr, - "stderr", - &actual.stderr, - MatchKind::NotPresent, - )?; - } - - for expect in self.expect_either_contains.iter() { - let match_std = self.match_std( - Some(expect), - &actual.stdout, - "stdout", - &actual.stdout, - MatchKind::Partial, - ); - let match_err = self.match_std( - Some(expect), - &actual.stderr, - "stderr", - &actual.stderr, - MatchKind::Partial, - ); - - if let (Err(_), Err(_)) = (match_std, match_err) { - return Err(format!( - "expected to find:\n\ - {}\n\n\ - did not find in either output.", - expect - )); - } + compare::match_unordered(expect, stderr, cwd)?; } - for (with, without) in self.expect_stderr_with_without.iter() { - self.match_with_without(&actual.stderr, with, without)?; + compare::match_with_without(stderr, with, without, cwd)?; } - if let Some(ref objects) = self.expect_json { - let stdout = str::from_utf8(&actual.stdout) - .map_err(|_| "stdout was not utf8 encoded".to_owned())?; - let lines = stdout - .lines() - .filter(|line| line.starts_with('{')) - .collect::>(); - if lines.len() != objects.len() { - return Err(format!( - "expected {} json lines, got {}, stdout:\n{}", - objects.len(), - lines.len(), - stdout - )); - } - for (obj, line) in objects.iter().zip(lines) { - self.match_json(obj, line)?; - } + if let Some(ref expect_json) = self.expect_json { + compare::match_json(expect_json, stdout, cwd)?; } - if !self.expect_json_contains_unordered.is_empty() { - let stdout = str::from_utf8(&actual.stdout) - .map_err(|_| "stdout was not utf8 encoded".to_owned())?; - let mut lines = stdout - .lines() - .filter(|line| line.starts_with('{')) - .collect::>(); - for obj in &self.expect_json_contains_unordered { - match lines - .iter() - .position(|line| self.match_json(obj, line).is_ok()) - { - Some(index) => lines.remove(index), - None => { - return Err(format!( - "Did not find expected JSON:\n\ - {}\n\ - Remaining available output:\n\ - {}\n", - serde_json::to_string_pretty(obj).unwrap(), - lines.join("\n") - )); - } - }; - } + if let Some(ref expected) = self.expect_json_contains_unordered { + compare::match_json_contains_unordered(expected, stdout, cwd)?; } Ok(()) } - - fn match_stderr(&self, actual: &Output) -> MatchResult { - self.match_std( - self.expect_stderr.as_ref(), - &actual.stderr, - "stderr", - &actual.stdout, - MatchKind::Exact, - ) - } - - fn normalize_actual(&self, description: &str, actual: &[u8]) -> Result { - let actual = match str::from_utf8(actual) { - Err(..) => return Err(format!("{} was not utf8 encoded", description)), - Ok(actual) => actual, - }; - Ok(self.normalize_matcher(actual)) - } - - fn normalize_matcher(&self, matcher: &str) -> String { - normalize_matcher( - matcher, - self.process_builder.as_ref().and_then(|p| p.get_cwd()), - ) - } - - fn match_std( - &self, - expected: Option<&String>, - actual: &[u8], - description: &str, - extra: &[u8], - kind: MatchKind, - ) -> MatchResult { - let out = match expected { - Some(out) => self.normalize_matcher(out), - None => return Ok(()), - }; - - let actual = self.normalize_actual(description, actual)?; - - match kind { - MatchKind::Exact => { - let a = actual.lines(); - let e = out.lines(); - - let diffs = self.diff_lines(a, e, false); - if diffs.is_empty() { - Ok(()) - } else { - Err(format!( - "differences:\n\ - {}\n\n\ - other output:\n\ - `{}`", - diffs.join("\n"), - String::from_utf8_lossy(extra) - )) - } - } - MatchKind::Partial => { - let mut a = actual.lines(); - let e = out.lines(); - - let mut diffs = self.diff_lines(a.clone(), e.clone(), true); - while a.next().is_some() { - let a = self.diff_lines(a.clone(), e.clone(), true); - if a.len() < diffs.len() { - diffs = a; - } - } - if diffs.is_empty() { - Ok(()) - } else { - Err(format!( - "expected to find:\n\ - {}\n\n\ - did not find in output:\n\ - {}", - out, actual - )) - } - } - MatchKind::PartialN(number) => { - let mut a = actual.lines(); - let e = out.lines(); - - let mut matches = 0; - - while let Some(..) = { - if self.diff_lines(a.clone(), e.clone(), true).is_empty() { - matches += 1; - } - a.next() - } {} - - if matches == number { - Ok(()) - } else { - Err(format!( - "expected to find {} occurrences:\n\ - {}\n\n\ - did not find in output:\n\ - {}", - number, out, actual - )) - } - } - MatchKind::NotPresent => { - let mut a = actual.lines(); - let e = out.lines(); - - let mut diffs = self.diff_lines(a.clone(), e.clone(), true); - while a.next().is_some() { - let a = self.diff_lines(a.clone(), e.clone(), true); - if a.len() < diffs.len() { - diffs = a; - } - } - if diffs.is_empty() { - Err(format!( - "expected not to find:\n\ - {}\n\n\ - but found in output:\n\ - {}", - out, actual - )) - } else { - Ok(()) - } - } - MatchKind::Unordered => { - let mut a = actual.lines().collect::>(); - // match more-constrained lines first, although in theory we'll - // need some sort of recursive match here. This handles the case - // that you expect "a\n[..]b" and two lines are printed out, - // "ab\n"a", where technically we do match unordered but a naive - // search fails to find this. This simple sort at least gets the - // test suite to pass for now, but we may need to get more fancy - // if tests start failing again. - a.sort_by_key(|s| s.len()); - let e = out.lines(); - - for e_line in e { - match a.iter().position(|a_line| lines_match(e_line, a_line)) { - Some(index) => a.remove(index), - None => { - return Err(format!( - "Did not find expected line:\n\ - {}\n\ - Remaining available output:\n\ - {}\n", - e_line, - a.join("\n") - )); - } - }; - } - if !a.is_empty() { - Err(format!( - "Output included extra lines:\n\ - {}\n", - a.join("\n") - )) - } else { - Ok(()) - } - } - } - } - - fn match_with_without( - &self, - actual: &[u8], - with: &[String], - without: &[String], - ) -> MatchResult { - let actual = self.normalize_actual("stderr", actual)?; - let contains = |s, line| { - let mut s = self.normalize_matcher(s); - s.insert_str(0, "[..]"); - s.push_str("[..]"); - lines_match(&s, line) - }; - let matches: Vec<&str> = actual - .lines() - .filter(|line| with.iter().all(|with| contains(with, line))) - .filter(|line| !without.iter().any(|without| contains(without, line))) - .collect(); - match matches.len() { - 0 => Err(format!( - "Could not find expected line in output.\n\ - With contents: {:?}\n\ - Without contents: {:?}\n\ - Actual stderr:\n\ - {}\n", - with, without, actual - )), - 1 => Ok(()), - _ => Err(format!( - "Found multiple matching lines, but only expected one.\n\ - With contents: {:?}\n\ - Without contents: {:?}\n\ - Matching lines:\n\ - {}\n", - with, - without, - matches.join("\n") - )), - } - } - - fn match_json(&self, expected: &str, line: &str) -> MatchResult { - let expected = self.normalize_matcher(expected); - let line = self.normalize_matcher(line); - let actual = match line.parse() { - Err(e) => return Err(format!("invalid json, {}:\n`{}`", e, line)), - Ok(actual) => actual, - }; - let expected = match expected.parse() { - Err(e) => return Err(format!("invalid json, {}:\n`{}`", e, line)), - Ok(expected) => expected, - }; - - find_json_mismatch(&expected, &actual) - } - - fn diff_lines<'a>( - &self, - actual: str::Lines<'a>, - expected: str::Lines<'a>, - partial: bool, - ) -> Vec { - let actual = actual.take(if partial { - expected.clone().count() - } else { - usize::MAX - }); - zip_all(actual, expected) - .enumerate() - .filter_map(|(i, (a, e))| match (a, e) { - (Some(a), Some(e)) => { - if lines_match(e, a) { - None - } else { - Some(format!("{:3} - |{}|\n + |{}|\n", i, e, a)) - } - } - (Some(a), None) => Some(format!("{:3} -\n + |{}|\n", i, a)), - (None, Some(e)) => Some(format!("{:3} - |{}|\n +\n", i, e)), - (None, None) => panic!("Cannot get here"), - }) - .collect() - } } impl Drop for Execs { @@ -1346,202 +964,6 @@ } } -#[derive(Debug, PartialEq, Eq, Clone, Copy)] -enum MatchKind { - Exact, - Partial, - PartialN(usize), - NotPresent, - Unordered, -} - -/// Compares a line with an expected pattern. -/// - Use `[..]` as a wildcard to match 0 or more characters on the same line -/// (similar to `.*` in a regex). -/// - Use `[EXE]` to optionally add `.exe` on Windows (empty string on other -/// platforms). -/// - There is a wide range of macros (such as `[COMPILING]` or `[WARNING]`) -/// to match cargo's "status" output and allows you to ignore the alignment. -/// See `substitute_macros` for a complete list of macros. -/// - `[ROOT]` the path to the test directory's root -/// - `[CWD]` is the working directory of the process that was run. -pub fn lines_match(expected: &str, mut actual: &str) -> bool { - let expected = substitute_macros(expected); - for (i, part) in expected.split("[..]").enumerate() { - match actual.find(part) { - Some(j) => { - if i == 0 && j != 0 { - return false; - } - actual = &actual[j + part.len()..]; - } - None => return false, - } - } - actual.is_empty() || expected.ends_with("[..]") -} - -/// Variant of `lines_match` that applies normalization to the strings. -pub fn normalized_lines_match(expected: &str, actual: &str, cwd: Option<&Path>) -> bool { - let expected = normalize_matcher(expected, cwd); - let actual = normalize_matcher(actual, cwd); - lines_match(&expected, &actual) -} - -fn normalize_matcher(matcher: &str, cwd: Option<&Path>) -> String { - // Let's not deal with / vs \ (windows...) - let matcher = matcher.replace("\\\\", "/").replace("\\", "/"); - - // Weirdness for paths on Windows extends beyond `/` vs `\` apparently. - // Namely paths like `c:\` and `C:\` are equivalent and that can cause - // issues. The return value of `env::current_dir()` may return a - // lowercase drive name, but we round-trip a lot of values through `Url` - // which will auto-uppercase the drive name. To just ignore this - // distinction we try to canonicalize as much as possible, taking all - // forms of a path and canonicalizing them to one. - let replace_path = |s: &str, path: &Path, with: &str| { - let path_through_url = Url::from_file_path(path).unwrap().to_file_path().unwrap(); - let path1 = path.display().to_string().replace("\\", "/"); - let path2 = path_through_url.display().to_string().replace("\\", "/"); - s.replace(&path1, with) - .replace(&path2, with) - .replace(with, &path1) - }; - - // Do the template replacements on the expected string. - let matcher = match cwd { - None => matcher, - Some(p) => replace_path(&matcher, p, "[CWD]"), - }; - - // Similar to cwd above, perform similar treatment to the root path - // which in theory all of our paths should otherwise get rooted at. - let root = paths::root(); - let matcher = replace_path(&matcher, &root, "[ROOT]"); - - // Let's not deal with \r\n vs \n on windows... - let matcher = matcher.replace("\r", ""); - - // It's easier to read tabs in outputs if they don't show up as literal - // hidden characters - matcher.replace("\t", "") -} - -#[test] -fn lines_match_works() { - assert!(lines_match("a b", "a b")); - assert!(lines_match("a[..]b", "a b")); - assert!(lines_match("a[..]", "a b")); - assert!(lines_match("[..]", "a b")); - assert!(lines_match("[..]b", "a b")); - - assert!(!lines_match("[..]b", "c")); - assert!(!lines_match("b", "c")); - assert!(!lines_match("b", "cb")); -} - -/// Compares JSON object for approximate equality. -/// You can use `[..]` wildcard in strings (useful for OS-dependent things such -/// as paths). You can use a `"{...}"` string literal as a wildcard for -/// arbitrary nested JSON (useful for parts of object emitted by other programs -/// (e.g., rustc) rather than Cargo itself). Arrays are sorted before comparison. -pub fn find_json_mismatch(expected: &Value, actual: &Value) -> Result<(), String> { - match find_json_mismatch_r(expected, actual) { - Some((expected_part, actual_part)) => Err(format!( - "JSON mismatch\nExpected:\n{}\nWas:\n{}\nExpected part:\n{}\nActual part:\n{}\n", - serde_json::to_string_pretty(expected).unwrap(), - serde_json::to_string_pretty(&actual).unwrap(), - serde_json::to_string_pretty(expected_part).unwrap(), - serde_json::to_string_pretty(actual_part).unwrap(), - )), - None => Ok(()), - } -} - -fn find_json_mismatch_r<'a>( - expected: &'a Value, - actual: &'a Value, -) -> Option<(&'a Value, &'a Value)> { - use serde_json::Value::*; - match (expected, actual) { - (&Number(ref l), &Number(ref r)) if l == r => None, - (&Bool(l), &Bool(r)) if l == r => None, - (&String(ref l), &String(ref r)) if lines_match(l, r) => None, - (&Array(ref l), &Array(ref r)) => { - if l.len() != r.len() { - return Some((expected, actual)); - } - - let mut l = l.iter().collect::>(); - let mut r = r.iter().collect::>(); - - l.retain( - |l| match r.iter().position(|r| find_json_mismatch_r(l, r).is_none()) { - Some(i) => { - r.remove(i); - false - } - None => true, - }, - ); - - if !l.is_empty() { - assert!(!r.is_empty()); - Some((l[0], r[0])) - } else { - assert_eq!(r.len(), 0); - None - } - } - (&Object(ref l), &Object(ref r)) => { - let same_keys = l.len() == r.len() && l.keys().all(|k| r.contains_key(k)); - if !same_keys { - return Some((expected, actual)); - } - - l.values() - .zip(r.values()) - .filter_map(|(l, r)| find_json_mismatch_r(l, r)) - .next() - } - (&Null, &Null) => None, - // Magic string literal `"{...}"` acts as wildcard for any sub-JSON. - (&String(ref l), _) if l == "{...}" => None, - _ => Some((expected, actual)), - } -} - -struct ZipAll { - first: I1, - second: I2, -} - -impl, I2: Iterator> Iterator for ZipAll { - type Item = (Option, Option); - fn next(&mut self) -> Option<(Option, Option)> { - let first = self.first.next(); - let second = self.second.next(); - - match (first, second) { - (None, None) => None, - (a, b) => Some((a, b)), - } - } -} - -fn zip_all, I2: Iterator>(a: I1, b: I2) -> ZipAll { - ZipAll { - first: a, - second: b, - } -} - -impl fmt::Debug for Execs { - fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { - write!(f, "execs") - } -} - pub fn execs() -> Execs { Execs { ran: false, @@ -1552,30 +974,17 @@ expect_exit_code: Some(0), expect_stdout_contains: Vec::new(), expect_stderr_contains: Vec::new(), - expect_either_contains: Vec::new(), expect_stdout_contains_n: Vec::new(), expect_stdout_not_contains: Vec::new(), expect_stderr_not_contains: Vec::new(), expect_stderr_unordered: Vec::new(), - expect_neither_contains: Vec::new(), expect_stderr_with_without: Vec::new(), expect_json: None, - expect_json_contains_unordered: Vec::new(), + expect_json_contains_unordered: None, stream_output: false, } } -pub trait Tap { - fn tap(self, callback: F) -> Self; -} - -impl Tap for T { - fn tap(mut self, callback: F) -> T { - callback(&mut self); - self - } -} - pub fn basic_manifest(name: &str, version: &str) -> String { format!( r#" @@ -1626,75 +1035,57 @@ Url::from_file_path(p).ok().unwrap() } -fn substitute_macros(input: &str) -> String { - let macros = [ - ("[RUNNING]", " Running"), - ("[COMPILING]", " Compiling"), - ("[CHECKING]", " Checking"), - ("[COMPLETED]", " Completed"), - ("[CREATED]", " Created"), - ("[FINISHED]", " Finished"), - ("[ERROR]", "error:"), - ("[WARNING]", "warning:"), - ("[NOTE]", "note:"), - ("[DOCUMENTING]", " Documenting"), - ("[FRESH]", " Fresh"), - ("[UPDATING]", " Updating"), - ("[ADDING]", " Adding"), - ("[REMOVING]", " Removing"), - ("[DOCTEST]", " Doc-tests"), - ("[PACKAGING]", " Packaging"), - ("[DOWNLOADING]", " Downloading"), - ("[DOWNLOADED]", " Downloaded"), - ("[UPLOADING]", " Uploading"), - ("[VERIFYING]", " Verifying"), - ("[ARCHIVING]", " Archiving"), - ("[INSTALLING]", " Installing"), - ("[REPLACING]", " Replacing"), - ("[UNPACKING]", " Unpacking"), - ("[SUMMARY]", " Summary"), - ("[FIXING]", " Fixing"), - ("[EXE]", env::consts::EXE_SUFFIX), - ("[IGNORED]", " Ignored"), - ("[INSTALLED]", " Installed"), - ("[REPLACED]", " Replaced"), - ]; - let mut result = input.to_owned(); - for &(pat, subst) in ¯os { - result = result.replace(pat, subst) - } - result +struct RustcInfo { + verbose_version: String, + host: String, } -pub mod install; +impl RustcInfo { + fn new() -> RustcInfo { + let output = ProcessBuilder::new("rustc") + .arg("-vV") + .exec_with_output() + .expect("rustc should exec"); + let verbose_version = String::from_utf8(output.stdout).expect("utf8 output"); + let host = verbose_version + .lines() + .filter_map(|line| line.strip_prefix("host: ")) + .next() + .expect("verbose version has host: field") + .to_string(); + RustcInfo { + verbose_version, + host, + } + } +} -thread_local!( -pub static RUSTC: Rustc = Rustc::new( - PathBuf::from("rustc"), - None, - None, - Path::new("should be path to rustup rustc, but we don't care in tests"), - None, -).unwrap() -); +lazy_static::lazy_static! { + static ref RUSTC_INFO: RustcInfo = RustcInfo::new(); +} /// The rustc host such as `x86_64-unknown-linux-gnu`. -pub fn rustc_host() -> String { - RUSTC.with(|r| r.host.to_string()) +pub fn rustc_host() -> &'static str { + &RUSTC_INFO.host +} + +/// The host triple suitable for use in a cargo environment variable (uppercased). +pub fn rustc_host_env() -> String { + rustc_host().to_uppercase().replace('-', "_") } pub fn is_nightly() -> bool { + let vv = &RUSTC_INFO.verbose_version; env::var("CARGO_TEST_DISABLE_NIGHTLY").is_err() - && RUSTC - .with(|r| r.verbose_version.contains("-nightly") || r.verbose_version.contains("-dev")) + && (vv.contains("-nightly") || vv.contains("-dev")) } -pub fn process>(t: T) -> cargo::util::ProcessBuilder { +pub fn process>(t: T) -> ProcessBuilder { _process(t.as_ref()) } -fn _process(t: &OsStr) -> cargo::util::ProcessBuilder { - let mut p = cargo::util::process(t); +fn _process(t: &OsStr) -> ProcessBuilder { + let mut p = ProcessBuilder::new(t); // In general just clear out all cargo-specific configuration already in the // environment. Our tests all assume a "default configuration" unless @@ -1704,6 +1095,32 @@ p.env_remove(&k); } } + if env::var_os("RUSTUP_TOOLCHAIN").is_some() { + // Override the PATH to avoid executing the rustup wrapper thousands + // of times. This makes the testsuite run substantially faster. + lazy_static::lazy_static! { + static ref RUSTC_DIR: PathBuf = { + match ProcessBuilder::new("rustup") + .args(&["which", "rustc"]) + .exec_with_output() + { + Ok(output) => { + let s = str::from_utf8(&output.stdout).expect("utf8").trim(); + let mut p = PathBuf::from(s); + p.pop(); + p + } + Err(e) => { + panic!("RUSTUP_TOOLCHAIN was set, but could not run rustup: {}", e); + } + } + }; + } + let path = env::var_os("PATH").unwrap_or_default(); + let paths = env::split_paths(&path); + let new_path = env::join_paths(std::iter::once(RUSTC_DIR.clone()).chain(paths)).unwrap(); + p.env("PATH", new_path); + } p.cwd(&paths::root()) .env("HOME", paths::home()) @@ -1745,15 +1162,19 @@ fn masquerade_as_nightly_cargo(&mut self) -> &mut Self; } -impl ChannelChanger for cargo::util::ProcessBuilder { +impl ChannelChanger for ProcessBuilder { fn masquerade_as_nightly_cargo(&mut self) -> &mut Self { self.env("__CARGO_TEST_CHANNEL_OVERRIDE_DO_NOT_USE_THIS", "nightly") } } fn split_and_add_args(p: &mut ProcessBuilder, s: &str) { - for arg in s.split_whitespace() { - if arg.contains('"') || arg.contains('\'') { + for mut arg in s.split_whitespace() { + if (arg.starts_with('"') && arg.ends_with('"')) + || (arg.starts_with('\'') && arg.ends_with('\'')) + { + arg = &arg[1..(arg.len() - 1).max(1)]; + } else if arg.contains(&['"', '\''][..]) { panic!("shell-style argument parsing is not supported") } p.arg(arg); diff -Nru cargo-mozilla-0.47.0/crates/cargo-test-support/src/paths.rs cargo-mozilla-0.57.0/crates/cargo-test-support/src/paths.rs --- cargo-mozilla-0.47.0/crates/cargo-test-support/src/paths.rs 2020-07-17 20:39:39.000000000 +0000 +++ cargo-mozilla-0.57.0/crates/cargo-test-support/src/paths.rs 2021-10-04 17:24:20.000000000 +0000 @@ -1,4 +1,3 @@ -use crate::{basic_manifest, project}; use filetime::{self, FileTime}; use lazy_static::lazy_static; use std::cell::RefCell; @@ -14,28 +13,44 @@ static CARGO_INTEGRATION_TEST_DIR: &str = "cit"; lazy_static! { - static ref GLOBAL_ROOT: PathBuf = { - let mut path = t!(env::current_exe()); - path.pop(); // chop off exe name - path.pop(); // chop off 'debug' - - // If `cargo test` is run manually then our path looks like - // `target/debug/foo`, in which case our `path` is already pointing at - // `target`. If, however, `cargo test --target $target` is used then the - // output is `target/$target/debug/foo`, so our path is pointing at - // `target/$target`. Here we conditionally pop the `$target` name. - if path.file_name().and_then(|s| s.to_str()) != Some("target") { - path.pop(); - } - - path.push(CARGO_INTEGRATION_TEST_DIR); - path.mkdir_p(); - path - }; + // TODO: Use `SyncOnceCell` when stable + static ref GLOBAL_ROOT: Mutex> = Mutex::new(None); static ref TEST_ROOTS: Mutex> = Default::default(); } +/// This is used when running cargo is pre-CARGO_TARGET_TMPDIR +/// TODO: Remove when CARGO_TARGET_TMPDIR grows old enough. +fn global_root_legacy() -> PathBuf { + let mut path = t!(env::current_exe()); + path.pop(); // chop off exe name + path.pop(); // chop off "deps" + path.push("tmp"); + path.mkdir_p(); + path +} + +fn set_global_root(tmp_dir: Option<&'static str>) { + let mut lock = GLOBAL_ROOT.lock().unwrap(); + if lock.is_none() { + let mut root = match tmp_dir { + Some(tmp_dir) => PathBuf::from(tmp_dir), + None => global_root_legacy(), + }; + + root.push(CARGO_INTEGRATION_TEST_DIR); + *lock = Some(root); + } +} + +pub fn global_root() -> PathBuf { + let lock = GLOBAL_ROOT.lock().unwrap(); + match lock.as_ref() { + Some(p) => p.clone(), + None => unreachable!("GLOBAL_ROOT not set yet"), + } +} + // We need to give each test a unique id. The test name could serve this // purpose, but the `test` crate doesn't have a way to obtain the current test // name.[*] Instead, we used the `cargo-test-macro` crate to automatically @@ -52,14 +67,15 @@ _private: (), } -pub fn init_root() -> TestIdGuard { +pub fn init_root(tmp_dir: Option<&'static str>) -> TestIdGuard { static NEXT_ID: AtomicUsize = AtomicUsize::new(0); - let id = NEXT_ID.fetch_add(1, Ordering::Relaxed); + let id = NEXT_ID.fetch_add(1, Ordering::SeqCst); TEST_ID.with(|n| *n.borrow_mut() = Some(id)); let guard = TestIdGuard { _private: () }; + set_global_root(tmp_dir); let r = root(); r.rm_rf(); r.mkdir_p(); @@ -80,7 +96,10 @@ order to be able to use the crate root.", ) }); - GLOBAL_ROOT.join(&format!("t{}", id)) + + let mut root = global_root(); + root.push(&format!("t{}", id)); + root } pub fn home() -> PathBuf { @@ -105,19 +124,28 @@ fn move_in_time(&self, travel_amount: F) where F: Fn(i64, u32) -> (i64, u32); - - fn is_symlink(&self) -> bool; } impl CargoPathExt for Path { - /* Technically there is a potential race condition, but we don't - * care all that much for our tests - */ fn rm_rf(&self) { - if self.exists() { + let meta = match self.symlink_metadata() { + Ok(meta) => meta, + Err(e) => { + if e.kind() == ErrorKind::NotFound { + return; + } + panic!("failed to remove {:?}, could not read: {:?}", self, e); + } + }; + // There is a race condition between fetching the metadata and + // actually performing the removal, but we don't care all that much + // for our tests. + if meta.is_dir() { if let Err(e) = remove_dir_all::remove_dir_all(self) { panic!("failed to remove {:?}: {:?}", self, e) } + } else if let Err(e) = fs::remove_file(self) { + panic!("failed to remove {:?}: {:?}", self, e) } } @@ -168,12 +196,14 @@ }); } } +} - fn is_symlink(&self) -> bool { - fs::symlink_metadata(self) - .map(|m| m.file_type().is_symlink()) - .unwrap_or(false) - } +// Replace with std implementation when stabilized, see +// https://github.com/rust-lang/rust/issues/85748 +pub fn is_symlink(path: &Path) -> bool { + fs::symlink_metadata(path) + .map(|m| m.file_type().is_symlink()) + .unwrap_or(false) } fn do_op(path: &Path, desc: &str, mut f: F) @@ -265,24 +295,3 @@ let sysroot = String::from_utf8(output.stdout).unwrap(); sysroot.trim().to_string() } - -pub fn echo_wrapper() -> std::path::PathBuf { - let p = project() - .at("rustc-echo-wrapper") - .file("Cargo.toml", &basic_manifest("rustc-echo-wrapper", "1.0.0")) - .file( - "src/main.rs", - r#" - fn main() { - let args = std::env::args().collect::>(); - eprintln!("WRAPPER CALLED: {}", args[1..].join(" ")); - let status = std::process::Command::new(&args[1]) - .args(&args[2..]).status().unwrap(); - std::process::exit(status.code().unwrap_or(1)); - } - "#, - ) - .build(); - p.cargo("build").run(); - p.bin("rustc-echo-wrapper") -} diff -Nru cargo-mozilla-0.47.0/crates/cargo-test-support/src/publish.rs cargo-mozilla-0.57.0/crates/cargo-test-support/src/publish.rs --- cargo-mozilla-0.47.0/crates/cargo-test-support/src/publish.rs 2020-07-17 20:39:39.000000000 +0000 +++ cargo-mozilla-0.57.0/crates/cargo-test-support/src/publish.rs 2021-10-04 17:24:20.000000000 +0000 @@ -1,5 +1,5 @@ +use crate::compare::{assert_match_exact, find_json_mismatch}; use crate::registry::{self, alt_api_path}; -use crate::{find_json_mismatch, lines_match}; use flate2::read::GzDecoder; use std::collections::{HashMap, HashSet}; use std::fs::File; @@ -75,8 +75,10 @@ f.read_exact(&mut json_bytes).expect("read JSON data"); let actual_json = serde_json::from_slice(&json_bytes).expect("uploaded JSON should be valid"); let expected_json = serde_json::from_str(expected_json).expect("expected JSON does not parse"); - find_json_mismatch(&expected_json, &actual_json) - .expect("uploaded JSON did not match expected JSON"); + + if let Err(e) = find_json_mismatch(&expected_json, &actual_json, None) { + panic!("{}", e); + } // 32-bit little-endian integer of length of crate file. let crate_sz = read_le_u32(&mut f).expect("read crate length"); @@ -149,16 +151,7 @@ let actual_contents = files .get(&full_e_name) .unwrap_or_else(|| panic!("file `{}` missing in archive", e_file_name)); - if !lines_match(e_file_contents, actual_contents) { - panic!( - "Crate contents mismatch for {:?}:\n\ - --- expected\n\ - {}\n\ - --- actual \n\ - {}\n", - e_file_name, e_file_contents, actual_contents - ); - } + assert_match_exact(e_file_contents, actual_contents); } } } diff -Nru cargo-mozilla-0.47.0/crates/cargo-test-support/src/registry.rs cargo-mozilla-0.57.0/crates/cargo-test-support/src/registry.rs --- cargo-mozilla-0.47.0/crates/cargo-test-support/src/registry.rs 2020-07-17 20:39:39.000000000 +0000 +++ cargo-mozilla-0.57.0/crates/cargo-test-support/src/registry.rs 2021-10-04 17:24:20.000000000 +0000 @@ -1,13 +1,15 @@ use crate::git::repo; use crate::paths; -use cargo::sources::CRATES_IO_INDEX; -use cargo::util::Sha256; +use cargo_util::{registry::make_dep_path, Sha256}; use flate2::write::GzEncoder; use flate2::Compression; -use std::collections::HashMap; +use std::collections::BTreeMap; +use std::fmt::Write as _; use std::fs::{self, File}; -use std::io::prelude::*; +use std::io::{BufRead, BufReader, Write}; +use std::net::TcpListener; use std::path::{Path, PathBuf}; +use std::thread; use tar::{Builder, Header}; use url::Url; @@ -70,6 +72,178 @@ format!("{}/{{crate}}/{{version}}/{{crate}}-{{version}}.crate", base) } +/// A builder for initializing registries. +pub struct RegistryBuilder { + /// If `true`, adds source replacement for crates.io to a registry on the filesystem. + replace_crates_io: bool, + /// If `true`, configures a registry named "alternative". + alternative: bool, + /// If set, sets the API url for the "alternative" registry. + /// This defaults to a directory on the filesystem. + alt_api_url: Option, + /// If `true`, configures `.cargo/credentials` with some tokens. + add_tokens: bool, +} + +impl RegistryBuilder { + pub fn new() -> RegistryBuilder { + RegistryBuilder { + replace_crates_io: true, + alternative: false, + alt_api_url: None, + add_tokens: true, + } + } + + /// Sets whether or not to replace crates.io with a registry on the filesystem. + /// Default is `true`. + pub fn replace_crates_io(&mut self, replace: bool) -> &mut Self { + self.replace_crates_io = replace; + self + } + + /// Sets whether or not to initialize an alternative registry named "alternative". + /// Default is `false`. + pub fn alternative(&mut self, alt: bool) -> &mut Self { + self.alternative = alt; + self + } + + /// Sets the API url for the "alternative" registry. + /// Defaults to a path on the filesystem ([`alt_api_path`]). + pub fn alternative_api_url(&mut self, url: &str) -> &mut Self { + self.alternative = true; + self.alt_api_url = Some(url.to_string()); + self + } + + /// Sets whether or not to initialize `.cargo/credentials` with some tokens. + /// Defaults to `true`. + pub fn add_tokens(&mut self, add: bool) -> &mut Self { + self.add_tokens = add; + self + } + + /// Initializes the registries. + pub fn build(&self) { + let config_path = paths::home().join(".cargo/config"); + if config_path.exists() { + panic!( + "{} already exists, the registry may only be initialized once, \ + and must be done before the config file is created", + config_path.display() + ); + } + t!(fs::create_dir_all(config_path.parent().unwrap())); + let mut config = String::new(); + if self.replace_crates_io { + write!( + &mut config, + " + [source.crates-io] + replace-with = 'dummy-registry' + + [source.dummy-registry] + registry = '{}' + ", + registry_url() + ) + .unwrap(); + } + if self.alternative { + write!( + config, + " + [registries.alternative] + index = '{}' + ", + alt_registry_url() + ) + .unwrap(); + } + t!(fs::write(&config_path, config)); + + if self.add_tokens { + let credentials = paths::home().join(".cargo/credentials"); + t!(fs::write( + &credentials, + r#" + [registry] + token = "api-token" + + [registries.alternative] + token = "api-token" + "# + )); + } + + if self.replace_crates_io { + init_registry(registry_path(), dl_url().into(), api_url(), api_path()); + } + + if self.alternative { + init_registry( + alt_registry_path(), + alt_dl_url(), + self.alt_api_url + .as_ref() + .map_or_else(alt_api_url, |url| Url::parse(url).expect("valid url")), + alt_api_path(), + ); + } + } + + /// Initializes the registries, and sets up an HTTP server for the + /// "alternative" registry. + /// + /// The given callback takes a `Vec` of headers when a request comes in. + /// The first entry should be the HTTP command, such as + /// `PUT /api/v1/crates/new HTTP/1.1`. + /// + /// The callback should return the HTTP code for the response, and the + /// response body. + /// + /// This method returns a `JoinHandle` which you should call + /// `.join().unwrap()` on before exiting the test. + pub fn build_api_server<'a>( + &mut self, + handler: &'static (dyn (Fn(Vec) -> (u32, &'a dyn AsRef<[u8]>)) + Sync), + ) -> thread::JoinHandle<()> { + let server = TcpListener::bind("127.0.0.1:0").unwrap(); + let addr = server.local_addr().unwrap(); + let api_url = format!("http://{}", addr); + + self.replace_crates_io(false) + .alternative_api_url(&api_url) + .build(); + + let t = thread::spawn(move || { + let mut conn = BufReader::new(server.accept().unwrap().0); + let headers: Vec<_> = (&mut conn) + .lines() + .map(|s| s.unwrap()) + .take_while(|s| s.len() > 2) + .map(|s| s.trim().to_string()) + .collect(); + let (code, response) = handler(headers); + let response = response.as_ref(); + let stream = conn.get_mut(); + write!( + stream, + "HTTP/1.1 {}\r\n\ + Content-Length: {}\r\n\ + \r\n", + code, + response.len() + ) + .unwrap(); + stream.write_all(response).unwrap(); + }); + + t + } +} + /// A builder for creating a new package in a registry. /// /// This uses "source replacement" using an automatically generated @@ -137,17 +311,21 @@ name: String, vers: String, deps: Vec, - files: Vec<(String, String)>, - extra_files: Vec<(String, String)>, + files: Vec, yanked: bool, - features: HashMap>, + features: FeatureMap, local: bool, alternative: bool, invalid_json: bool, proc_macro: bool, links: Option, + rust_version: Option, + cargo_features: Vec, + v: Option, } +type FeatureMap = BTreeMap>; + #[derive(Clone)] pub struct Dependency { name: String, @@ -160,70 +338,42 @@ optional: bool, } +/// A file to be created in a package. +struct PackageFile { + path: String, + contents: String, + /// The Unix mode for the file. Note that when extracted on Windows, this + /// is mostly ignored since it doesn't have the same style of permissions. + mode: u32, + /// If `true`, the file is created in the root of the tarfile, used for + /// testing invalid packages. + extra: bool, +} + +const DEFAULT_MODE: u32 = 0o644; + +/// Initializes the on-disk registry and sets up the config so that crates.io +/// is replaced with the one on disk. pub fn init() { let config = paths::home().join(".cargo/config"); - t!(fs::create_dir_all(config.parent().unwrap())); if config.exists() { return; } - t!(fs::write( - &config, - format!( - r#" - [source.crates-io] - registry = 'https://wut' - replace-with = 'dummy-registry' - - [source.dummy-registry] - registry = '{reg}' - - [registries.alternative] - index = '{alt}' - "#, - reg = registry_url(), - alt = alt_registry_url() - ) - )); - let credentials = paths::home().join(".cargo/credentials"); - t!(fs::write( - &credentials, - r#" - [registry] - token = "api-token" - - [registries.alternative] - token = "api-token" - "# - )); + RegistryBuilder::new().build(); +} - // Initialize a new registry. - init_registry( - registry_path(), - dl_url().into_string(), - api_url(), - api_path(), - ); - - // Initialize an alternative registry. - init_registry( - alt_registry_path(), - alt_dl_url(), - alt_api_url(), - alt_api_path(), - ); +/// Variant of `init` that initializes the "alternative" registry. +pub fn alt_init() { + RegistryBuilder::new().alternative(true).build(); } +/// Creates a new on-disk registry. pub fn init_registry(registry_path: PathBuf, dl_url: String, api_url: Url, api_path: PathBuf) { // Initialize a new registry. repo(®istry_path) .file( "config.json", - &format!( - r#" - {{"dl":"{}","api":"{}"}} - "#, - dl_url, api_url - ), + &format!(r#"{{"dl":"{}","api":"{}"}}"#, dl_url, api_url), ) .build(); fs::create_dir_all(api_path.join("api/v1/crates")).unwrap(); @@ -239,14 +389,16 @@ vers: vers.to_string(), deps: Vec::new(), files: Vec::new(), - extra_files: Vec::new(), yanked: false, - features: HashMap::new(), + features: BTreeMap::new(), local: false, alternative: false, invalid_json: false, proc_macro: false, links: None, + rust_version: None, + cargo_features: Vec::new(), + v: None, } } @@ -274,7 +426,17 @@ /// Adds a file to the package. pub fn file(&mut self, name: &str, contents: &str) -> &mut Package { - self.files.push((name.to_string(), contents.to_string())); + self.file_with_mode(name, DEFAULT_MODE, contents) + } + + /// Adds a file with a specific Unix mode. + pub fn file_with_mode(&mut self, path: &str, mode: u32, contents: &str) -> &mut Package { + self.files.push(PackageFile { + path: path.to_string(), + contents: contents.to_string(), + mode, + extra: false, + }); self } @@ -283,9 +445,13 @@ /// Normal files are automatically placed within a directory named /// `$PACKAGE-$VERSION`. This allows you to override that behavior, /// typically for testing invalid behavior. - pub fn extra_file(&mut self, name: &str, contents: &str) -> &mut Package { - self.extra_files - .push((name.to_string(), contents.to_string())); + pub fn extra_file(&mut self, path: &str, contents: &str) -> &mut Package { + self.files.push(PackageFile { + path: path.to_string(), + contents: contents.to_string(), + mode: DEFAULT_MODE, + extra: true, + }); self } @@ -363,6 +529,12 @@ self } + /// Specify a minimal Rust version. + pub fn rust_version(&mut self, rust_version: &str) -> &mut Package { + self.rust_version = Some(rust_version.into()); + self + } + /// Causes the JSON line emitted in the index to be invalid, presumably /// causing Cargo to skip over this version. pub fn invalid_json(&mut self, invalid: bool) -> &mut Package { @@ -375,6 +547,19 @@ self } + pub fn cargo_feature(&mut self, feature: &str) -> &mut Package { + self.cargo_features.push(feature.to_owned()); + self + } + + /// Sets the index schema version for this package. + /// + /// See `cargo::sources::registry::RegistryPackage` for more information. + pub fn schema_version(&mut self, version: u32) -> &mut Package { + self.v = Some(version); + self + } + /// Creates the package and place it in the registry. /// /// This does not actually use Cargo's publishing system, but instead @@ -394,7 +579,9 @@ let registry_url = match (self.alternative, dep.registry.as_deref()) { (false, None) => None, (false, Some("alternative")) => Some(alt_registry_url().to_string()), - (true, None) => Some(CRATES_IO_INDEX.to_string()), + (true, None) => { + Some("https://github.com/rust-lang/crates.io-index".to_string()) + } (true, Some("alternative")) => None, _ => panic!("registry_dep currently only supports `alternative`"), }; @@ -420,23 +607,27 @@ } else { serde_json::json!(self.name) }; - let line = serde_json::json!({ + // This emulates what crates.io may do in the future. + let (features, features2) = split_index_features(self.features.clone()); + let mut json = serde_json::json!({ "name": name, "vers": self.vers, "deps": deps, "cksum": cksum, - "features": self.features, + "features": features, "yanked": self.yanked, "links": self.links, - }) - .to_string(); + }); + if let Some(f2) = &features2 { + json["features2"] = serde_json::json!(f2); + json["v"] = serde_json::json!(2); + } + if let Some(v) = self.v { + json["v"] = serde_json::json!(v); + } + let line = json.to_string(); - let file = match self.name.len() { - 1 => format!("1/{}", self.name), - 2 => format!("2/{}", self.name), - 3 => format!("3/{}/{}", &self.name[..1], self.name), - _ => format!("{}/{}/{}", &self.name[0..2], &self.name[2..4], self.name), - }; + let file = make_dep_path(&self.name, false); let registry_path = if self.alternative { alt_registry_path() @@ -486,23 +677,43 @@ let f = t!(File::create(&dst)); let mut a = Builder::new(GzEncoder::new(f, Compression::default())); - if !self.files.iter().any(|(name, _)| name == "Cargo.toml") { + if !self + .files + .iter() + .any(|PackageFile { path, .. }| path == "Cargo.toml") + { self.append_manifest(&mut a); } if self.files.is_empty() { - self.append(&mut a, "src/lib.rs", ""); + self.append(&mut a, "src/lib.rs", DEFAULT_MODE, ""); } else { - for &(ref name, ref contents) in self.files.iter() { - self.append(&mut a, name, contents); + for PackageFile { + path, + contents, + mode, + extra, + } in &self.files + { + if *extra { + self.append_raw(&mut a, path, *mode, contents); + } else { + self.append(&mut a, path, *mode, contents); + } } } - for &(ref name, ref contents) in self.extra_files.iter() { - self.append_extra(&mut a, name, contents); - } } fn append_manifest(&self, ar: &mut Builder) { - let mut manifest = format!( + let mut manifest = String::new(); + + if !self.cargo_features.is_empty() { + manifest.push_str(&format!( + "cargo-features = {}\n\n", + toml::to_string(&self.cargo_features).unwrap() + )); + } + + manifest.push_str(&format!( r#" [package] name = "{}" @@ -510,7 +721,12 @@ authors = [] "#, self.name, self.vers - ); + )); + + if let Some(version) = &self.rust_version { + manifest.push_str(&format!("rust-version = \"{}\"", version)); + } + for dep in self.deps.iter() { let target = match dep.target { None => String::new(), @@ -537,21 +753,23 @@ manifest.push_str("[lib]\nproc-macro = true\n"); } - self.append(ar, "Cargo.toml", &manifest); + self.append(ar, "Cargo.toml", DEFAULT_MODE, &manifest); } - fn append(&self, ar: &mut Builder, file: &str, contents: &str) { - self.append_extra( + fn append(&self, ar: &mut Builder, file: &str, mode: u32, contents: &str) { + self.append_raw( ar, &format!("{}-{}/{}", self.name, self.vers, file), + mode, contents, ); } - fn append_extra(&self, ar: &mut Builder, path: &str, contents: &str) { + fn append_raw(&self, ar: &mut Builder, path: &str, mode: u32, contents: &str) { let mut header = Header::new_ustar(); header.set_size(contents.len() as u64); t!(header.set_path(path)); + header.set_mode(mode); header.set_cksum(); t!(ar.append(&header, contents.as_bytes())); } @@ -631,3 +849,21 @@ self } } + +fn split_index_features(mut features: FeatureMap) -> (FeatureMap, Option) { + let mut features2 = FeatureMap::new(); + for (feat, values) in features.iter_mut() { + if values + .iter() + .any(|value| value.starts_with("dep:") || value.contains("?/")) + { + let new_values = values.drain(..).collect(); + features2.insert(feat.clone(), new_values); + } + } + if features2.is_empty() { + (features, None) + } else { + (features, Some(features2)) + } +} diff -Nru cargo-mozilla-0.47.0/crates/cargo-test-support/src/tools.rs cargo-mozilla-0.57.0/crates/cargo-test-support/src/tools.rs --- cargo-mozilla-0.47.0/crates/cargo-test-support/src/tools.rs 1970-01-01 00:00:00.000000000 +0000 +++ cargo-mozilla-0.57.0/crates/cargo-test-support/src/tools.rs 2021-10-04 17:24:20.000000000 +0000 @@ -0,0 +1,59 @@ +//! Common executables that can be reused by various tests. + +use crate::{basic_manifest, paths, project, Project}; +use lazy_static::lazy_static; +use std::path::PathBuf; +use std::sync::Mutex; + +lazy_static! { + static ref ECHO_WRAPPER: Mutex> = Mutex::new(None); +} + +/// Returns the path to an executable that works as a wrapper around rustc. +/// +/// The wrapper will echo the command line it was called with to stderr. +pub fn echo_wrapper() -> PathBuf { + let mut lock = ECHO_WRAPPER.lock().unwrap(); + if let Some(path) = &*lock { + return path.clone(); + } + let p = project() + .at(paths::global_root().join("rustc-echo-wrapper")) + .file("Cargo.toml", &basic_manifest("rustc-echo-wrapper", "1.0.0")) + .file( + "src/main.rs", + r#" + fn main() { + let args = std::env::args().collect::>(); + eprintln!("WRAPPER CALLED: {}", args[1..].join(" ")); + let status = std::process::Command::new(&args[1]) + .args(&args[2..]).status().unwrap(); + std::process::exit(status.code().unwrap_or(1)); + } + "#, + ) + .build(); + p.cargo("build").run(); + let path = p.bin("rustc-echo-wrapper"); + *lock = Some(path.clone()); + path +} + +/// Returns a project which builds a cargo-echo simple subcommand +pub fn echo_subcommand() -> Project { + let p = project() + .at("cargo-echo") + .file("Cargo.toml", &basic_manifest("cargo-echo", "0.0.1")) + .file( + "src/main.rs", + r#" + fn main() { + let args: Vec<_> = ::std::env::args().skip(1).collect(); + println!("{}", args.join(" ")); + } + "#, + ) + .build(); + p.cargo("build").run(); + p +} diff -Nru cargo-mozilla-0.47.0/crates/cargo-util/Cargo.toml cargo-mozilla-0.57.0/crates/cargo-util/Cargo.toml --- cargo-mozilla-0.47.0/crates/cargo-util/Cargo.toml 1970-01-01 00:00:00.000000000 +0000 +++ cargo-mozilla-0.57.0/crates/cargo-util/Cargo.toml 2021-10-04 17:24:20.000000000 +0000 @@ -0,0 +1,29 @@ +[package] +name = "cargo-util" +version = "0.1.1" +authors = ["The Cargo Project Developers"] +edition = "2018" +license = "MIT OR Apache-2.0" +homepage = "https://github.com/rust-lang/cargo" +repository = "https://github.com/rust-lang/cargo" +description = "Miscellaneous support code used by Cargo." + +[dependencies] +anyhow = "1.0.34" +crypto-hash = "0.3.1" +filetime = "0.2.9" +hex = "0.4.2" +jobserver = "0.1.21" +libc = "0.2.88" +log = "0.4.6" +same-file = "1.0.6" +shell-escape = "0.1.4" +tempfile = "3.1.0" +walkdir = "2.3.1" + +[target.'cfg(target_os = "macos")'.dependencies] +core-foundation = { version = "0.9.0", features = ["mac_os_10_7_support"] } + +[target.'cfg(windows)'.dependencies] +miow = "0.3.6" +winapi = { version = "0.3.9", features = ["consoleapi", "minwindef"] } diff -Nru cargo-mozilla-0.47.0/crates/cargo-util/LICENSE-APACHE cargo-mozilla-0.57.0/crates/cargo-util/LICENSE-APACHE --- cargo-mozilla-0.47.0/crates/cargo-util/LICENSE-APACHE 1970-01-01 00:00:00.000000000 +0000 +++ cargo-mozilla-0.57.0/crates/cargo-util/LICENSE-APACHE 2021-10-04 17:24:20.000000000 +0000 @@ -0,0 +1,201 @@ + Apache License + Version 2.0, January 2004 + https://www.apache.org/licenses/LICENSE-2.0 + +TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION + +1. Definitions. + + "License" shall mean the terms and conditions for use, reproduction, + and distribution as defined by Sections 1 through 9 of this document. + + "Licensor" shall mean the copyright owner or entity authorized by + the copyright owner that is granting the License. + + "Legal Entity" shall mean the union of the acting entity and all + other entities that control, are controlled by, or are under common + control with that entity. For the purposes of this definition, + "control" means (i) the power, direct or indirect, to cause the + direction or management of such entity, whether by contract or + otherwise, or (ii) ownership of fifty percent (50%) or more of the + outstanding shares, or (iii) beneficial ownership of such entity. + + "You" (or "Your") shall mean an individual or Legal Entity + exercising permissions granted by this License. + + "Source" form shall mean the preferred form for making modifications, + including but not limited to software source code, documentation + source, and configuration files. + + "Object" form shall mean any form resulting from mechanical + transformation or translation of a Source form, including but + not limited to compiled object code, generated documentation, + and conversions to other media types. + + "Work" shall mean the work of authorship, whether in Source or + Object form, made available under the License, as indicated by a + copyright notice that is included in or attached to the work + (an example is provided in the Appendix below). + + "Derivative Works" shall mean any work, whether in Source or Object + form, that is based on (or derived from) the Work and for which the + editorial revisions, annotations, elaborations, or other modifications + represent, as a whole, an original work of authorship. For the purposes + of this License, Derivative Works shall not include works that remain + separable from, or merely link (or bind by name) to the interfaces of, + the Work and Derivative Works thereof. + + "Contribution" shall mean any work of authorship, including + the original version of the Work and any modifications or additions + to that Work or Derivative Works thereof, that is intentionally + submitted to Licensor for inclusion in the Work by the copyright owner + or by an individual or Legal Entity authorized to submit on behalf of + the copyright owner. For the purposes of this definition, "submitted" + means any form of electronic, verbal, or written communication sent + to the Licensor or its representatives, including but not limited to + communication on electronic mailing lists, source code control systems, + and issue tracking systems that are managed by, or on behalf of, the + Licensor for the purpose of discussing and improving the Work, but + excluding communication that is conspicuously marked or otherwise + designated in writing by the copyright owner as "Not a Contribution." + + "Contributor" shall mean Licensor and any individual or Legal Entity + on behalf of whom a Contribution has been received by Licensor and + subsequently incorporated within the Work. + +2. Grant of Copyright License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + copyright license to reproduce, prepare Derivative Works of, + publicly display, publicly perform, sublicense, and distribute the + Work and such Derivative Works in Source or Object form. + +3. Grant of Patent License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + (except as stated in this section) patent license to make, have made, + use, offer to sell, sell, import, and otherwise transfer the Work, + where such license applies only to those patent claims licensable + by such Contributor that are necessarily infringed by their + Contribution(s) alone or by combination of their Contribution(s) + with the Work to which such Contribution(s) was submitted. If You + institute patent litigation against any entity (including a + cross-claim or counterclaim in a lawsuit) alleging that the Work + or a Contribution incorporated within the Work constitutes direct + or contributory patent infringement, then any patent licenses + granted to You under this License for that Work shall terminate + as of the date such litigation is filed. + +4. Redistribution. You may reproduce and distribute copies of the + Work or Derivative Works thereof in any medium, with or without + modifications, and in Source or Object form, provided that You + meet the following conditions: + + (a) You must give any other recipients of the Work or + Derivative Works a copy of this License; and + + (b) You must cause any modified files to carry prominent notices + stating that You changed the files; and + + (c) You must retain, in the Source form of any Derivative Works + that You distribute, all copyright, patent, trademark, and + attribution notices from the Source form of the Work, + excluding those notices that do not pertain to any part of + the Derivative Works; and + + (d) If the Work includes a "NOTICE" text file as part of its + distribution, then any Derivative Works that You distribute must + include a readable copy of the attribution notices contained + within such NOTICE file, excluding those notices that do not + pertain to any part of the Derivative Works, in at least one + of the following places: within a NOTICE text file distributed + as part of the Derivative Works; within the Source form or + documentation, if provided along with the Derivative Works; or, + within a display generated by the Derivative Works, if and + wherever such third-party notices normally appear. The contents + of the NOTICE file are for informational purposes only and + do not modify the License. You may add Your own attribution + notices within Derivative Works that You distribute, alongside + or as an addendum to the NOTICE text from the Work, provided + that such additional attribution notices cannot be construed + as modifying the License. + + You may add Your own copyright statement to Your modifications and + may provide additional or different license terms and conditions + for use, reproduction, or distribution of Your modifications, or + for any such Derivative Works as a whole, provided Your use, + reproduction, and distribution of the Work otherwise complies with + the conditions stated in this License. + +5. Submission of Contributions. Unless You explicitly state otherwise, + any Contribution intentionally submitted for inclusion in the Work + by You to the Licensor shall be under the terms and conditions of + this License, without any additional terms or conditions. + Notwithstanding the above, nothing herein shall supersede or modify + the terms of any separate license agreement you may have executed + with Licensor regarding such Contributions. + +6. Trademarks. This License does not grant permission to use the trade + names, trademarks, service marks, or product names of the Licensor, + except as required for reasonable and customary use in describing the + origin of the Work and reproducing the content of the NOTICE file. + +7. Disclaimer of Warranty. Unless required by applicable law or + agreed to in writing, Licensor provides the Work (and each + Contributor provides its Contributions) on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or + implied, including, without limitation, any warranties or conditions + of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A + PARTICULAR PURPOSE. You are solely responsible for determining the + appropriateness of using or redistributing the Work and assume any + risks associated with Your exercise of permissions under this License. + +8. Limitation of Liability. In no event and under no legal theory, + whether in tort (including negligence), contract, or otherwise, + unless required by applicable law (such as deliberate and grossly + negligent acts) or agreed to in writing, shall any Contributor be + liable to You for damages, including any direct, indirect, special, + incidental, or consequential damages of any character arising as a + result of this License or out of the use or inability to use the + Work (including but not limited to damages for loss of goodwill, + work stoppage, computer failure or malfunction, or any and all + other commercial damages or losses), even if such Contributor + has been advised of the possibility of such damages. + +9. Accepting Warranty or Additional Liability. While redistributing + the Work or Derivative Works thereof, You may choose to offer, + and charge a fee for, acceptance of support, warranty, indemnity, + or other liability obligations and/or rights consistent with this + License. However, in accepting such obligations, You may act only + on Your own behalf and on Your sole responsibility, not on behalf + of any other Contributor, and only if You agree to indemnify, + defend, and hold each Contributor harmless for any liability + incurred by, or claims asserted against, such Contributor by reason + of your accepting any such warranty or additional liability. + +END OF TERMS AND CONDITIONS + +APPENDIX: How to apply the Apache License to your work. + + To apply the Apache License to your work, attach the following + boilerplate notice, with the fields enclosed by brackets "[]" + replaced with your own identifying information. (Don't include + the brackets!) The text should be enclosed in the appropriate + comment syntax for the file format. We also recommend that a + file or class name and description of purpose be included on the + same "printed page" as the copyright notice for easier + identification within third-party archives. + +Copyright [yyyy] [name of copyright owner] + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. diff -Nru cargo-mozilla-0.47.0/crates/cargo-util/LICENSE-MIT cargo-mozilla-0.57.0/crates/cargo-util/LICENSE-MIT --- cargo-mozilla-0.47.0/crates/cargo-util/LICENSE-MIT 1970-01-01 00:00:00.000000000 +0000 +++ cargo-mozilla-0.57.0/crates/cargo-util/LICENSE-MIT 2021-10-04 17:24:20.000000000 +0000 @@ -0,0 +1,23 @@ +Permission is hereby granted, free of charge, to any +person obtaining a copy of this software and associated +documentation files (the "Software"), to deal in the +Software without restriction, including without +limitation the rights to use, copy, modify, merge, +publish, distribute, sublicense, and/or sell copies of +the Software, and to permit persons to whom the Software +is furnished to do so, subject to the following +conditions: + +The above copyright notice and this permission notice +shall be included in all copies or substantial portions +of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF +ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED +TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A +PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT +SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY +CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION +OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR +IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER +DEALINGS IN THE SOFTWARE. diff -Nru cargo-mozilla-0.47.0/crates/cargo-util/src/lib.rs cargo-mozilla-0.57.0/crates/cargo-util/src/lib.rs --- cargo-mozilla-0.47.0/crates/cargo-util/src/lib.rs 1970-01-01 00:00:00.000000000 +0000 +++ cargo-mozilla-0.57.0/crates/cargo-util/src/lib.rs 2021-10-04 17:24:20.000000000 +0000 @@ -0,0 +1,18 @@ +//! Miscellaneous support code used by Cargo. + +pub use self::read2::read2; +pub use process_builder::ProcessBuilder; +pub use process_error::{exit_status_to_string, is_simple_exit_code, ProcessError}; +pub use sha256::Sha256; + +pub mod paths; +mod process_builder; +mod process_error; +mod read2; +pub mod registry; +mod sha256; + +/// Whether or not this running in a Continuous Integration environment. +pub fn is_ci() -> bool { + std::env::var("CI").is_ok() || std::env::var("TF_BUILD").is_ok() +} diff -Nru cargo-mozilla-0.47.0/crates/cargo-util/src/paths.rs cargo-mozilla-0.57.0/crates/cargo-util/src/paths.rs --- cargo-mozilla-0.47.0/crates/cargo-util/src/paths.rs 1970-01-01 00:00:00.000000000 +0000 +++ cargo-mozilla-0.57.0/crates/cargo-util/src/paths.rs 2021-10-04 17:24:20.000000000 +0000 @@ -0,0 +1,728 @@ +//! Various utilities for working with files and paths. + +use anyhow::{Context, Result}; +use filetime::FileTime; +use std::env; +use std::ffi::{OsStr, OsString}; +use std::fs::{self, File, OpenOptions}; +use std::io; +use std::io::prelude::*; +use std::iter; +use std::path::{Component, Path, PathBuf}; +use tempfile::Builder as TempFileBuilder; + +/// Joins paths into a string suitable for the `PATH` environment variable. +/// +/// This is equivalent to [`std::env::join_paths`], but includes a more +/// detailed error message. The given `env` argument is the name of the +/// environment variable this is will be used for, which is included in the +/// error message. +pub fn join_paths>(paths: &[T], env: &str) -> Result { + env::join_paths(paths.iter()) + .with_context(|| { + let paths = paths.iter().map(Path::new).collect::>(); + format!("failed to join path array: {:?}", paths) + }) + .with_context(|| { + format!( + "failed to join search paths together\n\ + Does ${} have an unterminated quote character?", + env + ) + }) +} + +/// Returns the name of the environment variable used for searching for +/// dynamic libraries. +pub fn dylib_path_envvar() -> &'static str { + if cfg!(windows) { + "PATH" + } else if cfg!(target_os = "macos") { + // When loading and linking a dynamic library or bundle, dlopen + // searches in LD_LIBRARY_PATH, DYLD_LIBRARY_PATH, PWD, and + // DYLD_FALLBACK_LIBRARY_PATH. + // In the Mach-O format, a dynamic library has an "install path." + // Clients linking against the library record this path, and the + // dynamic linker, dyld, uses it to locate the library. + // dyld searches DYLD_LIBRARY_PATH *before* the install path. + // dyld searches DYLD_FALLBACK_LIBRARY_PATH only if it cannot + // find the library in the install path. + // Setting DYLD_LIBRARY_PATH can easily have unintended + // consequences. + // + // Also, DYLD_LIBRARY_PATH appears to have significant performance + // penalty starting in 10.13. Cargo's testsuite ran more than twice as + // slow with it on CI. + "DYLD_FALLBACK_LIBRARY_PATH" + } else { + "LD_LIBRARY_PATH" + } +} + +/// Returns a list of directories that are searched for dynamic libraries. +/// +/// Note that some operating systems will have defaults if this is empty that +/// will need to be dealt with. +pub fn dylib_path() -> Vec { + match env::var_os(dylib_path_envvar()) { + Some(var) => env::split_paths(&var).collect(), + None => Vec::new(), + } +} + +/// Normalize a path, removing things like `.` and `..`. +/// +/// CAUTION: This does not resolve symlinks (unlike +/// [`std::fs::canonicalize`]). This may cause incorrect or surprising +/// behavior at times. This should be used carefully. Unfortunately, +/// [`std::fs::canonicalize`] can be hard to use correctly, since it can often +/// fail, or on Windows returns annoying device paths. This is a problem Cargo +/// needs to improve on. +pub fn normalize_path(path: &Path) -> PathBuf { + let mut components = path.components().peekable(); + let mut ret = if let Some(c @ Component::Prefix(..)) = components.peek().cloned() { + components.next(); + PathBuf::from(c.as_os_str()) + } else { + PathBuf::new() + }; + + for component in components { + match component { + Component::Prefix(..) => unreachable!(), + Component::RootDir => { + ret.push(component.as_os_str()); + } + Component::CurDir => {} + Component::ParentDir => { + ret.pop(); + } + Component::Normal(c) => { + ret.push(c); + } + } + } + ret +} + +/// Returns the absolute path of where the given executable is located based +/// on searching the `PATH` environment variable. +/// +/// Returns an error if it cannot be found. +pub fn resolve_executable(exec: &Path) -> Result { + if exec.components().count() == 1 { + let paths = env::var_os("PATH").ok_or_else(|| anyhow::format_err!("no PATH"))?; + let candidates = env::split_paths(&paths).flat_map(|path| { + let candidate = path.join(&exec); + let with_exe = if env::consts::EXE_EXTENSION.is_empty() { + None + } else { + Some(candidate.with_extension(env::consts::EXE_EXTENSION)) + }; + iter::once(candidate).chain(with_exe) + }); + for candidate in candidates { + if candidate.is_file() { + // PATH may have a component like "." in it, so we still need to + // canonicalize. + return Ok(candidate.canonicalize()?); + } + } + + anyhow::bail!("no executable for `{}` found in PATH", exec.display()) + } else { + Ok(exec.canonicalize()?) + } +} + +/// Reads a file to a string. +/// +/// Equivalent to [`std::fs::read_to_string`] with better error messages. +pub fn read(path: &Path) -> Result { + match String::from_utf8(read_bytes(path)?) { + Ok(s) => Ok(s), + Err(_) => anyhow::bail!("path at `{}` was not valid utf-8", path.display()), + } +} + +/// Reads a file into a bytes vector. +/// +/// Equivalent to [`std::fs::read`] with better error messages. +pub fn read_bytes(path: &Path) -> Result> { + fs::read(path).with_context(|| format!("failed to read `{}`", path.display())) +} + +/// Writes a file to disk. +/// +/// Equivalent to [`std::fs::write`] with better error messages. +pub fn write, C: AsRef<[u8]>>(path: P, contents: C) -> Result<()> { + let path = path.as_ref(); + fs::write(path, contents.as_ref()) + .with_context(|| format!("failed to write `{}`", path.display())) +} + +/// Equivalent to [`write()`], but does not write anything if the file contents +/// are identical to the given contents. +pub fn write_if_changed, C: AsRef<[u8]>>(path: P, contents: C) -> Result<()> { + (|| -> Result<()> { + let contents = contents.as_ref(); + let mut f = OpenOptions::new() + .read(true) + .write(true) + .create(true) + .open(&path)?; + let mut orig = Vec::new(); + f.read_to_end(&mut orig)?; + if orig != contents { + f.set_len(0)?; + f.seek(io::SeekFrom::Start(0))?; + f.write_all(contents)?; + } + Ok(()) + })() + .with_context(|| format!("failed to write `{}`", path.as_ref().display()))?; + Ok(()) +} + +/// Equivalent to [`write()`], but appends to the end instead of replacing the +/// contents. +pub fn append(path: &Path, contents: &[u8]) -> Result<()> { + (|| -> Result<()> { + let mut f = OpenOptions::new() + .write(true) + .append(true) + .create(true) + .open(path)?; + + f.write_all(contents)?; + Ok(()) + })() + .with_context(|| format!("failed to write `{}`", path.display()))?; + Ok(()) +} + +/// Creates a new file. +pub fn create>(path: P) -> Result { + let path = path.as_ref(); + File::create(path).with_context(|| format!("failed to create file `{}`", path.display())) +} + +/// Opens an existing file. +pub fn open>(path: P) -> Result { + let path = path.as_ref(); + File::open(path).with_context(|| format!("failed to open file `{}`", path.display())) +} + +/// Returns the last modification time of a file. +pub fn mtime(path: &Path) -> Result { + let meta = + fs::metadata(path).with_context(|| format!("failed to stat `{}`", path.display()))?; + Ok(FileTime::from_last_modification_time(&meta)) +} + +/// Returns the maximum mtime of the given path, recursing into +/// subdirectories, and following symlinks. +pub fn mtime_recursive(path: &Path) -> Result { + let meta = + fs::metadata(path).with_context(|| format!("failed to stat `{}`", path.display()))?; + if !meta.is_dir() { + return Ok(FileTime::from_last_modification_time(&meta)); + } + let max_meta = walkdir::WalkDir::new(path) + .follow_links(true) + .into_iter() + .filter_map(|e| match e { + Ok(e) => Some(e), + Err(e) => { + // Ignore errors while walking. If Cargo can't access it, the + // build script probably can't access it, either. + log::debug!("failed to determine mtime while walking directory: {}", e); + None + } + }) + .filter_map(|e| { + if e.path_is_symlink() { + // Use the mtime of both the symlink and its target, to + // handle the case where the symlink is modified to a + // different target. + let sym_meta = match std::fs::symlink_metadata(e.path()) { + Ok(m) => m, + Err(err) => { + // I'm not sure when this is really possible (maybe a + // race with unlinking?). Regardless, if Cargo can't + // read it, the build script probably can't either. + log::debug!( + "failed to determine mtime while fetching symlink metdata of {}: {}", + e.path().display(), + err + ); + return None; + } + }; + let sym_mtime = FileTime::from_last_modification_time(&sym_meta); + // Walkdir follows symlinks. + match e.metadata() { + Ok(target_meta) => { + let target_mtime = FileTime::from_last_modification_time(&target_meta); + Some(sym_mtime.max(target_mtime)) + } + Err(err) => { + // Can't access the symlink target. If Cargo can't + // access it, the build script probably can't access + // it either. + log::debug!( + "failed to determine mtime of symlink target for {}: {}", + e.path().display(), + err + ); + Some(sym_mtime) + } + } + } else { + let meta = match e.metadata() { + Ok(m) => m, + Err(err) => { + // I'm not sure when this is really possible (maybe a + // race with unlinking?). Regardless, if Cargo can't + // read it, the build script probably can't either. + log::debug!( + "failed to determine mtime while fetching metadata of {}: {}", + e.path().display(), + err + ); + return None; + } + }; + Some(FileTime::from_last_modification_time(&meta)) + } + }) + .max() + // or_else handles the case where there are no files in the directory. + .unwrap_or_else(|| FileTime::from_last_modification_time(&meta)); + Ok(max_meta) +} + +/// Record the current time on the filesystem (using the filesystem's clock) +/// using a file at the given directory. Returns the current time. +pub fn set_invocation_time(path: &Path) -> Result { + // note that if `FileTime::from_system_time(SystemTime::now());` is determined to be sufficient, + // then this can be removed. + let timestamp = path.join("invoked.timestamp"); + write( + ×tamp, + "This file has an mtime of when this was started.", + )?; + let ft = mtime(×tamp)?; + log::debug!("invocation time for {:?} is {}", path, ft); + Ok(ft) +} + +/// Converts a path to UTF-8 bytes. +pub fn path2bytes(path: &Path) -> Result<&[u8]> { + #[cfg(unix)] + { + use std::os::unix::prelude::*; + Ok(path.as_os_str().as_bytes()) + } + #[cfg(windows)] + { + match path.as_os_str().to_str() { + Some(s) => Ok(s.as_bytes()), + None => Err(anyhow::format_err!( + "invalid non-unicode path: {}", + path.display() + )), + } + } +} + +/// Converts UTF-8 bytes to a path. +pub fn bytes2path(bytes: &[u8]) -> Result { + #[cfg(unix)] + { + use std::os::unix::prelude::*; + Ok(PathBuf::from(OsStr::from_bytes(bytes))) + } + #[cfg(windows)] + { + use std::str; + match str::from_utf8(bytes) { + Ok(s) => Ok(PathBuf::from(s)), + Err(..) => Err(anyhow::format_err!("invalid non-unicode path")), + } + } +} + +/// Returns an iterator that walks up the directory hierarchy towards the root. +/// +/// Each item is a [`Path`]. It will start with the given path, finishing at +/// the root. If the `stop_root_at` parameter is given, it will stop at the +/// given path (which will be the last item). +pub fn ancestors<'a>(path: &'a Path, stop_root_at: Option<&Path>) -> PathAncestors<'a> { + PathAncestors::new(path, stop_root_at) +} + +pub struct PathAncestors<'a> { + current: Option<&'a Path>, + stop_at: Option, +} + +impl<'a> PathAncestors<'a> { + fn new(path: &'a Path, stop_root_at: Option<&Path>) -> PathAncestors<'a> { + let stop_at = env::var("__CARGO_TEST_ROOT") + .ok() + .map(PathBuf::from) + .or_else(|| stop_root_at.map(|p| p.to_path_buf())); + PathAncestors { + current: Some(path), + //HACK: avoid reading `~/.cargo/config` when testing Cargo itself. + stop_at, + } + } +} + +impl<'a> Iterator for PathAncestors<'a> { + type Item = &'a Path; + + fn next(&mut self) -> Option<&'a Path> { + if let Some(path) = self.current { + self.current = path.parent(); + + if let Some(ref stop_at) = self.stop_at { + if path == stop_at { + self.current = None; + } + } + + Some(path) + } else { + None + } + } +} + +/// Equivalent to [`std::fs::create_dir_all`] with better error messages. +pub fn create_dir_all(p: impl AsRef) -> Result<()> { + _create_dir_all(p.as_ref()) +} + +fn _create_dir_all(p: &Path) -> Result<()> { + fs::create_dir_all(p) + .with_context(|| format!("failed to create directory `{}`", p.display()))?; + Ok(()) +} + +/// Recursively remove all files and directories at the given directory. +/// +/// This does *not* follow symlinks. +pub fn remove_dir_all>(p: P) -> Result<()> { + _remove_dir_all(p.as_ref()) +} + +fn _remove_dir_all(p: &Path) -> Result<()> { + if p.symlink_metadata() + .with_context(|| format!("could not get metadata for `{}` to remove", p.display()))? + .file_type() + .is_symlink() + { + return remove_file(p); + } + let entries = p + .read_dir() + .with_context(|| format!("failed to read directory `{}`", p.display()))?; + for entry in entries { + let entry = entry?; + let path = entry.path(); + if entry.file_type()?.is_dir() { + remove_dir_all(&path)?; + } else { + remove_file(&path)?; + } + } + remove_dir(&p) +} + +/// Equivalent to [`std::fs::remove_dir`] with better error messages. +pub fn remove_dir>(p: P) -> Result<()> { + _remove_dir(p.as_ref()) +} + +fn _remove_dir(p: &Path) -> Result<()> { + fs::remove_dir(p).with_context(|| format!("failed to remove directory `{}`", p.display()))?; + Ok(()) +} + +/// Equivalent to [`std::fs::remove_file`] with better error messages. +/// +/// If the file is readonly, this will attempt to change the permissions to +/// force the file to be deleted. +pub fn remove_file>(p: P) -> Result<()> { + _remove_file(p.as_ref()) +} + +fn _remove_file(p: &Path) -> Result<()> { + let mut err = match fs::remove_file(p) { + Ok(()) => return Ok(()), + Err(e) => e, + }; + + if err.kind() == io::ErrorKind::PermissionDenied && set_not_readonly(p).unwrap_or(false) { + match fs::remove_file(p) { + Ok(()) => return Ok(()), + Err(e) => err = e, + } + } + + Err(err).with_context(|| format!("failed to remove file `{}`", p.display()))?; + Ok(()) +} + +fn set_not_readonly(p: &Path) -> io::Result { + let mut perms = p.metadata()?.permissions(); + if !perms.readonly() { + return Ok(false); + } + perms.set_readonly(false); + fs::set_permissions(p, perms)?; + Ok(true) +} + +/// Hardlink (file) or symlink (dir) src to dst if possible, otherwise copy it. +/// +/// If the destination already exists, it is removed before linking. +pub fn link_or_copy(src: impl AsRef, dst: impl AsRef) -> Result<()> { + let src = src.as_ref(); + let dst = dst.as_ref(); + _link_or_copy(src, dst) +} + +fn _link_or_copy(src: &Path, dst: &Path) -> Result<()> { + log::debug!("linking {} to {}", src.display(), dst.display()); + if same_file::is_same_file(src, dst).unwrap_or(false) { + return Ok(()); + } + + // NB: we can't use dst.exists(), as if dst is a broken symlink, + // dst.exists() will return false. This is problematic, as we still need to + // unlink dst in this case. symlink_metadata(dst).is_ok() will tell us + // whether dst exists *without* following symlinks, which is what we want. + if fs::symlink_metadata(dst).is_ok() { + remove_file(&dst)?; + } + + let link_result = if src.is_dir() { + #[cfg(target_os = "redox")] + use std::os::redox::fs::symlink; + #[cfg(unix)] + use std::os::unix::fs::symlink; + #[cfg(windows)] + // FIXME: This should probably panic or have a copy fallback. Symlinks + // are not supported in all windows environments. Currently symlinking + // is only used for .dSYM directories on macos, but this shouldn't be + // accidentally relied upon. + use std::os::windows::fs::symlink_dir as symlink; + + let dst_dir = dst.parent().unwrap(); + let src = if src.starts_with(dst_dir) { + src.strip_prefix(dst_dir).unwrap() + } else { + src + }; + symlink(src, dst) + } else if env::var_os("__CARGO_COPY_DONT_LINK_DO_NOT_USE_THIS").is_some() { + // This is a work-around for a bug in macOS 10.15. When running on + // APFS, there seems to be a strange race condition with + // Gatekeeper where it will forcefully kill a process launched via + // `cargo run` with SIGKILL. Copying seems to avoid the problem. + // This shouldn't affect anyone except Cargo's test suite because + // it is very rare, and only seems to happen under heavy load and + // rapidly creating lots of executables and running them. + // See https://github.com/rust-lang/cargo/issues/7821 for the + // gory details. + fs::copy(src, dst).map(|_| ()) + } else { + fs::hard_link(src, dst) + }; + link_result + .or_else(|err| { + log::debug!("link failed {}. falling back to fs::copy", err); + fs::copy(src, dst).map(|_| ()) + }) + .with_context(|| { + format!( + "failed to link or copy `{}` to `{}`", + src.display(), + dst.display() + ) + })?; + Ok(()) +} + +/// Copies a file from one location to another. +/// +/// Equivalent to [`std::fs::copy`] with better error messages. +pub fn copy, Q: AsRef>(from: P, to: Q) -> Result { + let from = from.as_ref(); + let to = to.as_ref(); + fs::copy(from, to) + .with_context(|| format!("failed to copy `{}` to `{}`", from.display(), to.display())) +} + +/// Changes the filesystem mtime (and atime if possible) for the given file. +/// +/// This intentionally does not return an error, as this is sometimes not +/// supported on network filesystems. For the current uses in Cargo, this is a +/// "best effort" approach, and errors shouldn't be propagated. +pub fn set_file_time_no_err>(path: P, time: FileTime) { + let path = path.as_ref(); + match filetime::set_file_times(path, time, time) { + Ok(()) => log::debug!("set file mtime {} to {}", path.display(), time), + Err(e) => log::warn!( + "could not set mtime of {} to {}: {:?}", + path.display(), + time, + e + ), + } +} + +/// Strips `base` from `path`. +/// +/// This canonicalizes both paths before stripping. This is useful if the +/// paths are obtained in different ways, and one or the other may or may not +/// have been normalized in some way. +pub fn strip_prefix_canonical>( + path: P, + base: P, +) -> Result { + // Not all filesystems support canonicalize. Just ignore if it doesn't work. + let safe_canonicalize = |path: &Path| match path.canonicalize() { + Ok(p) => p, + Err(e) => { + log::warn!("cannot canonicalize {:?}: {:?}", path, e); + path.to_path_buf() + } + }; + let canon_path = safe_canonicalize(path.as_ref()); + let canon_base = safe_canonicalize(base.as_ref()); + canon_path.strip_prefix(canon_base).map(|p| p.to_path_buf()) +} + +/// Creates an excluded from cache directory atomically with its parents as needed. +/// +/// The atomicity only covers creating the leaf directory and exclusion from cache. Any missing +/// parent directories will not be created in an atomic manner. +/// +/// This function is idempotent and in addition to that it won't exclude ``p`` from cache if it +/// already exists. +pub fn create_dir_all_excluded_from_backups_atomic(p: impl AsRef) -> Result<()> { + let path = p.as_ref(); + if path.is_dir() { + return Ok(()); + } + + let parent = path.parent().unwrap(); + let base = path.file_name().unwrap(); + create_dir_all(parent)?; + // We do this in two steps (first create a temporary directory and exlucde + // it from backups, then rename it to the desired name. If we created the + // directory directly where it should be and then excluded it from backups + // we would risk a situation where cargo is interrupted right after the directory + // creation but before the exclusion the the directory would remain non-excluded from + // backups because we only perform exclusion right after we created the directory + // ourselves. + // + // We need the tempdir created in parent instead of $TMP, because only then we can be + // easily sure that rename() will succeed (the new name needs to be on the same mount + // point as the old one). + let tempdir = TempFileBuilder::new().prefix(base).tempdir_in(parent)?; + exclude_from_backups(tempdir.path()); + exclude_from_content_indexing(tempdir.path()); + // Previously std::fs::create_dir_all() (through paths::create_dir_all()) was used + // here to create the directory directly and fs::create_dir_all() explicitly treats + // the directory being created concurrently by another thread or process as success, + // hence the check below to follow the existing behavior. If we get an error at + // rename() and suddently the directory (which didn't exist a moment earlier) exists + // we can infer from it it's another cargo process doing work. + if let Err(e) = fs::rename(tempdir.path(), path) { + if !path.exists() { + return Err(anyhow::Error::from(e)); + } + } + Ok(()) +} + +/// Marks the directory as excluded from archives/backups. +/// +/// This is recommended to prevent derived/temporary files from bloating backups. There are two +/// mechanisms used to achieve this right now: +/// +/// * A dedicated resource property excluding from Time Machine backups on macOS +/// * CACHEDIR.TAG files supported by various tools in a platform-independent way +fn exclude_from_backups(path: &Path) { + exclude_from_time_machine(path); + let _ = std::fs::write( + path.join("CACHEDIR.TAG"), + "Signature: 8a477f597d28d172789f06886806bc55 +# This file is a cache directory tag created by cargo. +# For information about cache directory tags see https://bford.info/cachedir/ +", + ); + // Similarly to exclude_from_time_machine() we ignore errors here as it's an optional feature. +} + +/// Marks the directory as excluded from content indexing. +/// +/// This is recommended to prevent the content of derived/temporary files from being indexed. +/// This is very important for Windows users, as the live content indexing significantly slows +/// cargo's I/O operations. +/// +/// This is currently a no-op on non-Windows platforms. +fn exclude_from_content_indexing(path: &Path) { + #[cfg(windows)] + { + use std::iter::once; + use std::os::windows::prelude::OsStrExt; + use winapi::um::fileapi::{GetFileAttributesW, SetFileAttributesW}; + use winapi::um::winnt::FILE_ATTRIBUTE_NOT_CONTENT_INDEXED; + + let path: Vec = path.as_os_str().encode_wide().chain(once(0)).collect(); + unsafe { + SetFileAttributesW( + path.as_ptr(), + GetFileAttributesW(path.as_ptr()) | FILE_ATTRIBUTE_NOT_CONTENT_INDEXED, + ); + } + } + #[cfg(not(windows))] + { + let _ = path; + } +} + +#[cfg(not(target_os = "macos"))] +fn exclude_from_time_machine(_: &Path) {} + +#[cfg(target_os = "macos")] +/// Marks files or directories as excluded from Time Machine on macOS +fn exclude_from_time_machine(path: &Path) { + use core_foundation::base::TCFType; + use core_foundation::{number, string, url}; + use std::ptr; + + // For compatibility with 10.7 a string is used instead of global kCFURLIsExcludedFromBackupKey + let is_excluded_key: Result = "NSURLIsExcludedFromBackupKey".parse(); + let path = url::CFURL::from_path(path, false); + if let (Some(path), Ok(is_excluded_key)) = (path, is_excluded_key) { + unsafe { + url::CFURLSetResourcePropertyForKey( + path.as_concrete_TypeRef(), + is_excluded_key.as_concrete_TypeRef(), + number::kCFBooleanTrue as *const _, + ptr::null_mut(), + ); + } + } + // Errors are ignored, since it's an optional feature and failure + // doesn't prevent Cargo from working +} diff -Nru cargo-mozilla-0.47.0/crates/cargo-util/src/process_builder.rs cargo-mozilla-0.57.0/crates/cargo-util/src/process_builder.rs --- cargo-mozilla-0.47.0/crates/cargo-util/src/process_builder.rs 1970-01-01 00:00:00.000000000 +0000 +++ cargo-mozilla-0.57.0/crates/cargo-util/src/process_builder.rs 2021-10-04 17:24:20.000000000 +0000 @@ -0,0 +1,424 @@ +use crate::process_error::ProcessError; +use crate::read2; +use anyhow::{bail, Context, Result}; +use jobserver::Client; +use shell_escape::escape; +use std::collections::BTreeMap; +use std::env; +use std::ffi::{OsStr, OsString}; +use std::fmt; +use std::iter::once; +use std::path::Path; +use std::process::{Command, Output, Stdio}; + +/// A builder object for an external process, similar to [`std::process::Command`]. +#[derive(Clone, Debug)] +pub struct ProcessBuilder { + /// The program to execute. + program: OsString, + /// A list of arguments to pass to the program. + args: Vec, + /// Any environment variables that should be set for the program. + env: BTreeMap>, + /// The directory to run the program from. + cwd: Option, + /// The `make` jobserver. See the [jobserver crate] for + /// more information. + /// + /// [jobserver crate]: https://docs.rs/jobserver/ + jobserver: Option, + /// `true` to include environment variable in display. + display_env_vars: bool, +} + +impl fmt::Display for ProcessBuilder { + fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { + write!(f, "`")?; + + if self.display_env_vars { + for (key, val) in self.env.iter() { + if let Some(val) = val { + let val = escape(val.to_string_lossy()); + if cfg!(windows) { + write!(f, "set {}={}&& ", key, val)?; + } else { + write!(f, "{}={} ", key, val)?; + } + } + } + } + + write!(f, "{}", self.program.to_string_lossy())?; + + for arg in &self.args { + write!(f, " {}", escape(arg.to_string_lossy()))?; + } + + write!(f, "`") + } +} + +impl ProcessBuilder { + /// Creates a new [`ProcessBuilder`] with the given executable path. + pub fn new>(cmd: T) -> ProcessBuilder { + ProcessBuilder { + program: cmd.as_ref().to_os_string(), + args: Vec::new(), + cwd: None, + env: BTreeMap::new(), + jobserver: None, + display_env_vars: false, + } + } + + /// (chainable) Sets the executable for the process. + pub fn program>(&mut self, program: T) -> &mut ProcessBuilder { + self.program = program.as_ref().to_os_string(); + self + } + + /// (chainable) Adds `arg` to the args list. + pub fn arg>(&mut self, arg: T) -> &mut ProcessBuilder { + self.args.push(arg.as_ref().to_os_string()); + self + } + + /// (chainable) Adds multiple `args` to the args list. + pub fn args>(&mut self, args: &[T]) -> &mut ProcessBuilder { + self.args + .extend(args.iter().map(|t| t.as_ref().to_os_string())); + self + } + + /// (chainable) Replaces the args list with the given `args`. + pub fn args_replace>(&mut self, args: &[T]) -> &mut ProcessBuilder { + self.args = args.iter().map(|t| t.as_ref().to_os_string()).collect(); + self + } + + /// (chainable) Sets the current working directory of the process. + pub fn cwd>(&mut self, path: T) -> &mut ProcessBuilder { + self.cwd = Some(path.as_ref().to_os_string()); + self + } + + /// (chainable) Sets an environment variable for the process. + pub fn env>(&mut self, key: &str, val: T) -> &mut ProcessBuilder { + self.env + .insert(key.to_string(), Some(val.as_ref().to_os_string())); + self + } + + /// (chainable) Unsets an environment variable for the process. + pub fn env_remove(&mut self, key: &str) -> &mut ProcessBuilder { + self.env.insert(key.to_string(), None); + self + } + + /// Gets the executable name. + pub fn get_program(&self) -> &OsString { + &self.program + } + + /// Gets the program arguments. + pub fn get_args(&self) -> &[OsString] { + &self.args + } + + /// Gets the current working directory for the process. + pub fn get_cwd(&self) -> Option<&Path> { + self.cwd.as_ref().map(Path::new) + } + + /// Gets an environment variable as the process will see it (will inherit from environment + /// unless explicitally unset). + pub fn get_env(&self, var: &str) -> Option { + self.env + .get(var) + .cloned() + .or_else(|| Some(env::var_os(var))) + .and_then(|s| s) + } + + /// Gets all environment variables explicitly set or unset for the process (not inherited + /// vars). + pub fn get_envs(&self) -> &BTreeMap> { + &self.env + } + + /// Sets the `make` jobserver. See the [jobserver crate][jobserver_docs] for + /// more information. + /// + /// [jobserver_docs]: https://docs.rs/jobserver/0.1.6/jobserver/ + pub fn inherit_jobserver(&mut self, jobserver: &Client) -> &mut Self { + self.jobserver = Some(jobserver.clone()); + self + } + + /// Enables environment variable display. + pub fn display_env_vars(&mut self) -> &mut Self { + self.display_env_vars = true; + self + } + + /// Runs the process, waiting for completion, and mapping non-success exit codes to an error. + pub fn exec(&self) -> Result<()> { + let mut command = self.build_command(); + let exit = command.status().with_context(|| { + ProcessError::new(&format!("could not execute process {}", self), None, None) + })?; + + if exit.success() { + Ok(()) + } else { + Err(ProcessError::new( + &format!("process didn't exit successfully: {}", self), + Some(exit), + None, + ) + .into()) + } + } + + /// Replaces the current process with the target process. + /// + /// On Unix, this executes the process using the Unix syscall `execvp`, which will block + /// this process, and will only return if there is an error. + /// + /// On Windows this isn't technically possible. Instead we emulate it to the best of our + /// ability. One aspect we fix here is that we specify a handler for the Ctrl-C handler. + /// In doing so (and by effectively ignoring it) we should emulate proxying Ctrl-C + /// handling to the application at hand, which will either terminate or handle it itself. + /// According to Microsoft's documentation at + /// . + /// the Ctrl-C signal is sent to all processes attached to a terminal, which should + /// include our child process. If the child terminates then we'll reap them in Cargo + /// pretty quickly, and if the child handles the signal then we won't terminate + /// (and we shouldn't!) until the process itself later exits. + pub fn exec_replace(&self) -> Result<()> { + imp::exec_replace(self) + } + + /// Executes the process, returning the stdio output, or an error if non-zero exit status. + pub fn exec_with_output(&self) -> Result { + let mut command = self.build_command(); + + let output = command.output().with_context(|| { + ProcessError::new(&format!("could not execute process {}", self), None, None) + })?; + + if output.status.success() { + Ok(output) + } else { + Err(ProcessError::new( + &format!("process didn't exit successfully: {}", self), + Some(output.status), + Some(&output), + ) + .into()) + } + } + + /// Executes a command, passing each line of stdout and stderr to the supplied callbacks, which + /// can mutate the string data. + /// + /// If any invocations of these function return an error, it will be propagated. + /// + /// If `capture_output` is true, then all the output will also be buffered + /// and stored in the returned `Output` object. If it is false, no caching + /// is done, and the callbacks are solely responsible for handling the + /// output. + pub fn exec_with_streaming( + &self, + on_stdout_line: &mut dyn FnMut(&str) -> Result<()>, + on_stderr_line: &mut dyn FnMut(&str) -> Result<()>, + capture_output: bool, + ) -> Result { + let mut stdout = Vec::new(); + let mut stderr = Vec::new(); + + let mut cmd = self.build_command(); + cmd.stdout(Stdio::piped()) + .stderr(Stdio::piped()) + .stdin(Stdio::null()); + + let mut callback_error = None; + let mut stdout_pos = 0; + let mut stderr_pos = 0; + let status = (|| { + let mut child = cmd.spawn()?; + let out = child.stdout.take().unwrap(); + let err = child.stderr.take().unwrap(); + read2(out, err, &mut |is_out, data, eof| { + let pos = if is_out { + &mut stdout_pos + } else { + &mut stderr_pos + }; + let idx = if eof { + data.len() + } else { + match data[*pos..].iter().rposition(|b| *b == b'\n') { + Some(i) => *pos + i + 1, + None => { + *pos = data.len(); + return; + } + } + }; + + let new_lines = &data[..idx]; + + for line in String::from_utf8_lossy(new_lines).lines() { + if callback_error.is_some() { + break; + } + let callback_result = if is_out { + on_stdout_line(line) + } else { + on_stderr_line(line) + }; + if let Err(e) = callback_result { + callback_error = Some(e); + break; + } + } + + if capture_output { + let dst = if is_out { &mut stdout } else { &mut stderr }; + dst.extend(new_lines); + } + + data.drain(..idx); + *pos = 0; + })?; + child.wait() + })() + .with_context(|| { + ProcessError::new(&format!("could not execute process {}", self), None, None) + })?; + let output = Output { + status, + stdout, + stderr, + }; + + { + let to_print = if capture_output { Some(&output) } else { None }; + if let Some(e) = callback_error { + let cx = ProcessError::new( + &format!("failed to parse process output: {}", self), + Some(output.status), + to_print, + ); + bail!(anyhow::Error::new(cx).context(e)); + } else if !output.status.success() { + bail!(ProcessError::new( + &format!("process didn't exit successfully: {}", self), + Some(output.status), + to_print, + )); + } + } + + Ok(output) + } + + /// Converts `ProcessBuilder` into a `std::process::Command`, and handles the jobserver, if + /// present. + pub fn build_command(&self) -> Command { + let mut command = Command::new(&self.program); + if let Some(cwd) = self.get_cwd() { + command.current_dir(cwd); + } + for arg in &self.args { + command.arg(arg); + } + for (k, v) in &self.env { + match *v { + Some(ref v) => { + command.env(k, v); + } + None => { + command.env_remove(k); + } + } + } + if let Some(ref c) = self.jobserver { + c.configure(&mut command); + } + command + } + + /// Wraps an existing command with the provided wrapper, if it is present and valid. + /// + /// # Examples + /// + /// ```rust + /// use cargo_util::ProcessBuilder; + /// // Running this would execute `rustc` + /// let cmd = ProcessBuilder::new("rustc"); + /// + /// // Running this will execute `sccache rustc` + /// let cmd = cmd.wrapped(Some("sccache")); + /// ``` + pub fn wrapped(mut self, wrapper: Option>) -> Self { + let wrapper = if let Some(wrapper) = wrapper.as_ref() { + wrapper.as_ref() + } else { + return self; + }; + + if wrapper.is_empty() { + return self; + } + + let args = once(self.program).chain(self.args.into_iter()).collect(); + + self.program = wrapper.to_os_string(); + self.args = args; + + self + } +} + +#[cfg(unix)] +mod imp { + use super::{ProcessBuilder, ProcessError}; + use anyhow::Result; + use std::os::unix::process::CommandExt; + + pub fn exec_replace(process_builder: &ProcessBuilder) -> Result<()> { + let mut command = process_builder.build_command(); + let error = command.exec(); + Err(anyhow::Error::from(error).context(ProcessError::new( + &format!("could not execute process {}", process_builder), + None, + None, + ))) + } +} + +#[cfg(windows)] +mod imp { + use super::{ProcessBuilder, ProcessError}; + use anyhow::Result; + use winapi::shared::minwindef::{BOOL, DWORD, FALSE, TRUE}; + use winapi::um::consoleapi::SetConsoleCtrlHandler; + + unsafe extern "system" fn ctrlc_handler(_: DWORD) -> BOOL { + // Do nothing; let the child process handle it. + TRUE + } + + pub fn exec_replace(process_builder: &ProcessBuilder) -> Result<()> { + unsafe { + if SetConsoleCtrlHandler(Some(ctrlc_handler), TRUE) == FALSE { + return Err(ProcessError::new("Could not set Ctrl-C handler.", None, None).into()); + } + } + + // Just execute the process as normal. + process_builder.exec() + } +} diff -Nru cargo-mozilla-0.47.0/crates/cargo-util/src/process_error.rs cargo-mozilla-0.57.0/crates/cargo-util/src/process_error.rs --- cargo-mozilla-0.47.0/crates/cargo-util/src/process_error.rs 1970-01-01 00:00:00.000000000 +0000 +++ cargo-mozilla-0.57.0/crates/cargo-util/src/process_error.rs 2021-10-04 17:24:20.000000000 +0000 @@ -0,0 +1,194 @@ +//! Error value for [`crate::ProcessBuilder`] when a process fails. + +use std::fmt; +use std::process::{ExitStatus, Output}; +use std::str; + +#[derive(Debug)] +pub struct ProcessError { + /// A detailed description to show to the user why the process failed. + pub desc: String, + + /// The exit status of the process. + /// + /// This can be `None` if the process failed to launch (like process not + /// found) or if the exit status wasn't a code but was instead something + /// like termination via a signal. + pub code: Option, + + /// The stdout from the process. + /// + /// This can be `None` if the process failed to launch, or the output was + /// not captured. + pub stdout: Option>, + + /// The stderr from the process. + /// + /// This can be `None` if the process failed to launch, or the output was + /// not captured. + pub stderr: Option>, +} + +impl fmt::Display for ProcessError { + fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { + self.desc.fmt(f) + } +} + +impl std::error::Error for ProcessError {} + +impl ProcessError { + /// Creates a new [`ProcessError`]. + /// + /// * `status` can be `None` if the process did not launch. + /// * `output` can be `None` if the process did not launch, or output was not captured. + pub fn new(msg: &str, status: Option, output: Option<&Output>) -> ProcessError { + let exit = match status { + Some(s) => exit_status_to_string(s), + None => "never executed".to_string(), + }; + + Self::new_raw( + msg, + status.and_then(|s| s.code()), + &exit, + output.map(|s| s.stdout.as_slice()), + output.map(|s| s.stderr.as_slice()), + ) + } + + /// Creates a new [`ProcessError`] with the raw output data. + /// + /// * `code` can be `None` for situations like being killed by a signal on unix. + pub fn new_raw( + msg: &str, + code: Option, + status: &str, + stdout: Option<&[u8]>, + stderr: Option<&[u8]>, + ) -> ProcessError { + let mut desc = format!("{} ({})", msg, status); + + if let Some(out) = stdout { + match str::from_utf8(out) { + Ok(s) if !s.trim().is_empty() => { + desc.push_str("\n--- stdout\n"); + desc.push_str(s); + } + Ok(..) | Err(..) => {} + } + } + if let Some(out) = stderr { + match str::from_utf8(out) { + Ok(s) if !s.trim().is_empty() => { + desc.push_str("\n--- stderr\n"); + desc.push_str(s); + } + Ok(..) | Err(..) => {} + } + } + + ProcessError { + desc, + code, + stdout: stdout.map(|s| s.to_vec()), + stderr: stderr.map(|s| s.to_vec()), + } + } +} + +/// Converts an [`ExitStatus`] to a human-readable string suitable for +/// displaying to a user. +pub fn exit_status_to_string(status: ExitStatus) -> String { + return status_to_string(status); + + #[cfg(unix)] + fn status_to_string(status: ExitStatus) -> String { + use std::os::unix::process::*; + + if let Some(signal) = status.signal() { + let name = match signal as libc::c_int { + libc::SIGABRT => ", SIGABRT: process abort signal", + libc::SIGALRM => ", SIGALRM: alarm clock", + libc::SIGFPE => ", SIGFPE: erroneous arithmetic operation", + libc::SIGHUP => ", SIGHUP: hangup", + libc::SIGILL => ", SIGILL: illegal instruction", + libc::SIGINT => ", SIGINT: terminal interrupt signal", + libc::SIGKILL => ", SIGKILL: kill", + libc::SIGPIPE => ", SIGPIPE: write on a pipe with no one to read", + libc::SIGQUIT => ", SIGQUIT: terminal quit signal", + libc::SIGSEGV => ", SIGSEGV: invalid memory reference", + libc::SIGTERM => ", SIGTERM: termination signal", + libc::SIGBUS => ", SIGBUS: access to undefined memory", + #[cfg(not(target_os = "haiku"))] + libc::SIGSYS => ", SIGSYS: bad system call", + libc::SIGTRAP => ", SIGTRAP: trace/breakpoint trap", + _ => "", + }; + format!("signal: {}{}", signal, name) + } else { + status.to_string() + } + } + + #[cfg(windows)] + fn status_to_string(status: ExitStatus) -> String { + use winapi::shared::minwindef::DWORD; + use winapi::um::winnt::*; + + let mut base = status.to_string(); + let extra = match status.code().unwrap() as DWORD { + STATUS_ACCESS_VIOLATION => "STATUS_ACCESS_VIOLATION", + STATUS_IN_PAGE_ERROR => "STATUS_IN_PAGE_ERROR", + STATUS_INVALID_HANDLE => "STATUS_INVALID_HANDLE", + STATUS_INVALID_PARAMETER => "STATUS_INVALID_PARAMETER", + STATUS_NO_MEMORY => "STATUS_NO_MEMORY", + STATUS_ILLEGAL_INSTRUCTION => "STATUS_ILLEGAL_INSTRUCTION", + STATUS_NONCONTINUABLE_EXCEPTION => "STATUS_NONCONTINUABLE_EXCEPTION", + STATUS_INVALID_DISPOSITION => "STATUS_INVALID_DISPOSITION", + STATUS_ARRAY_BOUNDS_EXCEEDED => "STATUS_ARRAY_BOUNDS_EXCEEDED", + STATUS_FLOAT_DENORMAL_OPERAND => "STATUS_FLOAT_DENORMAL_OPERAND", + STATUS_FLOAT_DIVIDE_BY_ZERO => "STATUS_FLOAT_DIVIDE_BY_ZERO", + STATUS_FLOAT_INEXACT_RESULT => "STATUS_FLOAT_INEXACT_RESULT", + STATUS_FLOAT_INVALID_OPERATION => "STATUS_FLOAT_INVALID_OPERATION", + STATUS_FLOAT_OVERFLOW => "STATUS_FLOAT_OVERFLOW", + STATUS_FLOAT_STACK_CHECK => "STATUS_FLOAT_STACK_CHECK", + STATUS_FLOAT_UNDERFLOW => "STATUS_FLOAT_UNDERFLOW", + STATUS_INTEGER_DIVIDE_BY_ZERO => "STATUS_INTEGER_DIVIDE_BY_ZERO", + STATUS_INTEGER_OVERFLOW => "STATUS_INTEGER_OVERFLOW", + STATUS_PRIVILEGED_INSTRUCTION => "STATUS_PRIVILEGED_INSTRUCTION", + STATUS_STACK_OVERFLOW => "STATUS_STACK_OVERFLOW", + STATUS_DLL_NOT_FOUND => "STATUS_DLL_NOT_FOUND", + STATUS_ORDINAL_NOT_FOUND => "STATUS_ORDINAL_NOT_FOUND", + STATUS_ENTRYPOINT_NOT_FOUND => "STATUS_ENTRYPOINT_NOT_FOUND", + STATUS_CONTROL_C_EXIT => "STATUS_CONTROL_C_EXIT", + STATUS_DLL_INIT_FAILED => "STATUS_DLL_INIT_FAILED", + STATUS_FLOAT_MULTIPLE_FAULTS => "STATUS_FLOAT_MULTIPLE_FAULTS", + STATUS_FLOAT_MULTIPLE_TRAPS => "STATUS_FLOAT_MULTIPLE_TRAPS", + STATUS_REG_NAT_CONSUMPTION => "STATUS_REG_NAT_CONSUMPTION", + STATUS_HEAP_CORRUPTION => "STATUS_HEAP_CORRUPTION", + STATUS_STACK_BUFFER_OVERRUN => "STATUS_STACK_BUFFER_OVERRUN", + STATUS_ASSERTION_FAILURE => "STATUS_ASSERTION_FAILURE", + _ => return base, + }; + base.push_str(", "); + base.push_str(extra); + base + } +} + +/// Returns `true` if the given process exit code is something a normal +/// process would exit with. +/// +/// This helps differentiate from abnormal termination codes, such as +/// segmentation faults or signals. +pub fn is_simple_exit_code(code: i32) -> bool { + // Typical unix exit codes are 0 to 127. + // Windows doesn't have anything "typical", and is a + // 32-bit number (which appears signed here, but is really + // unsigned). However, most of the interesting NTSTATUS + // codes are very large. This is just a rough + // approximation of which codes are "normal" and which + // ones are abnormal termination. + code >= 0 && code <= 127 +} diff -Nru cargo-mozilla-0.47.0/crates/cargo-util/src/read2.rs cargo-mozilla-0.57.0/crates/cargo-util/src/read2.rs --- cargo-mozilla-0.47.0/crates/cargo-util/src/read2.rs 1970-01-01 00:00:00.000000000 +0000 +++ cargo-mozilla-0.57.0/crates/cargo-util/src/read2.rs 2021-10-04 17:24:20.000000000 +0000 @@ -0,0 +1,178 @@ +pub use self::imp::read2; + +#[cfg(unix)] +mod imp { + use std::io; + use std::io::prelude::*; + use std::mem; + use std::os::unix::prelude::*; + use std::process::{ChildStderr, ChildStdout}; + + pub fn read2( + mut out_pipe: ChildStdout, + mut err_pipe: ChildStderr, + data: &mut dyn FnMut(bool, &mut Vec, bool), + ) -> io::Result<()> { + unsafe { + libc::fcntl(out_pipe.as_raw_fd(), libc::F_SETFL, libc::O_NONBLOCK); + libc::fcntl(err_pipe.as_raw_fd(), libc::F_SETFL, libc::O_NONBLOCK); + } + + let mut out_done = false; + let mut err_done = false; + let mut out = Vec::new(); + let mut err = Vec::new(); + + let mut fds: [libc::pollfd; 2] = unsafe { mem::zeroed() }; + fds[0].fd = out_pipe.as_raw_fd(); + fds[0].events = libc::POLLIN; + fds[1].fd = err_pipe.as_raw_fd(); + fds[1].events = libc::POLLIN; + let mut nfds = 2; + let mut errfd = 1; + + while nfds > 0 { + // wait for either pipe to become readable using `select` + let r = unsafe { libc::poll(fds.as_mut_ptr(), nfds, -1) }; + if r == -1 { + let err = io::Error::last_os_error(); + if err.kind() == io::ErrorKind::Interrupted { + continue; + } + return Err(err); + } + + // Read as much as we can from each pipe, ignoring EWOULDBLOCK or + // EAGAIN. If we hit EOF, then this will happen because the underlying + // reader will return Ok(0), in which case we'll see `Ok` ourselves. In + // this case we flip the other fd back into blocking mode and read + // whatever's leftover on that file descriptor. + let handle = |res: io::Result<_>| match res { + Ok(_) => Ok(true), + Err(e) => { + if e.kind() == io::ErrorKind::WouldBlock { + Ok(false) + } else { + Err(e) + } + } + }; + if !err_done && fds[errfd].revents != 0 && handle(err_pipe.read_to_end(&mut err))? { + err_done = true; + nfds -= 1; + } + data(false, &mut err, err_done); + if !out_done && fds[0].revents != 0 && handle(out_pipe.read_to_end(&mut out))? { + out_done = true; + fds[0].fd = err_pipe.as_raw_fd(); + errfd = 0; + nfds -= 1; + } + data(true, &mut out, out_done); + } + Ok(()) + } +} + +#[cfg(windows)] +mod imp { + use std::io; + use std::os::windows::prelude::*; + use std::process::{ChildStderr, ChildStdout}; + use std::slice; + + use miow::iocp::{CompletionPort, CompletionStatus}; + use miow::pipe::NamedPipe; + use miow::Overlapped; + use winapi::shared::winerror::ERROR_BROKEN_PIPE; + + struct Pipe<'a> { + dst: &'a mut Vec, + overlapped: Overlapped, + pipe: NamedPipe, + done: bool, + } + + pub fn read2( + out_pipe: ChildStdout, + err_pipe: ChildStderr, + data: &mut dyn FnMut(bool, &mut Vec, bool), + ) -> io::Result<()> { + let mut out = Vec::new(); + let mut err = Vec::new(); + + let port = CompletionPort::new(1)?; + port.add_handle(0, &out_pipe)?; + port.add_handle(1, &err_pipe)?; + + unsafe { + let mut out_pipe = Pipe::new(out_pipe, &mut out); + let mut err_pipe = Pipe::new(err_pipe, &mut err); + + out_pipe.read()?; + err_pipe.read()?; + + let mut status = [CompletionStatus::zero(), CompletionStatus::zero()]; + + while !out_pipe.done || !err_pipe.done { + for status in port.get_many(&mut status, None)? { + if status.token() == 0 { + out_pipe.complete(status); + data(true, out_pipe.dst, out_pipe.done); + out_pipe.read()?; + } else { + err_pipe.complete(status); + data(false, err_pipe.dst, err_pipe.done); + err_pipe.read()?; + } + } + } + + Ok(()) + } + } + + impl<'a> Pipe<'a> { + unsafe fn new(p: P, dst: &'a mut Vec) -> Pipe<'a> { + Pipe { + dst, + pipe: NamedPipe::from_raw_handle(p.into_raw_handle()), + overlapped: Overlapped::zero(), + done: false, + } + } + + unsafe fn read(&mut self) -> io::Result<()> { + let dst = slice_to_end(self.dst); + match self.pipe.read_overlapped(dst, self.overlapped.raw()) { + Ok(_) => Ok(()), + Err(e) => { + if e.raw_os_error() == Some(ERROR_BROKEN_PIPE as i32) { + self.done = true; + Ok(()) + } else { + Err(e) + } + } + } + } + + unsafe fn complete(&mut self, status: &CompletionStatus) { + let prev = self.dst.len(); + self.dst.set_len(prev + status.bytes_transferred() as usize); + if status.bytes_transferred() == 0 { + self.done = true; + } + } + } + + unsafe fn slice_to_end(v: &mut Vec) -> &mut [u8] { + if v.capacity() == 0 { + v.reserve(16); + } + if v.capacity() == v.len() { + v.reserve(1); + } + slice::from_raw_parts_mut(v.as_mut_ptr().add(v.len()), v.capacity() - v.len()) + } +} diff -Nru cargo-mozilla-0.47.0/crates/cargo-util/src/registry.rs cargo-mozilla-0.57.0/crates/cargo-util/src/registry.rs --- cargo-mozilla-0.47.0/crates/cargo-util/src/registry.rs 1970-01-01 00:00:00.000000000 +0000 +++ cargo-mozilla-0.57.0/crates/cargo-util/src/registry.rs 2021-10-04 17:24:20.000000000 +0000 @@ -0,0 +1,45 @@ +/// Make a path to a dependency, which aligns to +/// +/// - [index from of Cargo's index on filesystem][1], and +/// - [index from Crates.io][2]. +/// +/// [1]: https://docs.rs/cargo/latest/cargo/sources/registry/index.html#the-format-of-the-index +/// [2]: https://github.com/rust-lang/crates.io-index +pub fn make_dep_path(dep_name: &str, prefix_only: bool) -> String { + let (slash, name) = if prefix_only { + ("", "") + } else { + ("/", dep_name) + }; + match dep_name.len() { + 1 => format!("1{}{}", slash, name), + 2 => format!("2{}{}", slash, name), + 3 => format!("3/{}{}{}", &dep_name[..1], slash, name), + _ => format!("{}/{}{}{}", &dep_name[0..2], &dep_name[2..4], slash, name), + } +} + +#[cfg(test)] +mod tests { + use super::make_dep_path; + + #[test] + fn prefix_only() { + assert_eq!(make_dep_path("a", true), "1"); + assert_eq!(make_dep_path("ab", true), "2"); + assert_eq!(make_dep_path("abc", true), "3/a"); + assert_eq!(make_dep_path("Abc", true), "3/A"); + assert_eq!(make_dep_path("AbCd", true), "Ab/Cd"); + assert_eq!(make_dep_path("aBcDe", true), "aB/cD"); + } + + #[test] + fn full() { + assert_eq!(make_dep_path("a", false), "1/a"); + assert_eq!(make_dep_path("ab", false), "2/ab"); + assert_eq!(make_dep_path("abc", false), "3/a/abc"); + assert_eq!(make_dep_path("Abc", false), "3/A/Abc"); + assert_eq!(make_dep_path("AbCd", false), "Ab/Cd/AbCd"); + assert_eq!(make_dep_path("aBcDe", false), "aB/cD/aBcDe"); + } +} diff -Nru cargo-mozilla-0.47.0/crates/cargo-util/src/sha256.rs cargo-mozilla-0.57.0/crates/cargo-util/src/sha256.rs --- cargo-mozilla-0.47.0/crates/cargo-util/src/sha256.rs 1970-01-01 00:00:00.000000000 +0000 +++ cargo-mozilla-0.57.0/crates/cargo-util/src/sha256.rs 2021-10-04 17:24:20.000000000 +0000 @@ -0,0 +1,56 @@ +use super::paths; +use anyhow::{Context, Result}; +use crypto_hash::{Algorithm, Hasher}; +use std::fs::File; +use std::io::{self, Read, Write}; +use std::path::Path; + +pub struct Sha256(Hasher); + +impl Sha256 { + pub fn new() -> Sha256 { + let hasher = Hasher::new(Algorithm::SHA256); + Sha256(hasher) + } + + pub fn update(&mut self, bytes: &[u8]) -> &mut Sha256 { + let _ = self.0.write_all(bytes); + self + } + + pub fn update_file(&mut self, mut file: &File) -> io::Result<&mut Sha256> { + let mut buf = [0; 64 * 1024]; + loop { + let n = file.read(&mut buf)?; + if n == 0 { + break Ok(self); + } + self.update(&buf[..n]); + } + } + + pub fn update_path>(&mut self, path: P) -> Result<&mut Sha256> { + let path = path.as_ref(); + let file = paths::open(path)?; + self.update_file(&file) + .with_context(|| format!("failed to read `{}`", path.display()))?; + Ok(self) + } + + pub fn finish(&mut self) -> [u8; 32] { + let mut ret = [0u8; 32]; + let data = self.0.finish(); + ret.copy_from_slice(&data[..]); + ret + } + + pub fn finish_hex(&mut self) -> String { + hex::encode(self.finish()) + } +} + +impl Default for Sha256 { + fn default() -> Self { + Self::new() + } +} diff -Nru cargo-mozilla-0.47.0/crates/crates-io/Cargo.toml cargo-mozilla-0.57.0/crates/crates-io/Cargo.toml --- cargo-mozilla-0.47.0/crates/crates-io/Cargo.toml 2020-07-17 20:39:39.000000000 +0000 +++ cargo-mozilla-0.57.0/crates/crates-io/Cargo.toml 2021-10-04 17:24:20.000000000 +0000 @@ -1,6 +1,6 @@ [package] name = "crates-io" -version = "0.31.1" +version = "0.33.0" edition = "2018" authors = ["Alex Crichton "] license = "MIT OR Apache-2.0" @@ -15,7 +15,7 @@ [dependencies] curl = "0.4" -anyhow = "1.0.0" +anyhow = "1.0.34" percent-encoding = "2.0" serde = { version = "1.0", features = ['derive'] } serde_json = "1.0" diff -Nru cargo-mozilla-0.47.0/crates/crates-io/lib.rs cargo-mozilla-0.57.0/crates/crates-io/lib.rs --- cargo-mozilla-0.47.0/crates/crates-io/lib.rs 2020-07-17 20:39:39.000000000 +0000 +++ cargo-mozilla-0.57.0/crates/crates-io/lib.rs 2021-10-04 17:24:20.000000000 +0000 @@ -1,13 +1,13 @@ -#![allow(unknown_lints)] -#![allow(clippy::identity_op)] // used for vertical alignment +#![allow(clippy::all)] use std::collections::BTreeMap; +use std::fmt; use std::fs::File; use std::io::prelude::*; -use std::io::Cursor; +use std::io::{Cursor, SeekFrom}; use std::time::Instant; -use anyhow::{bail, Result}; +use anyhow::{bail, format_err, Context, Result}; use curl::easy::{Easy, List}; use percent_encoding::{percent_encode, NON_ALPHANUMERIC}; use serde::{Deserialize, Serialize}; @@ -55,6 +55,8 @@ pub repository: Option, pub badges: BTreeMap>, pub links: Option, + #[serde(skip_serializing_if = "Option::is_none")] + pub v: Option, } #[derive(Serialize)] @@ -121,11 +123,84 @@ crates: Vec, meta: TotalCrates, } -impl Registry { - pub fn new(host: String, token: Option) -> Registry { - Registry::new_handle(host, token, Easy::new()) + +#[derive(Debug)] +pub enum ResponseError { + Curl(curl::Error), + Api { + code: u32, + errors: Vec, + }, + Code { + code: u32, + headers: Vec, + body: String, + }, + Other(anyhow::Error), +} + +impl std::error::Error for ResponseError { + fn source(&self) -> Option<&(dyn std::error::Error + 'static)> { + match self { + ResponseError::Curl(..) => None, + ResponseError::Api { .. } => None, + ResponseError::Code { .. } => None, + ResponseError::Other(e) => Some(e.as_ref()), + } + } +} + +impl fmt::Display for ResponseError { + fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { + match self { + ResponseError::Curl(e) => write!(f, "{}", e), + ResponseError::Api { code, errors } => { + f.write_str("the remote server responded with an error")?; + if *code != 200 { + write!(f, " (status {} {})", code, reason(*code))?; + }; + write!(f, ": {}", errors.join(", ")) + } + ResponseError::Code { + code, + headers, + body, + } => write!( + f, + "failed to get a 200 OK response, got {}\n\ + headers:\n\ + \t{}\n\ + body:\n\ + {}", + code, + headers.join("\n\t"), + body + ), + ResponseError::Other(..) => write!(f, "invalid response from server"), + } } +} +impl From for ResponseError { + fn from(error: curl::Error) -> Self { + ResponseError::Curl(error) + } +} + +impl Registry { + /// Creates a new `Registry`. + /// + /// ## Example + /// + /// ```rust + /// use curl::easy::Easy; + /// use crates_io::Registry; + /// + /// let mut handle = Easy::new(); + /// // If connecting to crates.io, a user-agent is required. + /// handle.useragent("my_crawler (example.com/info)"); + /// let mut reg = Registry::new_handle(String::from("https://crates.io"), None, handle); + /// ``` pub fn new_handle(host: String, token: Option, handle: Easy) -> Registry { Registry { host, @@ -161,7 +236,7 @@ Ok(serde_json::from_str::(&body)?.users) } - pub fn publish(&mut self, krate: &NewCrate, tarball: &File) -> Result { + pub fn publish(&mut self, krate: &NewCrate, mut tarball: &File) -> Result { let json = serde_json::to_string(krate)?; // Prepare the body. The format of the upload request is: // @@ -169,33 +244,26 @@ // (metadata for the package) // // - let stat = tarball.metadata()?; + + // NOTE: This can be replaced with `stream_len` if it is ever stabilized. + // + // This checks the length using seeking instead of metadata, because + // on some filesystems, getting the metadata will fail because + // the file was renamed in ops::package. + let tarball_len = tarball + .seek(SeekFrom::End(0)) + .with_context(|| "failed to seek tarball")?; + tarball + .seek(SeekFrom::Start(0)) + .with_context(|| "failed to seek tarball")?; let header = { let mut w = Vec::new(); - w.extend( - [ - (json.len() >> 0) as u8, - (json.len() >> 8) as u8, - (json.len() >> 16) as u8, - (json.len() >> 24) as u8, - ] - .iter() - .cloned(), - ); + w.extend(&(json.len() as u32).to_le_bytes()); w.extend(json.as_bytes().iter().cloned()); - w.extend( - [ - (stat.len() >> 0) as u8, - (stat.len() >> 8) as u8, - (stat.len() >> 16) as u8, - (stat.len() >> 24) as u8, - ] - .iter() - .cloned(), - ); + w.extend(&(tarball_len as u32).to_le_bytes()); w }; - let size = stat.len() as usize + header.len(); + let size = tarball_len as usize + header.len(); let mut body = Cursor::new(header).chain(tarball); let url = format!("{}/api/v1/crates/new", self.host); @@ -212,7 +280,25 @@ headers.append(&format!("Authorization: {}", token))?; self.handle.http_headers(headers)?; - let body = self.handle(&mut |buf| body.read(buf).unwrap_or(0))?; + let started = Instant::now(); + let body = self + .handle(&mut |buf| body.read(buf).unwrap_or(0)) + .map_err(|e| match e { + ResponseError::Code { code, .. } + if code == 503 + && started.elapsed().as_secs() >= 29 + && self.host_is_crates_io() => + { + format_err!( + "Request timed out after 30 seconds. If you're trying to \ + upload a crate it may be too large. If the crate is under \ + 10MB in size, you can email help@crates.io for assistance.\n\ + Total size was {}.", + tarball_len + ) + } + _ => e.into(), + })?; let response = if body.is_empty() { "{}".parse()? @@ -306,15 +392,18 @@ self.handle.upload(true)?; self.handle.in_filesize(body.len() as u64)?; self.handle(&mut |buf| body.read(buf).unwrap_or(0)) + .map_err(|e| e.into()) } - None => self.handle(&mut |_| 0), + None => self.handle(&mut |_| 0).map_err(|e| e.into()), } } - fn handle(&mut self, read: &mut dyn FnMut(&mut [u8]) -> usize) -> Result { + fn handle( + &mut self, + read: &mut dyn FnMut(&mut [u8]) -> usize, + ) -> std::result::Result { let mut headers = Vec::new(); let mut body = Vec::new(); - let started; { let mut handle = self.handle.transfer(); handle.read_function(|buf| Ok(read(buf)))?; @@ -323,50 +412,36 @@ Ok(data.len()) })?; handle.header_function(|data| { - headers.push(String::from_utf8_lossy(data).into_owned()); + // Headers contain trailing \r\n, trim them to make it easier + // to work with. + let s = String::from_utf8_lossy(data).trim().to_string(); + headers.push(s); true })?; - started = Instant::now(); handle.perform()?; } let body = match String::from_utf8(body) { Ok(body) => body, - Err(..) => bail!("response body was not valid utf-8"), + Err(..) => { + return Err(ResponseError::Other(format_err!( + "response body was not valid utf-8" + ))) + } }; let errors = serde_json::from_str::(&body) .ok() .map(|s| s.errors.into_iter().map(|s| s.detail).collect::>()); match (self.handle.response_code()?, errors) { - (0, None) | (200, None) => {} - (503, None) if started.elapsed().as_secs() >= 29 && self.host_is_crates_io() => bail!( - "Request timed out after 30 seconds. If you're trying to \ - upload a crate it may be too large. If the crate is under \ - 10MB in size, you can email help@crates.io for assistance." - ), - (code, Some(errors)) => { - let reason = reason(code); - bail!( - "api errors (status {} {}): {}", - code, - reason, - errors.join(", ") - ) - } - (code, None) => bail!( - "failed to get a 200 OK response, got {}\n\ - headers:\n\ - \t{}\n\ - body:\n\ - {}", + (0, None) | (200, None) => Ok(body), + (code, Some(errors)) => Err(ResponseError::Api { code, errors }), + (code, None) => Err(ResponseError::Code { code, - headers.join("\n\t"), + headers, body, - ), + }), } - - Ok(body) } } diff -Nru cargo-mozilla-0.47.0/crates/credential/README.md cargo-mozilla-0.57.0/crates/credential/README.md --- cargo-mozilla-0.47.0/crates/credential/README.md 1970-01-01 00:00:00.000000000 +0000 +++ cargo-mozilla-0.57.0/crates/credential/README.md 2021-10-04 17:24:20.000000000 +0000 @@ -0,0 +1,8 @@ +# Cargo Credential Packages + +This directory contains Cargo packages for handling storage of tokens in a +secure manner. + +`cargo-credential` is a generic library to assist writing a credential +process. The other directories contain implementations that integrate with +specific credential systems. diff -Nru cargo-mozilla-0.47.0/crates/credential/cargo-credential/Cargo.toml cargo-mozilla-0.57.0/crates/credential/cargo-credential/Cargo.toml --- cargo-mozilla-0.47.0/crates/credential/cargo-credential/Cargo.toml 1970-01-01 00:00:00.000000000 +0000 +++ cargo-mozilla-0.57.0/crates/credential/cargo-credential/Cargo.toml 2021-10-04 17:24:20.000000000 +0000 @@ -0,0 +1,10 @@ +[package] +name = "cargo-credential" +version = "0.1.0" +authors = ["The Rust Project Developers"] +edition = "2018" +license = "MIT OR Apache-2.0" +repository = "https://github.com/rust-lang/cargo" +description = "A library to assist writing Cargo credential helpers." + +[dependencies] diff -Nru cargo-mozilla-0.47.0/crates/credential/cargo-credential/README.md cargo-mozilla-0.57.0/crates/credential/cargo-credential/README.md --- cargo-mozilla-0.47.0/crates/credential/cargo-credential/README.md 1970-01-01 00:00:00.000000000 +0000 +++ cargo-mozilla-0.57.0/crates/credential/cargo-credential/README.md 2021-10-04 17:24:20.000000000 +0000 @@ -0,0 +1,41 @@ +# cargo-credential + +This package is a library to assist writing a Cargo credential helper, which +provides an interface to store tokens for authorizing access to a registry +such as https://crates.io/. + +Documentation about credential processes may be found at +https://doc.rust-lang.org/nightly/cargo/reference/unstable.html#credential-process + +Example implementations may be found at +https://github.com/rust-lang/cargo/tree/master/crates/credential + +## Usage + +Create a Cargo project with this as a dependency: + +```toml +# Add this to your Cargo.toml: + +[dependencies] +cargo-credential = "0.1" +``` + +And then include a `main.rs` binary which implements the `Credential` trait, and calls +the `main` function which will call the appropriate method of the trait: + +```rust +// src/main.rs + +use cargo_credential::{Credential, Error}; + +struct MyCredential; + +impl Credential for MyCredential { + /// implement trait methods here... +} + +fn main() { + cargo_credential::main(MyCredential); +} +``` diff -Nru cargo-mozilla-0.47.0/crates/credential/cargo-credential/src/lib.rs cargo-mozilla-0.57.0/crates/credential/cargo-credential/src/lib.rs --- cargo-mozilla-0.47.0/crates/credential/cargo-credential/src/lib.rs 1970-01-01 00:00:00.000000000 +0000 +++ cargo-mozilla-0.57.0/crates/credential/cargo-credential/src/lib.rs 2021-10-04 17:24:20.000000000 +0000 @@ -0,0 +1,86 @@ +//! Helper library for writing Cargo credential processes. +//! +//! A credential process should have a `struct` that implements the `Credential` trait. +//! The `main` function should be called with an instance of that struct, such as: +//! +//! ```rust,ignore +//! fn main() { +//! cargo_credential::main(MyCredential); +//! } +//! ``` +//! +//! This will determine the action to perform (get/store/erase) by looking at +//! the CLI arguments for the first argument that does not start with `-`. It +//! will then call the corresponding method of the trait to perform the +//! requested action. + +pub type Error = Box; + +pub trait Credential { + /// Returns the name of this credential process. + fn name(&self) -> &'static str; + + /// Retrieves a token for the given registry. + fn get(&self, registry_name: &str, api_url: &str) -> Result; + + /// Stores the given token for the given registry. + fn store(&self, registry_name: &str, api_url: &str, token: &str) -> Result<(), Error>; + + /// Removes the token for the given registry. + /// + /// If the user is not logged in, this should print a message to stderr if + /// possible indicating that the user is not currently logged in, and + /// return `Ok`. + fn erase(&self, registry_name: &str, api_url: &str) -> Result<(), Error>; +} + +/// Runs the credential interaction by processing the command-line and +/// environment variables. +pub fn main(credential: impl Credential) { + let name = credential.name(); + if let Err(e) = doit(credential) { + eprintln!("{} error: {}", name, e); + std::process::exit(1); + } +} + +fn env(name: &str) -> Result { + std::env::var(name).map_err(|_| format!("environment variable `{}` is not set", name).into()) +} + +fn doit(credential: impl Credential) -> Result<(), Error> { + let which = std::env::args() + .skip(1) + .skip_while(|arg| arg.starts_with('-')) + .next() + .ok_or_else(|| "first argument must be the {action}")?; + let registry_name = env("CARGO_REGISTRY_NAME")?; + let api_url = env("CARGO_REGISTRY_API_URL")?; + let result = match which.as_ref() { + "get" => credential.get(®istry_name, &api_url).and_then(|token| { + println!("{}", token); + Ok(()) + }), + "store" => { + read_token().and_then(|token| credential.store(®istry_name, &api_url, &token)) + } + "erase" => credential.erase(®istry_name, &api_url), + _ => { + return Err(format!( + "unexpected command-line argument `{}`, expected get/store/erase", + which + ) + .into()) + } + }; + result.map_err(|e| format!("failed to `{}` token: {}", which, e).into()) +} + +fn read_token() -> Result { + let mut buffer = String::new(); + std::io::stdin().read_line(&mut buffer)?; + if buffer.ends_with('\n') { + buffer.pop(); + } + Ok(buffer) +} diff -Nru cargo-mozilla-0.47.0/crates/credential/cargo-credential-1password/Cargo.toml cargo-mozilla-0.57.0/crates/credential/cargo-credential-1password/Cargo.toml --- cargo-mozilla-0.47.0/crates/credential/cargo-credential-1password/Cargo.toml 1970-01-01 00:00:00.000000000 +0000 +++ cargo-mozilla-0.57.0/crates/credential/cargo-credential-1password/Cargo.toml 2021-10-04 17:24:20.000000000 +0000 @@ -0,0 +1,13 @@ +[package] +name = "cargo-credential-1password" +version = "0.1.0" +authors = ["The Rust Project Developers"] +edition = "2018" +license = "MIT OR Apache-2.0" +repository = "https://github.com/rust-lang/cargo" +description = "A Cargo credential process that stores tokens in a 1password vault." + +[dependencies] +cargo-credential = { version = "0.1.0", path = "../cargo-credential" } +serde = { version = "1.0.117", features = ["derive"] } +serde_json = "1.0.59" diff -Nru cargo-mozilla-0.47.0/crates/credential/cargo-credential-1password/src/main.rs cargo-mozilla-0.57.0/crates/credential/cargo-credential-1password/src/main.rs --- cargo-mozilla-0.47.0/crates/credential/cargo-credential-1password/src/main.rs 1970-01-01 00:00:00.000000000 +0000 +++ cargo-mozilla-0.57.0/crates/credential/cargo-credential-1password/src/main.rs 2021-10-04 17:24:20.000000000 +0000 @@ -0,0 +1,323 @@ +//! Cargo registry 1password credential process. + +use cargo_credential::{Credential, Error}; +use serde::Deserialize; +use std::io::Read; +use std::process::{Command, Stdio}; + +const CARGO_TAG: &str = "cargo-registry"; + +/// Implementation of 1password keychain access for Cargo registries. +struct OnePasswordKeychain { + account: Option, + vault: Option, + sign_in_address: Option, + email: Option, +} + +/// 1password Login item type, used for the JSON output of `op get item`. +#[derive(Deserialize)] +struct Login { + details: Details, +} + +#[derive(Deserialize)] +struct Details { + fields: Vec, +} + +#[derive(Deserialize)] +struct Field { + designation: String, + value: String, +} + +/// 1password item from `op list items`. +#[derive(Deserialize)] +struct ListItem { + uuid: String, + overview: Overview, +} + +#[derive(Deserialize)] +struct Overview { + title: String, +} + +impl OnePasswordKeychain { + fn new() -> Result { + let mut args = std::env::args().skip(1); + let mut action = false; + let mut account = None; + let mut vault = None; + let mut sign_in_address = None; + let mut email = None; + while let Some(arg) = args.next() { + match arg.as_str() { + "--account" => { + account = Some(args.next().ok_or("--account needs an arg")?); + } + "--vault" => { + vault = Some(args.next().ok_or("--vault needs an arg")?); + } + "--sign-in-address" => { + sign_in_address = Some(args.next().ok_or("--sign-in-address needs an arg")?); + } + "--email" => { + email = Some(args.next().ok_or("--email needs an arg")?); + } + s if s.starts_with('-') => { + return Err(format!("unknown option {}", s).into()); + } + _ => { + if action { + return Err("too many arguments".into()); + } else { + action = true; + } + } + } + } + if sign_in_address.is_none() && email.is_some() { + return Err("--email requires --sign-in-address".into()); + } + Ok(OnePasswordKeychain { + account, + vault, + sign_in_address, + email, + }) + } + + fn signin(&self) -> Result, Error> { + // If there are any session env vars, we'll assume that this is the + // correct account, and that the user knows what they are doing. + if std::env::vars().any(|(name, _)| name.starts_with("OP_SESSION_")) { + return Ok(None); + } + let mut cmd = Command::new("op"); + cmd.arg("signin"); + if let Some(addr) = &self.sign_in_address { + cmd.arg(addr); + if let Some(email) = &self.email { + cmd.arg(email); + } + } + cmd.arg("--raw"); + cmd.stdout(Stdio::piped()); + #[cfg(unix)] + const IN_DEVICE: &str = "/dev/tty"; + #[cfg(windows)] + const IN_DEVICE: &str = "CONIN$"; + let stdin = std::fs::OpenOptions::new() + .read(true) + .write(true) + .open(IN_DEVICE)?; + cmd.stdin(stdin); + let mut child = cmd + .spawn() + .map_err(|e| format!("failed to spawn `op`: {}", e))?; + let mut buffer = String::new(); + child + .stdout + .as_mut() + .unwrap() + .read_to_string(&mut buffer) + .map_err(|e| format!("failed to get session from `op`: {}", e))?; + if let Some(end) = buffer.find('\n') { + buffer.truncate(end); + } + let status = child + .wait() + .map_err(|e| format!("failed to wait for `op`: {}", e))?; + if !status.success() { + return Err(format!("failed to run `op signin`: {}", status).into()); + } + Ok(Some(buffer)) + } + + fn make_cmd(&self, session: &Option, args: &[&str]) -> Command { + let mut cmd = Command::new("op"); + cmd.args(args); + if let Some(account) = &self.account { + cmd.arg("--account"); + cmd.arg(account); + } + if let Some(vault) = &self.vault { + cmd.arg("--vault"); + cmd.arg(vault); + } + if let Some(session) = session { + cmd.arg("--session"); + cmd.arg(session); + } + cmd + } + + fn run_cmd(&self, mut cmd: Command) -> Result { + cmd.stdout(Stdio::piped()); + let mut child = cmd + .spawn() + .map_err(|e| format!("failed to spawn `op`: {}", e))?; + let mut buffer = String::new(); + child + .stdout + .as_mut() + .unwrap() + .read_to_string(&mut buffer) + .map_err(|e| format!("failed to read `op` output: {}", e))?; + let status = child + .wait() + .map_err(|e| format!("failed to wait for `op`: {}", e))?; + if !status.success() { + return Err(format!("`op` command exit error: {}", status).into()); + } + Ok(buffer) + } + + fn search( + &self, + session: &Option, + registry_name: &str, + ) -> Result, Error> { + let cmd = self.make_cmd( + session, + &[ + "list", + "items", + "--categories", + "Login", + "--tags", + CARGO_TAG, + ], + ); + let buffer = self.run_cmd(cmd)?; + let items: Vec = serde_json::from_str(&buffer) + .map_err(|e| format!("failed to deserialize JSON from 1password list: {}", e))?; + let mut matches = items + .into_iter() + .filter(|item| item.overview.title == registry_name); + match matches.next() { + Some(login) => { + // Should this maybe just sort on `updatedAt` and return the newest one? + if matches.next().is_some() { + return Err(format!( + "too many 1password logins match registry name {}, \ + consider deleting the excess entries", + registry_name + ) + .into()); + } + Ok(Some(login.uuid)) + } + None => Ok(None), + } + } + + fn modify(&self, session: &Option, uuid: &str, token: &str) -> Result<(), Error> { + let cmd = self.make_cmd( + session, + &["edit", "item", uuid, &format!("password={}", token)], + ); + self.run_cmd(cmd)?; + Ok(()) + } + + fn create( + &self, + session: &Option, + registry_name: &str, + api_url: &str, + token: &str, + ) -> Result<(), Error> { + let cmd = self.make_cmd( + session, + &[ + "create", + "item", + "Login", + &format!("password={}", token), + &format!("url={}", api_url), + "--title", + registry_name, + "--tags", + CARGO_TAG, + ], + ); + self.run_cmd(cmd)?; + Ok(()) + } + + fn get_token(&self, session: &Option, uuid: &str) -> Result { + let cmd = self.make_cmd(session, &["get", "item", uuid]); + let buffer = self.run_cmd(cmd)?; + let item: Login = serde_json::from_str(&buffer) + .map_err(|e| format!("failed to deserialize JSON from 1password get: {}", e))?; + let password = item + .details + .fields + .into_iter() + .find(|item| item.designation == "password"); + match password { + Some(password) => Ok(password.value), + None => Err("could not find password field".into()), + } + } + + fn delete(&self, session: &Option, uuid: &str) -> Result<(), Error> { + let cmd = self.make_cmd(session, &["delete", "item", uuid]); + self.run_cmd(cmd)?; + Ok(()) + } +} + +impl Credential for OnePasswordKeychain { + fn name(&self) -> &'static str { + env!("CARGO_PKG_NAME") + } + + fn get(&self, registry_name: &str, _api_url: &str) -> Result { + let session = self.signin()?; + if let Some(uuid) = self.search(&session, registry_name)? { + self.get_token(&session, &uuid) + } else { + return Err(format!( + "no 1password entry found for registry `{}`, try `cargo login` to add a token", + registry_name + ) + .into()); + } + } + + fn store(&self, registry_name: &str, api_url: &str, token: &str) -> Result<(), Error> { + let session = self.signin()?; + // Check if an item already exists. + if let Some(uuid) = self.search(&session, registry_name)? { + self.modify(&session, &uuid, token) + } else { + self.create(&session, registry_name, api_url, token) + } + } + + fn erase(&self, registry_name: &str, _api_url: &str) -> Result<(), Error> { + let session = self.signin()?; + // Check if an item already exists. + if let Some(uuid) = self.search(&session, registry_name)? { + self.delete(&session, &uuid)?; + } else { + eprintln!("not currently logged in to `{}`", registry_name); + } + Ok(()) + } +} + +fn main() { + let op = match OnePasswordKeychain::new() { + Ok(op) => op, + Err(e) => { + eprintln!("error: {}", e); + std::process::exit(1); + } + }; + cargo_credential::main(op); +} diff -Nru cargo-mozilla-0.47.0/crates/credential/cargo-credential-gnome-secret/Cargo.toml cargo-mozilla-0.57.0/crates/credential/cargo-credential-gnome-secret/Cargo.toml --- cargo-mozilla-0.47.0/crates/credential/cargo-credential-gnome-secret/Cargo.toml 1970-01-01 00:00:00.000000000 +0000 +++ cargo-mozilla-0.57.0/crates/credential/cargo-credential-gnome-secret/Cargo.toml 2021-10-04 17:24:20.000000000 +0000 @@ -0,0 +1,14 @@ +[package] +name = "cargo-credential-gnome-secret" +version = "0.1.0" +authors = ["The Rust Project Developers"] +edition = "2018" +license = "MIT OR Apache-2.0" +repository = "https://github.com/rust-lang/cargo" +description = "A Cargo credential process that stores tokens with GNOME libsecret." + +[dependencies] +cargo-credential = { version = "0.1.0", path = "../cargo-credential" } + +[build-dependencies] +pkg-config = "0.3.19" diff -Nru cargo-mozilla-0.47.0/crates/credential/cargo-credential-gnome-secret/build.rs cargo-mozilla-0.57.0/crates/credential/cargo-credential-gnome-secret/build.rs --- cargo-mozilla-0.47.0/crates/credential/cargo-credential-gnome-secret/build.rs 1970-01-01 00:00:00.000000000 +0000 +++ cargo-mozilla-0.57.0/crates/credential/cargo-credential-gnome-secret/build.rs 2021-10-04 17:24:20.000000000 +0000 @@ -0,0 +1,3 @@ +fn main() { + pkg_config::probe_library("libsecret-1").unwrap(); +} diff -Nru cargo-mozilla-0.47.0/crates/credential/cargo-credential-gnome-secret/src/main.rs cargo-mozilla-0.57.0/crates/credential/cargo-credential-gnome-secret/src/main.rs --- cargo-mozilla-0.47.0/crates/credential/cargo-credential-gnome-secret/src/main.rs 1970-01-01 00:00:00.000000000 +0000 +++ cargo-mozilla-0.57.0/crates/credential/cargo-credential-gnome-secret/src/main.rs 2021-10-04 17:24:20.000000000 +0000 @@ -0,0 +1,210 @@ +//! Cargo registry gnome libsecret credential process. + +use cargo_credential::{Credential, Error}; +use std::ffi::{CStr, CString}; +use std::os::raw::{c_char, c_int}; +use std::ptr::{null, null_mut}; + +#[allow(non_camel_case_types)] +type gchar = c_char; + +#[allow(non_camel_case_types)] +type gboolean = c_int; + +type GQuark = u32; + +#[repr(C)] +struct GError { + domain: GQuark, + code: c_int, + message: *mut gchar, +} + +#[repr(C)] +struct GCancellable { + _private: [u8; 0], +} + +#[repr(C)] +struct SecretSchema { + name: *const gchar, + flags: SecretSchemaFlags, + attributes: [SecretSchemaAttribute; 32], +} + +#[repr(C)] +#[derive(Copy, Clone)] +struct SecretSchemaAttribute { + name: *const gchar, + attr_type: SecretSchemaAttributeType, +} + +#[repr(C)] +enum SecretSchemaFlags { + None = 0, +} + +#[repr(C)] +#[derive(Copy, Clone)] +enum SecretSchemaAttributeType { + String = 0, +} + +extern "C" { + fn secret_password_store_sync( + schema: *const SecretSchema, + collection: *const gchar, + label: *const gchar, + password: *const gchar, + cancellable: *mut GCancellable, + error: *mut *mut GError, + ... + ) -> gboolean; + fn secret_password_clear_sync( + schema: *const SecretSchema, + cancellable: *mut GCancellable, + error: *mut *mut GError, + ... + ) -> gboolean; + fn secret_password_lookup_sync( + schema: *const SecretSchema, + cancellable: *mut GCancellable, + error: *mut *mut GError, + ... + ) -> *mut gchar; +} + +struct GnomeSecret; + +fn label(registry_name: &str) -> CString { + CString::new(format!("cargo-registry:{}", registry_name)).unwrap() +} + +fn schema() -> SecretSchema { + let mut attributes = [SecretSchemaAttribute { + name: null(), + attr_type: SecretSchemaAttributeType::String, + }; 32]; + attributes[0] = SecretSchemaAttribute { + name: b"registry\0".as_ptr() as *const gchar, + attr_type: SecretSchemaAttributeType::String, + }; + attributes[1] = SecretSchemaAttribute { + name: b"url\0".as_ptr() as *const gchar, + attr_type: SecretSchemaAttributeType::String, + }; + SecretSchema { + name: b"org.rust-lang.cargo.registry\0".as_ptr() as *const gchar, + flags: SecretSchemaFlags::None, + attributes, + } +} + +impl Credential for GnomeSecret { + fn name(&self) -> &'static str { + env!("CARGO_PKG_NAME") + } + + fn get(&self, registry_name: &str, api_url: &str) -> Result { + let mut error: *mut GError = null_mut(); + let attr_registry = CString::new("registry").unwrap(); + let attr_url = CString::new("url").unwrap(); + let registry_name_c = CString::new(registry_name).unwrap(); + let api_url_c = CString::new(api_url).unwrap(); + let schema = schema(); + unsafe { + let token_c = secret_password_lookup_sync( + &schema, + null_mut(), + &mut error, + attr_registry.as_ptr(), + registry_name_c.as_ptr(), + attr_url.as_ptr(), + api_url_c.as_ptr(), + null() as *const gchar, + ); + if !error.is_null() { + return Err(format!( + "failed to get token: {}", + CStr::from_ptr((*error).message).to_str()? + ) + .into()); + } + if token_c.is_null() { + return Err(format!("cannot find token for {}", registry_name).into()); + } + let token = CStr::from_ptr(token_c) + .to_str() + .map_err(|e| format!("expected utf8 token: {}", e))? + .to_string(); + Ok(token) + } + } + + fn store(&self, registry_name: &str, api_url: &str, token: &str) -> Result<(), Error> { + let label = label(registry_name); + let token = CString::new(token).unwrap(); + let mut error: *mut GError = null_mut(); + let attr_registry = CString::new("registry").unwrap(); + let attr_url = CString::new("url").unwrap(); + let registry_name_c = CString::new(registry_name).unwrap(); + let api_url_c = CString::new(api_url).unwrap(); + let schema = schema(); + unsafe { + secret_password_store_sync( + &schema, + b"default\0".as_ptr() as *const gchar, + label.as_ptr(), + token.as_ptr(), + null_mut(), + &mut error, + attr_registry.as_ptr(), + registry_name_c.as_ptr(), + attr_url.as_ptr(), + api_url_c.as_ptr(), + null() as *const gchar, + ); + if !error.is_null() { + return Err(format!( + "failed to store token: {}", + CStr::from_ptr((*error).message).to_str()? + ) + .into()); + } + } + Ok(()) + } + + fn erase(&self, registry_name: &str, api_url: &str) -> Result<(), Error> { + let schema = schema(); + let mut error: *mut GError = null_mut(); + let attr_registry = CString::new("registry").unwrap(); + let attr_url = CString::new("url").unwrap(); + let registry_name_c = CString::new(registry_name).unwrap(); + let api_url_c = CString::new(api_url).unwrap(); + unsafe { + secret_password_clear_sync( + &schema, + null_mut(), + &mut error, + attr_registry.as_ptr(), + registry_name_c.as_ptr(), + attr_url.as_ptr(), + api_url_c.as_ptr(), + null() as *const gchar, + ); + if !error.is_null() { + return Err(format!( + "failed to erase token: {}", + CStr::from_ptr((*error).message).to_str()? + ) + .into()); + } + } + Ok(()) + } +} + +fn main() { + cargo_credential::main(GnomeSecret); +} diff -Nru cargo-mozilla-0.47.0/crates/credential/cargo-credential-macos-keychain/Cargo.toml cargo-mozilla-0.57.0/crates/credential/cargo-credential-macos-keychain/Cargo.toml --- cargo-mozilla-0.47.0/crates/credential/cargo-credential-macos-keychain/Cargo.toml 1970-01-01 00:00:00.000000000 +0000 +++ cargo-mozilla-0.57.0/crates/credential/cargo-credential-macos-keychain/Cargo.toml 2021-10-04 17:24:20.000000000 +0000 @@ -0,0 +1,12 @@ +[package] +name = "cargo-credential-macos-keychain" +version = "0.1.0" +authors = ["The Rust Project Developers"] +edition = "2018" +license = "MIT OR Apache-2.0" +repository = "https://github.com/rust-lang/cargo" +description = "A Cargo credential process that stores tokens in a macOS keychain." + +[dependencies] +cargo-credential = { version = "0.1.0", path = "../cargo-credential" } +security-framework = "2.0.0" diff -Nru cargo-mozilla-0.47.0/crates/credential/cargo-credential-macos-keychain/src/main.rs cargo-mozilla-0.57.0/crates/credential/cargo-credential-macos-keychain/src/main.rs --- cargo-mozilla-0.47.0/crates/credential/cargo-credential-macos-keychain/src/main.rs 1970-01-01 00:00:00.000000000 +0000 +++ cargo-mozilla-0.57.0/crates/credential/cargo-credential-macos-keychain/src/main.rs 2021-10-04 17:24:20.000000000 +0000 @@ -0,0 +1,50 @@ +//! Cargo registry macos keychain credential process. + +use cargo_credential::{Credential, Error}; +use security_framework::os::macos::keychain::SecKeychain; + +struct MacKeychain; + +/// The account name is not used. +const ACCOUNT: &'static str = ""; + +fn registry(registry_name: &str) -> String { + format!("cargo-registry:{}", registry_name) +} + +impl Credential for MacKeychain { + fn name(&self) -> &'static str { + env!("CARGO_PKG_NAME") + } + + fn get(&self, registry_name: &str, _api_url: &str) -> Result { + let keychain = SecKeychain::default().unwrap(); + let service_name = registry(registry_name); + let (pass, _item) = keychain.find_generic_password(&service_name, ACCOUNT)?; + String::from_utf8(pass.as_ref().to_vec()) + .map_err(|_| "failed to convert token to UTF8".into()) + } + + fn store(&self, registry_name: &str, _api_url: &str, token: &str) -> Result<(), Error> { + let keychain = SecKeychain::default().unwrap(); + let service_name = registry(registry_name); + if let Ok((_pass, mut item)) = keychain.find_generic_password(&service_name, ACCOUNT) { + item.set_password(token.as_bytes())?; + } else { + keychain.add_generic_password(&service_name, ACCOUNT, token.as_bytes())?; + } + Ok(()) + } + + fn erase(&self, registry_name: &str, _api_url: &str) -> Result<(), Error> { + let keychain = SecKeychain::default().unwrap(); + let service_name = registry(registry_name); + let (_pass, item) = keychain.find_generic_password(&service_name, ACCOUNT)?; + item.delete(); + Ok(()) + } +} + +fn main() { + cargo_credential::main(MacKeychain); +} diff -Nru cargo-mozilla-0.47.0/crates/credential/cargo-credential-wincred/Cargo.toml cargo-mozilla-0.57.0/crates/credential/cargo-credential-wincred/Cargo.toml --- cargo-mozilla-0.47.0/crates/credential/cargo-credential-wincred/Cargo.toml 1970-01-01 00:00:00.000000000 +0000 +++ cargo-mozilla-0.57.0/crates/credential/cargo-credential-wincred/Cargo.toml 2021-10-04 17:24:20.000000000 +0000 @@ -0,0 +1,12 @@ +[package] +name = "cargo-credential-wincred" +version = "0.1.0" +authors = ["The Rust Project Developers"] +edition = "2018" +license = "MIT OR Apache-2.0" +repository = "https://github.com/rust-lang/cargo" +description = "A Cargo credential process that stores tokens with Windows Credential Manager." + +[dependencies] +cargo-credential = { version = "0.1.0", path = "../cargo-credential" } +winapi = { version = "0.3.9", features = ["wincred", "winerror", "impl-default"] } diff -Nru cargo-mozilla-0.47.0/crates/credential/cargo-credential-wincred/src/main.rs cargo-mozilla-0.57.0/crates/credential/cargo-credential-wincred/src/main.rs --- cargo-mozilla-0.47.0/crates/credential/cargo-credential-wincred/src/main.rs 1970-01-01 00:00:00.000000000 +0000 +++ cargo-mozilla-0.57.0/crates/credential/cargo-credential-wincred/src/main.rs 2021-10-04 17:24:20.000000000 +0000 @@ -0,0 +1,99 @@ +//! Cargo registry windows credential process. + +use cargo_credential::{Credential, Error}; +use std::ffi::OsStr; +use std::os::windows::ffi::OsStrExt; +use winapi::shared::minwindef::{DWORD, FILETIME, LPBYTE, TRUE}; +use winapi::shared::winerror; +use winapi::um::wincred; +use winapi::um::winnt::LPWSTR; + +struct WindowsCredential; + +/// Converts a string to a nul-terminated wide UTF-16 byte sequence. +fn wstr(s: &str) -> Vec { + let mut wide: Vec = OsStr::new(s).encode_wide().collect(); + if wide.iter().any(|b| *b == 0) { + panic!("nul byte in wide string"); + } + wide.push(0); + wide +} + +fn target_name(registry_name: &str) -> Vec { + wstr(&format!("cargo-registry:{}", registry_name)) +} + +impl Credential for WindowsCredential { + fn name(&self) -> &'static str { + env!("CARGO_PKG_NAME") + } + + fn get(&self, registry_name: &str, _api_url: &str) -> Result { + let target_name = target_name(registry_name); + let mut p_credential: wincred::PCREDENTIALW = std::ptr::null_mut(); + unsafe { + if wincred::CredReadW( + target_name.as_ptr(), + wincred::CRED_TYPE_GENERIC, + 0, + &mut p_credential, + ) != TRUE + { + return Err( + format!("failed to fetch token: {}", std::io::Error::last_os_error()).into(), + ); + } + let bytes = std::slice::from_raw_parts( + (*p_credential).CredentialBlob, + (*p_credential).CredentialBlobSize as usize, + ); + String::from_utf8(bytes.to_vec()).map_err(|_| "failed to convert token to UTF8".into()) + } + } + + fn store(&self, registry_name: &str, _api_url: &str, token: &str) -> Result<(), Error> { + let token = token.as_bytes(); + let target_name = target_name(registry_name); + let comment = wstr("Cargo registry token"); + let mut credential = wincred::CREDENTIALW { + Flags: 0, + Type: wincred::CRED_TYPE_GENERIC, + TargetName: target_name.as_ptr() as LPWSTR, + Comment: comment.as_ptr() as LPWSTR, + LastWritten: FILETIME::default(), + CredentialBlobSize: token.len() as DWORD, + CredentialBlob: token.as_ptr() as LPBYTE, + Persist: wincred::CRED_PERSIST_LOCAL_MACHINE, + AttributeCount: 0, + Attributes: std::ptr::null_mut(), + TargetAlias: std::ptr::null_mut(), + UserName: std::ptr::null_mut(), + }; + let result = unsafe { wincred::CredWriteW(&mut credential, 0) }; + if result != TRUE { + let err = std::io::Error::last_os_error(); + return Err(format!("failed to store token: {}", err).into()); + } + Ok(()) + } + + fn erase(&self, registry_name: &str, _api_url: &str) -> Result<(), Error> { + let target_name = target_name(registry_name); + let result = + unsafe { wincred::CredDeleteW(target_name.as_ptr(), wincred::CRED_TYPE_GENERIC, 0) }; + if result != TRUE { + let err = std::io::Error::last_os_error(); + if err.raw_os_error() == Some(winerror::ERROR_NOT_FOUND as i32) { + eprintln!("not currently logged in to `{}`", registry_name); + return Ok(()); + } + return Err(format!("failed to remove token: {}", err).into()); + } + Ok(()) + } +} + +fn main() { + cargo_credential::main(WindowsCredential); +} diff -Nru cargo-mozilla-0.47.0/crates/mdman/Cargo.lock cargo-mozilla-0.57.0/crates/mdman/Cargo.lock --- cargo-mozilla-0.47.0/crates/mdman/Cargo.lock 1970-01-01 00:00:00.000000000 +0000 +++ cargo-mozilla-0.57.0/crates/mdman/Cargo.lock 2021-10-04 17:24:20.000000000 +0000 @@ -0,0 +1,460 @@ +# This file is automatically @generated by Cargo. +# It is not intended for manual editing. +[[package]] +name = "ansi_term" +version = "0.11.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ee49baf6cb617b853aa8d93bf420db2383fab46d314482ca2803b40d5fde979b" +dependencies = [ + "winapi", +] + +[[package]] +name = "anyhow" +version = "1.0.32" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6b602bfe940d21c130f3895acd65221e8a61270debe89d628b9cb4e3ccb8569b" + +[[package]] +name = "bitflags" +version = "1.2.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "cf1de2fe8c75bc145a2f577add951f8134889b4795d47466a54a5c846d691693" + +[[package]] +name = "block-buffer" +version = "0.7.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c0940dc441f31689269e10ac70eb1002a3a1d3ad1390e030043662eb7fe4688b" +dependencies = [ + "block-padding", + "byte-tools", + "byteorder", + "generic-array", +] + +[[package]] +name = "block-padding" +version = "0.1.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "fa79dedbb091f449f1f39e53edf88d5dbe95f895dae6135a8d7b881fb5af73f5" +dependencies = [ + "byte-tools", +] + +[[package]] +name = "byte-tools" +version = "0.3.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e3b5ca7a04898ad4bcd41c90c5285445ff5b791899bb1b0abdd2a2aa791211d7" + +[[package]] +name = "byteorder" +version = "1.3.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "08c48aae112d48ed9f069b33538ea9e3e90aa263cfa3d1c24309612b1f7472de" + +[[package]] +name = "cfg-if" +version = "0.1.10" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4785bdd1c96b2a846b2bd7cc02e86b6b3dbf14e7e53446c4f54c92a361040822" + +[[package]] +name = "ctor" +version = "0.1.15" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "39858aa5bac06462d4dd4b9164848eb81ffc4aa5c479746393598fd193afa227" +dependencies = [ + "quote", + "syn", +] + +[[package]] +name = "difference" +version = "2.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "524cbf6897b527295dff137cec09ecf3a05f4fddffd7dfcd1585403449e74198" + +[[package]] +name = "digest" +version = "0.8.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f3d0c8c8752312f9713efd397ff63acb9f85585afbf179282e720e7704954dd5" +dependencies = [ + "generic-array", +] + +[[package]] +name = "fake-simd" +version = "0.1.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e88a8acf291dafb59c2d96e8f59828f3838bb1a70398823ade51a84de6a6deed" + +[[package]] +name = "form_urlencoded" +version = "1.0.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5fc25a87fa4fd2094bffb06925852034d90a17f0d1e05197d4956d3555752191" +dependencies = [ + "matches", + "percent-encoding", +] + +[[package]] +name = "generic-array" +version = "0.12.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c68f0274ae0e023facc3c97b2e00f076be70e254bc851d972503b328db79b2ec" +dependencies = [ + "typenum", +] + +[[package]] +name = "handlebars" +version = "3.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "86dbc8a0746b08f363d2e00da48e6c9ceb75c198ac692d2715fcbb5bee74c87d" +dependencies = [ + "log", + "pest", + "pest_derive", + "quick-error", + "serde", + "serde_json", + "walkdir", +] + +[[package]] +name = "idna" +version = "0.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "02e2673c30ee86b5b96a9cb52ad15718aa1f966f5ab9ad54a8b95d5ca33120a9" +dependencies = [ + "matches", + "unicode-bidi", + "unicode-normalization", +] + +[[package]] +name = "itoa" +version = "0.4.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "dc6f3ad7b9d11a0c00842ff8de1b60ee58661048eb8049ed33c73594f359d7e6" + +[[package]] +name = "log" +version = "0.4.11" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4fabed175da42fed1fa0746b0ea71f412aa9d35e76e95e59b192c64b9dc2bf8b" +dependencies = [ + "cfg-if", +] + +[[package]] +name = "maplit" +version = "1.0.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3e2e65a1a2e43cfcb47a895c4c8b10d1f4a61097f9f254f183aee60cad9c651d" + +[[package]] +name = "matches" +version = "0.1.8" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7ffc5c5338469d4d3ea17d269fa8ea3512ad247247c30bd2df69e68309ed0a08" + +[[package]] +name = "mdman" +version = "0.1.0" +dependencies = [ + "anyhow", + "handlebars", + "pretty_assertions", + "pulldown-cmark", + "same-file", + "serde_json", + "url", +] + +[[package]] +name = "memchr" +version = "2.3.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3728d817d99e5ac407411fa471ff9800a778d88a24685968b36824eaf4bee400" + +[[package]] +name = "opaque-debug" +version = "0.2.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2839e79665f131bdb5782e51f2c6c9599c133c6098982a54c794358bf432529c" + +[[package]] +name = "output_vt100" +version = "0.1.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "53cdc5b785b7a58c5aad8216b3dfa114df64b0b06ae6e1501cef91df2fbdf8f9" +dependencies = [ + "winapi", +] + +[[package]] +name = "percent-encoding" +version = "2.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d4fd5641d01c8f18a23da7b6fe29298ff4b55afcccdf78973b24cf3175fee32e" + +[[package]] +name = "pest" +version = "2.1.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "10f4872ae94d7b90ae48754df22fd42ad52ce740b8f370b03da4835417403e53" +dependencies = [ + "ucd-trie", +] + +[[package]] +name = "pest_derive" +version = "2.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "833d1ae558dc601e9a60366421196a8d94bc0ac980476d0b67e1d0988d72b2d0" +dependencies = [ + "pest", + "pest_generator", +] + +[[package]] +name = "pest_generator" +version = "2.1.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "99b8db626e31e5b81787b9783425769681b347011cc59471e33ea46d2ea0cf55" +dependencies = [ + "pest", + "pest_meta", + "proc-macro2", + "quote", + "syn", +] + +[[package]] +name = "pest_meta" +version = "2.1.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "54be6e404f5317079812fc8f9f5279de376d8856929e21c184ecf6bbd692a11d" +dependencies = [ + "maplit", + "pest", + "sha-1", +] + +[[package]] +name = "pretty_assertions" +version = "0.6.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3f81e1644e1b54f5a68959a29aa86cde704219254669da328ecfdf6a1f09d427" +dependencies = [ + "ansi_term", + "ctor", + "difference", + "output_vt100", +] + +[[package]] +name = "proc-macro2" +version = "1.0.19" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "04f5f085b5d71e2188cb8271e5da0161ad52c3f227a661a3c135fdf28e258b12" +dependencies = [ + "unicode-xid", +] + +[[package]] +name = "pulldown-cmark" +version = "0.7.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ca36dea94d187597e104a5c8e4b07576a8a45aa5db48a65e12940d3eb7461f55" +dependencies = [ + "bitflags", + "memchr", + "unicase", +] + +[[package]] +name = "quick-error" +version = "1.2.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a1d01941d82fa2ab50be1e79e6714289dd7cde78eba4c074bc5a4374f650dfe0" + +[[package]] +name = "quote" +version = "1.0.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "aa563d17ecb180e500da1cfd2b028310ac758de548efdd203e18f283af693f37" +dependencies = [ + "proc-macro2", +] + +[[package]] +name = "ryu" +version = "1.0.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "71d301d4193d031abdd79ff7e3dd721168a9572ef3fe51a1517aba235bd8f86e" + +[[package]] +name = "same-file" +version = "1.0.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "93fc1dc3aaa9bfed95e02e6eadabb4baf7e3078b0bd1b4d7b6b0b68378900502" +dependencies = [ + "winapi-util", +] + +[[package]] +name = "serde" +version = "1.0.114" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5317f7588f0a5078ee60ef675ef96735a1442132dc645eb1d12c018620ed8cd3" + +[[package]] +name = "serde_json" +version = "1.0.57" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "164eacbdb13512ec2745fb09d51fd5b22b0d65ed294a1dcf7285a360c80a675c" +dependencies = [ + "itoa", + "ryu", + "serde", +] + +[[package]] +name = "sha-1" +version = "0.8.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f7d94d0bede923b3cea61f3f1ff57ff8cdfd77b400fb8f9998949e0cf04163df" +dependencies = [ + "block-buffer", + "digest", + "fake-simd", + "opaque-debug", +] + +[[package]] +name = "syn" +version = "1.0.36" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4cdb98bcb1f9d81d07b536179c269ea15999b5d14ea958196413869445bb5250" +dependencies = [ + "proc-macro2", + "quote", + "unicode-xid", +] + +[[package]] +name = "tinyvec" +version = "0.3.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "53953d2d3a5ad81d9f844a32f14ebb121f50b650cd59d0ee2a07cf13c617efed" + +[[package]] +name = "typenum" +version = "1.12.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "373c8a200f9e67a0c95e62a4f52fbf80c23b4381c05a17845531982fa99e6b33" + +[[package]] +name = "ucd-trie" +version = "0.1.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "56dee185309b50d1f11bfedef0fe6d036842e3fb77413abef29f8f8d1c5d4c1c" + +[[package]] +name = "unicase" +version = "2.6.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "50f37be617794602aabbeee0be4f259dc1778fabe05e2d67ee8f79326d5cb4f6" +dependencies = [ + "version_check", +] + +[[package]] +name = "unicode-bidi" +version = "0.3.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "49f2bd0c6468a8230e1db229cff8029217cf623c767ea5d60bfbd42729ea54d5" +dependencies = [ + "matches", +] + +[[package]] +name = "unicode-normalization" +version = "0.1.13" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6fb19cf769fa8c6a80a162df694621ebeb4dafb606470b2b2fce0be40a98a977" +dependencies = [ + "tinyvec", +] + +[[package]] +name = "unicode-xid" +version = "0.2.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f7fe0bb3479651439c9112f72b6c505038574c9fbb575ed1bf3b797fa39dd564" + +[[package]] +name = "url" +version = "2.2.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a507c383b2d33b5fc35d1861e77e6b383d158b2da5e14fe51b83dfedf6fd578c" +dependencies = [ + "form_urlencoded", + "idna", + "matches", + "percent-encoding", +] + +[[package]] +name = "version_check" +version = "0.9.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b5a972e5669d67ba988ce3dc826706fb0a8b01471c088cb0b6110b805cc36aed" + +[[package]] +name = "walkdir" +version = "2.3.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "777182bc735b6424e1a57516d35ed72cb8019d85c8c9bf536dccb3445c1a2f7d" +dependencies = [ + "same-file", + "winapi", + "winapi-util", +] + +[[package]] +name = "winapi" +version = "0.3.9" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5c839a674fcd7a98952e593242ea400abe93992746761e38641405d28b00f419" +dependencies = [ + "winapi-i686-pc-windows-gnu", + "winapi-x86_64-pc-windows-gnu", +] + +[[package]] +name = "winapi-i686-pc-windows-gnu" +version = "0.4.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ac3b87c63620426dd9b991e5ce0329eff545bccbbb34f3be09ff6fb6ab51b7b6" + +[[package]] +name = "winapi-util" +version = "0.1.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "70ec6ce85bb158151cae5e5c87f95a8e97d2c0c4b001223f33a334e3ce5de178" +dependencies = [ + "winapi", +] + +[[package]] +name = "winapi-x86_64-pc-windows-gnu" +version = "0.4.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "712e227841d057c1ee1cd2fb22fa7e5a5461ae8e48fa2ca79ec42cfc1931183f" diff -Nru cargo-mozilla-0.47.0/crates/mdman/Cargo.toml cargo-mozilla-0.57.0/crates/mdman/Cargo.toml --- cargo-mozilla-0.47.0/crates/mdman/Cargo.toml 1970-01-01 00:00:00.000000000 +0000 +++ cargo-mozilla-0.57.0/crates/mdman/Cargo.toml 2021-10-04 17:24:20.000000000 +0000 @@ -0,0 +1,18 @@ +[package] +name = "mdman" +version = "0.1.0" +authors = ["Eric Huss"] +edition = "2018" +license = "MIT OR Apache-2.0" +description = "Creates a man page page from markdown." + +[dependencies] +anyhow = "1.0.31" +handlebars = { version = "3.2.1", features = ["dir_source"] } +pulldown-cmark = { version = "0.7.2", default-features = false } +same-file = "1.0.6" +serde_json = "1.0.56" +url = "2.2.2" + +[dev-dependencies] +pretty_assertions = "0.6.1" diff -Nru cargo-mozilla-0.47.0/crates/mdman/README.md cargo-mozilla-0.57.0/crates/mdman/README.md --- cargo-mozilla-0.47.0/crates/mdman/README.md 1970-01-01 00:00:00.000000000 +0000 +++ cargo-mozilla-0.57.0/crates/mdman/README.md 2021-10-04 17:24:20.000000000 +0000 @@ -0,0 +1,7 @@ +# mdman + +mdman is a small utility for creating man pages from markdown text files. + +## Usage + +See the [man page](doc/out/mdman.md) generated by this tool. diff -Nru cargo-mozilla-0.47.0/crates/mdman/build-man.sh cargo-mozilla-0.57.0/crates/mdman/build-man.sh --- cargo-mozilla-0.47.0/crates/mdman/build-man.sh 1970-01-01 00:00:00.000000000 +0000 +++ cargo-mozilla-0.57.0/crates/mdman/build-man.sh 2021-10-04 17:24:20.000000000 +0000 @@ -0,0 +1,7 @@ +#!/bin/bash + +set -e + +cargo run -- -t md -o doc/out doc/*.md +cargo run -- -t txt -o doc/out doc/*.md +cargo run -- -t man -o doc/out doc/*.md diff -Nru cargo-mozilla-0.47.0/crates/mdman/doc/mdman.md cargo-mozilla-0.57.0/crates/mdman/doc/mdman.md --- cargo-mozilla-0.47.0/crates/mdman/doc/mdman.md 1970-01-01 00:00:00.000000000 +0000 +++ cargo-mozilla-0.57.0/crates/mdman/doc/mdman.md 2021-10-04 17:24:20.000000000 +0000 @@ -0,0 +1,95 @@ +# mdman(1) + +## NAME + +mdman - Converts markdown to a man page + +## SYNOPSIS + +`mdman` [_options_] `-t` _type_ `-o` _outdir_ _sources..._ + +## DESCRIPTION + +Converts a markdown file to a man page. + +The source file is first processed as a +[handlebars](https://handlebarsjs.com/) template. Then, it is processed as +markdown into the target format. This supports different output formats, +such as troff or plain text. + +Every man page should start with a level-1 header with the man name and +section, such as `# mdman(1)`. + +The handlebars template has several special tags to assist with generating the +man page: + +{{{{raw}}}} +- Every block of command-line options must be wrapped between `{{#options}}` + and `{{/options}}` tags. This tells the processor where the options start + and end. +- Each option must be expressed with a `{{#option}}` block. The parameters to + the the block are a sequence of strings indicating the option. For example, + ```{{#option "`-p` _spec_..." "`--package` _spec_..."}}``` is an option that + has two different forms. The text within the string is processed as markdown. + It is recommended to use formatting similar to this example. + + The content of the `{{#option}}` block should contain a detailed description + of the option. + + Use the `{{/option}}` tag to end the option block. +- References to other man pages should use the `{{man name section}}` + expression. For example, `{{man "mdman" 1}}` will generate a reference to + the `mdman(1)` man page. For non-troff output, the `--man` option will tell + `mdman` how to create links to the man page. If there is no matching `--man` + option, then it links to a file named _name_`.md` in the same directory. +- Variables can be set with `{{*set name="value"}}`. These variables can + then be referenced with `{{name}}` expressions. +- Partial templates should be placed in a directory named `includes` + next to the source file. Templates can be included with an expression like + `{{> template-name}}`. +- Other helpers include: + - `{{lower value}}` Converts the given value to lowercase. +{{{{/raw}}}} + +## OPTIONS + +{{#options}} + +{{#option "`-t` _type_"}} +Specifies the output type. The following output types are supported: +- `man` — A troff-style man page. Outputs with a numbered extension (like + `.1`) matching the man page section. +- `md` — A markdown file, after all handlebars processing has been finished. + Outputs with the `.md` extension. +- `txt` — A text file, rendered for situations where a man page viewer isn't + available. Outputs with the `.txt` extension. +{{/option}} + +{{#option "`-o` _outdir_"}} +Specifies the directory where to save the output. +{{/option}} + +{{#option "`--url` _base_url_"}} +Specifies a base URL to use for relative URLs within the document. Any +relative URL will be joined with this URL. +{{/option}} + +{{#option "`--man` _name_`:`_section_`=`_url_"}} +Specifies a URL to use for the given man page. When the `\{{man name +section}}` expression is used, the given URL will be inserted as a link. This +may be specified multiple times. If a man page reference does not have a +matching `--man` entry, then a relative link to a file named _name_`.md` will +be used. +{{/option}} + +{{#option "_sources..._"}} +The source input filename, may be specified multiple times. +{{/option}} + +{{/options}} + +## EXAMPLES + +1. Convert the given documents to man pages: + + mdman -t man -o doc doc/mdman.md diff -Nru cargo-mozilla-0.47.0/crates/mdman/doc/out/mdman.1 cargo-mozilla-0.57.0/crates/mdman/doc/out/mdman.1 --- cargo-mozilla-0.47.0/crates/mdman/doc/out/mdman.1 1970-01-01 00:00:00.000000000 +0000 +++ cargo-mozilla-0.57.0/crates/mdman/doc/out/mdman.1 2021-10-04 17:24:20.000000000 +0000 @@ -0,0 +1,124 @@ +'\" t +.TH "MDMAN" "1" +.nh +.ad l +.ss \n[.ss] 0 +.SH "NAME" +mdman \- Converts markdown to a man page +.SH "SYNOPSIS" +\fBmdman\fR [\fIoptions\fR] \fB\-t\fR \fItype\fR \fB\-o\fR \fIoutdir\fR \fIsources...\fR +.SH "DESCRIPTION" +Converts a markdown file to a man page. +.sp +The source file is first processed as a +\fIhandlebars\fR template. Then, it is processed as +markdown into the target format. This supports different output formats, +such as troff or plain text. +.sp +Every man page should start with a level\-1 header with the man name and +section, such as \fB# mdman(1)\fR\&. +.sp +The handlebars template has several special tags to assist with generating the +man page: +.sp +.RS 4 +\h'-04'\(bu\h'+02'Every block of command\-line options must be wrapped between \fB{{#options}}\fR +and \fB{{/options}}\fR tags. This tells the processor where the options start +and end. +.RE +.sp +.RS 4 +\h'-04'\(bu\h'+02'Each option must be expressed with a \fB{{#option}}\fR block. The parameters to +the the block are a sequence of strings indicating the option. For example, +\fB{{#option "`\-p` _spec_..." "`\-\-package` _spec_..."}}\fR is an option that +has two different forms. The text within the string is processed as markdown. +It is recommended to use formatting similar to this example. +.sp +The content of the \fB{{#option}}\fR block should contain a detailed description +of the option. +.sp +Use the \fB{{/option}}\fR tag to end the option block. +.RE +.sp +.RS 4 +\h'-04'\(bu\h'+02'References to other man pages should use the \fB{{man name section}}\fR +expression. For example, \fB{{man "mdman" 1}}\fR will generate a reference to +the \fBmdman(1)\fR man page. For non\-troff output, the \fB\-\-man\fR option will tell +\fBmdman\fR how to create links to the man page. If there is no matching \fB\-\-man\fR +option, then it links to a file named \fIname\fR\fB\&.md\fR in the same directory. +.RE +.sp +.RS 4 +\h'-04'\(bu\h'+02'Variables can be set with \fB{{*set name="value"}}\fR\&. These variables can +then be referenced with \fB{{name}}\fR expressions. +.RE +.sp +.RS 4 +\h'-04'\(bu\h'+02'Partial templates should be placed in a directory named \fBincludes\fR +next to the source file. Templates can be included with an expression like +\fB{{> template\-name}}\fR\&. +.RE +.sp +.RS 4 +\h'-04'\(bu\h'+02'Other helpers include: +.sp +.RS 4 +\h'-04'\(bu\h'+02'\fB{{lower value}}\fR Converts the given value to lowercase. +.RE +.RE +.SH "OPTIONS" +.sp +\fB\-t\fR \fItype\fR +.RS 4 +Specifies the output type. The following output types are supported: +.sp +.RS 4 +\h'-04'\(bu\h'+02'\fBman\fR \[em] A troff\-style man page. Outputs with a numbered extension (like +\fB\&.1\fR) matching the man page section. +.RE +.sp +.RS 4 +\h'-04'\(bu\h'+02'\fBmd\fR \[em] A markdown file, after all handlebars processing has been finished. +Outputs with the \fB\&.md\fR extension. +.RE +.sp +.RS 4 +\h'-04'\(bu\h'+02'\fBtxt\fR \[em] A text file, rendered for situations where a man page viewer isn't +available. Outputs with the \fB\&.txt\fR extension. +.RE +.RE +.sp +\fB\-o\fR \fIoutdir\fR +.RS 4 +Specifies the directory where to save the output. +.RE +.sp +\fB\-\-url\fR \fIbase_url\fR +.RS 4 +Specifies a base URL to use for relative URLs within the document. Any +relative URL will be joined with this URL. +.RE +.sp +\fB\-\-man\fR \fIname\fR\fB:\fR\fIsection\fR\fB=\fR\fIurl\fR +.RS 4 +Specifies a URL to use for the given man page. When the \fB{{man name section}}\fR expression is used, the given URL will be inserted as a link. This +may be specified multiple times. If a man page reference does not have a +matching \fB\-\-man\fR entry, then a relative link to a file named \fIname\fR\fB\&.md\fR will +be used. +.RE +.sp +\fIsources...\fR +.RS 4 +The source input filename, may be specified multiple times. +.RE +.SH "EXAMPLES" +.sp +.RS 4 +\h'-04' 1.\h'+01'Convert the given documents to man pages: +.sp +.RS 4 +.nf +mdman \-t man \-o doc doc/mdman.md +.fi +.RE +.RE diff -Nru cargo-mozilla-0.47.0/crates/mdman/doc/out/mdman.md cargo-mozilla-0.57.0/crates/mdman/doc/out/mdman.md --- cargo-mozilla-0.47.0/crates/mdman/doc/out/mdman.md 1970-01-01 00:00:00.000000000 +0000 +++ cargo-mozilla-0.57.0/crates/mdman/doc/out/mdman.md 2021-10-04 17:24:20.000000000 +0000 @@ -0,0 +1,95 @@ +# mdman(1) + +## NAME + +mdman - Converts markdown to a man page + +## SYNOPSIS + +`mdman` [_options_] `-t` _type_ `-o` _outdir_ _sources..._ + +## DESCRIPTION + +Converts a markdown file to a man page. + +The source file is first processed as a +[handlebars](https://handlebarsjs.com/) template. Then, it is processed as +markdown into the target format. This supports different output formats, +such as troff or plain text. + +Every man page should start with a level-1 header with the man name and +section, such as `# mdman(1)`. + +The handlebars template has several special tags to assist with generating the +man page: + +- Every block of command-line options must be wrapped between `{{#options}}` + and `{{/options}}` tags. This tells the processor where the options start + and end. +- Each option must be expressed with a `{{#option}}` block. The parameters to + the the block are a sequence of strings indicating the option. For example, + ```{{#option "`-p` _spec_..." "`--package` _spec_..."}}``` is an option that + has two different forms. The text within the string is processed as markdown. + It is recommended to use formatting similar to this example. + + The content of the `{{#option}}` block should contain a detailed description + of the option. + + Use the `{{/option}}` tag to end the option block. +- References to other man pages should use the `{{man name section}}` + expression. For example, `{{man "mdman" 1}}` will generate a reference to + the `mdman(1)` man page. For non-troff output, the `--man` option will tell + `mdman` how to create links to the man page. If there is no matching `--man` + option, then it links to a file named _name_`.md` in the same directory. +- Variables can be set with `{{*set name="value"}}`. These variables can + then be referenced with `{{name}}` expressions. +- Partial templates should be placed in a directory named `includes` + next to the source file. Templates can be included with an expression like + `{{> template-name}}`. +- Other helpers include: + - `{{lower value}}` Converts the given value to lowercase. + + +## OPTIONS + +
+ +
-t type
+
Specifies the output type. The following output types are supported:

+
    +
  • man — A troff-style man page. Outputs with a numbered extension (like +.1) matching the man page section.
  • +
  • md — A markdown file, after all handlebars processing has been finished. +Outputs with the .md extension.
  • +
  • txt — A text file, rendered for situations where a man page viewer isn't +available. Outputs with the .txt extension.
  • +
+ + +
-o outdir
+
Specifies the directory where to save the output.
+ + +
--url base_url
+
Specifies a base URL to use for relative URLs within the document. Any +relative URL will be joined with this URL.
+ + +
--man name:section=url
+
Specifies a URL to use for the given man page. When the {{man name section}} expression is used, the given URL will be inserted as a link. This +may be specified multiple times. If a man page reference does not have a +matching --man entry, then a relative link to a file named name.md will +be used.
+ + +
sources...
+
The source input filename, may be specified multiple times.
+ + +
+ +## EXAMPLES + +1. Convert the given documents to man pages: + + mdman -t man -o doc doc/mdman.md diff -Nru cargo-mozilla-0.47.0/crates/mdman/doc/out/mdman.txt cargo-mozilla-0.57.0/crates/mdman/doc/out/mdman.txt --- cargo-mozilla-0.47.0/crates/mdman/doc/out/mdman.txt 1970-01-01 00:00:00.000000000 +0000 +++ cargo-mozilla-0.57.0/crates/mdman/doc/out/mdman.txt 2021-10-04 17:24:20.000000000 +0000 @@ -0,0 +1,91 @@ +MDMAN(1) + +NAME + mdman - Converts markdown to a man page + +SYNOPSIS + mdman [options] -t type -o outdir sources... + +DESCRIPTION + Converts a markdown file to a man page. + + The source file is first processed as a handlebars + template. Then, it is processed as markdown + into the target format. This supports different output formats, such as + troff or plain text. + + Every man page should start with a level-1 header with the man name and + section, such as # mdman(1). + + The handlebars template has several special tags to assist with + generating the man page: + + o Every block of command-line options must be wrapped between + {{#options}} and {{/options}} tags. This tells the processor where + the options start and end. + + o Each option must be expressed with a {{#option}} block. The + parameters to the the block are a sequence of strings indicating the + option. For example, {{#option "`-p` _spec_..." "`--package` + _spec_..."}} is an option that has two different forms. The text + within the string is processed as markdown. It is recommended to use + formatting similar to this example. + + The content of the {{#option}} block should contain a detailed + description of the option. + + Use the {{/option}} tag to end the option block. + + o References to other man pages should use the {{man name section}} + expression. For example, {{man "mdman" 1}} will generate a reference + to the mdman(1) man page. For non-troff output, the --man option will + tell mdman how to create links to the man page. If there is no + matching --man option, then it links to a file named name.md in the + same directory. + + o Variables can be set with {{*set name="value"}}. These variables can + then be referenced with {{name}} expressions. + + o Partial templates should be placed in a directory named includes next + to the source file. Templates can be included with an expression like + {{> template-name}}. + + o Other helpers include: + + o {{lower value}} Converts the given value to lowercase. + +OPTIONS + -t type + Specifies the output type. The following output types are supported: + + o man — A troff-style man page. Outputs with a numbered extension + (like .1) matching the man page section. + + o md — A markdown file, after all handlebars processing has been + finished. Outputs with the .md extension. + + o txt — A text file, rendered for situations where a man page + viewer isn't available. Outputs with the .txt extension. + + -o outdir + Specifies the directory where to save the output. + + --url base_url + Specifies a base URL to use for relative URLs within the document. + Any relative URL will be joined with this URL. + + --man name:section=url + Specifies a URL to use for the given man page. When the {{man name + section}} expression is used, the given URL will be inserted as a + link. This may be specified multiple times. If a man page reference + does not have a matching --man entry, then a relative link to a file + named name.md will be used. + + sources... + The source input filename, may be specified multiple times. + +EXAMPLES + 1. Convert the given documents to man pages: + + mdman -t man -o doc doc/mdman.md + diff -Nru cargo-mozilla-0.47.0/crates/mdman/src/format/man.rs cargo-mozilla-0.57.0/crates/mdman/src/format/man.rs --- cargo-mozilla-0.47.0/crates/mdman/src/format/man.rs 1970-01-01 00:00:00.000000000 +0000 +++ cargo-mozilla-0.57.0/crates/mdman/src/format/man.rs 2021-10-04 17:24:20.000000000 +0000 @@ -0,0 +1,430 @@ +//! Man-page formatter. + +use crate::util::{header_text, parse_name_and_section}; +use crate::EventIter; +use anyhow::{bail, Error}; +use pulldown_cmark::{Alignment, Event, LinkType, Tag}; +use std::fmt::Write; +use url::Url; + +pub struct ManFormatter { + url: Option, +} + +impl ManFormatter { + pub fn new(url: Option) -> ManFormatter { + ManFormatter { url } + } +} + +impl super::Formatter for ManFormatter { + fn render(&self, input: &str) -> Result { + ManRenderer::render(input, self.url.clone()) + } + + fn render_options_start(&self) -> &'static str { + // Tell pulldown_cmark to ignore this. + // This will be stripped out later. + " &'static str { + "]]>" + } + + fn render_option( + &self, + params: &[&str], + block: &str, + _man_name: &str, + ) -> Result { + let rendered_options = params + .iter() + .map(|param| { + let r = self.render(param)?; + Ok(r.trim().trim_start_matches(".sp").to_string()) + }) + .collect::, Error>>()?; + let rendered_block = self.render(block)?; + let rendered_block = rendered_block.trim().trim_start_matches(".sp").trim(); + // .RS = move left margin to right 4. + // .RE = move margin back one level. + Ok(format!( + "\n.sp\n{}\n.RS 4\n{}\n.RE\n", + rendered_options.join(", "), + rendered_block + )) + } + + fn linkify_man_to_md(&self, name: &str, section: u8) -> Result { + Ok(format!("`{}`({})", name, section)) + } +} + +#[derive(Copy, Clone)] +enum Font { + Bold, + Italic, +} + +impl Font { + fn str_from_stack(font_stack: &[Font]) -> &'static str { + let has_bold = font_stack.iter().any(|font| matches!(font, Font::Bold)); + let has_italic = font_stack.iter().any(|font| matches!(font, Font::Italic)); + match (has_bold, has_italic) { + (false, false) => "\\fR", // roman (normal) + (false, true) => "\\fI", // italic + (true, false) => "\\fB", // bold + (true, true) => "\\f(BI", // bold italic + } + } +} + +struct ManRenderer<'e> { + output: String, + parser: EventIter<'e>, + font_stack: Vec, +} + +impl<'e> ManRenderer<'e> { + fn render(input: &str, url: Option) -> Result { + let parser = crate::md_parser(input, url); + let output = String::with_capacity(input.len() * 3 / 2); + let mut mr = ManRenderer { + parser, + output, + font_stack: Vec::new(), + }; + mr.push_man()?; + Ok(mr.output) + } + + fn push_man(&mut self) -> Result<(), Error> { + // If this is true, this is inside a cdata block used for hiding + // content from pulldown_cmark. + let mut in_cdata = false; + // The current list stack. None if unordered, Some if ordered with the + // given number as the current index. + let mut list: Vec> = Vec::new(); + // Used in some cases where spacing isn't desired. + let mut suppress_paragraph = false; + let mut table_cell_index = 0; + + while let Some((event, range)) = self.parser.next() { + let this_suppress_paragraph = suppress_paragraph; + suppress_paragraph = false; + match event { + Event::Start(tag) => { + match tag { + Tag::Paragraph => { + if !this_suppress_paragraph { + self.flush(); + self.output.push_str(".sp\n"); + } + } + Tag::Heading(n) => { + if n == 1 { + self.push_top_header()?; + } else if n == 2 { + // Section header + let text = header_text(&mut self.parser)?; + self.flush(); + write!(self.output, ".SH \"{}\"\n", text)?; + suppress_paragraph = true; + } else { + // Subsection header + let text = header_text(&mut self.parser)?; + self.flush(); + write!(self.output, ".SS \"{}\"\n", text)?; + suppress_paragraph = true; + } + } + Tag::BlockQuote => { + self.flush(); + // .RS = move left margin over 3 + // .ll = shrink line length + self.output.push_str(".RS 3\n.ll -5\n.sp\n"); + suppress_paragraph = true; + } + Tag::CodeBlock(_kind) => { + // space down, indent 4, no-fill mode + self.flush(); + self.output.push_str(".sp\n.RS 4\n.nf\n"); + } + Tag::List(start) => list.push(start), + Tag::Item => { + // Note: This uses explicit movement instead of .IP + // because the spacing on .IP looks weird to me. + // space down, indent 4 + self.flush(); + self.output.push_str(".sp\n.RS 4\n"); + match list.last_mut().expect("item must have list start") { + // Ordered list. + Some(n) => { + // move left 4, output the list index number, move right 1. + write!(self.output, "\\h'-04' {}.\\h'+01'", n)?; + *n += 1; + } + // Unordered list. + None => self.output.push_str("\\h'-04'\\(bu\\h'+02'"), + } + suppress_paragraph = true; + } + Tag::FootnoteDefinition(_label) => unimplemented!(), + Tag::Table(alignment) => { + // Table start + // allbox = draw a box around all the cells + // tab(:) = Use `:` to separate cell data (instead of tab) + // ; = end of options + self.output.push_str( + "\n.TS\n\ + allbox tab(:);\n", + ); + let alignments: Vec<_> = alignment + .iter() + .map(|a| match a { + Alignment::Left | Alignment::None => "lt", + Alignment::Center => "ct", + Alignment::Right => "rt", + }) + .collect(); + self.output.push_str(&alignments.join(" ")); + self.output.push_str(".\n"); + table_cell_index = 0; + } + Tag::TableHead => { + table_cell_index = 0; + } + Tag::TableRow => { + table_cell_index = 0; + self.output.push('\n'); + } + Tag::TableCell => { + if table_cell_index != 0 { + // Separator between columns. + self.output.push(':'); + } + // Start a text block. + self.output.push_str("T{\n"); + table_cell_index += 1 + } + Tag::Emphasis => self.push_font(Font::Italic), + Tag::Strong => self.push_font(Font::Bold), + // Strikethrough isn't usually supported for TTY. + Tag::Strikethrough => self.output.push_str("~~"), + Tag::Link(link_type, dest_url, _title) => { + if dest_url.starts_with('#') { + // In a man page, page-relative anchors don't + // have much meaning. + continue; + } + match link_type { + LinkType::Autolink | LinkType::Email => { + // The text is a copy of the URL, which is not needed. + match self.parser.next() { + Some((Event::Text(_), _range)) => {} + _ => bail!("expected text after autolink"), + } + } + LinkType::Inline + | LinkType::Reference + | LinkType::Collapsed + | LinkType::Shortcut => { + self.push_font(Font::Italic); + } + // This is currently unused. This is only + // emitted with a broken link callback, but I + // felt it is too annoying to escape `[` in + // option descriptions. + LinkType::ReferenceUnknown + | LinkType::CollapsedUnknown + | LinkType::ShortcutUnknown => { + bail!( + "link with missing reference `{}` located at offset {}", + dest_url, + range.start + ); + } + } + } + Tag::Image(_link_type, _dest_url, _title) => { + bail!("images are not currently supported") + } + } + } + Event::End(tag) => { + match &tag { + Tag::Paragraph => self.flush(), + Tag::Heading(_n) => {} + Tag::BlockQuote => { + self.flush(); + // restore left margin, restore line length + self.output.push_str(".br\n.RE\n.ll\n"); + } + Tag::CodeBlock(_kind) => { + self.flush(); + // Restore fill mode, move margin back one level. + self.output.push_str(".fi\n.RE\n"); + } + Tag::List(_) => { + list.pop(); + } + Tag::Item => { + self.flush(); + // Move margin back one level. + self.output.push_str(".RE\n"); + } + Tag::FootnoteDefinition(_label) => {} + Tag::Table(_) => { + // Table end + // I don't know why, but the .sp is needed to provide + // space with the following content. + self.output.push_str("\n.TE\n.sp\n"); + } + Tag::TableHead => {} + Tag::TableRow => {} + Tag::TableCell => { + // End text block. + self.output.push_str("\nT}"); + } + Tag::Emphasis | Tag::Strong => self.pop_font(), + Tag::Strikethrough => self.output.push_str("~~"), + Tag::Link(link_type, dest_url, _title) => { + if dest_url.starts_with('#') { + continue; + } + match link_type { + LinkType::Autolink | LinkType::Email => {} + LinkType::Inline + | LinkType::Reference + | LinkType::Collapsed + | LinkType::Shortcut => { + self.pop_font(); + self.output.push(' '); + } + _ => { + panic!("unexpected tag {:?}", tag); + } + } + write!(self.output, "<{}>", escape(&dest_url)?)?; + } + Tag::Image(_link_type, _dest_url, _title) => {} + } + } + Event::Text(t) => { + self.output.push_str(&escape(&t)?); + } + Event::Code(t) => { + self.push_font(Font::Bold); + self.output.push_str(&escape(&t)?); + self.pop_font(); + } + Event::Html(t) => { + if t.starts_with("") { + in_cdata = false; + } else if !t.trim().is_empty() { + self.output.push_str(&t); + } + } else { + self.output.push_str(&escape(&t)?); + } + } + Event::FootnoteReference(_t) => {} + Event::SoftBreak => self.output.push('\n'), + Event::HardBreak => { + self.flush(); + self.output.push_str(".br\n"); + } + Event::Rule => { + self.flush(); + // \l' **length** ' Draw horizontal line (default underscore). + // \n(.lu Gets value from register "lu" (current line length) + self.output.push_str("\\l'\\n(.lu'\n"); + } + Event::TaskListMarker(_b) => unimplemented!(), + } + } + Ok(()) + } + + fn flush(&mut self) { + if !self.output.ends_with('\n') { + self.output.push('\n'); + } + } + + /// Switch to the given font. + /// + /// Because the troff sequence `\fP` for switching to the "previous" font + /// doesn't support nesting, this needs to emulate it here. This is needed + /// for situations like **hi _there_**. + fn push_font(&mut self, font: Font) { + self.font_stack.push(font); + self.output.push_str(Font::str_from_stack(&self.font_stack)); + } + + fn pop_font(&mut self) { + self.font_stack.pop(); + self.output.push_str(Font::str_from_stack(&self.font_stack)); + } + + /// Parse and render the first top-level header of the document. + fn push_top_header(&mut self) -> Result<(), Error> { + // This enables the tbl preprocessor for tables. + // This seems to be enabled by default on every modern system I could + // find, but it doesn't seem to hurt to enable this. + self.output.push_str("'\\\" t\n"); + // Extract the name of the man page. + let text = header_text(&mut self.parser)?; + let (name, section) = parse_name_and_section(&text)?; + // .TH = Table header + // .nh = disable hyphenation + // .ad l = Left-adjust mode (disable justified). + // .ss sets sentence_space_size to 0 (prevents double spaces after . + // if . is last on the line) + write!( + self.output, + ".TH \"{}\" \"{}\"\n\ + .nh\n\ + .ad l\n\ + .ss \\n[.ss] 0\n", + escape(&name.to_uppercase())?, + section + )?; + Ok(()) + } +} + +fn escape(s: &str) -> Result { + let mut replaced = s + .replace('\\', "\\(rs") + .replace('-', "\\-") + .replace('\u{00A0}', "\\ ") // non-breaking space (non-stretchable) + .replace('–', "\\[en]") // \u{2013} en-dash + .replace('—', "\\[em]") // \u{2014} em-dash + .replace('│', "|") // \u{2502} box drawing light vertical (could use \[br]) + .replace('├', "|") // \u{251C} box drawings light vertical and right + .replace('└', "`") // \u{2514} box drawings light up and right + .replace('─', "\\-") // \u{2500} box drawing light horizontal + ; + if replaced.starts_with('.') { + replaced = format!("\\&.{}", &replaced[1..]); + } else if replaced.starts_with('\'') { + replaced = format!("\\(aq{}", &replaced[1..]); + } + + if let Some(ch) = replaced.chars().find(|ch| { + !matches!(ch, '\n' | ' ' | '!'..='/' | '0'..='9' + | ':'..='@' | 'A'..='Z' | '['..='`' | 'a'..='z' | '{'..='~') + }) { + bail!( + "character {:?} is not allowed (update the translation table if needed)", + ch + ); + } + Ok(replaced) +} diff -Nru cargo-mozilla-0.47.0/crates/mdman/src/format/md.rs cargo-mozilla-0.57.0/crates/mdman/src/format/md.rs --- cargo-mozilla-0.47.0/crates/mdman/src/format/md.rs 1970-01-01 00:00:00.000000000 +0000 +++ cargo-mozilla-0.57.0/crates/mdman/src/format/md.rs 2021-10-04 17:24:20.000000000 +0000 @@ -0,0 +1,112 @@ +//! Markdown formatter. + +use crate::util::unwrap; +use crate::ManMap; +use anyhow::{bail, format_err, Error}; +use std::fmt::Write; + +pub struct MdFormatter { + man_map: ManMap, +} + +impl MdFormatter { + pub fn new(man_map: ManMap) -> MdFormatter { + MdFormatter { man_map } + } +} + +impl MdFormatter { + fn render_html(&self, input: &str) -> Result { + let parser = crate::md_parser(input, None); + let mut html_output: String = String::with_capacity(input.len() * 3 / 2); + pulldown_cmark::html::push_html(&mut html_output, parser.map(|(e, _r)| e)); + Ok(html_output) + } +} + +impl super::Formatter for MdFormatter { + fn render(&self, input: &str) -> Result { + Ok(input.replace("\r\n", "\n")) + } + + fn render_options_start(&self) -> &'static str { + "
" + } + + fn render_options_end(&self) -> &'static str { + "
" + } + + fn render_option(&self, params: &[&str], block: &str, man_name: &str) -> Result { + let mut result = String::new(); + fn unwrap_p(t: &str) -> &str { + unwrap(t, "

", "

") + } + + for param in params { + let rendered = self.render_html(param)?; + let no_p = unwrap_p(&rendered); + // split out first term to use as the id. + let first = no_p + .split_whitespace() + .next() + .ok_or_else(|| format_err!("did not expect option `{}` to be empty", param))?; + let no_tags = trim_tags(first); + if no_tags.is_empty() { + bail!("unexpected empty option with no tags `{}`", param); + } + let id = format!("option-{}-{}", man_name, no_tags); + write!( + result, + "
\ + {OPTION}
\n", + ID = id, + OPTION = no_p + )?; + } + let rendered_block = self.render_html(block)?; + write!( + result, + "
{}
\n", + unwrap_p(&rendered_block) + )?; + Ok(result) + } + + fn linkify_man_to_md(&self, name: &str, section: u8) -> Result { + let s = match self.man_map.get(&(name.to_string(), section)) { + Some(link) => format!("[{}({})]({})", name, section, link), + None => format!("[{}({})]({}.html)", name, section, name), + }; + Ok(s) + } +} + +fn trim_tags(s: &str) -> String { + // This is a hack. It removes all HTML tags. + let mut in_tag = false; + let mut in_char_ref = false; + s.chars() + .filter(|&ch| match ch { + '<' if in_tag => panic!("unexpected nested tag"), + '&' if in_char_ref => panic!("unexpected nested char ref"), + '<' => { + in_tag = true; + false + } + '&' => { + in_char_ref = true; + false + } + '>' if in_tag => { + in_tag = false; + false + } + ';' if in_char_ref => { + in_char_ref = false; + false + } + _ => !in_tag && !in_char_ref, + }) + .collect() +} diff -Nru cargo-mozilla-0.47.0/crates/mdman/src/format/text.rs cargo-mozilla-0.57.0/crates/mdman/src/format/text.rs --- cargo-mozilla-0.47.0/crates/mdman/src/format/text.rs 1970-01-01 00:00:00.000000000 +0000 +++ cargo-mozilla-0.57.0/crates/mdman/src/format/text.rs 2021-10-04 17:24:20.000000000 +0000 @@ -0,0 +1,605 @@ +//! Text formatter. + +use crate::util::{header_text, unwrap}; +use crate::EventIter; +use anyhow::{bail, Error}; +use pulldown_cmark::{Alignment, Event, LinkType, Tag}; +use std::fmt::Write; +use std::mem; +use url::Url; + +pub struct TextFormatter { + url: Option, +} + +impl TextFormatter { + pub fn new(url: Option) -> TextFormatter { + TextFormatter { url } + } +} + +impl super::Formatter for TextFormatter { + fn render(&self, input: &str) -> Result { + TextRenderer::render(input, self.url.clone(), 0) + } + + fn render_options_start(&self) -> &'static str { + // Tell pulldown_cmark to ignore this. + // This will be stripped out later. + " &'static str { + "]]>" + } + + fn render_option( + &self, + params: &[&str], + block: &str, + _man_name: &str, + ) -> Result { + let rendered_options = params + .iter() + .map(|param| TextRenderer::render(param, self.url.clone(), 0)) + .collect::, Error>>()?; + let trimmed: Vec<_> = rendered_options.iter().map(|o| o.trim()).collect(); + // Wrap in HTML tags, they will be stripped out during rendering. + Ok(format!( + "
{}
\n
{}
\n
\n", + trimmed.join(", "), + block + )) + } + + fn linkify_man_to_md(&self, name: &str, section: u8) -> Result { + Ok(format!("`{}`({})", name, section)) + } +} + +struct TextRenderer<'e> { + output: String, + indent: usize, + /// The current line being written. Once a line break is encountered (such + /// as starting a new paragraph), this will be written to `output` via + /// `flush`. + line: String, + /// The current word being written. Once a break is encountered (such as a + /// space) this will be written to `line` via `flush_word`. + word: String, + parser: EventIter<'e>, + /// The base URL used for relative URLs. + url: Option, + table: Table, +} + +impl<'e> TextRenderer<'e> { + fn render(input: &str, url: Option, indent: usize) -> Result { + let parser = crate::md_parser(input, url.clone()); + let output = String::with_capacity(input.len() * 3 / 2); + let mut mr = TextRenderer { + output, + indent, + line: String::new(), + word: String::new(), + parser, + url, + table: Table::new(), + }; + mr.push_md()?; + Ok(mr.output) + } + + fn push_md(&mut self) -> Result<(), Error> { + // If this is true, this is inside a cdata block used for hiding + // content from pulldown_cmark. + let mut in_cdata = false; + // The current list stack. None if unordered, Some if ordered with the + // given number as the current index. + let mut list: Vec> = Vec::new(); + // Used in some cases where spacing isn't desired. + let mut suppress_paragraph = false; + // Whether or not word-wrapping is enabled. + let mut wrap_text = true; + + while let Some((event, range)) = self.parser.next() { + let this_suppress_paragraph = suppress_paragraph; + // Always reset suppression, even if the next event isn't a + // paragraph. This is in essence, a 1-token lookahead where the + // suppression is only enabled if the next event is a paragraph. + suppress_paragraph = false; + match event { + Event::Start(tag) => { + match tag { + Tag::Paragraph => { + if !this_suppress_paragraph { + self.flush(); + } + } + Tag::Heading(n) => { + self.flush(); + if n == 1 { + let text = header_text(&mut self.parser)?; + self.push_to_line(&text.to_uppercase()); + self.hard_break(); + self.hard_break(); + } else if n == 2 { + let text = header_text(&mut self.parser)?; + self.push_to_line(&text.to_uppercase()); + self.flush(); + self.indent = 7; + } else { + let text = header_text(&mut self.parser)?; + self.push_indent((n as usize - 2) * 3); + self.push_to_line(&text); + self.flush(); + self.indent = (n as usize - 1) * 3 + 1; + } + } + Tag::BlockQuote => { + self.indent += 3; + } + Tag::CodeBlock(_kind) => { + self.flush(); + wrap_text = false; + self.indent += 4; + } + Tag::List(start) => list.push(start), + Tag::Item => { + self.flush(); + match list.last_mut().expect("item must have list start") { + // Ordered list. + Some(n) => { + self.push_indent(self.indent); + write!(self.line, "{}.", n)?; + *n += 1; + } + // Unordered list. + None => { + self.push_indent(self.indent); + self.push_to_line("o ") + } + } + self.indent += 3; + suppress_paragraph = true; + } + Tag::FootnoteDefinition(_label) => unimplemented!(), + Tag::Table(alignment) => { + assert!(self.table.alignment.is_empty()); + self.flush(); + self.table.alignment.extend(alignment); + let table = self.table.process(&mut self.parser, self.indent)?; + self.output.push_str(&table); + self.hard_break(); + self.table = Table::new(); + } + Tag::TableHead | Tag::TableRow | Tag::TableCell => { + bail!("unexpected table element") + } + Tag::Emphasis => {} + Tag::Strong => {} + // Strikethrough isn't usually supported for TTY. + Tag::Strikethrough => self.word.push_str("~~"), + Tag::Link(link_type, dest_url, _title) => { + if dest_url.starts_with('#') { + // In a man page, page-relative anchors don't + // have much meaning. + continue; + } + match link_type { + LinkType::Autolink | LinkType::Email => { + // The text is a copy of the URL, which is not needed. + match self.parser.next() { + Some((Event::Text(_), _range)) => {} + _ => bail!("expected text after autolink"), + } + } + LinkType::Inline + | LinkType::Reference + | LinkType::Collapsed + | LinkType::Shortcut => {} + // This is currently unused. This is only + // emitted with a broken link callback, but I + // felt it is too annoying to escape `[` in + // option descriptions. + LinkType::ReferenceUnknown + | LinkType::CollapsedUnknown + | LinkType::ShortcutUnknown => { + bail!( + "link with missing reference `{}` located at offset {}", + dest_url, + range.start + ); + } + } + } + Tag::Image(_link_type, _dest_url, _title) => { + bail!("images are not currently supported") + } + } + } + Event::End(tag) => match &tag { + Tag::Paragraph => { + self.flush(); + self.hard_break(); + } + Tag::Heading(_n) => {} + Tag::BlockQuote => { + self.indent -= 3; + } + Tag::CodeBlock(_kind) => { + self.hard_break(); + wrap_text = true; + self.indent -= 4; + } + Tag::List(_) => { + list.pop(); + } + Tag::Item => { + self.flush(); + self.indent -= 3; + self.hard_break(); + } + Tag::FootnoteDefinition(_label) => {} + Tag::Table(_) => {} + Tag::TableHead => {} + Tag::TableRow => {} + Tag::TableCell => {} + Tag::Emphasis => {} + Tag::Strong => {} + Tag::Strikethrough => self.word.push_str("~~"), + Tag::Link(link_type, dest_url, _title) => { + if dest_url.starts_with('#') { + continue; + } + match link_type { + LinkType::Autolink | LinkType::Email => {} + LinkType::Inline + | LinkType::Reference + | LinkType::Collapsed + | LinkType::Shortcut => self.flush_word(), + _ => { + panic!("unexpected tag {:?}", tag); + } + } + self.flush_word(); + write!(self.word, "<{}>", dest_url)?; + } + Tag::Image(_link_type, _dest_url, _title) => {} + }, + Event::Text(t) | Event::Code(t) => { + if wrap_text { + let chunks = split_chunks(&t); + for chunk in chunks { + if chunk == " " { + self.flush_word(); + } else { + self.word.push_str(chunk); + } + } + } else { + for line in t.lines() { + self.push_indent(self.indent); + self.push_to_line(line); + self.flush(); + } + } + } + Event::Html(t) => { + if t.starts_with("") { + in_cdata = false; + } else { + let trimmed = t.trim(); + if trimmed.is_empty() { + continue; + } + if trimmed == "
" { + self.hard_break(); + } else if trimmed.starts_with("
") { + let opts = unwrap(trimmed, "
", "
"); + self.push_indent(self.indent); + self.push_to_line(opts); + self.flush(); + } else if trimmed.starts_with("
") { + let mut def = String::new(); + while let Some((Event::Html(t), _range)) = self.parser.next() { + if t.starts_with("
") { + break; + } + def.push_str(&t); + } + let rendered = + TextRenderer::render(&def, self.url.clone(), self.indent + 4)?; + self.push_to_line(rendered.trim_end()); + self.flush(); + } else { + self.push_to_line(&t); + self.flush(); + } + } + } else { + self.push_to_line(&t); + self.flush(); + } + } + Event::FootnoteReference(_t) => {} + Event::SoftBreak => self.flush_word(), + Event::HardBreak => self.flush(), + Event::Rule => { + self.flush(); + self.push_indent(self.indent); + self.push_to_line(&"_".repeat(79 - self.indent * 2)); + self.flush(); + } + Event::TaskListMarker(_b) => unimplemented!(), + } + } + Ok(()) + } + + fn flush(&mut self) { + self.flush_word(); + if !self.line.is_empty() { + self.output.push_str(&self.line); + self.output.push('\n'); + self.line.clear(); + } + } + + fn hard_break(&mut self) { + self.flush(); + if !self.output.ends_with("\n\n") { + self.output.push('\n'); + } + } + + fn flush_word(&mut self) { + if self.word.is_empty() { + return; + } + if self.line.len() + self.word.len() >= 79 { + self.output.push_str(&self.line); + self.output.push('\n'); + self.line.clear(); + } + if self.line.is_empty() { + self.push_indent(self.indent); + self.line.push_str(&self.word); + } else { + self.line.push(' '); + self.line.push_str(&self.word); + } + self.word.clear(); + } + + fn push_indent(&mut self, indent: usize) { + for _ in 0..indent { + self.line.push(' '); + } + } + + fn push_to_line(&mut self, text: &str) { + self.flush_word(); + self.line.push_str(text); + } +} + +/// Splits the text on whitespace. +/// +/// Consecutive whitespace is collapsed to a single ' ', and is included as a +/// separate element in the result. +fn split_chunks(text: &str) -> Vec<&str> { + let mut result = Vec::new(); + let mut start = 0; + while start < text.len() { + match text[start..].find(' ') { + Some(i) => { + if i != 0 { + result.push(&text[start..start + i]); + } + result.push(" "); + // Skip past whitespace. + match text[start + i..].find(|c| c != ' ') { + Some(n) => { + start = start + i + n; + } + None => { + break; + } + } + } + None => { + result.push(&text[start..]); + break; + } + } + } + result +} + +struct Table { + alignment: Vec, + rows: Vec>, + row: Vec, + cell: String, +} + +impl Table { + fn new() -> Table { + Table { + alignment: Vec::new(), + rows: Vec::new(), + row: Vec::new(), + cell: String::new(), + } + } + + /// Processes table events and generates a text table. + fn process(&mut self, parser: &mut EventIter<'_>, indent: usize) -> Result { + while let Some((event, _range)) = parser.next() { + match event { + Event::Start(tag) => match tag { + Tag::TableHead + | Tag::TableRow + | Tag::TableCell + | Tag::Emphasis + | Tag::Strong => {} + Tag::Strikethrough => self.cell.push_str("~~"), + // Links not yet supported, they usually won't fit. + Tag::Link(_, _, _) => {} + _ => bail!("unexpected tag in table: {:?}", tag), + }, + Event::End(tag) => match tag { + Tag::Table(_) => return self.render(indent), + Tag::TableCell => { + let cell = mem::replace(&mut self.cell, String::new()); + self.row.push(cell); + } + Tag::TableHead | Tag::TableRow => { + let row = mem::replace(&mut self.row, Vec::new()); + self.rows.push(row); + } + Tag::Strikethrough => self.cell.push_str("~~"), + _ => {} + }, + Event::Text(t) | Event::Code(t) => { + self.cell.push_str(&t); + } + Event::Html(t) => bail!("html unsupported in tables: {:?}", t), + _ => bail!("unexpected event in table: {:?}", event), + } + } + bail!("table end not reached"); + } + + fn render(&self, indent: usize) -> Result { + // This is an extremely primitive layout routine. + // First compute the potential maximum width of each cell. + // 2 for 1 space margin on left and right. + let width_acc = vec![2; self.alignment.len()]; + let mut col_widths = self + .rows + .iter() + .map(|row| row.iter().map(|cell| cell.len())) + .fold(width_acc, |mut acc, row| { + acc.iter_mut() + .zip(row) + // +3 for left/right margin and | symbol + .for_each(|(a, b)| *a = (*a).max(b + 3)); + acc + }); + // Shrink each column until it fits the total width, proportional to + // the columns total percent width. + let max_width = 78 - indent; + // Include total len for | characters, and +1 for final |. + let total_width = col_widths.iter().sum::() + col_widths.len() + 1; + if total_width > max_width { + let to_shrink = total_width - max_width; + // Compute percentage widths, and shrink each column based on its + // total percentage. + for width in &mut col_widths { + let percent = *width as f64 / total_width as f64; + *width -= (to_shrink as f64 * percent).ceil() as usize; + } + } + // Start rendering. + let mut result = String::new(); + + // Draw the horizontal line separating each row. + let mut row_line = String::new(); + row_line.push_str(&" ".repeat(indent)); + row_line.push('+'); + let lines = col_widths + .iter() + .map(|width| "-".repeat(*width)) + .collect::>(); + row_line.push_str(&lines.join("+")); + row_line.push('+'); + row_line.push('\n'); + + // Draw top of the table. + result.push_str(&row_line); + // Draw each row. + for row in &self.rows { + // Word-wrap and fill each column as needed. + let filled = fill_row(row, &col_widths, &self.alignment); + // Need to transpose the cells across rows for cells that span + // multiple rows. + let height = filled.iter().map(|c| c.len()).max().unwrap(); + for row_i in 0..height { + result.push_str(&" ".repeat(indent)); + result.push('|'); + for filled_row in &filled { + let cell = &filled_row[row_i]; + result.push_str(cell); + result.push('|'); + } + result.push('\n'); + } + result.push_str(&row_line); + } + Ok(result) + } +} + +/// Formats a row, filling cells with spaces and word-wrapping text. +/// +/// Returns a vec of cells, where each cell is split into multiple lines. +fn fill_row(row: &[String], col_widths: &[usize], alignment: &[Alignment]) -> Vec> { + let mut cell_lines = row + .iter() + .zip(col_widths) + .zip(alignment) + .map(|((cell, width), alignment)| fill_cell(cell, *width - 2, *alignment)) + .collect::>(); + // Fill each cell to match the maximum vertical height of the tallest cell. + let max_lines = cell_lines.iter().map(|cell| cell.len()).max().unwrap(); + for (cell, width) in cell_lines.iter_mut().zip(col_widths) { + if cell.len() < max_lines { + cell.extend(std::iter::repeat(" ".repeat(*width)).take(max_lines - cell.len())); + } + } + cell_lines +} + +/// Formats a cell. Word-wraps based on width, and adjusts based on alignment. +/// +/// Returns a vec of lines for the cell. +fn fill_cell(text: &str, width: usize, alignment: Alignment) -> Vec { + let fill_width = |text: &str| match alignment { + Alignment::None | Alignment::Left => format!(" {: format!(" {:^width$} ", text, width = width), + Alignment::Right => format!(" {:>width$} ", text, width = width), + }; + if text.len() < width { + // No wrapping necessary, just format. + vec![fill_width(text)] + } else { + // Word-wrap the cell. + let mut result = Vec::new(); + let mut line = String::new(); + for word in text.split_whitespace() { + if line.len() + word.len() >= width { + // todo: word.len() > width + result.push(fill_width(&line)); + line.clear(); + } + if line.is_empty() { + line.push_str(word); + } else { + line.push(' '); + line.push_str(&word); + } + } + if !line.is_empty() { + result.push(fill_width(&line)); + } + + result + } +} diff -Nru cargo-mozilla-0.47.0/crates/mdman/src/format.rs cargo-mozilla-0.57.0/crates/mdman/src/format.rs --- cargo-mozilla-0.47.0/crates/mdman/src/format.rs 1970-01-01 00:00:00.000000000 +0000 +++ cargo-mozilla-0.57.0/crates/mdman/src/format.rs 2021-10-04 17:24:20.000000000 +0000 @@ -0,0 +1,20 @@ +use anyhow::Error; + +pub mod man; +pub mod md; +pub mod text; + +pub trait Formatter { + /// Renders the given markdown to the formatter's output. + fn render(&self, input: &str) -> Result; + /// Renders the start of a block of options (triggered by `{{#options}}`). + fn render_options_start(&self) -> &'static str; + /// Renders the end of a block of options (triggered by `{{/options}}`). + fn render_options_end(&self) -> &'static str; + /// Renders an option (triggered by `{{#option}}`). + fn render_option(&self, params: &[&str], block: &str, man_name: &str) -> Result; + /// Converts a man page reference into markdown that is appropriate for this format. + /// + /// Triggered by `{{man name section}}`. + fn linkify_man_to_md(&self, name: &str, section: u8) -> Result; +} diff -Nru cargo-mozilla-0.47.0/crates/mdman/src/hbs.rs cargo-mozilla-0.57.0/crates/mdman/src/hbs.rs --- cargo-mozilla-0.47.0/crates/mdman/src/hbs.rs 1970-01-01 00:00:00.000000000 +0000 +++ cargo-mozilla-0.57.0/crates/mdman/src/hbs.rs 2021-10-04 17:24:20.000000000 +0000 @@ -0,0 +1,217 @@ +//! Handlebars template processing. + +use crate::format::Formatter; +use anyhow::Error; +use handlebars::{ + handlebars_helper, Context, Decorator, Handlebars, Helper, HelperDef, HelperResult, Output, + RenderContext, RenderError, Renderable, +}; +use std::collections::HashMap; +use std::convert::TryFrom; +use std::path::Path; + +type FormatterRef<'a> = &'a (dyn Formatter + Send + Sync); + +/// Processes the handlebars template at the given file. +pub fn expand(file: &Path, formatter: FormatterRef) -> Result { + let mut handlebars = Handlebars::new(); + handlebars.set_strict_mode(true); + handlebars.register_helper("lower", Box::new(lower)); + handlebars.register_helper("options", Box::new(OptionsHelper { formatter })); + handlebars.register_helper("option", Box::new(OptionHelper { formatter })); + handlebars.register_helper("man", Box::new(ManLinkHelper { formatter })); + handlebars.register_decorator("set", Box::new(set_decorator)); + handlebars.register_template_file("template", file)?; + let includes = file.parent().unwrap().join("includes"); + handlebars.register_templates_directory(".md", includes)?; + let mut data: HashMap = HashMap::new(); + let man_name = file + .file_stem() + .expect("expected filename") + .to_str() + .expect("utf8 filename") + .to_string(); + data.insert("man_name".to_string(), man_name); + let expanded = handlebars.render("template", &data)?; + Ok(expanded) +} + +/// Helper for `{{#options}}` block. +struct OptionsHelper<'a> { + formatter: FormatterRef<'a>, +} + +impl HelperDef for OptionsHelper<'_> { + fn call<'reg: 'rc, 'rc>( + &self, + h: &Helper<'reg, 'rc>, + r: &'reg Handlebars<'reg>, + ctx: &'rc Context, + rc: &mut RenderContext<'reg, 'rc>, + out: &mut dyn Output, + ) -> HelperResult { + if in_options(rc) { + return Err(RenderError::new("options blocks cannot be nested")); + } + // Prevent nested {{#options}}. + set_in_context(rc, "__MDMAN_IN_OPTIONS", serde_json::Value::Bool(true)); + let s = self.formatter.render_options_start(); + out.write(&s)?; + let t = match h.template() { + Some(t) => t, + None => return Err(RenderError::new("options block must not be empty")), + }; + let block = t.renders(r, ctx, rc)?; + out.write(&block)?; + + let s = self.formatter.render_options_end(); + out.write(&s)?; + remove_from_context(rc, "__MDMAN_IN_OPTIONS"); + Ok(()) + } +} + +/// Whether or not the context is currently inside a `{{#options}}` block. +fn in_options(rc: &RenderContext<'_, '_>) -> bool { + rc.context() + .map_or(false, |ctx| ctx.data().get("__MDMAN_IN_OPTIONS").is_some()) +} + +/// Helper for `{{#option}}` block. +struct OptionHelper<'a> { + formatter: FormatterRef<'a>, +} + +impl HelperDef for OptionHelper<'_> { + fn call<'reg: 'rc, 'rc>( + &self, + h: &Helper<'reg, 'rc>, + r: &'reg Handlebars<'reg>, + ctx: &'rc Context, + rc: &mut RenderContext<'reg, 'rc>, + out: &mut dyn Output, + ) -> HelperResult { + if !in_options(rc) { + return Err(RenderError::new("option must be in options block")); + } + let params = h.params(); + if params.is_empty() { + return Err(RenderError::new( + "option block must have at least one param", + )); + } + // Convert params to strings. + let params = params + .iter() + .map(|param| { + param + .value() + .as_str() + .ok_or_else(|| RenderError::new("option params must be strings")) + }) + .collect::, RenderError>>()?; + let t = match h.template() { + Some(t) => t, + None => return Err(RenderError::new("option block must not be empty")), + }; + // Render the block. + let block = t.renders(r, ctx, rc)?; + + // Get the name of this page. + let man_name = ctx + .data() + .get("man_name") + .expect("expected man_name in context") + .as_str() + .expect("expect man_name str"); + + // Ask the formatter to convert this option to its format. + let option = self + .formatter + .render_option(¶ms, &block, man_name) + .map_err(|e| RenderError::new(format!("option render failed: {}", e)))?; + out.write(&option)?; + Ok(()) + } +} + +/// Helper for `{{man name section}}` expression. +struct ManLinkHelper<'a> { + formatter: FormatterRef<'a>, +} + +impl HelperDef for ManLinkHelper<'_> { + fn call<'reg: 'rc, 'rc>( + &self, + h: &Helper<'reg, 'rc>, + _r: &'reg Handlebars<'reg>, + _ctx: &'rc Context, + _rc: &mut RenderContext<'reg, 'rc>, + out: &mut dyn Output, + ) -> HelperResult { + let params = h.params(); + if params.len() != 2 { + return Err(RenderError::new("{{man}} must have two arguments")); + } + let name = params[0] + .value() + .as_str() + .ok_or_else(|| RenderError::new("man link name must be a string"))?; + let section = params[1] + .value() + .as_u64() + .ok_or_else(|| RenderError::new("man link section must be an integer"))?; + let section = + u8::try_from(section).map_err(|_e| RenderError::new("section number too large"))?; + let link = self + .formatter + .linkify_man_to_md(name, section) + .map_err(|e| RenderError::new(format!("failed to linkify man: {}", e)))?; + out.write(&link)?; + Ok(()) + } +} + +/// `{{*set var=value}}` decorator. +/// +/// This sets a variable to a value within the template context. +fn set_decorator( + d: &Decorator, + _: &Handlebars, + _ctx: &Context, + rc: &mut RenderContext, +) -> Result<(), RenderError> { + let data_to_set = d.hash(); + for (k, v) in data_to_set { + set_in_context(rc, k, v.value().clone()); + } + Ok(()) +} + +/// Sets a variable to a value within the context. +fn set_in_context(rc: &mut RenderContext, key: &str, value: serde_json::Value) { + let mut ctx = match rc.context() { + Some(c) => (*c).clone(), + None => Context::wraps(serde_json::Value::Object(serde_json::Map::new())).unwrap(), + }; + if let serde_json::Value::Object(m) = ctx.data_mut() { + m.insert(key.to_string(), value); + rc.set_context(ctx); + } else { + panic!("expected object in context"); + } +} + +/// Removes a variable from the context. +fn remove_from_context(rc: &mut RenderContext, key: &str) { + let ctx = rc.context().expect("cannot remove from null context"); + let mut ctx = (*ctx).clone(); + if let serde_json::Value::Object(m) = ctx.data_mut() { + m.remove(key); + rc.set_context(ctx); + } else { + panic!("expected object in context"); + } +} + +handlebars_helper!(lower: |s: str| s.to_lowercase()); diff -Nru cargo-mozilla-0.47.0/crates/mdman/src/lib.rs cargo-mozilla-0.57.0/crates/mdman/src/lib.rs --- cargo-mozilla-0.47.0/crates/mdman/src/lib.rs 1970-01-01 00:00:00.000000000 +0000 +++ cargo-mozilla-0.57.0/crates/mdman/src/lib.rs 2021-10-04 17:24:20.000000000 +0000 @@ -0,0 +1,121 @@ +//! mdman markdown to man converter. + +use anyhow::{bail, Context, Error}; +use pulldown_cmark::{CowStr, Event, LinkType, Options, Parser, Tag}; +use std::collections::HashMap; +use std::fs; +use std::io::{self, BufRead}; +use std::ops::Range; +use std::path::Path; +use url::Url; + +mod format; +mod hbs; +mod util; + +use format::Formatter; + +/// Mapping of `(name, section)` of a man page to a URL. +pub type ManMap = HashMap<(String, u8), String>; + +/// A man section. +pub type Section = u8; + +/// The output formats supported by mdman. +#[derive(Copy, Clone)] +pub enum Format { + Man, + Md, + Text, +} + +impl Format { + /// The filename extension for the format. + pub fn extension(&self, section: Section) -> String { + match self { + Format::Man => section.to_string(), + Format::Md => "md".to_string(), + Format::Text => "txt".to_string(), + } + } +} + +/// Converts the handlebars markdown file at the given path into the given +/// format, returning the translated result. +pub fn convert( + file: &Path, + format: Format, + url: Option, + man_map: ManMap, +) -> Result { + let formatter: Box = match format { + Format::Man => Box::new(format::man::ManFormatter::new(url)), + Format::Md => Box::new(format::md::MdFormatter::new(man_map)), + Format::Text => Box::new(format::text::TextFormatter::new(url)), + }; + let expanded = hbs::expand(file, &*formatter)?; + // pulldown-cmark can behave a little differently with Windows newlines, + // just normalize it. + let expanded = expanded.replace("\r\n", "\n"); + formatter.render(&expanded) +} + +/// Pulldown-cmark iterator yielding an `(event, range)` tuple. +type EventIter<'a> = Box, Range)> + 'a>; + +/// Creates a new markdown parser with the given input. +pub(crate) fn md_parser(input: &str, url: Option) -> EventIter { + let mut options = Options::empty(); + options.insert(Options::ENABLE_TABLES); + options.insert(Options::ENABLE_FOOTNOTES); + options.insert(Options::ENABLE_STRIKETHROUGH); + let parser = Parser::new_ext(input, options); + let parser = parser.into_offset_iter(); + // Translate all links to include the base url. + let parser = parser.map(move |(event, range)| match event { + Event::Start(Tag::Link(lt, dest_url, title)) if !matches!(lt, LinkType::Email) => ( + Event::Start(Tag::Link(lt, join_url(url.as_ref(), dest_url), title)), + range, + ), + Event::End(Tag::Link(lt, dest_url, title)) if !matches!(lt, LinkType::Email) => ( + Event::End(Tag::Link(lt, join_url(url.as_ref(), dest_url), title)), + range, + ), + _ => (event, range), + }); + Box::new(parser) +} + +fn join_url<'a>(base: Option<&Url>, dest: CowStr<'a>) -> CowStr<'a> { + match base { + Some(base_url) => { + // Absolute URL or page-relative anchor doesn't need to be translated. + if dest.contains(':') || dest.starts_with('#') { + dest + } else { + let joined = base_url.join(&dest).unwrap_or_else(|e| { + panic!("failed to join URL `{}` to `{}`: {}", dest, base_url, e) + }); + String::from(joined).into() + } + } + None => dest, + } +} + +pub fn extract_section(file: &Path) -> Result { + let f = fs::File::open(file).with_context(|| format!("could not open `{}`", file.display()))?; + let mut f = io::BufReader::new(f); + let mut line = String::new(); + f.read_line(&mut line)?; + if !line.starts_with("# ") { + bail!("expected input file to start with # header"); + } + let (_name, section) = util::parse_name_and_section(&line[2..].trim()).with_context(|| { + format!( + "expected input file to have header with the format `# command-name(1)`, found: `{}`", + line + ) + })?; + Ok(section) +} diff -Nru cargo-mozilla-0.47.0/crates/mdman/src/main.rs cargo-mozilla-0.57.0/crates/mdman/src/main.rs --- cargo-mozilla-0.47.0/crates/mdman/src/main.rs 1970-01-01 00:00:00.000000000 +0000 +++ cargo-mozilla-0.57.0/crates/mdman/src/main.rs 2021-10-04 17:24:20.000000000 +0000 @@ -0,0 +1,133 @@ +use anyhow::{bail, format_err, Context, Error}; +use mdman::{Format, ManMap}; +use std::collections::HashMap; +use std::path::{Path, PathBuf}; +use url::Url; + +/// Command-line options. +struct Options { + format: Format, + output_dir: PathBuf, + sources: Vec, + url: Option, + man_map: ManMap, +} + +fn main() { + if let Err(e) = run() { + eprintln!("error: {}", e); + for cause in e.chain().skip(1) { + eprintln!("\nCaused by:"); + for line in cause.to_string().lines() { + if line.is_empty() { + eprintln!(); + } else { + eprintln!(" {}", line); + } + } + } + std::process::exit(1); + } +} + +fn run() -> Result<(), Error> { + let opts = process_args()?; + if !opts.output_dir.exists() { + std::fs::create_dir_all(&opts.output_dir).with_context(|| { + format!( + "failed to create output directory {}", + opts.output_dir.display() + ) + })?; + } + for source in &opts.sources { + let section = mdman::extract_section(source)?; + let filename = + Path::new(source.file_name().unwrap()).with_extension(opts.format.extension(section)); + let out_path = opts.output_dir.join(filename); + if same_file::is_same_file(source, &out_path).unwrap_or(false) { + bail!("cannot output to the same file as the source"); + } + println!("Converting {} -> {}", source.display(), out_path.display()); + let result = mdman::convert(&source, opts.format, opts.url.clone(), opts.man_map.clone()) + .with_context(|| format!("failed to translate {}", source.display()))?; + + std::fs::write(out_path, result)?; + } + Ok(()) +} + +fn process_args() -> Result { + let mut format = None; + let mut output = None; + let mut url = None; + let mut man_map: ManMap = HashMap::new(); + let mut sources = Vec::new(); + let mut args = std::env::args().skip(1); + while let Some(arg) = args.next() { + match arg.as_str() { + "-t" => { + format = match args.next().as_deref() { + Some("man") => Some(Format::Man), + Some("md") => Some(Format::Md), + Some("txt") => Some(Format::Text), + Some(s) => bail!("unknown output format: {}", s), + None => bail!("-t requires a value (man, md, txt)"), + }; + } + "-o" => { + output = match args.next() { + Some(s) => Some(PathBuf::from(s)), + None => bail!("-o requires a value"), + }; + } + "--url" => { + url = match args.next() { + Some(s) => { + let url = Url::parse(&s) + .with_context(|| format!("could not convert `{}` to a url", s))?; + if !url.path().ends_with('/') { + bail!("url `{}` should end with a /", url); + } + Some(url) + } + None => bail!("--url requires a value"), + } + } + "--man" => { + let man = args + .next() + .ok_or_else(|| format_err!("--man requires a value"))?; + let parts: Vec<_> = man.splitn(2, '=').collect(); + let key_parts: Vec<_> = parts[0].splitn(2, ':').collect(); + if parts.len() != 2 || key_parts.len() != 2 { + bail!("--man expected value with form name:1=link"); + } + let section: u8 = key_parts[1].parse().with_context(|| { + format!("expected unsigned integer for section, got `{}`", parts[1]) + })?; + man_map.insert((key_parts[0].to_string(), section), parts[1].to_string()); + } + s => { + sources.push(PathBuf::from(s)); + } + } + } + if format.is_none() { + bail!("-t must be specified (man, md, txt)"); + } + if output.is_none() { + bail!("-o must be specified (output directory)"); + } + if sources.is_empty() { + bail!("at least one source must be specified"); + } + let opts = Options { + format: format.unwrap(), + output_dir: output.unwrap(), + sources, + url, + man_map, + }; + Ok(opts) +} diff -Nru cargo-mozilla-0.47.0/crates/mdman/src/util.rs cargo-mozilla-0.57.0/crates/mdman/src/util.rs --- cargo-mozilla-0.47.0/crates/mdman/src/util.rs 1970-01-01 00:00:00.000000000 +0000 +++ cargo-mozilla-0.57.0/crates/mdman/src/util.rs 2021-10-04 17:24:20.000000000 +0000 @@ -0,0 +1,44 @@ +///! General utilities. +use crate::EventIter; +use anyhow::{bail, format_err, Context, Error}; +use pulldown_cmark::{CowStr, Event, Tag}; + +/// Splits the text `foo(1)` into "foo" and `1`. +pub fn parse_name_and_section(text: &str) -> Result<(&str, u8), Error> { + let mut i = text.split_terminator(&['(', ')'][..]); + let name = i + .next() + .ok_or_else(|| format_err!("man reference must have a name"))?; + let section = i + .next() + .ok_or_else(|| format_err!("man reference must have a section such as mycommand(1)"))?; + if let Some(s) = i.next() { + bail!( + "man reference must have the form mycommand(1), got extra part `{}`", + s + ); + } + let section: u8 = section + .parse() + .with_context(|| format!("section must be a number, got {}", section))?; + Ok((name, section)) +} + +/// Extracts the text from a header after Tag::Heading has been received. +pub fn header_text<'e>(parser: &mut EventIter<'e>) -> Result, Error> { + let text = match parser.next() { + Some((Event::Text(t), _range)) => t, + e => bail!("expected plain text in man header, got {:?}", e), + }; + match parser.next() { + Some((Event::End(Tag::Heading(_)), _range)) => { + return Ok(text); + } + e => bail!("expected plain text in man header, got {:?}", e), + } +} + +/// Removes tags from the front and back of a string. +pub fn unwrap<'t>(text: &'t str, front: &str, back: &str) -> &'t str { + text.trim().trim_start_matches(front).trim_end_matches(back) +} diff -Nru cargo-mozilla-0.47.0/crates/mdman/tests/compare/expected/formatting.1 cargo-mozilla-0.57.0/crates/mdman/tests/compare/expected/formatting.1 --- cargo-mozilla-0.47.0/crates/mdman/tests/compare/expected/formatting.1 1970-01-01 00:00:00.000000000 +0000 +++ cargo-mozilla-0.57.0/crates/mdman/tests/compare/expected/formatting.1 2021-10-04 17:24:20.000000000 +0000 @@ -0,0 +1,118 @@ +'\" t +.TH "FORMATTING" "1" +.nh +.ad l +.ss \n[.ss] 0 +.sp +This is \fBnested \f(BIformatting\fB \fBtext\fB\fR\&. +.SH "SECOND HEADING" +Some text at second level. +.SS "Third heading" +Some text at third level. +.SS "Fourth heading" +Some text at fourth level. +.SH "Quotes and blocks." +Here are some quotes and blocks. +.RS 3 +.ll -5 +.sp +This is a block quote. Ambidextrously koala apart that prudent blindly alas +far amid dear goodness turgid so exact inside oh and alas much fanciful that +dark on spoon\-fed adequately insolent walking crud. +.br +.RE +.ll +.sp +.RS 4 +.nf +This is a code block. Groundhog watchfully sudden firefly some self\-consciously hotly jeepers satanic after that this parrot this at virtuous +some mocking the leaned jeez nightingale as much mallard so because jeez +turned dear crud grizzly strenuously. + + Indented and should be unmodified. +.fi +.RE +.sp +.RS 4 +.nf +This is an indented code block. Egregiously yikes animatedly since outside beseechingly a badger hey shakily giraffe a one wow one this +goodness regarding reindeer so astride before. + + Doubly indented +.fi +.RE +.SH "Lists" +.sp +.RS 4 +\h'-04' 1.\h'+01'Ordered list +.sp +.RS 4 +\h'-04'\(bu\h'+02'Unordered list +.sp +With a second paragraph inside it +.sp +.RS 4 +\h'-04' 1.\h'+01'Inner ordered list +.RE +.sp +.RS 4 +\h'-04' 2.\h'+01'Another +.RE +.RE +.sp +.RS 4 +\h'-04'\(bu\h'+02'Eggs +.RE +.sp +.RS 4 +\h'-04'\(bu\h'+02'Milk +.sp +.RS 4 +\h'-04' 5.\h'+01'Don't start at one. +.RE +.sp +.RS 4 +\h'-04' 6.\h'+01'tamarind +.RE +.RE +.RE +.sp +.RS 4 +\h'-04' 2.\h'+01'Second element +.RE +.sp +.RS 4 +\h'-04' 3.\h'+01'Third element +.RE +.SH "Breaks" +This has a +.br +hard break in it +and a soft one. +.SH "Horizontal rule" +This should contain a line: +\l'\n(.lu' +.sp +Nice! +.SH "Strange characters" +Handles escaping for characters +.sp +\&.dot at the start of a line. +.sp +\(rsfBnot really troff +.sp +Various characters \(rs \- \[en] \[em] \- | | ` +.sp +.RS 4 +.nf +tree +`\-\- example + |\-\- salamander + | |\-\- honey + | `\-\- some + |\-\- fancifully + `\-\- trout +.fi +.RE +.sp +\ \ \ \ non\-breaking space. diff -Nru cargo-mozilla-0.47.0/crates/mdman/tests/compare/expected/formatting.md cargo-mozilla-0.57.0/crates/mdman/tests/compare/expected/formatting.md --- cargo-mozilla-0.47.0/crates/mdman/tests/compare/expected/formatting.md 1970-01-01 00:00:00.000000000 +0000 +++ cargo-mozilla-0.57.0/crates/mdman/tests/compare/expected/formatting.md 2021-10-04 17:24:20.000000000 +0000 @@ -0,0 +1,94 @@ +# formatting(1) + +This is **nested _formatting_ `text`**. + +## SECOND HEADING + +Some text at second level. + +### Third heading + +Some text at third level. + +#### Fourth heading + +Some text at fourth level. + +## Quotes and blocks. + +Here are some quotes and blocks. + +> This is a block quote. Ambidextrously koala apart that prudent blindly alas +> far amid dear goodness turgid so exact inside oh and alas much fanciful that +> dark on spoon-fed adequately insolent walking crud. + +``` +This is a code block. Groundhog watchfully sudden firefly some self-consciously hotly jeepers satanic after that this parrot this at virtuous +some mocking the leaned jeez nightingale as much mallard so because jeez +turned dear crud grizzly strenuously. + + Indented and should be unmodified. +``` + + This is an indented code block. Egregiously yikes animatedly since outside beseechingly a badger hey shakily giraffe a one wow one this + goodness regarding reindeer so astride before. + + Doubly indented + +## Lists + +1. Ordered list + + * Unordered list + + With a second paragraph inside it + + 1. Inner ordered list + + 1. Another + + * Eggs + + * Milk + 5. Don't start at one. + 6. tamarind + +1. Second element + +1. Third element + +## Breaks + +This has a\ +hard break in it +and a soft one. + +## Horizontal rule + +This should contain a line: + +--- + +Nice! + +## Strange characters + +Handles escaping for characters + +.dot at the start of a line. + +\fBnot really troff + +Various characters \ - – — ─ │ ├ └ + +``` +tree +└── example + ├── salamander + │ ├── honey + │ └── some + ├── fancifully + └── trout +``` + +    non-breaking space. diff -Nru cargo-mozilla-0.47.0/crates/mdman/tests/compare/expected/formatting.txt cargo-mozilla-0.57.0/crates/mdman/tests/compare/expected/formatting.txt --- cargo-mozilla-0.47.0/crates/mdman/tests/compare/expected/formatting.txt 1970-01-01 00:00:00.000000000 +0000 +++ cargo-mozilla-0.57.0/crates/mdman/tests/compare/expected/formatting.txt 2021-10-04 17:24:20.000000000 +0000 @@ -0,0 +1,84 @@ +FORMATTING(1) + +This is nested formatting text. + +SECOND HEADING + Some text at second level. + + Third heading + Some text at third level. + + Fourth heading + Some text at fourth level. + +QUOTES AND BLOCKS. + Here are some quotes and blocks. + + This is a block quote. Ambidextrously koala apart that prudent + blindly alas far amid dear goodness turgid so exact inside oh and + alas much fanciful that dark on spoon-fed adequately insolent walking + crud. + + This is a code block. Groundhog watchfully sudden firefly some self-consciously hotly jeepers satanic after that this parrot this at virtuous + some mocking the leaned jeez nightingale as much mallard so because jeez + turned dear crud grizzly strenuously. + + Indented and should be unmodified. + + This is an indented code block. Egregiously yikes animatedly since outside beseechingly a badger hey shakily giraffe a one wow one this + goodness regarding reindeer so astride before. + + Doubly indented + +LISTS + 1. Ordered list + + o Unordered list + + With a second paragraph inside it + + 1. Inner ordered list + + 2. Another + + o Eggs + + o Milk + + 5. Don't start at one. + + 6. tamarind + + 2. Second element + + 3. Third element + +BREAKS + This has a + hard break in it and a soft one. + +HORIZONTAL RULE + This should contain a line: + + _________________________________________________________________ + Nice! + +STRANGE CHARACTERS + Handles escaping for characters + + .dot at the start of a line. + + \fBnot really troff + + Various characters \ - – — ─ │ ├ └ + + tree + └── example + ├── salamander + │ ├── honey + │ └── some + ├── fancifully + └── trout + +     non-breaking space. + diff -Nru cargo-mozilla-0.47.0/crates/mdman/tests/compare/expected/links.1 cargo-mozilla-0.57.0/crates/mdman/tests/compare/expected/links.1 --- cargo-mozilla-0.47.0/crates/mdman/tests/compare/expected/links.1 1970-01-01 00:00:00.000000000 +0000 +++ cargo-mozilla-0.57.0/crates/mdman/tests/compare/expected/links.1 2021-10-04 17:24:20.000000000 +0000 @@ -0,0 +1,45 @@ +'\" t +.TH "LINKS" "1" +.nh +.ad l +.ss \n[.ss] 0 +.SH "NAME" +links \- Test of different link kinds +.SH "DESCRIPTION" +Inline link: \fIinline link\fR +.sp +Reference link: \fIthis is a link\fR +.sp +Collapsed: \fIcollapsed\fR +.sp +Shortcut: \fIshortcut\fR +.sp +Autolink: +.sp +Email: +.sp +Relative link: \fIrelative link\fR +.sp +Collapsed unknown: [collapsed unknown][] +.sp +Reference unknown: [foo][unknown] +.sp +Shortcut unknown: [shortcut unknown] +.sp +\fBother\-cmd\fR(1) +.sp +\fBlocal\-cmd\fR(1) +.sp +\fISome link\fR +.sp +\fB\-\-include\fR +.RS 4 +Testing an \fIincluded link\fR \&. +.RE +.SH "OPTIONS" +.sp +\fB\-\-foo\-bar\fR +.RS 4 +Example \fIlink\fR \&. +See \fBother\-cmd\fR(1), \fBlocal\-cmd\fR(1) +.RE diff -Nru cargo-mozilla-0.47.0/crates/mdman/tests/compare/expected/links.md cargo-mozilla-0.57.0/crates/mdman/tests/compare/expected/links.md --- cargo-mozilla-0.47.0/crates/mdman/tests/compare/expected/links.md 1970-01-01 00:00:00.000000000 +0000 +++ cargo-mozilla-0.57.0/crates/mdman/tests/compare/expected/links.md 2021-10-04 17:24:20.000000000 +0000 @@ -0,0 +1,56 @@ +# links(1) + +## NAME + +links - Test of different link kinds + +## DESCRIPTION + +Inline link: [inline link](https://example.com/inline) + +Reference link: [this is a link][bar] + +Collapsed: [collapsed][] + +Shortcut: [shortcut] + +Autolink: + +Email: + +Relative link: [relative link](foo/bar.html) + +Collapsed unknown: [collapsed unknown][] + +Reference unknown: [foo][unknown] + +Shortcut unknown: [shortcut unknown] + +[other-cmd(1)](https://example.org/commands/other-cmd.html) + +[local-cmd(1)](local-cmd.html) + +[Some link](foo.html) + +
+ +
Testing an included link.
+ +
+ + +## OPTIONS + +
+ + +
Example link. +See other-cmd(1), local-cmd(1)
+ + +
+ + +[bar]: https://example.com/bar +[collapsed]: https://example.com/collapsed +[shortcut]: https://example.com/shortcut diff -Nru cargo-mozilla-0.47.0/crates/mdman/tests/compare/expected/links.txt cargo-mozilla-0.57.0/crates/mdman/tests/compare/expected/links.txt --- cargo-mozilla-0.47.0/crates/mdman/tests/compare/expected/links.txt 1970-01-01 00:00:00.000000000 +0000 +++ cargo-mozilla-0.57.0/crates/mdman/tests/compare/expected/links.txt 2021-10-04 17:24:20.000000000 +0000 @@ -0,0 +1,40 @@ +LINKS(1) + +NAME + links - Test of different link kinds + +DESCRIPTION + Inline link: inline link + + Reference link: this is a link + + Collapsed: collapsed + + Shortcut: shortcut + + Autolink: + + Email: + + Relative link: relative link + + Collapsed unknown: [collapsed unknown][] + + Reference unknown: [foo][unknown] + + Shortcut unknown: [shortcut unknown] + + other-cmd(1) + + local-cmd(1) + + Some link + + --include + Testing an included link . + +OPTIONS + --foo-bar + Example link . See other-cmd(1), + local-cmd(1) + diff -Nru cargo-mozilla-0.47.0/crates/mdman/tests/compare/expected/options.1 cargo-mozilla-0.57.0/crates/mdman/tests/compare/expected/options.1 --- cargo-mozilla-0.47.0/crates/mdman/tests/compare/expected/options.1 1970-01-01 00:00:00.000000000 +0000 +++ cargo-mozilla-0.57.0/crates/mdman/tests/compare/expected/options.1 2021-10-04 17:24:20.000000000 +0000 @@ -0,0 +1,94 @@ +'\" t +.TH "MY\-COMMAND" "1" +.nh +.ad l +.ss \n[.ss] 0 +.SH "NAME" +my\-command \- A brief description +.SH "SYNOPSIS" +\fBmy\-command\fR [\fB\-\-abc\fR | \fB\-\-xyz\fR] \fIname\fR +.br +\fBmy\-command\fR [\fB\-f\fR \fIfile\fR] +.br +\fBmy\-command\fR (\fB\-m\fR | \fB\-M\fR) [\fIoldbranch\fR] \fInewbranch\fR +.br +\fBmy\-command\fR (\fB\-d\fR | \fB\-D\fR) [\fB\-r\fR] \fIbranchname\fR\&... +.SH "DESCRIPTION" +A description of the command. +.sp +.RS 4 +\h'-04'\(bu\h'+02'One +.sp +.RS 4 +\h'-04'\(bu\h'+02'Sub one +.RE +.sp +.RS 4 +\h'-04'\(bu\h'+02'Sub two +.RE +.RE +.sp +.RS 4 +\h'-04'\(bu\h'+02'Two +.RE +.sp +.RS 4 +\h'-04'\(bu\h'+02'Three +.RE +.SH "OPTIONS" +.SS "Command options" +.sp +\fB\-\-foo\-bar\fR +.RS 4 +Demo \fIemphasis\fR, \fBstrong\fR, ~~strike~~ +.RE +.sp +\fB\-p\fR \fIspec\fR, +\fB\-\-package\fR \fIspec\fR +.RS 4 +This has multiple flags. +.RE +.sp +\fInamed\-arg...\fR +.RS 4 +A named argument. +.RE +.SS "Common Options" +.sp +\fB@\fR\fIfilename\fR +.RS 4 +Load from filename. +.RE +.sp +\fB\-\-foo\fR [\fIbar\fR] +.RS 4 +Flag with optional value. +.RE +.sp +\fB\-\-foo\fR[\fB=\fR\fIbar\fR] +.RS 4 +Alternate syntax for optional value (with required = for disambiguation). +.RE +.SH "EXAMPLES" +.sp +.RS 4 +\h'-04' 1.\h'+01'An example +.sp +.RS 4 +.nf +my\-command \-\-abc +.fi +.RE +.RE +.sp +.RS 4 +\h'-04' 2.\h'+01'Another example +.sp +.RS 4 +.nf +my\-command \-\-xyz +.fi +.RE +.RE +.SH "SEE ALSO" +\fBother\-command\fR(1) \fBabc\fR(7) diff -Nru cargo-mozilla-0.47.0/crates/mdman/tests/compare/expected/options.md cargo-mozilla-0.57.0/crates/mdman/tests/compare/expected/options.md --- cargo-mozilla-0.47.0/crates/mdman/tests/compare/expected/options.md 1970-01-01 00:00:00.000000000 +0000 +++ cargo-mozilla-0.57.0/crates/mdman/tests/compare/expected/options.md 2021-10-04 17:24:20.000000000 +0000 @@ -0,0 +1,77 @@ +# my-command(1) + +## NAME + +my-command - A brief description + +## SYNOPSIS + +`my-command` [`--abc` | `--xyz`] _name_\ +`my-command` [`-f` _file_]\ +`my-command` (`-m` | `-M`) [_oldbranch_] _newbranch_\ +`my-command` (`-d` | `-D`) [`-r`] _branchname_... + +## DESCRIPTION + +A description of the command. + +* One + * Sub one + * Sub two +* Two +* Three + + +## OPTIONS + +### Command options + +
+ +
--foo-bar
+
Demo emphasis, strong, strike
+ + +
-p spec
+
--package spec
+
This has multiple flags.
+ + +
named-arg...
+
A named argument.
+ + +
+ +### Common Options + +
+
@filename
+
Load from filename.
+ + +
--foo [bar]
+
Flag with optional value.
+ + +
--foo[=bar]
+
Alternate syntax for optional value (with required = for disambiguation).
+ + +
+ + +## EXAMPLES + +1. An example + + ``` + my-command --abc + ``` + +1. Another example + + my-command --xyz + +## SEE ALSO +[other-command(1)](other-command.html) [abc(7)](abc.html) diff -Nru cargo-mozilla-0.47.0/crates/mdman/tests/compare/expected/options.txt cargo-mozilla-0.57.0/crates/mdman/tests/compare/expected/options.txt --- cargo-mozilla-0.47.0/crates/mdman/tests/compare/expected/options.txt 1970-01-01 00:00:00.000000000 +0000 +++ cargo-mozilla-0.57.0/crates/mdman/tests/compare/expected/options.txt 2021-10-04 17:24:20.000000000 +0000 @@ -0,0 +1,57 @@ +MY-COMMAND(1) + +NAME + my-command - A brief description + +SYNOPSIS + my-command [--abc | --xyz] name + my-command [-f file] + my-command (-m | -M) [oldbranch] newbranch + my-command (-d | -D) [-r] branchname... + +DESCRIPTION + A description of the command. + + o One + o Sub one + + o Sub two + + o Two + + o Three + +OPTIONS + Command options + --foo-bar + Demo emphasis, strong, ~~strike~~ + + -p spec, --package spec + This has multiple flags. + + named-arg... + A named argument. + + Common Options + @filename + Load from filename. + + --foo [bar] + Flag with optional value. + + --foo[=bar] + Alternate syntax for optional value (with required = for + disambiguation). + +EXAMPLES + 1. An example + + my-command --abc + + 2. Another example + + my-command --xyz + +SEE ALSO + other-command(1) abc(7) + diff -Nru cargo-mozilla-0.47.0/crates/mdman/tests/compare/expected/tables.1 cargo-mozilla-0.57.0/crates/mdman/tests/compare/expected/tables.1 --- cargo-mozilla-0.47.0/crates/mdman/tests/compare/expected/tables.1 1970-01-01 00:00:00.000000000 +0000 +++ cargo-mozilla-0.57.0/crates/mdman/tests/compare/expected/tables.1 2021-10-04 17:24:20.000000000 +0000 @@ -0,0 +1,108 @@ +'\" t +.TH "TABLES" "1" +.nh +.ad l +.ss \n[.ss] 0 +.SH "DESCRIPTION" +Testing tables. + +.TS +allbox tab(:); +lt. +T{ +Single col +T} +T{ +Hi! :) +T} +.TE +.sp + +.TS +allbox tab(:); +lt lt lt. +T{ +Header content +T}:T{ +With \fBformat\fR \fItext\fR +T}:T{ +Another column +T} +T{ +Some data +T}:T{ +More data +T}:T{ + +T} +T{ +Extra long amount of text within a column +T}:T{ +hi +T}:T{ +there +T} +.TE +.sp + +.TS +allbox tab(:); +lt ct rt. +T{ +Left aligned +T}:T{ +Center aligned +T}:T{ +Right aligned +T} +T{ +abc +T}:T{ +def +T}:T{ +ghi +T} +.TE +.sp + +.TS +allbox tab(:); +lt ct rt. +T{ +Left aligned +T}:T{ +Center aligned +T}:T{ +Right aligned +T} +T{ +X +T}:T{ +X +T}:T{ +X +T} +T{ +Extra long text 123456789012 with mixed widths. +T}:T{ +Extra long text 123456789012 with mixed widths. +T}:T{ +Extra long text 123456789012 with mixed widths. +T} +.TE +.sp + +.TS +allbox tab(:); +lt. +T{ +Link check +T} +T{ +\fIfoo\fR +T} +T{ + +T} +.TE +.sp diff -Nru cargo-mozilla-0.47.0/crates/mdman/tests/compare/expected/tables.md cargo-mozilla-0.57.0/crates/mdman/tests/compare/expected/tables.md --- cargo-mozilla-0.47.0/crates/mdman/tests/compare/expected/tables.md 1970-01-01 00:00:00.000000000 +0000 +++ cargo-mozilla-0.57.0/crates/mdman/tests/compare/expected/tables.md 2021-10-04 17:24:20.000000000 +0000 @@ -0,0 +1,35 @@ +# tables(1) + +## DESCRIPTION + +Testing tables. + +| Single col | +-------------- +| Hi! :) | + + +Header content | With `format` *text* | Another column +---------------|----------------------|---------------- +Some data | More data | +Extra long amount of text within a column | hi | there + + +Left aligned | Center aligned | Right aligned +-------------|:--------------:|--------------: +abc | def | ghi + + +Left aligned | Center aligned | Right aligned +-------------|:--------------:|--------------: +X | X | X +Extra long text 123456789012 with mixed widths. | Extra long text 123456789012 with mixed widths. | Extra long text 123456789012 with mixed widths. + + +| Link check | +-------------- +| [foo] | +| | + + +[foo]: https://example.com/ diff -Nru cargo-mozilla-0.47.0/crates/mdman/tests/compare/expected/tables.txt cargo-mozilla-0.57.0/crates/mdman/tests/compare/expected/tables.txt --- cargo-mozilla-0.47.0/crates/mdman/tests/compare/expected/tables.txt 1970-01-01 00:00:00.000000000 +0000 +++ cargo-mozilla-0.57.0/crates/mdman/tests/compare/expected/tables.txt 2021-10-04 17:24:20.000000000 +0000 @@ -0,0 +1,45 @@ +TABLES(1) + +DESCRIPTION + Testing tables. + + +-------------+ + | Single col | + +-------------+ + | Hi! :) | + +-------------+ + + +-------------------------------------+----------------+--------------+ + | Header content | With format | Another | + | | text | column | + +-------------------------------------+----------------+--------------+ + | Some data | More data | | + +-------------------------------------+----------------+--------------+ + | Extra long amount of text within a | hi | there | + | column | | | + +-------------------------------------+----------------+--------------+ + + +---------------+-----------------+----------------+ + | Left aligned | Center aligned | Right aligned | + +---------------+-----------------+----------------+ + | abc | def | ghi | + +---------------+-----------------+----------------+ + + +-----------------------+-----------------------+-----------------------+ + | Left aligned | Center aligned | Right aligned | + +-----------------------+-----------------------+-----------------------+ + | X | X | X | + +-----------------------+-----------------------+-----------------------+ + | Extra long text | Extra long text | Extra long text | + | 123456789012 with | 123456789012 with | 123456789012 with | + | mixed widths. | mixed widths. | mixed widths. | + +-----------------------+-----------------------+-----------------------+ + + +-----------------------+ + | Link check | + +-----------------------+ + | foo | + +-----------------------+ + | https://example.com/ | + +-----------------------+ + diff -Nru cargo-mozilla-0.47.0/crates/mdman/tests/compare/expected/vars.7 cargo-mozilla-0.57.0/crates/mdman/tests/compare/expected/vars.7 --- cargo-mozilla-0.47.0/crates/mdman/tests/compare/expected/vars.7 1970-01-01 00:00:00.000000000 +0000 +++ cargo-mozilla-0.57.0/crates/mdman/tests/compare/expected/vars.7 2021-10-04 17:24:20.000000000 +0000 @@ -0,0 +1,9 @@ +'\" t +.TH "VARS" "7" +.nh +.ad l +.ss \n[.ss] 0 +.sp +Bar +.sp +bar diff -Nru cargo-mozilla-0.47.0/crates/mdman/tests/compare/expected/vars.md cargo-mozilla-0.57.0/crates/mdman/tests/compare/expected/vars.md --- cargo-mozilla-0.47.0/crates/mdman/tests/compare/expected/vars.md 1970-01-01 00:00:00.000000000 +0000 +++ cargo-mozilla-0.57.0/crates/mdman/tests/compare/expected/vars.md 2021-10-04 17:24:20.000000000 +0000 @@ -0,0 +1,7 @@ +# vars(7) + + + +Bar + +bar diff -Nru cargo-mozilla-0.47.0/crates/mdman/tests/compare/expected/vars.txt cargo-mozilla-0.57.0/crates/mdman/tests/compare/expected/vars.txt --- cargo-mozilla-0.47.0/crates/mdman/tests/compare/expected/vars.txt 1970-01-01 00:00:00.000000000 +0000 +++ cargo-mozilla-0.57.0/crates/mdman/tests/compare/expected/vars.txt 2021-10-04 17:24:20.000000000 +0000 @@ -0,0 +1,6 @@ +VARS(7) + +Bar + +bar + diff -Nru cargo-mozilla-0.47.0/crates/mdman/tests/compare/formatting.md cargo-mozilla-0.57.0/crates/mdman/tests/compare/formatting.md --- cargo-mozilla-0.47.0/crates/mdman/tests/compare/formatting.md 1970-01-01 00:00:00.000000000 +0000 +++ cargo-mozilla-0.57.0/crates/mdman/tests/compare/formatting.md 2021-10-04 17:24:20.000000000 +0000 @@ -0,0 +1,94 @@ +# formatting(1) + +This is **nested _formatting_ `text`**. + +## SECOND HEADING + +Some text at second level. + +### Third heading + +Some text at third level. + +#### Fourth heading + +Some text at fourth level. + +## Quotes and blocks. + +Here are some quotes and blocks. + +> This is a block quote. Ambidextrously koala apart that prudent blindly alas +> far amid dear goodness turgid so exact inside oh and alas much fanciful that +> dark on spoon-fed adequately insolent walking crud. + +``` +This is a code block. Groundhog watchfully sudden firefly some self-consciously hotly jeepers satanic after that this parrot this at virtuous +some mocking the leaned jeez nightingale as much mallard so because jeez +turned dear crud grizzly strenuously. + + Indented and should be unmodified. +``` + + This is an indented code block. Egregiously yikes animatedly since outside beseechingly a badger hey shakily giraffe a one wow one this + goodness regarding reindeer so astride before. + + Doubly indented + +## Lists + +1. Ordered list + + * Unordered list + + With a second paragraph inside it + + 1. Inner ordered list + + 1. Another + + * Eggs + + * Milk + 5. Don't start at one. + 6. tamarind + +1. Second element + +1. Third element + +## Breaks + +This has a\ +hard break in it +and a soft one. + +## Horizontal rule + +This should contain a line: + +--- + +Nice! + +## Strange characters + +Handles escaping for characters + +.dot at the start of a line. + +\fBnot really troff + +Various characters \ - – — ─ │ ├ └ + +``` +tree +└── example + ├── salamander + │ ├── honey + │ └── some + ├── fancifully + └── trout +``` + +    non-breaking space. diff -Nru cargo-mozilla-0.47.0/crates/mdman/tests/compare/includes/links-include.md cargo-mozilla-0.57.0/crates/mdman/tests/compare/includes/links-include.md --- cargo-mozilla-0.47.0/crates/mdman/tests/compare/includes/links-include.md 1970-01-01 00:00:00.000000000 +0000 +++ cargo-mozilla-0.57.0/crates/mdman/tests/compare/includes/links-include.md 2021-10-04 17:24:20.000000000 +0000 @@ -0,0 +1,7 @@ +[Some link](foo.html) + +{{#options}} +{{#option "`--include`"}} +Testing an [included link](included_link.html). +{{/option}} +{{/options}} diff -Nru cargo-mozilla-0.47.0/crates/mdman/tests/compare/includes/options-common.md cargo-mozilla-0.57.0/crates/mdman/tests/compare/includes/options-common.md --- cargo-mozilla-0.47.0/crates/mdman/tests/compare/includes/options-common.md 1970-01-01 00:00:00.000000000 +0000 +++ cargo-mozilla-0.57.0/crates/mdman/tests/compare/includes/options-common.md 2021-10-04 17:24:20.000000000 +0000 @@ -0,0 +1,14 @@ +{{#options}} +{{#option "`@`_filename_"}} +Load from filename. +{{/option}} + +{{#option "`--foo` [_bar_]"}} +Flag with optional value. +{{/option}} + +{{#option "`--foo`[`=`_bar_]"}} +Alternate syntax for optional value (with required = for disambiguation). +{{/option}} + +{{/options}} diff -Nru cargo-mozilla-0.47.0/crates/mdman/tests/compare/links.md cargo-mozilla-0.57.0/crates/mdman/tests/compare/links.md --- cargo-mozilla-0.47.0/crates/mdman/tests/compare/links.md 1970-01-01 00:00:00.000000000 +0000 +++ cargo-mozilla-0.57.0/crates/mdman/tests/compare/links.md 2021-10-04 17:24:20.000000000 +0000 @@ -0,0 +1,49 @@ +# links(1) + +## NAME + +links - Test of different link kinds + +## DESCRIPTION + +Inline link: [inline link](https://example.com/inline) + +Reference link: [this is a link][bar] + +Collapsed: [collapsed][] + +Shortcut: [shortcut] + +Autolink: + +Email: + +Relative link: [relative link](foo/bar.html) + +Collapsed unknown: [collapsed unknown][] + +Reference unknown: [foo][unknown] + +Shortcut unknown: [shortcut unknown] + +{{man "other-cmd" 1}} + +{{man "local-cmd" 1}} + +{{> links-include}} + +## OPTIONS + +{{#options}} + +{{#option "`--foo-bar`"}} +Example [link](bar.html). +See {{man "other-cmd" 1}}, {{man "local-cmd" 1}} +{{/option}} + +{{/options}} + + +[bar]: https://example.com/bar +[collapsed]: https://example.com/collapsed +[shortcut]: https://example.com/shortcut diff -Nru cargo-mozilla-0.47.0/crates/mdman/tests/compare/options.md cargo-mozilla-0.57.0/crates/mdman/tests/compare/options.md --- cargo-mozilla-0.47.0/crates/mdman/tests/compare/options.md 1970-01-01 00:00:00.000000000 +0000 +++ cargo-mozilla-0.57.0/crates/mdman/tests/compare/options.md 2021-10-04 17:24:20.000000000 +0000 @@ -0,0 +1,62 @@ +# my-command(1) + +## NAME + +my-command - A brief description + +## SYNOPSIS + +`my-command` [`--abc` | `--xyz`] _name_\ +`my-command` [`-f` _file_]\ +`my-command` (`-m` | `-M`) [_oldbranch_] _newbranch_\ +`my-command` (`-d` | `-D`) [`-r`] _branchname_... + +## DESCRIPTION + +A description of the command. + +* One + * Sub one + * Sub two +* Two +* Three + + +## OPTIONS + +### Command options + +{{#options}} + +{{#option "`--foo-bar`"}} +Demo *emphasis*, **strong**, ~~strike~~ +{{/option}} + +{{#option "`-p` _spec_" "`--package` _spec_"}} +This has multiple flags. +{{/option}} + +{{#option "_named-arg..._"}} +A named argument. +{{/option}} + +{{/options}} + +### Common Options + +{{> options-common}} + +## EXAMPLES + +1. An example + + ``` + my-command --abc + ``` + +1. Another example + + my-command --xyz + +## SEE ALSO +{{man "other-command" 1}} {{man "abc" 7}} diff -Nru cargo-mozilla-0.47.0/crates/mdman/tests/compare/tables.md cargo-mozilla-0.57.0/crates/mdman/tests/compare/tables.md --- cargo-mozilla-0.47.0/crates/mdman/tests/compare/tables.md 1970-01-01 00:00:00.000000000 +0000 +++ cargo-mozilla-0.57.0/crates/mdman/tests/compare/tables.md 2021-10-04 17:24:20.000000000 +0000 @@ -0,0 +1,35 @@ +# tables(1) + +## DESCRIPTION + +Testing tables. + +| Single col | +-------------- +| Hi! :) | + + +Header content | With `format` *text* | Another column +---------------|----------------------|---------------- +Some data | More data | +Extra long amount of text within a column | hi | there + + +Left aligned | Center aligned | Right aligned +-------------|:--------------:|--------------: +abc | def | ghi + + +Left aligned | Center aligned | Right aligned +-------------|:--------------:|--------------: +X | X | X +Extra long text 123456789012 with mixed widths. | Extra long text 123456789012 with mixed widths. | Extra long text 123456789012 with mixed widths. + + +| Link check | +-------------- +| [foo] | +| | + + +[foo]: https://example.com/ diff -Nru cargo-mozilla-0.47.0/crates/mdman/tests/compare/vars.md cargo-mozilla-0.57.0/crates/mdman/tests/compare/vars.md --- cargo-mozilla-0.47.0/crates/mdman/tests/compare/vars.md 1970-01-01 00:00:00.000000000 +0000 +++ cargo-mozilla-0.57.0/crates/mdman/tests/compare/vars.md 2021-10-04 17:24:20.000000000 +0000 @@ -0,0 +1,7 @@ +# vars(7) + +{{*set foo="Bar"}} + +{{foo}} + +{{lower foo}} diff -Nru cargo-mozilla-0.47.0/crates/mdman/tests/compare.rs cargo-mozilla-0.57.0/crates/mdman/tests/compare.rs --- cargo-mozilla-0.47.0/crates/mdman/tests/compare.rs 1970-01-01 00:00:00.000000000 +0000 +++ cargo-mozilla-0.57.0/crates/mdman/tests/compare.rs 2021-10-04 17:24:20.000000000 +0000 @@ -0,0 +1,48 @@ +//! Compares input to expected output. +//! +//! Use the MDMAN_BLESS environment variable to automatically update the +//! expected output. + +use mdman::{Format, ManMap}; +use pretty_assertions::assert_eq; +use std::path::PathBuf; +use url::Url; + +fn run(name: &str) { + let input = PathBuf::from(format!("tests/compare/{}.md", name)); + let url = Some(Url::parse("https://example.org/").unwrap()); + let mut map = ManMap::new(); + map.insert( + ("other-cmd".to_string(), 1), + "https://example.org/commands/other-cmd.html".to_string(), + ); + + for &format in &[Format::Man, Format::Md, Format::Text] { + let section = mdman::extract_section(&input).unwrap(); + let result = mdman::convert(&input, format, url.clone(), map.clone()).unwrap(); + let expected_path = format!( + "tests/compare/expected/{}.{}", + name, + format.extension(section) + ); + if std::env::var("MDMAN_BLESS").is_ok() { + std::fs::write(&expected_path, result).unwrap(); + } else { + let expected = std::fs::read_to_string(&expected_path).unwrap(); + // Fix if Windows checked out with autocrlf. + let expected = expected.replace("\r\n", "\n"); + assert_eq!(expected, result); + } + } +} + +macro_rules! test( ($name:ident) => ( + #[test] + fn $name() { run(stringify!($name)); } +) ); + +test!(formatting); +test!(links); +test!(options); +test!(tables); +test!(vars); diff -Nru cargo-mozilla-0.47.0/crates/mdman/tests/invalid/nested.md cargo-mozilla-0.57.0/crates/mdman/tests/invalid/nested.md --- cargo-mozilla-0.47.0/crates/mdman/tests/invalid/nested.md 1970-01-01 00:00:00.000000000 +0000 +++ cargo-mozilla-0.57.0/crates/mdman/tests/invalid/nested.md 2021-10-04 17:24:20.000000000 +0000 @@ -0,0 +1,6 @@ +# nested(1) + +{{#options}} +{{#options}} +{{/options}} +{{/options}} diff -Nru cargo-mozilla-0.47.0/crates/mdman/tests/invalid/not-inside-options.md cargo-mozilla-0.57.0/crates/mdman/tests/invalid/not-inside-options.md --- cargo-mozilla-0.47.0/crates/mdman/tests/invalid/not-inside-options.md 1970-01-01 00:00:00.000000000 +0000 +++ cargo-mozilla-0.57.0/crates/mdman/tests/invalid/not-inside-options.md 2021-10-04 17:24:20.000000000 +0000 @@ -0,0 +1,5 @@ +# not-inside-options(1) + +{{#option "`-o`"}} +Testing without options block. +{{/option}} diff -Nru cargo-mozilla-0.47.0/crates/mdman/tests/invalid.rs cargo-mozilla-0.57.0/crates/mdman/tests/invalid.rs --- cargo-mozilla-0.47.0/crates/mdman/tests/invalid.rs 1970-01-01 00:00:00.000000000 +0000 +++ cargo-mozilla-0.57.0/crates/mdman/tests/invalid.rs 2021-10-04 17:24:20.000000000 +0000 @@ -0,0 +1,34 @@ +//! Tests for errors and invalid input. + +use mdman::{Format, ManMap}; +use pretty_assertions::assert_eq; +use std::path::PathBuf; + +fn run(name: &str, expected_error: &str) { + let input = PathBuf::from(format!("tests/invalid/{}", name)); + match mdman::convert(&input, Format::Man, None, ManMap::new()) { + Ok(_) => { + panic!("expected {} to fail", name); + } + Err(e) => { + assert_eq!(expected_error, e.to_string()); + } + } +} + +macro_rules! test( ($name:ident, $file_name:expr, $error:expr) => ( + #[test] + fn $name() { run($file_name, $error); } +) ); + +test!( + nested, + "nested.md", + "Error rendering \"template\" line 4, col 1: options blocks cannot be nested" +); + +test!( + not_inside_options, + "not-inside-options.md", + "Error rendering \"template\" line 3, col 1: option must be in options block" +); diff -Nru cargo-mozilla-0.47.0/crates/resolver-tests/Cargo.toml cargo-mozilla-0.57.0/crates/resolver-tests/Cargo.toml --- cargo-mozilla-0.47.0/crates/resolver-tests/Cargo.toml 2020-07-17 20:39:39.000000000 +0000 +++ cargo-mozilla-0.57.0/crates/resolver-tests/Cargo.toml 2021-10-04 17:24:20.000000000 +0000 @@ -6,6 +6,7 @@ [dependencies] cargo = { path = "../.." } +cargo-util = { path = "../cargo-util" } proptest = "0.9.1" lazy_static = "1.3.0" varisat = "0.2.1" diff -Nru cargo-mozilla-0.47.0/crates/resolver-tests/src/lib.rs cargo-mozilla-0.57.0/crates/resolver-tests/src/lib.rs --- cargo-mozilla-0.47.0/crates/resolver-tests/src/lib.rs 2020-07-17 20:39:39.000000000 +0000 +++ cargo-mozilla-0.57.0/crates/resolver-tests/src/lib.rs 2021-10-04 17:24:20.000000000 +0000 @@ -1,5 +1,4 @@ -#![allow(clippy::many_single_char_names)] -#![allow(clippy::needless_range_loop)] // false positives +#![allow(clippy::all)] use std::cell::RefCell; use std::cmp::PartialEq; @@ -11,7 +10,7 @@ use std::time::Instant; use cargo::core::dependency::DepKind; -use cargo::core::resolver::{self, ResolveOpts}; +use cargo::core::resolver::{self, ResolveOpts, VersionPreferences}; use cargo::core::source::{GitReference, SourceId}; use cargo::core::Resolve; use cargo::core::{Dependency, PackageId, Registry, Summary}; @@ -24,7 +23,7 @@ use varisat::{self, ExtendFormula}; pub fn resolve(deps: Vec, registry: &[Summary]) -> CargoResult> { - resolve_with_config(deps, registry, None) + resolve_with_config(deps, registry, &Config::default().unwrap()) } pub fn resolve_and_validated( @@ -32,7 +31,7 @@ registry: &[Summary], sat_resolve: Option, ) -> CargoResult> { - let resolve = resolve_with_config_raw(deps.clone(), registry, None); + let resolve = resolve_with_config_raw(deps.clone(), registry, &Config::default().unwrap()); match resolve { Err(e) => { @@ -109,7 +108,7 @@ pub fn resolve_with_config( deps: Vec, registry: &[Summary], - config: Option<&Config>, + config: &Config, ) -> CargoResult> { let resolve = resolve_with_config_raw(deps, registry, config)?; Ok(resolve.sort()) @@ -118,12 +117,12 @@ pub fn resolve_with_config_raw( deps: Vec, registry: &[Summary], - config: Option<&Config>, + config: &Config, ) -> CargoResult { struct MyRegistry<'a> { list: &'a [Summary], used: HashSet, - }; + } impl<'a> Registry for MyRegistry<'a> { fn query( &mut self, @@ -171,11 +170,11 @@ used: HashSet::new(), }; let summary = Summary::new( + config, pkg_id("root"), deps, - &BTreeMap::>::new(), + &BTreeMap::new(), None::<&String>, - false, ) .unwrap(); let opts = ResolveOpts::everything(); @@ -184,8 +183,8 @@ &[(summary, opts)], &[], &mut registry, - &HashSet::new(), - config, + &VersionPreferences::default(), + Some(config), true, ); @@ -507,7 +506,7 @@ impl ToDep for &'static str { fn to_dep(self) -> Dependency { - Dependency::parse_no_deprecated(self, Some("1.0.0"), registry_loc()).unwrap() + Dependency::parse(self, Some("1.0.0"), registry_loc()).unwrap() } } @@ -572,11 +571,11 @@ None }; Summary::new( + &Config::default().unwrap(), name.to_pkgid(), dep, - &BTreeMap::>::new(), + &BTreeMap::new(), link, - false, ) .unwrap() } @@ -600,11 +599,11 @@ None }; Summary::new( + &Config::default().unwrap(), pkg_id_loc(name, loc), Vec::new(), - &BTreeMap::>::new(), + &BTreeMap::new(), link, - false, ) .unwrap() } @@ -614,11 +613,11 @@ deps.remove(ind); // note: more things will need to be copied over in the future, but it works for now. Summary::new( + &Config::default().unwrap(), sum.package_id(), deps, - &BTreeMap::>::new(), + &BTreeMap::new(), sum.links().map(|a| a.as_str()), - sum.namespaced_features(), ) .unwrap() } @@ -627,7 +626,7 @@ dep_req(name, "*") } pub fn dep_req(name: &str, req: &str) -> Dependency { - Dependency::parse_no_deprecated(name, Some(req), registry_loc()).unwrap() + Dependency::parse(name, Some(req), registry_loc()).unwrap() } pub fn dep_req_kind(name: &str, req: &str, kind: DepKind, public: bool) -> Dependency { let mut dep = dep_req(name, req); @@ -640,7 +639,7 @@ let url = location.into_url().unwrap(); let master = GitReference::Branch("master".to_string()); let source_id = SourceId::for_git(&url, master).unwrap(); - Dependency::parse_no_deprecated(name, Some("1.0.0"), source_id).unwrap() + Dependency::parse(name, Some("1.0.0"), source_id).unwrap() } pub fn dep_kind(name: &str, kind: DepKind) -> Dependency { dep(name).set_kind(kind).clone() @@ -969,12 +968,14 @@ } /// Assert `xs` contains `elems` +#[track_caller] pub fn assert_contains(xs: &[A], elems: &[A]) { for elem in elems { assert!(xs.contains(elem)); } } +#[track_caller] pub fn assert_same(a: &[A], b: &[A]) { assert_eq!(a.len(), b.len()); assert_contains(b, a); diff -Nru cargo-mozilla-0.47.0/crates/resolver-tests/tests/resolve.rs cargo-mozilla-0.57.0/crates/resolver-tests/tests/resolve.rs --- cargo-mozilla-0.47.0/crates/resolver-tests/tests/resolve.rs 2020-07-17 20:39:39.000000000 +0000 +++ cargo-mozilla-0.57.0/crates/resolver-tests/tests/resolve.rs 2021-10-04 17:24:20.000000000 +0000 @@ -1,6 +1,7 @@ use cargo::core::dependency::DepKind; -use cargo::core::{enable_nightly_features, Dependency}; -use cargo::util::{is_ci, Config}; +use cargo::core::Dependency; +use cargo::util::Config; +use cargo_util::is_ci; use resolver_tests::{ assert_contains, assert_same, dep, dep_kind, dep_loc, dep_req, dep_req_kind, loc_names, names, @@ -55,9 +56,8 @@ fn prop_minimum_version_errors_the_same( PrettyPrintRegistry(input) in registry_strategy(50, 20, 60) ) { - enable_nightly_features(); - let mut config = Config::default().unwrap(); + config.nightly_features_allowed = true; config .configure( 1, @@ -87,13 +87,13 @@ let mres = resolve_with_config( vec![dep_req(&this.name(), &format!("={}", this.version()))], ®, - Some(&config), + &config, ); prop_assert_eq!( res.is_ok(), mres.is_ok(), - "minimal-versions and regular resolver disagree about weather `{} = \"={}\"` can resolve", + "minimal-versions and regular resolver disagree about whether `{} = \"={}\"` can resolve", this.name(), this.version() ) @@ -228,6 +228,7 @@ } #[test] +#[should_panic(expected = "pub dep")] // The error handling is not yet implemented. fn pub_fail() { let input = vec![ pkg!(("a", "0.0.4")), @@ -552,11 +553,6 @@ #[test] fn test_resolving_minimum_version_with_transitive_deps() { - enable_nightly_features(); // -Z minimal-versions - // When the minimal-versions config option is specified then the lowest - // possible version of a package should be selected. "util 1.0.0" can't be - // selected because of the requirements of "bar", so the minimum version - // must be 1.1.1. let reg = registry(vec![ pkg!(("util", "1.2.2")), pkg!(("util", "1.0.0")), @@ -566,6 +562,12 @@ ]); let mut config = Config::default().unwrap(); + // -Z minimal-versions + // When the minimal-versions config option is specified then the lowest + // possible version of a package should be selected. "util 1.0.0" can't be + // selected because of the requirements of "bar", so the minimum version + // must be 1.1.1. + config.nightly_features_allowed = true; config .configure( 1, @@ -583,7 +585,7 @@ let res = resolve_with_config( vec![dep_req("foo", "1.0.0"), dep_req("bar", "1.0.0")], ®, - Some(&config), + &config, ) .unwrap(); @@ -1496,7 +1498,7 @@ assert_eq!("\ cyclic package dependency: package `A v0.0.0 (registry `https://example.com/`)` depends on itself. Cycle: package `A v0.0.0 (registry `https://example.com/`)` - ... which is depended on by `C v0.0.0 (registry `https://example.com/`)` - ... which is depended on by `A v0.0.0 (registry `https://example.com/`)`\ + ... which satisfies dependency `A = \"*\"` of package `C v0.0.0 (registry `https://example.com/`)` + ... which satisfies dependency `C = \"*\"` of package `A v0.0.0 (registry `https://example.com/`)`\ ", error.to_string()); } diff -Nru cargo-mozilla-0.47.0/debian/README.source cargo-mozilla-0.57.0/debian/README.source --- cargo-mozilla-0.47.0/debian/README.source 2020-04-18 18:41:52.000000000 +0000 +++ cargo-mozilla-0.57.0/debian/README.source 2022-03-15 12:09:01.000000000 +0000 @@ -4,14 +4,20 @@ 0. Update debcargo-conf.git so that cargo's dependencies are up-to-date. This means less stuff will have to be patched (in debian/debcargo-conf.patch) in the next step. This might take a while, ask other people for help if needed. -1. Run d/make_orig_multi.sh . +1. Empty d/make_orig_multi-pre-vendor.sh, then run d/make_orig_multi.sh . + + If cargo-vendor tries to use too-new crates that debcargo-conf doesn't have + patches for yet, downgrade them by tweaking d/make_orig_multi-pre-vendor.sh + + e.g. cargo update -p tempfile --precise 3.1.0 2. Verify the -vendor component tarball to make sure it looks good. If not, edit d/make_orig_multi.sh and the surrounding files (such as patches and exclude files) and repeat the above until it looks good. 3. $ git fetch upstream You might have to first run: $ git remote add upstream https://github.com/rust-lang/cargo -4. $ gbp import-orig ../cargo_.orig.tar.gz +4. $ git checkout debian/experimental + $ gbp import-orig ../cargo_.orig.tar.gz If you get errors, check the extra default flags in d/gbp.conf 5. Check that no old versions remain in vendor/. If there are, then your git repo was messed up when you ran (4). Rewind the debian/sid, upstream, and @@ -22,35 +28,17 @@ General info ============ -Current packaging of cargo is sub-optimal due to the fact that -both the language (Rust) and its package manager (Cargo) -are involved into self-dependency loops to bootstrap. - -Moreover, the current approach to modules and registry by cargo is -biased towards a developer-friendly always-online use. - -This package currently resort to several workarounds to build cargo: - 1. we use a custom script (debian/bootstrap.py) to build a local - stage0, instead of downloading/embedding a snapshotted binary. - 2. we embed all dependencies crates, because cargo needs external - modules (which need cargo themself to build). - 4. we generate a .cargo/config at build-time, to override paths and - registry. - 5. we create a temporary git repository at build-time for the - registry, as this is needed by cargo. +Cargo depends on a few hundred other crates (which themselves need cargo to +build). To avoid an insane bootstrapping loop, this package therefore embeds +all dependency crates. This is made convenient by the "vendor" subcommand. + +(The alternative method, that expresses the true upstream dependencies more +faithfully, can be found in the "rust-cargo" crate, which is packaged just like +any other Debian Rust package. That is used as a library by the Debian packages +of various Rust ecosystem tools that build on top of cargo, such as our very +own debcargo. By contrast, this package is used as the actual executable +package manager, with a smaller bootstrapping requirement.) As such, the original source is composed by two tarballs: * cargo source - * dependencies crates (under vendor/), stripped of unused embedded - C libraries - -Uploading Package -================= - -Please use dgit push-source command to upload new version of the package to -archive. Command by itself creates a source only upload uploads the package to -ftpmaster and creates version history on dgit. - - dgit push-source --gbp - - -- Vasudev Kamath , Sat, 9 Jun 2018 14:41:17 +0530 + * dependencies crates (under vendor/), stripped of unused embedded C libraries diff -Nru cargo-mozilla-0.47.0/debian/bin/cargo cargo-mozilla-0.57.0/debian/bin/cargo --- cargo-mozilla-0.47.0/debian/bin/cargo 2020-04-20 13:29:15.000000000 +0000 +++ cargo-mozilla-0.57.0/debian/bin/cargo 2022-03-15 12:14:49.000000000 +0000 @@ -192,16 +192,19 @@ newargs = [] subcmd = None for a in args: - if a in ("build", "rustc", "doc", "test", "bench", "install"): + if (subcmd is None) and (a in ("build", "rustc", "doc", "test", "bench", "install")): subcmd = a newargs.extend(["-Zavoid-dev-deps", a, "--verbose", "--verbose"] + parallel + ["--target", host_rust_type]) - elif a == "clean": + elif (subcmd is None) and (a == "clean"): subcmd = a newargs.extend([a, "--verbose", "--verbose"]) else: newargs.append(a) + if subcmd is not None and "--verbose" in newargs and "--quiet" in newargs: + newargs.remove("--quiet") + if nodoc and subcmd == "doc": return 0 if nocheck and subcmd in ("test", "bench"): diff -Nru cargo-mozilla-0.47.0/debian/bootstrap.py cargo-mozilla-0.57.0/debian/bootstrap.py --- cargo-mozilla-0.47.0/debian/bootstrap.py 2018-11-04 11:47:23.000000000 +0000 +++ cargo-mozilla-0.57.0/debian/bootstrap.py 1970-01-01 00:00:00.000000000 +0000 @@ -1,1465 +0,0 @@ -#!/usr/bin/env python -""" -NOTE: This script has not been used for a very long time and very likely won't -work. Please read the code before attempting to run it and hoping that "just -fixing the errors" will work. -- infinity0 - -About -===== - -This python script is design to do the bare minimum to compile and link the -Cargo binary for the purposes of bootstrapping itself on a new platform for -which cross-compiling isn't possible. I wrote this specifically to bootstrap -Cargo on [Bitrig](https://bitrig.org). Bitrig is a fork of OpenBSD that uses -clang/clang++ and other BSD licensed tools instead of GNU licensed software. -Cross compiling from another platform is extremely difficult because of the -alternative toolchain Bitrig uses. - -With this script, all that should be necessary to run this is a working Rust -toolchain, Python, and Git. - -This script will not set up a full cargo cache or anything. It works by -cloning the cargo index and then starting with the cargo dependencies, it -recursively builds the dependency tree. Once it has the dependency tree, it -starts with the leaves of the tree, doing a breadth first traversal and for -each dependency, it clones the repo, sets the repo's head to the correct -revision and then executes the build command specified in the cargo config. - -This bootstrap script uses a temporary directory to store the built dependency -libraries and uses that as a link path when linking dependencies and the -cargo binary. The goal is to create a statically linked cargo binary that is -capable of being used as a "local cargo" when running the main cargo Makefiles. - -Dependencies -============ - -* pytoml -- used for parsing toml files. - https://github.com/avakar/pytoml - -* dulwich -- used for working with git repos. - https://git.samba.org/?p=jelmer/dulwich.git;a=summary - -Both can be installed via the pip tool: - -```sh -sudo pip install pytoml dulwich -``` - -Command Line Options -==================== - -``` ---cargo-root specify the path to the cargo repo root. ---target-dir specify the location to store build results. ---crate-index path to where crates.io index shoudl be cloned ---no-clone don't clone crates.io index, --crate-index must point to existing clone. ---no-clean don't remove the folders created during bootstrapping. ---download only download the crates needed to bootstrap cargo. ---graph output dot format graph of dependencies. ---target build target: e.g. x86_64-unknown-bitrig ---host host machine: e.g. x86_64-unknown-linux-gnu ---urls-file file to write crate URLs to ---blacklist list of blacklisted crates to skip ---include-optional list of optional crates to include ---patchdir directory containing patches to apply to crates after fetching them ---save-crate if set, save .crate file when downloading -``` - -The `--cargo-root` option defaults to the current directory if unspecified. The -target directory defaults to Python equivilent of `mktemp -d` if unspecified. -The `--crate-index` option specifies where the crates.io index will be cloned. Or, -if you already have a clone of the index, the crates index should point there -and you should also specify `--no-clone`. The `--target` option is used to -specify which platform you are bootstrapping for. The `--host` option defaults -to the value of the `--target` option when not specified. - -Examples -======== - -To bootstrap Cargo on (Bitrig)[https://bitrig.org] I followed these steps: - -* Cloned this [bootstrap script repo](https://github.com/dhuseby/cargo-bootstra) -to `/tmp/bootstrap`. -* Cloned the [crates.io index](https://github.com/rust-lang/crates.io-index) -to `/tmp/index`. -* Created a target folder, `/tmp/out`, for the output. -* Cloned the (Cargo)[https://github.com/rust-lang/cargo] repo to `/tmp/cargo`. -* Copied the bootstrap.py script to the cargo repo root. -* Ran the bootstrap.py script like so: -```sh -./bootstrap.py --crate-index /tmp/index --target-dir /tmp/out --no-clone --no-clean --target x86_64-unknown-bitrig -``` - -After the script completed, there is a Cargo executable named `cargo-0_2_0` in -`/tmp/out`. That executable can then be used to bootstrap Cargo from source by -specifying it as the `--local-cargo` option to Cargo's `./configure` script. -""" - -import argparse -import cStringIO -import hashlib -import inspect -import json -import os -import re -import shutil -import subprocess -import sys -import tarfile -import tempfile -import urlparse -import socket -# In Debian crates are already downloaded when we bootstrap cargo. -# import requests -import pytoml as toml -import dulwich.porcelain as git -from glob import glob - - -TARGET = None -HOST = None -GRAPH = None -URLS_FILE = None -CRATE_CACHE = None -CRATES_INDEX = 'git://github.com/rust-lang/crates.io-index.git' -CARGO_REPO = 'git://github.com/rust-lang/cargo.git' -CRATE_API_DL = 'https://crates.io/api/v1/crates/%s/%s/download' -SV_RANGE = re.compile(r'^(?P(?:\<=|\>=|=|\<|\>|\^|\~))?\s*' - r'(?P(?:\*|0|[1-9][0-9]*))' - r'(\.(?P(?:\*|0|[1-9][0-9]*)))?' - r'(\.(?P(?:\*|0|[1-9][0-9]*)))?' - r'(\-(?P[0-9A-Za-z-]+(\.[0-9A-Za-z-]+)*))?' - r'(\+(?P[0-9A-Za-z-]+(\.[0-9A-Za-z-]+)*))?$') -SEMVER = re.compile(r'^\s*(?P(?:0|[1-9][0-9]*))' - r'(\.(?P(?:0|[1-9][0-9]*)))?' - r'(\.(?P(?:0|[1-9][0-9]*)))?' - r'(\-(?P[0-9A-Za-z-]+(\.[0-9A-Za-z-]+)*))?' - r'(\+(?P[0-9A-Za-z-]+(\.[0-9A-Za-z-]+)*))?$') -BSCRIPT = re.compile(r'^cargo:(?P([^\s=]+))(=(?P.+))?$') -BNAME = re.compile('^(lib)?(?P([^_]+))(_.*)?$') -BUILT = {} -CRATES = {} -CVER = re.compile("-([^-]+)$") -UNRESOLVED = [] -PFX = [] -BLACKLIST = [] -INCLUDE_OPTIONAL = [] - -def dbgCtx(f): - def do_dbg(self, *cargs): - PFX.append(self.name()) - ret = f(self, *cargs) - PFX.pop() - return ret - return do_dbg - -def dbg(s): - print '%s: %s' % (':'.join(PFX), s) - - -class PreRelease(object): - - def __init__(self, pr): - self._container = [] - if pr is not None: - self._container += str(pr).split('.') - - def __str__(self): - return '.'.join(self._container) - - def __repr__(self): - return self._container - - def __getitem__(self, key): - return self._container[key] - - def __len__(self): - return len(self._container) - - def __gt__(self, rhs): - return not ((self < rhs) or (self == rhs)) - - def __ge__(self, rhs): - return not (self < rhs) - - def __le__(self, rhs): - return not (self > rhs) - - def __eq__(self, rhs): - return self._container == rhs._container - - def __ne__(self, rhs): - return not (self == rhs) - - def __lt__(self, rhs): - if self == rhs: - return False - - # not having a pre-release is higher precedence - if len(self) == 0: - if len(rhs) == 0: - return False - else: - # 1.0.0 > 1.0.0-alpha - return False - else: - if len(rhs) is None: - # 1.0.0-alpha < 1.0.0 - return True - - # if both have one, then longer pre-releases are higher precedence - if len(self) > len(rhs): - # 1.0.0-alpha.1 > 1.0.0-alpha - return False - elif len(self) < len(rhs): - # 1.0.0-alpha < 1.0.0-alpha.1 - return True - - # if both have the same length pre-release, must check each piece - # numeric sub-parts have lower precedence than non-numeric sub-parts - # non-numeric sub-parts are compared lexically in ASCII sort order - for l,r in zip(self, rhs): - if l.isdigit(): - if r.isdigit(): - if int(l) < int(r): - # 2 > 1 - return True - elif int(l) > int(r): - # 1 < 2 - return False - else: - # 1 == 1 - continue - else: - # 1 < 'foo' - return True - else: - if r.isdigit(): - # 'foo' > 1 - return False - - # both are non-numeric - if l < r: - return True - elif l > r: - return False - - raise RuntimeError('PreRelease __lt__ failed') - - -class Semver(dict): - - def __init__(self, sv): - match = SEMVER.match(str(sv)) - if match is None: - raise ValueError('%s is not a valid semver string' % sv) - - self._input = sv - self.update(match.groupdict()) - self.prerelease = PreRelease(self['prerelease']) - - def __str__(self): - major, minor, patch, prerelease, build = self.parts_raw() - s = '' - if major is None: - s += '0' - else: - s += major - s += '.' - if minor is None: - s += '0' - else: - s += minor - s += '.' - if patch is None: - s += '0' - else: - s += patch - if len(self.prerelease): - s += '-' + str(self.prerelease) - if build is not None: - s += '+' + build - return s - - def __hash__(self): - return hash(str(self)) - - def as_range(self): - return SemverRange('=%s' % self) - - def parts(self): - major, minor, patch, prerelease, build = self.parts_raw() - if major is None: - major = '0' - if minor is None: - minor = '0' - if patch is None: - patch = '0' - return (int(major),int(minor),int(patch),prerelease,build) - - def parts_raw(self): - return (self['major'],self['minor'],self['patch'],self['prerelease'],self['build']) - - def __lt__(self, rhs): - lmaj,lmin,lpat,lpre,_ = self.parts() - rmaj,rmin,rpat,rpre,_ = rhs.parts() - if lmaj < rmaj: - return True - if lmaj > rmaj: - return False - if lmin < rmin: - return True - if lmin > rmin: - return False - if lpat < rpat: - return True - if lpat > rpat: - return False - if lpre is not None and rpre is None: - return True - if lpre is not None and rpre is not None: - if self.prerelease < rhs.prerelease: - return True - return False - - def __le__(self, rhs): - return not (self > rhs) - - def __gt__(self, rhs): - return not ((self < rhs) or (self == rhs)) - - def __ge__(self, rhs): - return not (self < rhs) - - def __eq__(self, rhs): - # build metadata is only considered for equality - lmaj,lmin,lpat,lpre,lbld = self.parts() - rmaj,rmin,rpat,rpre,rbld = rhs.parts() - return lmaj == rmaj and \ - lmin == rmin and \ - lpat == rpat and \ - lpre == rpre and \ - lbld == rbld - - def __ne__(self, rhs): - return not (self == rhs) - - -class SemverRange(object): - - def __init__(self, sv): - self._input = sv - self._lower = None - self._upper = None - self._op = None - self._semver = None - - sv = str(sv) - svs = [x.strip() for x in sv.split(',')] - - if len(svs) > 1: - self._op = '^' - for sr in svs: - rang = SemverRange(sr) - if rang.lower() is not None: - if self._lower is None or rang.lower() < self._lower: - self._lower = rang.lower() - if rang.upper() is not None: - if self._upper is None or rang.upper() > self._upper: - self._upper = rang.upper() - op, semver = rang.op_semver() - if semver is not None: - if op == '>=': - if self._lower is None or semver < self._lower: - self._lower = semver - if op == '<': - if self._upper is None or semver > self._upper: - self._upper = semver - return - - match = SV_RANGE.match(sv) - if match is None: - raise ValueError('%s is not a valid semver range string' % sv) - - svm = match.groupdict() - op, major, minor, patch, prerelease, build = svm['op'], svm['major'], svm['minor'], svm['patch'], svm['prerelease'], svm['build'] - prerelease = PreRelease(prerelease) - - # fix up the op - if op is None: - if major == '*' or minor == '*' or patch == '*': - op = '*' - else: - # if no op was specified and there are no wildcards, then op - # defaults to '^' - op = '^' - else: - self._semver = Semver(sv[len(op):]) - - if op not in ('<=', '>=', '<', '>', '=', '^', '~', '*'): - raise ValueError('%s is not a valid semver operator' % op) - - self._op = op - - # lower bound - def find_lower(): - if op in ('<=', '<', '=', '>', '>='): - return None - - if op == '*': - # wildcards specify a range - if major == '*': - return Semver('0.0.0') - elif minor == '*': - return Semver(major + '.0.0') - elif patch == '*': - return Semver(major + '.' + minor + '.0') - elif op == '^': - # caret specifies a range - if patch is None: - if minor is None: - # ^0 means >=0.0.0 and <1.0.0 - return Semver(major + '.0.0') - else: - # ^0.0 means >=0.0.0 and <0.1.0 - return Semver(major + '.' + minor + '.0') - else: - # ^0.0.1 means >=0.0.1 and <0.0.2 - # ^0.1.2 means >=0.1.2 and <0.2.0 - # ^1.2.3 means >=1.2.3 and <2.0.0 - if int(major) == 0: - if int(minor) == 0: - # ^0.0.1 - return Semver('0.0.' + patch) - else: - # ^0.1.2 - return Semver('0.' + minor + '.' + patch) - else: - # ^1.2.3 - return Semver(major + '.' + minor + '.' + patch) - elif op == '~': - # tilde specifies a minimal range - if patch is None: - if minor is None: - # ~0 means >=0.0.0 and <1.0.0 - return Semver(major + '.0.0') - else: - # ~0.0 means >=0.0.0 and <0.1.0 - return Semver(major + '.' + minor + '.0') - else: - # ~0.0.1 means >=0.0.1 and <0.1.0 - # ~0.1.2 means >=0.1.2 and <0.2.0 - # ~1.2.3 means >=1.2.3 and <1.3.0 - return Semver(major + '.' + minor + '.' + patch) - - raise RuntimeError('No lower bound') - self._lower = find_lower() - - def find_upper(): - if op in ('<=', '<', '=', '>', '>='): - return None - - if op == '*': - # wildcards specify a range - if major == '*': - return None - elif minor == '*': - return Semver(str(int(major) + 1) + '.0.0') - elif patch == '*': - return Semver(major + '.' + str(int(minor) + 1) + '.0') - elif op == '^': - # caret specifies a range - if patch is None: - if minor is None: - # ^0 means >=0.0.0 and <1.0.0 - return Semver(str(int(major) + 1) + '.0.0') - else: - # ^0.0 means >=0.0.0 and <0.1.0 - return Semver(major + '.' + str(int(minor) + 1) + '.0') - else: - # ^0.0.1 means >=0.0.1 and <0.0.2 - # ^0.1.2 means >=0.1.2 and <0.2.0 - # ^1.2.3 means >=1.2.3 and <2.0.0 - if int(major) == 0: - if int(minor) == 0: - # ^0.0.1 - return Semver('0.0.' + str(int(patch) + 1)) - else: - # ^0.1.2 - return Semver('0.' + str(int(minor) + 1) + '.0') - else: - # ^1.2.3 - return Semver(str(int(major) + 1) + '.0.0') - elif op == '~': - # tilde specifies a minimal range - if patch is None: - if minor is None: - # ~0 means >=0.0.0 and <1.0.0 - return Semver(str(int(major) + 1) + '.0.0') - else: - # ~0.0 means >=0.0.0 and <0.1.0 - return Semver(major + '.' + str(int(minor) + 1) + '.0') - else: - # ~0.0.1 means >=0.0.1 and <0.1.0 - # ~0.1.2 means >=0.1.2 and <0.2.0 - # ~1.2.3 means >=1.2.3 and <1.3.0 - return Semver(major + '.' + str(int(minor) + 1) + '.0') - - raise RuntimeError('No upper bound') - self._upper = find_upper() - - def __repr__(self): - return "SemverRange(%s, op=%s, semver=%s, lower=%s, upper=%s)" % (repr(self._input), self._op, self._semver, self._lower, self._upper) - - def __str__(self): - return self._input - - def lower(self): - return self._lower - - def upper(self): - return self._upper - - def op_semver(self): - return self._op, self._semver - - def compare(self, sv): - if not isinstance(sv, Semver): - sv = Semver(sv) - - op = self._op - if op == '*': - if self._semver is not None and self._semver['major'] == '*': - return sv >= Semver('0.0.0') - if self._lower is not None and sv < self._lower: - return False - if self._upper is not None and sv >= self._upper: - return False - return True - elif op == '^': - return (sv >= self._lower) and (sv < self._upper) - elif op == '~': - return (sv >= self._lower) and (sv < self._upper) - elif op == '<=': - return sv <= self._semver - elif op == '>=': - return sv >= self._semver - elif op == '<': - return sv < self._semver - elif op == '>': - return sv > self._semver - elif op == '=': - return sv == self._semver - - raise RuntimeError('Semver comparison failed to find a matching op') - - -def test_semver(): - """ - Tests for Semver parsing. Run using py.test: py.test bootstrap.py - """ - assert str(Semver("1")) == "1.0.0" - assert str(Semver("1.1")) == "1.1.0" - assert str(Semver("1.1.1")) == "1.1.1" - assert str(Semver("1.1.1-alpha")) == "1.1.1-alpha" - assert str(Semver("1.1.1-alpha.1")) == "1.1.1-alpha.1" - assert str(Semver("1.1.1-alpha+beta")) == "1.1.1-alpha+beta" - assert str(Semver("1.1.1-alpha+beta.1")) == "1.1.1-alpha+beta.1" - -def test_semver_eq(): - assert Semver("1") == Semver("1.0.0") - assert Semver("1.1") == Semver("1.1.0") - assert Semver("1.1.1") == Semver("1.1.1") - assert Semver("1.1.1-alpha") == Semver("1.1.1-alpha") - assert Semver("1.1.1-alpha.1") == Semver("1.1.1-alpha.1") - assert Semver("1.1.1-alpha+beta") == Semver("1.1.1-alpha+beta") - assert Semver("1.1.1-alpha.1+beta") == Semver("1.1.1-alpha.1+beta") - assert Semver("1.1.1-alpha.1+beta.1") == Semver("1.1.1-alpha.1+beta.1") - -def test_semver_comparison(): - assert Semver("1") < Semver("2.0.0") - assert Semver("1.1") < Semver("1.2.0") - assert Semver("1.1.1") < Semver("1.1.2") - assert Semver("1.1.1-alpha") < Semver("1.1.1") - assert Semver("1.1.1-alpha") < Semver("1.1.1-beta") - assert Semver("1.1.1-alpha") < Semver("1.1.1-beta") - assert Semver("1.1.1-alpha") < Semver("1.1.1-alpha.1") - assert Semver("1.1.1-alpha.1") < Semver("1.1.1-alpha.2") - assert Semver("1.1.1-alpha+beta") < Semver("1.1.1+beta") - assert Semver("1.1.1-alpha+beta") < Semver("1.1.1-beta+beta") - assert Semver("1.1.1-alpha+beta") < Semver("1.1.1-beta+beta") - assert Semver("1.1.1-alpha+beta") < Semver("1.1.1-alpha.1+beta") - assert Semver("1.1.1-alpha.1+beta") < Semver("1.1.1-alpha.2+beta") - assert Semver("0.5") < Semver("2.0") - assert not (Semver("2.0") < Semver("0.5")) - assert not (Semver("0.5") > Semver("2.0")) - assert not (Semver("0.5") >= Semver("2.0")) - assert Semver("2.0") >= Semver("0.5") - assert Semver("2.0") > Semver("0.5") - assert not (Semver("2.0") > Semver("2.0")) - assert not (Semver("2.0") < Semver("2.0")) - -def test_semver_range(): - def bounds(spec, lowe, high): - lowe = Semver(lowe) if lowe is not None else lowe - high = Semver(high) if high is not None else high - assert SemverRange(spec).lower() == lowe and SemverRange(spec).upper() == high - bounds('0', '0.0.0', '1.0.0') - bounds('0.0', '0.0.0', '0.1.0') - bounds('0.0.0', '0.0.0', '0.0.1') - bounds('0.0.1', '0.0.1', '0.0.2') - bounds('0.1.1', '0.1.1', '0.2.0') - bounds('1.1.1', '1.1.1', '2.0.0') - bounds('^0', '0.0.0', '1.0.0') - bounds('^0.0', '0.0.0', '0.1.0') - bounds('^0.0.0', '0.0.0', '0.0.1') - bounds('^0.0.1', '0.0.1', '0.0.2') - bounds('^0.1.1', '0.1.1', '0.2.0') - bounds('^1.1.1', '1.1.1', '2.0.0') - bounds('~0', '0.0.0', '1.0.0') - bounds('~0.0', '0.0.0', '0.1.0') - bounds('~0.0.0', '0.0.0', '0.1.0') - bounds('~0.0.1', '0.0.1', '0.1.0') - bounds('~0.1.1', '0.1.1', '0.2.0') - bounds('~1.1.1', '1.1.1', '1.2.0') - bounds('*', '0.0.0', None) - bounds('0.*', '0.0.0', '1.0.0') - bounds('0.0.*', '0.0.0', '0.1.0') - - -def test_semver_multirange(): - assert SemverRange(">= 0.5, < 2.0").compare("1.0.0") - assert SemverRange("*").compare("0.2.7") - - -class Runner(object): - - def __init__(self, c, e, cwd=None): - self._cmd = c - if not isinstance(self._cmd, list): - self._cmd = [self._cmd] - self._env = e - self._stdout = [] - self._stderr = [] - self._returncode = 0 - self._cwd = cwd - - def __call__(self, c, e): - cmd = self._cmd + c - env = dict(self._env, **e) - #dbg(' env: %s' % env) - #dbg(' cwd: %s' % self._cwd) - envstr = '' - for k, v in env.iteritems(): - envstr += ' %s="%s"' % (k, v) - if self._cwd is not None: - dbg('cd %s && %s %s' % (self._cwd, envstr, ' '.join(cmd))) - else: - dbg('%s %s' % (envstr, ' '.join(cmd))) - - proc = subprocess.Popen(cmd, env=env, - stdout=subprocess.PIPE, stderr=subprocess.PIPE, - cwd=self._cwd) - out, err = proc.communicate() - - for lo in out.split('\n'): - if len(lo) > 0: - self._stdout.append(lo) - #dbg('out: %s' % lo) - - for le in err.split('\n'): - if len(le) > 0: - self._stderr.append(le) - dbg(le) - - """ - while proc.poll() is None: - lo = proc.stdout.readline().rstrip('\n') - le = proc.stderr.readline().rstrip('\n') - if len(lo) > 0: - self._stdout.append(lo) - dbg(lo) - sys.stdout.flush() - if len(le) > 0: - self._stderr.append(le) - dbg('err: %s', le) - sys.stdout.flush() - """ - self._returncode = proc.wait() - #dbg(' ret: %s' % self._returncode) - return self._stdout - - def output(self): - return self._stdout - - def returncode(self): - return self._returncode - -class RustcRunner(Runner): - - def __call__(self, c, e): - super(RustcRunner, self).__call__(c, e) - return ([], {}, {}) - -class BuildScriptRunner(Runner): - - def __call__(self, c, e): - #dbg('XXX Running build script:'); - #dbg(' env: %s' % e) - #dbg(' '.join(self._cmd + c)) - super(BuildScriptRunner, self).__call__(c, e) - - # parse the output for cargo: lines - cmd = [] - env = {} - denv = {} - for l in self.output(): - match = BSCRIPT.match(str(l)) - if match is None: - continue - pieces = match.groupdict() - k = pieces['key'] - v = pieces['value'] - - if k == 'rustc-link-lib': - #dbg('YYYYYY: adding -l %s' % v) - cmd += ['-l', v] - elif k == 'rustc-link-search': - #dbg("adding link search path: %s" % v) - cmd += ['-L', v] - elif k == 'rustc-cfg': - cmd += ['--cfg', v] - env['CARGO_FEATURE_%s' % v.upper().replace('-', '_')] = 1 - else: - #dbg("env[%s] = %s" % (k, v)); - denv[k] = v - return (cmd, env, denv) - -class Crate(object): - - def __init__(self, crate, ver, deps, cdir, build): - self._crate = str(crate) - self._version = Semver(ver) - self._dep_info = deps - self._dir = cdir - # put the build scripts first - self._build = [x for x in build if x.get('type') == 'build_script'] - # then add the lib/bin builds - self._build += [x for x in build if x.get('type') != 'build_script'] - self._resolved = False - self._deps = {} - self._refs = [] - self._env = {} - self._dep_env = {} - self._extra_flags = [] - - def name(self): - return self._crate - - def dep_info(self): - return self._dep_info - - def version(self): - return self._version - - def dir(self): - return self._dir - - def __str__(self): - return '%s-%s' % (self.name(), self.version()) - - def add_dep(self, crate, features): - if str(crate) in self._deps: - return - - features = [str(x) for x in features] - self._deps[str(crate)] = { 'features': features } - crate.add_ref(self) - - def add_ref(self, crate): - if str(crate) not in self._refs: - self._refs.append(str(crate)) - - def resolved(self): - return self._resolved - - @dbgCtx - def resolve(self, tdir, idir, nodl, graph=None): - if self._resolved: - return - if str(self) in CRATES: - return - - if self._dep_info is not None: - print '' - dbg('Resolving dependencies for: %s' % str(self)) - for d in self._dep_info: - kind = d.get('kind', 'normal') - if kind not in ('normal', 'build'): - print '' - dbg('Skipping %s dep %s' % (kind, d['name'])) - continue - - optional = d.get('optional', False) - if optional and d['name'] not in INCLUDE_OPTIONAL: - print '' - dbg('Skipping optional dep %s' % d['name']) - continue - - svr = SemverRange(d['req']) - print '' - deps = [] - dbg('Looking up info for %s %s' % (d['name'], str(svr))) - if d.get('local', None) is None: - # go through crates first to see if the is satisfied already - dcrate = find_crate_by_name_and_semver(d['name'], svr) - if dcrate is not None: - #import pdb; pdb.set_trace() - svr = dcrate.version().as_range() - name, ver, ideps, ftrs, cksum = crate_info_from_index(idir, d['name'], svr) - if name in BLACKLIST: - dbg('Found in blacklist, skipping %s' % (name)) - elif dcrate is None: - if nodl: - cdir = find_downloaded_crate(tdir, name, svr) - else: - cdir = dl_and_check_crate(tdir, name, ver, cksum) - _, tver, tdeps, build = crate_info_from_toml(cdir) - deps += ideps - deps += tdeps - else: - dbg('Found crate already satisfying %s %s' % (d['name'], str(svr))) - deps += dcrate.dep_info() - else: - cdir = d['path'] - name, ver, ideps, build = crate_info_from_toml(cdir) - deps += ideps - - if name not in BLACKLIST: - try: - if dcrate is None: - dcrate = Crate(name, ver, deps, cdir, build) - if str(dcrate) in CRATES: - dcrate = CRATES[str(dcrate)] - UNRESOLVED.append(dcrate) - if graph is not None: - print >> graph, '"%s" -> "%s";' % (str(self), str(dcrate)) - - except: - dcrate = None - - # clean up the list of features that are enabled - tftrs = d.get('features', []) - if isinstance(tftrs, dict): - tftrs = tftrs.keys() - else: - tftrs = [x for x in tftrs if len(x) > 0] - - # add 'default' if default_features is true - if d.get('default_features', True): - tftrs.append('default') - - features = [] - if isinstance(ftrs, dict): - # add any available features that are activated by the - # dependency entry in the parent's dependency record, - # and any features they depend on recursively - def add_features(f): - if f in ftrs: - for k in ftrs[f]: - # guard against infinite recursion - if not k in features: - features.append(k) - add_features(k) - for k in tftrs: - add_features(k) - else: - features += [x for x in ftrs if (len(x) > 0) and (x in tftrs)] - - if dcrate is not None: - self.add_dep(dcrate, features) - - self._resolved = True - CRATES[str(self)] = self - - @dbgCtx - def build(self, by, out_dir, features=[]): - extra_filename = '-' + str(self.version()).replace('.','_') - output_name = self.name().replace('-','_') - output = os.path.join(out_dir, 'lib%s%s.rlib' % (output_name, extra_filename)) - - if str(self) in BUILT: - return ({'name':self.name(), 'lib':output}, self._env, self._extra_flags) - - externs = [] - extra_flags = [] - for dep,info in self._deps.iteritems(): - if dep in CRATES: - extern, env, extra_flags = CRATES[dep].build(self, out_dir, info['features']) - externs.append(extern) - self._dep_env[CRATES[dep].name()] = env - self._extra_flags += extra_flags - - if os.path.isfile(output): - print '' - dbg('Skipping %s, already built (needed by: %s)' % (str(self), str(by))) - BUILT[str(self)] = str(by) - return ({'name':self.name(), 'lib':output}, self._env, self._extra_flags) - - # build the environment for subcommands - tenv = dict(os.environ) - env = {} - env['PATH'] = tenv['PATH'] - env['OUT_DIR'] = out_dir - env['TARGET'] = TARGET - env['HOST'] = HOST - env['NUM_JOBS'] = '1' - env['OPT_LEVEL'] = '0' - env['DEBUG'] = '0' - env['PROFILE'] = 'release' - env['CARGO_MANIFEST_DIR'] = self.dir() - env['CARGO_PKG_VERSION_MAJOR'] = self.version()['major'] - env['CARGO_PKG_VERSION_MINOR'] = self.version()['minor'] - env['CARGO_PKG_VERSION_PATCH'] = self.version()['patch'] - pre = self.version()['prerelease'] - if pre is None: - pre = '' - env['CARGO_PKG_VERSION_PRE'] = pre - env['CARGO_PKG_VERSION'] = str(self.version()) - for f in features: - env['CARGO_FEATURE_%s' % f.upper().replace('-','_')] = '1' - for l,e in self._dep_env.iteritems(): - for k,v in e.iteritems(): - if type(v) is not str and type(v) is not unicode: - v = str(v) - env['DEP_%s_%s' % (l.upper(), v.upper())] = v - - # create the builders, build scrips are first - cmds = [] - for b in self._build: - v = str(self._version).replace('.','_') - cmd = ['rustc'] - cmd.append(os.path.join(self._dir, b['path'])) - cmd.append('--crate-name') - if b['type'] == 'lib': - b.setdefault('name', self.name()) - cmd.append(b['name'].replace('-','_')) - cmd.append('--crate-type') - cmd.append('lib') - elif b['type'] == 'build_script': - cmd.append('build_script_%s' % b['name'].replace('-','_')) - cmd.append('--crate-type') - cmd.append('bin') - else: - cmd.append(b['name'].replace('-','_')) - cmd.append('--crate-type') - cmd.append('bin') - - for f in features: - cmd.append('--cfg') - cmd.append('feature=\"%s\"' % f) - - cmd.append('-C') - cmd.append('extra-filename=' + extra_filename) - - cmd.append('--out-dir') - cmd.append('%s' % out_dir) - cmd.append('--emit=dep-info,link') - cmd.append('--target') - cmd.append(TARGET) - cmd.append('-L') - cmd.append('%s' % out_dir) - cmd.append('-L') - cmd.append('%s/lib' % out_dir) - - - # add in the flags from dependencies - cmd += self._extra_flags - - for e in externs: - cmd.append('--extern') - cmd.append('%s=%s' % (e['name'].replace('-','_'), e['lib'])) - - # get the pkg key name - match = BNAME.match(b['name']) - if match is not None: - match = match.groupdict()['name'].replace('-','_') - - # queue up the runner - cmds.append({'name':b['name'], 'env_key':match, 'cmd':RustcRunner(cmd, env)}) - - # queue up the build script runner - if b['type'] == 'build_script': - bcmd = os.path.join(out_dir, 'build_script_%s-%s' % (b['name'], v)) - cmds.append({'name':b['name'], 'env_key':match, 'cmd':BuildScriptRunner(bcmd, env, self._dir)}) - - print '' - dbg('Building %s (needed by: %s)' % (str(self), str(by))) - - bcmd = [] - benv = {} - for c in cmds: - runner = c['cmd'] - - (c1, e1, e2) = runner(bcmd, benv) - - if runner.returncode() != 0: - raise RuntimeError('build command failed: %s' % runner.returncode()) - - bcmd += c1 - benv = dict(benv, **e1) - - key = c['env_key'] - for k,v in e2.iteritems(): - self._env['DEP_%s_%s' % (key.upper(), k.upper())] = v - - #dbg('XXX cmd: %s' % bcmd) - #dbg('XXX env: %s' % benv) - #dbg('XXX denv: %s' % self._env) - #print '' - - BUILT[str(self)] = str(by) - return ({'name':self.name(), 'lib':output}, self._env, bcmd) - - -def dl_crate(url, depth=0): - if depth > 10: - raise RuntimeError('too many redirects') - - r = requests.get(url) - try: - dbg('%sconnected to %s...%s' % ((' ' * depth), r.url, r.status_code)) - - if URLS_FILE is not None: - with open(URLS_FILE, "a") as f: - f.write(r.url + "\n") - - return r.content - finally: - r.close() - -def dl_and_check_crate(tdir, name, ver, cksum): - cname = '%s-%s' % (name, ver) - cdir = os.path.join(tdir, cname) - if cname in CRATES: - dbg('skipping %s...already downloaded' % cname) - return cdir - - def check_checksum(buf): - if (cksum is not None): - h = hashlib.sha256() - h.update(buf) - if h.hexdigest() == cksum: - dbg('Checksum is good...%s' % cksum) - else: - dbg('Checksum is BAD (%s != %s)' % (h.hexdigest(), cksum)) - - if CRATE_CACHE: - cachename = os.path.join(CRATE_CACHE, "%s.crate" % (cname)) - if os.path.isfile(cachename): - dbg('found crate in cache...%s.crate' % (cname)) - buf = open(cachename).read() - check_checksum(buf) - with tarfile.open(fileobj=cStringIO.StringIO(buf)) as tf: - dbg('unpacking result to %s...' % cdir) - tf.extractall(path=tdir) - return cdir - - if not os.path.isdir(cdir): - dbg('Downloading %s source to %s' % (cname, cdir)) - dl = CRATE_API_DL % (name, ver) - buf = dl_crate(dl) - check_checksum(buf) - - if CRATE_CACHE: - dbg("saving crate to %s/%s.crate..." % (CRATE_CACHE, cname)) - with open(os.path.join(CRATE_CACHE, "%s.crate" % (cname)), "wb") as f: - f.write(buf) - - fbuf = cStringIO.StringIO(buf) - with tarfile.open(fileobj=fbuf) as tf: - dbg('unpacking result to %s...' % cdir) - tf.extractall(path=tdir) - - return cdir - - -def find_downloaded_crate(tdir, name, svr): - exists = glob("%s/%s-[0-9]*" % (tdir, name)) - if not exists: - raise RuntimeError("crate does not exist and have --no-download: %s" % name) - - # First, grok the available versions. - aver = sorted([Semver(CVER.search(x).group(1)) for x in exists]) - - # Now filter the "suitable" versions based on our version range. - sver = filter(svr.compare, aver) - if not sver: - raise RuntimeError("unable to satisfy dependency %s %s from %s; try running without --no-download" % (name, svr, map(str, aver))) - - cver = sver[-1] - return "%s/%s-%s" % (tdir, name, cver) - - -def crate_info_from_toml(cdir): - try: - with open(os.path.join(cdir, 'Cargo.toml'), 'rb') as ctoml: - #import pdb; pdb.set_trace() - cfg = toml.load(ctoml) - build = [] - p = cfg.get('package',cfg.get('project', {})) - name = p.get('name', None) - #if name == 'num_cpus': - # import pdb; pdb.set_trace() - ver = p.get('version', None) - if (name is None) or (ver is None): - import pdb; pdb.set_trace() - raise RuntimeError('invalid .toml file format') - - # look for a "links" item - lnks = p.get('links', []) - if type(lnks) is not list: - lnks = [lnks] - - # look for a "build" item - bf = p.get('build', None) - - # if we have a 'links', there must be a 'build' - if len(lnks) > 0 and bf is None: - import pdb; pdb.set_trace() - raise RuntimeError('cargo requires a "build" item if "links" is specified') - - # there can be target specific build script overrides - boverrides = {} - for lnk in lnks: - boverrides.update(cfg.get('target', {}).get(TARGET, {}).get(lnk, {})) - - bmain = False - if bf is not None: - build.append({'type':'build_script', \ - 'path':[ bf ], \ - 'name':name.replace('-','_'), \ - 'links': lnks, \ - 'overrides': boverrides}) - - # look for libs array - libs = cfg.get('lib', []) - if type(libs) is not list: - libs = [libs] - for l in libs: - l['type'] = 'lib' - l['links'] = lnks - if l.get('path', None) is None: - l['path'] = [ 'lib.rs' ] - build.append(l) - bmain = True - - # look for bins array - bins = cfg.get('bin', []) - if type(bins) is not list: - bins = [bins] - for b in bins: - if b.get('path', None) is None: - b['path'] = [ os.path.join('bin', '%s.rs' % b['name']), os.path.join('bin', 'main.rs'), '%s.rs' % b['name'], 'main.rs' ] - build.append({'type': 'bin', \ - 'name':b['name'], \ - 'path':b['path'], \ - 'links': lnks}) - bmain = True - - # if no explicit directions on what to build, then add a default - if bmain == False: - build.append({'type':'lib', 'path':'lib.rs', 'name':name.replace('-','_')}) - - for b in build: - # make sure the path is a list of possible paths - if type(b['path']) is not list: - b['path'] = [ b['path'] ] - bin_paths = [] - for p in b['path']: - bin_paths.append(os.path.join(cdir, p)) - bin_paths.append(os.path.join(cdir, 'src', p)) - - found_path = None - for p in bin_paths: - if os.path.isfile(p): - found_path = p - break - - if found_path == None: - import pdb; pdb.set_trace() - raise RuntimeError('could not find %s to build in %s', (build, cdir)) - else: - b['path'] = found_path - - d = cfg.get('build-dependencies', {}) - d.update(cfg.get('dependencies', {})) - d.update(cfg.get('target', {}).get(TARGET, {}).get('dependencies', {})) - deps = [] - for k,v in d.iteritems(): - if type(v) is not dict: - deps.append({'name':k, 'req': v}) - elif 'path' in v: - if v.get('version', None) is None: - deps.append({'name':k, 'path':os.path.join(cdir, v['path']), 'local':True, 'req':0}) - else: - opts = v.get('optional',False) - ftrs = v.get('features',[]) - deps.append({'name':k, 'path': v['path'], 'req':v['version'], 'features':ftrs, 'optional':opts}) - else: - opts = v.get('optional',False) - ftrs = v.get('features',[]) - deps.append({'name':k, 'req':v['version'], 'features':ftrs, 'optional':opts}) - - return (name, ver, deps, build) - - except Exception, e: - dbg('failed to load toml file for: %s (%s)' % (cdir, str(e))) - import pdb; pdb.set_trace() - - return (None, None, [], 'lib.rs') - - -def crate_info_from_index(idir, name, svr): - if len(name) == 1: - ipath = os.path.join(idir, '1', name) - elif len(name) == 2: - ipath = os.path.join(idir, '2', name) - elif len(name) == 3: - ipath = os.path.join(idir, '3', name[0:1], name) - else: - ipath = os.path.join(idir, name[0:2], name[2:4], name) - - dbg('opening crate info: %s' % ipath) - dep_infos = [] - with open(ipath, 'rb') as fin: - lines = fin.readlines() - for l in lines: - dep_infos.append(json.loads(l)) - - passed = {} - for info in dep_infos: - if 'vers' not in info: - continue - sv = Semver(info['vers']) - if svr.compare(sv): - passed[sv] = info - - keys = sorted(passed.iterkeys()) - best_match = keys.pop() - dbg('best match is %s-%s' % (name, best_match)) - best_info = passed[best_match] - name = best_info.get('name', None) - ver = best_info.get('vers', None) - deps = best_info.get('deps', []) - ftrs = best_info.get('features', []) - cksum = best_info.get('cksum', None) - - # only include deps without a 'target' or ones with matching 'target' - deps = [x for x in deps if x.get('target', TARGET) == TARGET] - - return (name, ver, deps, ftrs, cksum) - - -def find_crate_by_name_and_semver(name, svr): - for c in CRATES.itervalues(): - if c.name() == name and svr.compare(c.version()): - return c - for c in UNRESOLVED: - if c.name() == name and svr.compare(c.version()): - return c - return None - - -def args_parser(): - parser = argparse.ArgumentParser(description='Cargo Bootstrap Tool') - parser.add_argument('--cargo-root', type=str, default=os.getcwd(), - help="specify the cargo repo root path") - parser.add_argument('--target-dir', type=str, default=tempfile.mkdtemp(), - help="specify the path for storing built dependency libs") - parser.add_argument('--crate-index', type=str, default=None, - help="path to where the crate index should be cloned") - parser.add_argument('--target', type=str, default=None, - help="target triple for machine we're bootstrapping for") - parser.add_argument('--host', type=str, default=None, - help="host triple for machine we're bootstrapping on") - parser.add_argument('--no-clone', action='store_true', - help="skip cloning crates index, --crate-index must point to an existing clone of the crates index") - parser.add_argument('--no-git', action='store_true', - help="don't assume that the crates index and cargo root are git repos; implies --no-clone") - parser.add_argument('--no-clean', action='store_true', - help="don't delete the target dir and crate index") - parser.add_argument('--download', action='store_true', - help="only download the crates needed to build cargo") - parser.add_argument('--no-download', action='store_true', - help="don't download any crates (fail if any do not exist)") - parser.add_argument('--graph', action='store_true', - help="output a dot graph of the dependencies") - parser.add_argument('--urls-file', type=str, default=None, - help="file to write crate URLs to") - parser.add_argument('--blacklist', type=str, default="", - help="space-separated list of crates to skip") - parser.add_argument('--include-optional', type=str, default="", - help="space-separated list of optional crates to include") - parser.add_argument('--patchdir', type=str, - help="directory with patches to apply after downloading crates. organized by crate/NNNN-description.patch") - parser.add_argument('--crate-cache', type=str, - help="download and save crates to crate cache (directory)") - return parser - - -def open_or_clone_repo(rdir, rurl, no_clone): - try: - repo = git.open_repo(rdir) - return repo - except: - repo = None - - if repo is None and no_clone is False: - dbg('Cloning %s to %s' % (rurl, rdir)) - return git.clone(rurl, rdir) - - if repo is None and no_clone is True: - repo = rdir - - return repo - - -def patch_crates(targetdir, patchdir): - """ - Apply patches in patchdir to downloaded crates - patchdir organization: - - / - / - .patch - """ - for patch in glob(os.path.join(patchdir, '*', '*.patch')): - crateid = os.path.basename(os.path.dirname(patch)) - m = re.match(r'^([A-Za-z0-9_-]+?)(?:-([\d.]+))?$', crateid) - if m: - cratename = m.group(1) - else: - cratename = crateid - if cratename != crateid: - dirs = glob(os.path.join(targetdir, crateid)) - else: - dirs = glob(os.path.join(targetdir, '%s-*' % (cratename))) - for cratedir in dirs: - # check if patch has been applied - patchpath = os.path.abspath(patch) - p = subprocess.Popen(['patch', '--dry-run', '-s', '-f', '-F', '10', '-p1', '-i', patchpath], cwd=cratedir) - rc = p.wait() - if rc == 0: - dbg("patching %s with patch %s" % (os.path.basename(cratedir), os.path.basename(patch))) - p = subprocess.Popen(['patch', '-s', '-F', '10', '-p1', '-i', patchpath], cwd=cratedir) - rc = p.wait() - if rc != 0: - dbg("%s: failed to apply %s (rc=%s)" % (os.path.basename(cratedir), os.path.basename(patch), rc)) - else: - dbg("%s: %s does not apply (rc=%s)" % (os.path.basename(cratedir), os.path.basename(patch), rc)) - - -if __name__ == "__main__": - try: - # parse args - parser = args_parser() - args = parser.parse_args() - - # clone the cargo index - if args.crate_index is None: - args.crate_index = os.path.normpath(os.path.join(args.target_dir, 'index')) - dbg('cargo: %s, target: %s, index: %s' % \ - (args.cargo_root, args.target_dir, args.crate_index)) - - TARGET = args.target - HOST = args.host - URLS_FILE = args.urls_file - BLACKLIST = args.blacklist.split() - INCLUDE_OPTIONAL = args.include_optional.split() - if args.crate_cache and os.path.isdir(args.crate_cache): - CRATE_CACHE = os.path.abspath(args.crate_cache) - - if not args.no_git: - index = open_or_clone_repo(args.crate_index, CRATES_INDEX, args.no_clone) - cargo = open_or_clone_repo(args.cargo_root, CARGO_REPO, args.no_clone) - - if index is None: - raise RuntimeError('You must have a local clone of the crates index, ' \ - 'omit --no-clone to allow this script to clone it for ' \ - 'you, or pass --no-git to bypass this check.') - if cargo is None: - raise RuntimeError('You must have a local clone of the cargo repo ' \ - 'so that this script can read the cargo toml file.') - - if TARGET is None: - raise RuntimeError('You must specify the target triple of this machine') - if HOST is None: - HOST = TARGET - - except Exception, e: - frame = inspect.trace()[-1] - print >> sys.stderr, "\nException:\n from %s, line %d:\n %s\n" % (frame[1], frame[2], e) - parser.print_help() - if not args.no_clean: - print "cleaning up %s" % (args.target_dir) - shutil.rmtree(args.target_dir) - sys.exit(1) - - try: - - # load cargo deps - name, ver, deps, build = crate_info_from_toml(args.cargo_root) - cargo_crate = Crate(name, ver, deps, args.cargo_root, build) - UNRESOLVED.append(cargo_crate) - - if args.graph: - GRAPH = open(os.path.join(args.target_dir, 'deps.dot'), 'wb') - print >> GRAPH, "digraph %s {" % name - - # resolve and download all of the dependencies - print '' - print '====================================' - print '===== DOWNLOADING DEPENDENCIES =====' - print '====================================' - while len(UNRESOLVED) > 0: - crate = UNRESOLVED.pop(0) - crate.resolve(args.target_dir, args.crate_index, args.no_download, GRAPH) - - if args.graph: - print >> GRAPH, "}" - GRAPH.close() - - if args.patchdir: - print '' - print '========================' - print '===== PATCH CRATES =====' - print '========================' - patch_crates(args.target_dir, args.patchdir) - - if args.download: - print "done downloading..." - sys.exit(0) - - # build cargo - print '' - print '==========================' - print '===== BUILDING CARGO =====' - print '==========================' - cargo_crate.build('bootstrap.py', args.target_dir) - - # cleanup - if not args.no_clean: - print "cleaning up %s..." % (args.target_dir) - shutil.rmtree(args.target_dir) - print "done" - - except Exception, e: - frame = inspect.trace()[-1] - print >> sys.stderr, "\nException:\n from %s, line %d:\n %s\n" % (frame[1], frame[2], e) - if not args.no_clean: - print "cleaning up %s..." % (args.target_dir) - shutil.rmtree(args.target_dir) - sys.exit(1) - - diff -Nru cargo-mozilla-0.47.0/debian/changelog cargo-mozilla-0.57.0/debian/changelog --- cargo-mozilla-0.47.0/debian/changelog 2021-12-14 12:46:50.000000000 +0000 +++ cargo-mozilla-0.57.0/debian/changelog 2022-07-14 10:00:57.000000000 +0000 @@ -1,15 +1,81 @@ -cargo-mozilla (0.47.0-3~deb10u1) buster; urgency=medium +cargo-mozilla (0.57.0-7~deb10u1) buster; urgency=medium * Non-maintainer upload. * Backport to buster. - * Vendor libgit2 1.0.1, the system one is too old. + * Bump rustc-mozilla build-dep. + + -- Emilio Pozuelo Monfort Thu, 14 Jul 2022 12:00:57 +0200 + +cargo-mozilla (0.57.0-7~deb11u1) bullseye; urgency=medium + + * Non-maintainer upload. + * Backport to bullseye as cargo-mozilla. * Build-dep on rustc-mozilla. + * Don't build the doc package. + * Vendor libgit2 1.3.0, the system one is too old. * Build-dep on libpcre3-dev, for libgit2. - * Fix tests that now have execution time in the output. - * Rename to cargo-mozilla to avoid disruption in the rustc/cargo ecosystem, - and don't build the doc package. + * Disable build::close_output_during_drain test as it hangs in bullseye. + + -- Emilio Pozuelo Monfort Fri, 01 Jul 2022 12:25:10 +0200 + +cargo (0.57.0-7) unstable; urgency=medium + + * Team upload. + * Upload to unstable. + + -- Peter Michael Green Mon, 02 May 2022 20:57:46 +0000 + +cargo (0.57.0-6) experimental; urgency=medium + + * Team upload. + * Fix debian cargo wrapper to stop looking for subcommands once it finds one + so that it is possible to test features whose name matches a subcommand. + * Limit autopkgtest to architectures where it does not run out of disk space. + * Remove patches for libgit2 1.1.x and adjust dependency for 0.3.x + (Closes: 1009015) + * Remove build-dependency on cmake (Closes: 981256) + + -- Peter Michael Green Sun, 10 Apr 2022 00:10:04 +0000 + +cargo (0.57.0-5) unstable; urgency=medium + + [ Simon Chopin ] + * Disable cross-build tests in autopkgtests + * d/p/0001-Change-test-to-not-trigger-emoji-error.patch: + Cherry-picked from upstream to fix testsuite against rustc 1.57 + * d/p/0002-Remove-eacces-test.patch: Cherry-picked from upstream as + cargo doesn't seem to trigger the error with recent Rust + + -- Ximin Luo Wed, 09 Mar 2022 13:52:14 +0000 + +cargo (0.57.0-4) unstable; urgency=medium + + [ Simon Chopin ] + * Add an autopkgtest for cargo to build itself + + [ Ximin Luo ] + * Fix FTBFS on x32. + + -- Ximin Luo Mon, 07 Mar 2022 20:35:00 +0000 + +cargo (0.57.0-3) unstable; urgency=medium + + * Actually fix failing tests. + * Fix armhf build by backporting a rust-cc patch. + + -- Ximin Luo Sun, 24 Oct 2021 14:11:00 +0100 + +cargo (0.57.0-2) unstable; urgency=medium + + * Fix failing tests. + + -- Ximin Luo Sun, 24 Oct 2021 13:13:07 +0100 + +cargo (0.57.0-1) unstable; urgency=medium + + * New upstream release for rustc 1.56.0, 2021 Edition. - -- Emilio Pozuelo Monfort Tue, 14 Dec 2021 13:46:50 +0100 + -- Ximin Luo Sun, 24 Oct 2021 01:59:08 +0100 cargo (0.47.0-3) unstable; urgency=medium diff -Nru cargo-mozilla-0.47.0/debian/control cargo-mozilla-0.57.0/debian/control --- cargo-mozilla-0.47.0/debian/control 2021-12-14 12:46:50.000000000 +0000 +++ cargo-mozilla-0.57.0/debian/control 2022-07-14 10:00:57.000000000 +0000 @@ -7,23 +7,24 @@ Vasudev Kamath Priority: optional # :native annotations are to support cross-compiling, see README.Debian of rustc -Build-Depends: debhelper (>= 12~), - dpkg-dev (>= 1.17.14), - cargo:native (>= 0.17.0), - rustc-mozilla:native (>= 1.16), - libstd-rust-mozilla-dev (>= 1.16), - pkg-config, - cmake, - bash-completion, - python3:native, - libcurl4-gnutls-dev | libcurl4-openssl-dev, - libssh2-1-dev, -# libgit2-dev (>= 1), - libhttp-parser-dev, - libpcre3-dev, - libssl-dev, - zlib1g-dev, - git +Build-Depends: + debhelper (>= 12~), + dpkg-dev (>= 1.17.14), + cargo:native (>= 0.17.0), + rustc-mozilla:native (>= 1.59), + libstd-rust-mozilla-dev (>= 1.59), + pkg-config, + bash-completion, + python3:native, + libcurl4-gnutls-dev | libcurl4-openssl-dev, + libssh2-1-dev, +# libgit2-dev (>= 1.3.0), +# libgit2-dev (<< 1.4~~), + libhttp-parser-dev, + libpcre3-dev, + libssl-dev, + zlib1g-dev, + git Homepage: https://crates.io/ Standards-Version: 4.2.1 Vcs-Git: https://salsa.debian.org/rust-team/cargo.git diff -Nru cargo-mozilla-0.47.0/debian/copyright cargo-mozilla-0.57.0/debian/copyright --- cargo-mozilla-0.47.0/debian/copyright 2020-12-06 12:32:13.000000000 +0000 +++ cargo-mozilla-0.57.0/debian/copyright 2022-03-15 12:09:01.000000000 +0000 @@ -7,6 +7,7 @@ src/* tests/* .* + build.rs Cargo.* LICENSE-* README.* @@ -53,6 +54,7 @@ vendor/backtrace-sys/* vendor/cc/* vendor/cfg-if/* + vendor/cfg-if-0*/* vendor/filetime/* vendor/fnv/* vendor/git2/* @@ -147,6 +149,17 @@ License: Zlib Comment: see https://github.com/remram44/adler32-rs +Files: + vendor/arrayvec/* + vendor/either/* + vendor/itertools/* +Copyright: 2014-2021 bluss +License: MIT or Apache-2.0 +Comment: + see https://github.com/bluss/arrayvec + see https://github.com/bluss/either + see https://github.com/rust-itertools/itertools + Files: vendor/bitmaps/* Copyright: 2019-2020 Bodil Stokke License: MPL-2.0+ @@ -371,6 +384,11 @@ License: MIT or Apache-2.0 Comment: see https://gitlab.com/mmstick/numtoa +Files: vendor/once_cell/* +Copyright: 2018-2021 Aleksey Kladov +License: MIT OR Apache-2.0 +Comment: see https://github.com/matklad/once_cell + Files: vendor/opener/* Copyright: 2018 Brian Bowman License: MIT or Apache-2.0 @@ -413,6 +431,11 @@ Copyright: 2017, Redox OS Developers License: MIT +Files: vendor/regex-automata/* +Copyright: 2018-2021 Andrew Gallant +License: Unlicense or MIT +Comment: see https://github.com/BurntSushi/regex-automata + Files: vendor/remove_dir_all/* Copyright: 2017, Aaron Power License: MIT or Apache-2.0 @@ -506,6 +529,11 @@ License: Zlib OR Apache-2.0 OR MIT Comment: see https://github.com/Lokathor/tinyvec +Files: vendor/tinyvec_macros/* +Copyright: 2020-2020 Soveu +License: MIT OR Apache-2.0 OR Zlib +Comment: see https://github.com/Soveu/tinyvec_macros + Files: vendor/typenum/* Copyright: 2015-2018 Paho Lurie-Gregg 2015-2018 Andre Bogus @@ -534,14 +562,17 @@ Comment: see https://github.com/reem/ Files: + vendor/form_urlencoded/* vendor/url/* vendor/url_serde/* vendor/percent-encoding/* -Copyright: 2015-2016 Simon Sapin - 2013-2019 The rust-url developers +Copyright: + 2015-2016 Simon Sapin + 2013-2021 The rust-url developers License: MIT or Apache-2.0 -Comment: see https://github.com/servo/rust-url - see https://github.com/servo/rust-url/tree/master/percent_encoding +Comment: + see https://github.com/servo/rust-url + see https://github.com/servo/rust-url/tree/master/percent_encoding Files: vendor/utf8parse/* Copyright: 2016-2019 Joe Wilm @@ -563,6 +594,11 @@ License: Apache-2.0 or MIT Comment: see https://github.com/jwilm/vte +Files: vendor/vte_generate_state_changes/* +Copyright: 2016-2021 Christian Duerr +License: Apache-2.0 OR MIT +Comment: see https://github.com/jwilm/vte + Files: vendor/winapi/* Copyright: 2014-2017 Peter Atashian diff -Nru cargo-mozilla-0.47.0/debian/debcargo-conf.patch cargo-mozilla-0.57.0/debian/debcargo-conf.patch --- cargo-mozilla-0.47.0/debian/debcargo-conf.patch 2019-05-31 06:25:04.000000000 +0000 +++ cargo-mozilla-0.57.0/debian/debcargo-conf.patch 2022-03-15 12:09:01.000000000 +0000 @@ -1,5 +1,16 @@ -diff --git a/src/commoncrypto-sys/debian/patches/no-clippy.patch b/src/commoncrypto-sys/debian/patches/no-clippy.patch -index 3e4c885..93789f3 100644 +For various reasons sometimes the debcargo-conf patches can't be applied as-is, +so we further patch them here. The reasons are as follows: + +- commoncrypto, commoncrypto-sys: these crates were released before crates.io + automatically re-wrote all Cargo.toml files. cargo-vendor outputs the + un-re-written original Cargo.toml files, but debcargo will forcibly rewrite + even un-re-written ones that were published to crates.io. The patch below + rewrites our existing patches so they work against the un-re-written ones. + +- our patch to miniz_oxide replaces the adler dep for the adler32 dep. This + interferes with our primitive logic in debian-cargo-vendor, so we have to + undo that here. + --- a/src/commoncrypto-sys/debian/patches/no-clippy.patch +++ b/src/commoncrypto-sys/debian/patches/no-clippy.patch @@ -1,17 +1,16 @@ @@ -31,8 +42,6 @@ +- + [dev-dependencies] + hex = "0.2" -diff --git a/src/commoncrypto/debian/patches/no-clippy.patch b/src/commoncrypto/debian/patches/no-clippy.patch -index 38d9c92..b21a7ca 100644 --- a/src/commoncrypto/debian/patches/no-clippy.patch +++ b/src/commoncrypto/debian/patches/no-clippy.patch @@ -1,17 +1,16 @@ @@ -64,35 +73,9 @@ +- + [dev-dependencies] + hex = "0.2" -diff --git a/src/unicode-bidi/debian/patches/no-flamegraphs.patch b/src/unicode-bidi/debian/patches/no-flamegraphs.patch -index 6234d5d..9acab86 100644 ---- a/src/unicode-bidi/debian/patches/no-flamegraphs.patch -+++ b/src/unicode-bidi/debian/patches/no-flamegraphs.patch -@@ -1,5 +1,5 @@ ----- a/Cargo.toml 2017-07-06 23:45:07.000000000 +0000 --+++ b/Cargo.toml 2018-09-15 18:09:13.913086470 +0000 -+--- a/Cargo.toml -++++ b/Cargo.toml - @@ -23,13 +23,6 @@ - - [lib] -@@ -12,12 +12,13 @@ - -version = "0.1" - -optional = true - -- [dependencies.matches] -- version = "0.1" --@@ -44,6 +37,5 @@ -+ [dependencies.serde] -+ version = ">=0.8, <2.0" -+@@ -43,7 +36,6 @@ -+ - [features] -- bench_it = [] -- default = [] -+ with_serde = ["serde"] - -flame_it = ["flame", "flamer"] - unstable = [] -- with_serde = ["serde"] -+ default = [] -+ bench_it = [] +--- a/src/miniz_oxide/debian/patches/series ++++ b/src/miniz_oxide/debian/patches/series +@@ -1,3 +1,2 @@ + remove-rustc-dep-of-std-etc.patch + remove-compiler-builtins.patch +-use-adler32.patch Binary files /srv/release.debian.org/tmp/po3QgdwPNO/cargo-mozilla-0.47.0/debian/libgit2_1.0.1+dfsg.1.orig.tar.xz and /srv/release.debian.org/tmp/k3GvWvjJce/cargo-mozilla-0.57.0/debian/libgit2_1.0.1+dfsg.1.orig.tar.xz differ Binary files /srv/release.debian.org/tmp/po3QgdwPNO/cargo-mozilla-0.47.0/debian/libgit2_1.3.0+dfsg.1.orig.tar.xz and /srv/release.debian.org/tmp/k3GvWvjJce/cargo-mozilla-0.57.0/debian/libgit2_1.3.0+dfsg.1.orig.tar.xz differ diff -Nru cargo-mozilla-0.47.0/debian/lintian-to-copyright.sh cargo-mozilla-0.57.0/debian/lintian-to-copyright.sh --- cargo-mozilla-0.47.0/debian/lintian-to-copyright.sh 1970-01-01 00:00:00.000000000 +0000 +++ cargo-mozilla-0.57.0/debian/lintian-to-copyright.sh 2022-03-15 12:09:01.000000000 +0000 @@ -0,0 +1,5 @@ +#!/bin/sh +# Pipe the output of lintian into this. +sed -ne 's,.* file-without-copyright-information debian/copyright ,,p' | cut -d/ -f1-2 | sort -u | while read x; do + /usr/share/cargo/scripts/guess-crate-copyright "$x" +done diff -Nru cargo-mozilla-0.47.0/debian/make_orig_multi-pre-vendor.sh cargo-mozilla-0.57.0/debian/make_orig_multi-pre-vendor.sh --- cargo-mozilla-0.47.0/debian/make_orig_multi-pre-vendor.sh 1970-01-01 00:00:00.000000000 +0000 +++ cargo-mozilla-0.57.0/debian/make_orig_multi-pre-vendor.sh 2022-03-15 12:09:01.000000000 +0000 @@ -0,0 +1,21 @@ +#!/bin/sh +# Sometimes, by the time we get around to packaging cargo, the crates.io +# ecosystem has moved on from the versions that cargo-vendor *would have* used +# when that version of cargo was released. This places a lot of maintenance +# burden on us, since it requires us to keep debcargo-conf always up-to-date. +# +# This script allows us to force cargo-vendor to use old versions of dependency +# crates, that better match our debcargo-conf patches, as well as the versions +# of crates used when a particular version of cargo was actually released. +# +# Example: +# cargo update -p filetime --precise 0.2.12 +# + +# Drop the "vendored" feature since we patch it out of debcargo +sed -i /vendored/d Cargo.toml + +# For cargo 0.57.0 / rustc 1.56.0 +cargo update -p tempfile --precise 3.1.0 +cargo update -p filetime --precise 0.2.12 +cargo update -p regex --precise 1.3.9 diff -Nru cargo-mozilla-0.47.0/debian/make_orig_multi.sh cargo-mozilla-0.57.0/debian/make_orig_multi.sh --- cargo-mozilla-0.47.0/debian/make_orig_multi.sh 2019-02-06 03:46:14.000000000 +0000 +++ cargo-mozilla-0.57.0/debian/make_orig_multi.sh 2022-03-15 12:09:01.000000000 +0000 @@ -1,8 +1,7 @@ #!/bin/sh set -e -echo "" -echo "This needs a local copy of cargo-vendor, and the following packages:" -echo "python-dulwich python-pytoml devscripts" +echo "This needs the following packages:" +echo " python3-pytoml devscripts cargo" echo "" TMPDIR=`mktemp -d` @@ -41,14 +40,17 @@ export GIT_COMMITTER_NAME="${GIT_AUTHOR_NAME}" export GIT_COMMITTER_EMAIL="${GIT_AUTHOR_EMAIL}" -SRCDIR="$SRCDIR" "$SRCDIR/debian/scripts/debian-cargo-vendor" +SRCDIR="$SRCDIR" \ +CARGO_PRE_VENDOR="$SRCDIR/debian/make_orig_multi-pre-vendor.sh" \ +"$SRCDIR/debian/scripts/debian-cargo-vendor" cp -R vendor vendor-scan ( cd vendor-scan "$SRCDIR/debian/scripts/audit-vendor-source" \ "$VENDOR_SUS_WHITELIST" \ - "the 'excludes' key of the relevant debcargo.toml in debcargo-conf.git" + "the 'excludes' key of the relevant debcargo.toml in debcargo-conf.git" \ + -m text/x-script.python ) rm -rf vendor-scan diff -Nru cargo-mozilla-0.47.0/debian/patches/0001-Change-test-to-not-trigger-emoji-error.patch cargo-mozilla-0.57.0/debian/patches/0001-Change-test-to-not-trigger-emoji-error.patch --- cargo-mozilla-0.47.0/debian/patches/0001-Change-test-to-not-trigger-emoji-error.patch 1970-01-01 00:00:00.000000000 +0000 +++ cargo-mozilla-0.57.0/debian/patches/0001-Change-test-to-not-trigger-emoji-error.patch 2022-03-15 12:09:01.000000000 +0000 @@ -0,0 +1,37 @@ +From 0dfe70f7e1384620e0e38c7bf58147e95be5e638 Mon Sep 17 00:00:00 2001 +From: Esteban Kuber +Date: Wed, 24 Nov 2021 05:59:42 +0000 +Subject: [PATCH] Change test to not trigger emoji error + +This change is needed to land rust-lang/rust#88781, as it changes the +handling of emojis in source code to treat them as identifiers. + +Applied-Upstream: 0.59.0 +--- + tests/testsuite/doc.rs | 6 ++---- + 1 file changed, 2 insertions(+), 4 deletions(-) + +diff --git a/tests/testsuite/doc.rs b/tests/testsuite/doc.rs +index 965e7eaa9bd..6bcdd2d02cf 100644 +--- a/tests/testsuite/doc.rs ++++ b/tests/testsuite/doc.rs +@@ -803,7 +803,7 @@ fn output_not_captured() { + "a/src/lib.rs", + " + /// ``` +- /// ☃ ++ /// ` + /// ``` + pub fn foo() {} + ", +@@ -811,9 +811,7 @@ fn output_not_captured() { + .build(); + + p.cargo("doc") +- .without_status() +- .with_stderr_contains("[..]☃") +- .with_stderr_contains(r"[..]unknown start of token: \u{2603}") ++ .with_stderr_contains("[..]unknown start of token: `") + .run(); + } + diff -Nru cargo-mozilla-0.47.0/debian/patches/0002-Remove-eacces-test.patch cargo-mozilla-0.57.0/debian/patches/0002-Remove-eacces-test.patch --- cargo-mozilla-0.47.0/debian/patches/0002-Remove-eacces-test.patch 1970-01-01 00:00:00.000000000 +0000 +++ cargo-mozilla-0.57.0/debian/patches/0002-Remove-eacces-test.patch 2022-03-15 12:09:01.000000000 +0000 @@ -0,0 +1,93 @@ +From d92dceaeba18e826eca4ae672356cdca0f8803cb Mon Sep 17 00:00:00 2001 +From: Weihang Lo +Date: Tue, 21 Dec 2021 02:59:41 +0800 +Origin: https://github.com/rust-lang/cargo/pull/10214 +Subject: Remove `build_script::build_script_scan_eacces` test case + +Remove the test because cargo ignores it and returns its path during a +`cargo build`. The caller still has a chance to hit the IO error if they +does access it. + +The original patch is part of a patchset for loop detection, but the +loop content has been edited out to only contain the test removal. + +--- + tests/testsuite/build.rs | 6 ++- + tests/testsuite/build_script.rs | 69 --------------------------------- + tests/testsuite/package.rs | 7 ++-- + 3 files changed, 8 insertions(+), 74 deletions(-) + +diff --git a/tests/testsuite/build_script.rs b/tests/testsuite/build_script.rs +index 0a98abe3893..40d8067d548 100644 +--- a/tests/testsuite/build_script.rs ++++ b/tests/testsuite/build_script.rs +@@ -4618,69 +4618,6 @@ fn links_interrupted_can_restart() { + .run(); + } + +-#[cargo_test] +-#[cfg(unix)] +-fn build_script_scan_eacces() { +- // build.rs causes a scan of the whole project, which can be a problem if +- // a directory is not accessible. +- use cargo_test_support::git; +- use std::os::unix::fs::PermissionsExt; +- +- let p = project() +- .file("src/lib.rs", "") +- .file("build.rs", "fn main() {}") +- .file("secrets/stuff", "") +- .build(); +- let path = p.root().join("secrets"); +- fs::set_permissions(&path, fs::Permissions::from_mode(0o0)).unwrap(); +- // The last "Caused by" is a string from libc such as the following: +- // Permission denied (os error 13) +- p.cargo("build") +- .with_stderr( +- "\ +-[ERROR] failed to determine package fingerprint for build script for foo v0.0.1 ([..]/foo) +- +-Caused by: +- failed to determine the most recently modified file in [..]/foo +- +-Caused by: +- failed to determine list of files in [..]/foo +- +-Caused by: +- cannot read \"[..]/foo/secrets\" +- +-Caused by: +- [..] +-", +- ) +- .with_status(101) +- .run(); +- +- // Try `package.exclude` to skip a directory. +- p.change_file( +- "Cargo.toml", +- r#" +- [package] +- name = "foo" +- version = "0.0.1" +- exclude = ["secrets"] +- "#, +- ); +- p.cargo("build").run(); +- +- // Try with git. This succeeds because the git status walker ignores +- // directories it can't access. +- p.change_file("Cargo.toml", &basic_manifest("foo", "0.0.1")); +- p.build_dir().rm_rf(); +- let repo = git::init(&p.root()); +- git::add(&repo); +- git::commit(&repo); +- p.cargo("build").run(); +- +- // Restore permissions so that the directory can be deleted. +- fs::set_permissions(&path, fs::Permissions::from_mode(0o755)).unwrap(); +-} +- + #[cargo_test] + fn dev_dep_with_links() { + let p = project() diff -Nru cargo-mozilla-0.47.0/debian/patches/1005_relax_deprecated_diagnostic_message_check.patch cargo-mozilla-0.57.0/debian/patches/1005_relax_deprecated_diagnostic_message_check.patch --- cargo-mozilla-0.47.0/debian/patches/1005_relax_deprecated_diagnostic_message_check.patch 2020-12-06 12:34:04.000000000 +0000 +++ cargo-mozilla-0.57.0/debian/patches/1005_relax_deprecated_diagnostic_message_check.patch 1970-01-01 00:00:00.000000000 +0000 @@ -1,30 +0,0 @@ -Description: relax deprecated diagnostic message check - Applied patch from upstream commit 537a0202679b - -Origin: upstream, https://github.com/rust-lang/cargo/commit/537a0202679b9ccd2a951d2695a2ad7b18b16415 - ---- cargo-0.43.1.orig/tests/testsuite/fix.rs -+++ cargo-0.43.1/tests/testsuite/fix.rs -@@ -689,7 +689,7 @@ fn shows_warnings() { - .build(); - - p.cargo("fix --allow-no-vcs") -- .with_stderr_contains("[..]warning: use of deprecated item[..]") -+ .with_stderr_contains("[..]warning: use of deprecated[..]") - .run(); - } - -@@ -935,11 +935,11 @@ fn shows_warnings_on_second_run_without_ - .build(); - - p.cargo("fix --allow-no-vcs") -- .with_stderr_contains("[..]warning: use of deprecated item[..]") -+ .with_stderr_contains("[..]warning: use of deprecated[..]") - .run(); - - p.cargo("fix --allow-no-vcs") -- .with_stderr_contains("[..]warning: use of deprecated item[..]") -+ .with_stderr_contains("[..]warning: use of deprecated[..]") - .run(); - } - diff -Nru cargo-mozilla-0.47.0/debian/patches/2002_disable-net-tests.patch cargo-mozilla-0.57.0/debian/patches/2002_disable-net-tests.patch --- cargo-mozilla-0.47.0/debian/patches/2002_disable-net-tests.patch 2020-12-06 12:32:13.000000000 +0000 +++ cargo-mozilla-0.57.0/debian/patches/2002_disable-net-tests.patch 2022-03-15 12:09:01.000000000 +0000 @@ -43,3 +43,14 @@ fn net_retry_git_outputs_warning() { let p = project() .file( +--- a/tests/testsuite/publish.rs ++++ b/tests/testsuite/publish.rs +@@ -1642,7 +1642,7 @@ + t.join().unwrap(); + } + +-#[cargo_test] ++#[allow(dead_code)] + fn api_curl_error() { + // Registry has a network error. + let t = registry::RegistryBuilder::new().build_api_server(&|_headers| panic!("broke!")); diff -Nru cargo-mozilla-0.47.0/debian/patches/2003_disable_close_output.patch cargo-mozilla-0.57.0/debian/patches/2003_disable_close_output.patch --- cargo-mozilla-0.47.0/debian/patches/2003_disable_close_output.patch 2020-12-08 01:42:22.000000000 +0000 +++ cargo-mozilla-0.57.0/debian/patches/2003_disable_close_output.patch 1970-01-01 00:00:00.000000000 +0000 @@ -1,21 +0,0 @@ -Description: - Disable close_output, it is flaky. - . - It is already fixed upstream in #8587 and #8668, however these depend on - subsequent changes to the same file and is hard to backport. So just disable - it for now in Debian, it is a test problem not a cargo problem. - . - FIXME remove this patch in cargo 0.49 which contains those above FRs. ---- a/tests/testsuite/build.rs -+++ b/tests/testsuite/build.rs -@@ -4924,8 +4924,8 @@ - p.process(&p.bin("foo")).run(); - } - --#[cargo_test] --fn close_output() { -+#[allow(dead_code)] -+fn _close_output() { - // What happens when stdout or stderr is closed during a build. - - // Server to know when rustc has spawned. diff -Nru cargo-mozilla-0.47.0/debian/patches/2110-use-mfpu-on-armhf.patch cargo-mozilla-0.57.0/debian/patches/2110-use-mfpu-on-armhf.patch --- cargo-mozilla-0.47.0/debian/patches/2110-use-mfpu-on-armhf.patch 1970-01-01 00:00:00.000000000 +0000 +++ cargo-mozilla-0.57.0/debian/patches/2110-use-mfpu-on-armhf.patch 2022-03-15 12:09:01.000000000 +0000 @@ -0,0 +1,18 @@ +Already in debcargo-conf.git, can be deleted for next source import. + +The upstream code uses -march but not -mfpu on debian armhf, this works +with gcc-10 but produces an error with gcc-11, set mfpu to fix this. + +--- a/vendor/cc/src/lib.rs 1973-11-29 21:33:09.000000000 +0000 ++++ b/vendor/cc/src/lib.rs 2021-10-23 23:05:21.409460780 +0000 +@@ -1638,6 +1638,10 @@ + && (target.contains("-linux-") || target.contains("-kmc-solid_")) + { + cmd.args.push("-march=armv7-a".into()); ++ if target.ends_with("eabihf") { ++ // lowest common denominator FPU ++ cmd.args.push("-mfpu=vfpv3-d16".into()); ++ } + } + + // (x86 Android doesn't say "eabi") diff -Nru cargo-mozilla-0.47.0/debian/patches/2111-curl-no-rebuild.patch cargo-mozilla-0.57.0/debian/patches/2111-curl-no-rebuild.patch --- cargo-mozilla-0.47.0/debian/patches/2111-curl-no-rebuild.patch 1970-01-01 00:00:00.000000000 +0000 +++ cargo-mozilla-0.57.0/debian/patches/2111-curl-no-rebuild.patch 2022-03-15 12:09:01.000000000 +0000 @@ -0,0 +1,12 @@ +Already in debcargo-conf.git, can be deleted for next source import. + +--- a/vendor/curl-sys/build.rs ++++ b/vendor/curl-sys/build.rs +@@ -4,7 +4,6 @@ + use std::process::Command; + + fn main() { +- println!("cargo:rerun-if-changed=curl"); + let host = env::var("HOST").unwrap(); + let target = env::var("TARGET").unwrap(); + let windows = target.contains("windows"); diff -Nru cargo-mozilla-0.47.0/debian/patches/2112-handle-4-siphasher-algorithms.patch cargo-mozilla-0.57.0/debian/patches/2112-handle-4-siphasher-algorithms.patch --- cargo-mozilla-0.47.0/debian/patches/2112-handle-4-siphasher-algorithms.patch 1970-01-01 00:00:00.000000000 +0000 +++ cargo-mozilla-0.57.0/debian/patches/2112-handle-4-siphasher-algorithms.patch 2022-03-15 12:09:01.000000000 +0000 @@ -0,0 +1,19 @@ +Bug: https://github.com/rust-lang/cargo/issues/10004 + +--- a/src/cargo/core/source/source_id.rs ++++ b/src/cargo/core/source/source_id.rs +@@ -621,7 +621,13 @@ + fn test_cratesio_hash() { + let config = Config::default().unwrap(); + let crates_io = SourceId::crates_io(&config).unwrap(); +- assert_eq!(crate::util::hex::short_hash(&crates_io), "1ecc6299db9ec823"); ++ assert!([ ++ "1ecc6299db9ec823", // 64 LE ++ "1285ae84e5963aae", // 32 LE ++ "eae4ba8cbf2ce1c7", // 64 BE ++ "b420f105fcaca6de", // 32 BE ++ ] ++ .contains(&crate::util::hex::short_hash(&crates_io).as_str())); + } + + /// A `Display`able view into a `SourceId` that will write it as a url diff -Nru cargo-mozilla-0.47.0/debian/patches/2200-workaround-x32-test.patch cargo-mozilla-0.57.0/debian/patches/2200-workaround-x32-test.patch --- cargo-mozilla-0.47.0/debian/patches/2200-workaround-x32-test.patch 1970-01-01 00:00:00.000000000 +0000 +++ cargo-mozilla-0.57.0/debian/patches/2200-workaround-x32-test.patch 2022-03-15 12:09:01.000000000 +0000 @@ -0,0 +1,13 @@ +Bug: https://github.com/rust-lang/cargo/issues/10005 + +--- a/tests/testsuite/cfg.rs ++++ b/tests/testsuite/cfg.rs +@@ -272,7 +272,7 @@ + + // https://github.com/rust-lang/cargo/issues/5313 + #[cargo_test] +-#[cfg(all(target_arch = "x86_64", target_os = "linux", target_env = "gnu"))] ++#[cfg(all(target_arch = "x86_64", target_os = "linux", target_env = "gnu", target_pointer_width = "64"))] + fn cfg_looks_at_rustflags_for_target() { + let p = project() + .file( diff -Nru cargo-mozilla-0.47.0/debian/patches/2300-disable-close_output_during_drain-test.patch cargo-mozilla-0.57.0/debian/patches/2300-disable-close_output_during_drain-test.patch --- cargo-mozilla-0.47.0/debian/patches/2300-disable-close_output_during_drain-test.patch 1970-01-01 00:00:00.000000000 +0000 +++ cargo-mozilla-0.57.0/debian/patches/2300-disable-close_output_during_drain-test.patch 2022-07-01 16:53:29.000000000 +0000 @@ -0,0 +1,23 @@ +The test is to check that a hang doesn't happen, but it does happen +in bullseye, so disable it. + +See https://github.com/rust-lang/cargo/pull/9201 + +--- a/tests/testsuite/build.rs ++++ b/tests/testsuite/build.rs +@@ -5376,6 +5376,7 @@ hello stderr! + assert_eq!(stdout, "hello stdout!\n"); + } + ++/* + #[cargo_test] + fn close_output_during_drain() { + // Test to close the output during the build phase (drain_the_queue). +@@ -5454,6 +5455,7 @@ fn close_output_during_drain() { + Err(e) => panic!("child wait failed: {}", e), + } + } ++*/ + + use cargo_test_support::registry::Dependency; + diff -Nru cargo-mozilla-0.47.0/debian/patches/accept-test-execution-time.patch cargo-mozilla-0.57.0/debian/patches/accept-test-execution-time.patch --- cargo-mozilla-0.47.0/debian/patches/accept-test-execution-time.patch 2021-12-03 12:17:58.000000000 +0000 +++ cargo-mozilla-0.57.0/debian/patches/accept-test-execution-time.patch 1970-01-01 00:00:00.000000000 +0000 @@ -1,128 +0,0 @@ -From 62ddaf343ef261a4da457f6334874d1413b64783 Mon Sep 17 00:00:00 2001 -From: Jakob Schikowski -Date: Mon, 23 Nov 2020 00:25:46 +0100 -Subject: [PATCH] Relaxes expectation of `cargo test` tests to accept test - execution time - ---- - tests/testsuite/test.rs | 26 +++++++++++++------------- - 1 file changed, 13 insertions(+), 13 deletions(-) - -diff --git a/tests/testsuite/test.rs b/tests/testsuite/test.rs -index 4ba9a4db833..55345c216c8 100644 ---- a/tests/testsuite/test.rs -+++ b/tests/testsuite/test.rs -@@ -175,7 +175,7 @@ fn cargo_test_quiet_with_harness() { - " - running 1 test - . --test result: ok. 1 passed; 0 failed; 0 ignored; 0 measured; 0 filtered out -+test result: ok. 1 passed; 0 failed; 0 ignored; 0 measured; 0 filtered out[..] - - ", - ) -@@ -1552,7 +1552,7 @@ fn test_filtered_excludes_compiling_examples() { - running 1 test - test tests::foo ... ok - --test result: ok. 1 passed; 0 failed; 0 ignored; 0 measured; 0 filtered out -+test result: ok. 1 passed; 0 failed; 0 ignored; 0 measured; 0 filtered out[..] - - ", - ) -@@ -3724,13 +3724,13 @@ pub fn foo() -> u8 { 1 } - running 1 test - test tests::it_works ... ok - --test result: ok. 1 passed; 0 failed; 0 ignored; 0 measured; 0 filtered out -+test result: ok. 1 passed; 0 failed; 0 ignored; 0 measured; 0 filtered out[..] - - - running 1 test - test src/lib.rs - foo (line 1) ... ok - --test result: ok. 1 passed; 0 failed; 0 ignored; 0 measured; 0 filtered out -+test result: ok. 1 passed; 0 failed; 0 ignored; 0 measured; 0 filtered out[..] - \n", - ) - .run(); -@@ -3746,7 +3746,7 @@ test result: ok. 1 passed; 0 failed; 0 ignored; 0 measured; 0 filtered out - running 1 test - test tests::it_works ... ok - --test result: ok. 1 passed; 0 failed; 0 ignored; 0 measured; 0 filtered out -+test result: ok. 1 passed; 0 failed; 0 ignored; 0 measured; 0 filtered out[..] - \n", - ) - .run(); -@@ -3763,7 +3763,7 @@ test result: ok. 1 passed; 0 failed; 0 ignored; 0 measured; 0 filtered out - running 1 test - test src/lib.rs - foo (line 1) ... ok - --test result: ok. 1 passed; 0 failed; 0 ignored; 0 measured; 0 filtered out -+test result: ok. 1 passed; 0 failed; 0 ignored; 0 measured; 0 filtered out[..] - - ", - ) -@@ -3877,14 +3877,14 @@ fn cargo_test_doctest_xcompile_ignores() { - #[cfg(not(target_arch = "x86_64"))] - p.cargo("test") - .with_stdout_contains( -- "test result: ok. 1 passed; 0 failed; 0 ignored; 0 measured; 0 filtered out", -+ "test result: ok. 1 passed; 0 failed; 0 ignored; 0 measured; 0 filtered out[..]", - ) - .run(); - #[cfg(target_arch = "x86_64")] - p.cargo("test") - .with_status(101) - .with_stdout_contains( -- "test result: FAILED. 0 passed; 1 failed; 0 ignored; 0 measured; 0 filtered out", -+ "test result: FAILED. 0 passed; 1 failed; 0 ignored; 0 measured; 0 filtered out[..]", - ) - .run(); - -@@ -3892,7 +3892,7 @@ fn cargo_test_doctest_xcompile_ignores() { - p.cargo("test -Zdoctest-xcompile") - .masquerade_as_nightly_cargo() - .with_stdout_contains( -- "test result: ok. 1 passed; 0 failed; 0 ignored; 0 measured; 0 filtered out", -+ "test result: ok. 1 passed; 0 failed; 0 ignored; 0 measured; 0 filtered out[..]", - ) - .run(); - -@@ -3900,7 +3900,7 @@ fn cargo_test_doctest_xcompile_ignores() { - p.cargo("test -Zdoctest-xcompile") - .masquerade_as_nightly_cargo() - .with_stdout_contains( -- "test result: ok. 0 passed; 0 failed; 1 ignored; 0 measured; 0 filtered out", -+ "test result: ok. 0 passed; 0 failed; 1 ignored; 0 measured; 0 filtered out[..]", - ) - .run(); - } -@@ -3940,7 +3940,7 @@ fn cargo_test_doctest_xcompile() { - )) - .masquerade_as_nightly_cargo() - .with_stdout_contains( -- "test result: ok. 1 passed; 0 failed; 0 ignored; 0 measured; 0 filtered out", -+ "test result: ok. 1 passed; 0 failed; 0 ignored; 0 measured; 0 filtered out[..]", - ) - .run(); - } -@@ -4020,7 +4020,7 @@ fn cargo_test_doctest_xcompile_runner() { - )) - .masquerade_as_nightly_cargo() - .with_stdout_contains( -- "test result: ok. 1 passed; 0 failed; 0 ignored; 0 measured; 0 filtered out", -+ "test result: ok. 1 passed; 0 failed; 0 ignored; 0 measured; 0 filtered out[..]", - ) - .with_stderr_contains("this is a runner") - .run(); -@@ -4064,7 +4064,7 @@ fn cargo_test_doctest_xcompile_no_runner() { - )) - .masquerade_as_nightly_cargo() - .with_stdout_contains( -- "test result: ok. 1 passed; 0 failed; 0 ignored; 0 measured; 0 filtered out", -+ "test result: ok. 1 passed; 0 failed; 0 ignored; 0 measured; 0 filtered out[..]", - ) - .run(); - } diff -Nru cargo-mozilla-0.47.0/debian/patches/series cargo-mozilla-0.57.0/debian/patches/series --- cargo-mozilla-0.47.0/debian/patches/series 2021-12-03 12:17:58.000000000 +0000 +++ cargo-mozilla-0.57.0/debian/patches/series 2022-07-02 18:38:35.000000000 +0000 @@ -1,6 +1,12 @@ -u-8713.patch -1005_relax_deprecated_diagnostic_message_check.patch +0001-Change-test-to-not-trigger-emoji-error.patch +0002-Remove-eacces-test.patch + 2002_disable-net-tests.patch -2003_disable_close_output.patch + +2110-use-mfpu-on-armhf.patch +2111-curl-no-rebuild.patch + +2112-handle-4-siphasher-algorithms.patch +2200-workaround-x32-test.patch +2300-disable-close_output_during_drain-test.patch use-vendored-libgit.patch -accept-test-execution-time.patch diff -Nru cargo-mozilla-0.47.0/debian/patches/u-8713.patch cargo-mozilla-0.57.0/debian/patches/u-8713.patch --- cargo-mozilla-0.47.0/debian/patches/u-8713.patch 2020-12-07 23:57:50.000000000 +0000 +++ cargo-mozilla-0.57.0/debian/patches/u-8713.patch 1970-01-01 00:00:00.000000000 +0000 @@ -1,31 +0,0 @@ -From 8ee908d40ff21d7fca12430ca14cdaf3c454e0b3 Mon Sep 17 00:00:00 2001 -From: Eric Huss -Date: Fri, 18 Sep 2020 12:28:33 -0700 -Subject: [PATCH] Add cross check to filters_target test. - ---- - tests/testsuite/tree.rs | 5 ++++- - 1 file changed, 4 insertions(+), 1 deletion(-) - -diff --git a/tests/testsuite/tree.rs b/tests/testsuite/tree.rs -index a8059228d7..9c03c4acb8 100644 ---- a/tests/testsuite/tree.rs -+++ b/tests/testsuite/tree.rs -@@ -1,6 +1,6 @@ - //! Tests for the `cargo tree` command. - --use cargo_test_support::cross_compile::alternate; -+use cargo_test_support::cross_compile::{self, alternate}; - use cargo_test_support::registry::{Dependency, Package}; - use cargo_test_support::{basic_manifest, git, project, rustc_host, Project}; - -@@ -324,6 +324,9 @@ a v0.1.0 ([..]/foo) - #[cargo_test] - fn filters_target() { - // --target flag -+ if cross_compile::disabled() { -+ return; -+ } - Package::new("targetdep", "1.0.0").publish(); - Package::new("hostdep", "1.0.0").publish(); - Package::new("devdep", "1.0.0").publish(); diff -Nru cargo-mozilla-0.47.0/debian/patches/use-vendored-libgit.patch cargo-mozilla-0.57.0/debian/patches/use-vendored-libgit.patch --- cargo-mozilla-0.47.0/debian/patches/use-vendored-libgit.patch 2021-12-03 12:17:58.000000000 +0000 +++ cargo-mozilla-0.57.0/debian/patches/use-vendored-libgit.patch 2022-07-02 18:40:59.000000000 +0000 @@ -4,16 +4,16 @@ --- a/vendor/libgit2-sys/build.rs +++ b/vendor/libgit2-sys/build.rs -@@ -9,7 +9,7 @@ fn main() { +@@ -11,7 +11,7 @@ fn main() { let zlib_ng_compat = env::var("CARGO_FEATURE_ZLIB_NG_COMPAT").is_ok(); // To use zlib-ng in zlib-compat mode, we have to build libgit2 ourselves. -- if !zlib_ng_compat { -+ if false { +- let try_to_use_system_libgit2 = !vendored && !zlib_ng_compat; ++ let try_to_use_system_libgit2 = false; + if try_to_use_system_libgit2 { let mut cfg = pkg_config::Config::new(); - if let Ok(lib) = cfg.probe("libgit2") { - for include in &lib.include_paths { -@@ -51,8 +51,8 @@ fn main() { + if let Ok(lib) = cfg.atleast_version("1.1.0").probe("libgit2") { +@@ -56,8 +56,8 @@ fn main() { add_c_files(&mut cfg, "libgit2/src/streams"); // Always use bundled http-parser for now @@ -24,7 +24,7 @@ // Use the included PCRE regex backend. // -@@ -61,7 +61,7 @@ fn main() { +@@ -66,7 +66,7 @@ fn main() { // reasons, just define on the command-line for everything. Perhaps there // is some way with cc to have different instructions per-file? cfg.define("GIT_REGEX_BUILTIN", "1") @@ -33,7 +33,7 @@ .define("HAVE_STDINT_H", Some("1")) .define("HAVE_MEMMOVE", Some("1")) .define("NO_RECURSE", Some("1")) -@@ -75,7 +75,8 @@ fn main() { +@@ -80,7 +80,8 @@ fn main() { .define("MAX_NAME_COUNT", Some("10000")); // "no symbols" warning on pcre_string_utils.c is because it is only used // when when COMPILE_PCRE8 is not defined, which is the default. @@ -41,9 +41,9 @@ + //add_c_files(&mut cfg, "libgit2/deps/pcre"); + println!("cargo:rustc-link-lib=pcre"); + cfg.file("libgit2/src/allocators/failalloc.c"); cfg.file("libgit2/src/allocators/stdalloc.c"); - -@@ -168,6 +169,8 @@ fn main() { +@@ -175,6 +176,8 @@ fn main() { println!("cargo:root={}", dst.display()); diff -Nru cargo-mozilla-0.47.0/debian/rules cargo-mozilla-0.57.0/debian/rules --- cargo-mozilla-0.47.0/debian/rules 2021-12-14 12:46:50.000000000 +0000 +++ cargo-mozilla-0.57.0/debian/rules 2022-07-01 11:07:05.000000000 +0000 @@ -12,13 +12,15 @@ export CARGO_HOME = $(CURDIR)/debian/cargo_home export DEB_CARGO_CRATE=cargo_$(DEB_VERSION_UPSTREAM) -export RUSTFLAGS += --remap-path-prefix=$(CURDIR)=/usr/src/cargo-$(DEB_VERSION_UPSTREAM) +RUSTFLAGS := --remap-path-prefix=$(CURDIR)=/usr/src/cargo-$(DEB_VERSION_UPSTREAM) # https://github.com/rust-lang/rust/issues/52108 ifneq (,$(filter $(DEB_HOST_ARCH), mips64el)) RUSTFLAGS += -Ctarget-feature=+xgot endif +export RUSTFLAGS + # don't shrink, this can take ages # see https://github.com/rust-lang/cargo/issues/6490 for details export PROPTEST_MAX_SHRINK_ITERS = 0 @@ -37,8 +39,8 @@ $(CARGO) prepare-debian $(CURDIR)/vendor set -e; \ - tar xf debian/libgit2_1.0.1+dfsg.1.orig.tar.xz; \ - mv libgit2-1.0.1 vendor/libgit2-sys/libgit2 + tar xf debian/libgit2_1.3.0+dfsg.1.orig.tar.xz; \ + mv libgit2-1.3.0 vendor/libgit2-sys/libgit2 override_dh_auto_build-arch: $(CARGO) build diff -Nru cargo-mozilla-0.47.0/debian/scripts/debian-cargo-vendor cargo-mozilla-0.57.0/debian/scripts/debian-cargo-vendor --- cargo-mozilla-0.47.0/debian/scripts/debian-cargo-vendor 2020-12-06 12:32:13.000000000 +0000 +++ cargo-mozilla-0.57.0/debian/scripts/debian-cargo-vendor 2022-03-15 12:09:01.000000000 +0000 @@ -40,6 +40,9 @@ } rm -rf vendor/ +if [ -e "$CARGO_PRE_VENDOR" ]; then + "$CARGO_PRE_VENDOR" +fi cargo vendor --verbose vendor/ mkdir -p .cargo cat >.cargo/config < packages-before cp Cargo.lock Cargo.lock.orig @@ -75,6 +77,8 @@ if [ ! -d debian/patches ]; then cp -a -n "../../debcargo-conf/src/$debname/debian/patches" debian/ fi + # first unapply any patches applied in the previous iteration + QUILT_PATCHES=debian/patches quilt pop -af QUILT_PATCHES=debian/patches quilt push -a case $? in 0|2) true;; @@ -104,6 +108,7 @@ bash || true echo >&2 "$0: trying patches again..." done +rm -rf vendor/*/.pc find vendor/*/debian/patches -name '*~' -delete || true cargo update cargo lock list > packages-after diff -Nru cargo-mozilla-0.47.0/debian/source/include-binaries cargo-mozilla-0.57.0/debian/source/include-binaries --- cargo-mozilla-0.47.0/debian/source/include-binaries 2021-12-03 12:17:58.000000000 +0000 +++ cargo-mozilla-0.57.0/debian/source/include-binaries 2022-07-01 10:52:26.000000000 +0000 @@ -1 +1 @@ -debian/libgit2_1.0.1+dfsg.1.orig.tar.xz +debian/libgit2_1.3.0+dfsg.1.orig.tar.xz diff -Nru cargo-mozilla-0.47.0/debian/source/lintian-overrides cargo-mozilla-0.57.0/debian/source/lintian-overrides --- cargo-mozilla-0.47.0/debian/source/lintian-overrides 2019-07-17 05:52:18.000000000 +0000 +++ cargo-mozilla-0.57.0/debian/source/lintian-overrides 2022-03-15 12:09:01.000000000 +0000 @@ -1,2 +1,6 @@ # debian policy bug #649530 -cargo source: missing-license-paragraph-in-dep5-copyright mpl-2.0+ (paragraph at line *) +cargo source: mismatched-override missing-license-paragraph-in-dep5-copyright mpl-2.0+ (*) +cargo source: missing-license-paragraph-in-dep5-copyright debian/copyright mpl-2.0+ (*) + +# lintian is superfluous +cargo source: superfluous-file-pattern debian/copyright * (*) diff -Nru cargo-mozilla-0.47.0/debian/tests/control cargo-mozilla-0.57.0/debian/tests/control --- cargo-mozilla-0.47.0/debian/tests/control 1970-01-01 00:00:00.000000000 +0000 +++ cargo-mozilla-0.57.0/debian/tests/control 2022-05-02 20:57:07.000000000 +0000 @@ -0,0 +1,4 @@ +Tests: self-build +Restrictions: rw-build-tree, allow-stderr +Architecture: amd64, armhf, i386, s390x #arm64 and ppc64el run out of disk space when running this test +Depends: @builddeps@ diff -Nru cargo-mozilla-0.47.0/debian/tests/self-build cargo-mozilla-0.57.0/debian/tests/self-build --- cargo-mozilla-0.47.0/debian/tests/self-build 1970-01-01 00:00:00.000000000 +0000 +++ cargo-mozilla-0.57.0/debian/tests/self-build 2022-03-15 12:09:01.000000000 +0000 @@ -0,0 +1,6 @@ +#!/bin/sh + +mkdir -p .cargo +cp ./debian/tests/self-build.config.toml .cargo/config.toml +export CFG_DISABLE_CROSS_TESTS=1 +exec cargo test -Zavoid-dev-deps diff -Nru cargo-mozilla-0.47.0/debian/tests/self-build.config.toml cargo-mozilla-0.57.0/debian/tests/self-build.config.toml --- cargo-mozilla-0.47.0/debian/tests/self-build.config.toml 1970-01-01 00:00:00.000000000 +0000 +++ cargo-mozilla-0.57.0/debian/tests/self-build.config.toml 2022-03-15 12:09:01.000000000 +0000 @@ -0,0 +1,5 @@ +[source.crates-io] +replace-with = "dh-cargo-registry" + +[source.dh-cargo-registry] +directory = "vendor" diff -Nru cargo-mozilla-0.47.0/debian/vendor-tarball-unsuspicious.txt cargo-mozilla-0.57.0/debian/vendor-tarball-unsuspicious.txt --- cargo-mozilla-0.47.0/debian/vendor-tarball-unsuspicious.txt 2020-12-06 12:32:13.000000000 +0000 +++ cargo-mozilla-0.57.0/debian/vendor-tarball-unsuspicious.txt 2022-03-15 12:09:01.000000000 +0000 @@ -17,14 +17,21 @@ flate2/tests/ idna/tests/punycode_tests.json idna/tests/IdnaTest.txt +idna/tests/IdnaTestV2.txt im-rc/proptest-regressions/ +itertools/examples/iris.data openssl/test/ +memchr/src/tests/x86_64-soft_float.json miniz_oxide/tests/test_data/* regex/src/testdata/basic.dat regex/tests/ +regex-automata/data/fowler-tests/* +regex-automata/data/tests/fowler/* schannel/test/* toml/tests/ url/tests/*.json +vcpkg/test-data/*/installed/vcpkg/updates/* +vte/tests/demo.vte # ideally should be autogenerated, but too difficult today bstr/src/unicode/fsm/*.dfa @@ -39,9 +46,19 @@ rustc-demangle/src/legacy.rs rustc-demangle/src/lib.rs termion/logo.svg +tinyvec/LICENSE-MIT.md +unicode-normalization/src/stream_safe.rs +vcpkg/notes.md walkdir/compare/nftw.c winapi/src/lib.rs # other misc OK, manually audited: backtrace-sys/src/android-api.c vte/foos/large_vim_scroll.recording + +memchr/scripts/make-byte-frequency-table +idna/src/make_uts46_mapping_table.py +walkdir/compare/walk.py +strsim/dev +unicode-normalization/scripts/unicode.py +unicode-width/scripts/unicode.py diff -Nru cargo-mozilla-0.47.0/debian/watch cargo-mozilla-0.57.0/debian/watch --- cargo-mozilla-0.47.0/debian/watch 2020-04-18 18:15:37.000000000 +0000 +++ cargo-mozilla-0.57.0/debian/watch 2022-03-15 12:09:01.000000000 +0000 @@ -1,2 +1,4 @@ -version=3 -https://github.com/rust-lang/cargo/releases /rust-lang/cargo/archive/(\d+\.\d+\.\d+)\.tar\.gz +version=4 +opts="filenamemangle=s%(?:.*?)?v?(\d[\d.]*)\.tar\.gz%cargo-$1.tar.gz%" \ + https://github.com/rust-lang/cargo/tags \ + (?:.*?/)?v?(\d[\d.]*)\.tar\.gz diff -Nru cargo-mozilla-0.47.0/publish.py cargo-mozilla-0.57.0/publish.py --- cargo-mozilla-0.47.0/publish.py 2020-07-17 20:39:39.000000000 +0000 +++ cargo-mozilla-0.57.0/publish.py 2021-10-04 17:24:20.000000000 +0000 @@ -5,12 +5,14 @@ import os import re import subprocess +import time import urllib.request from urllib.error import HTTPError TO_PUBLISH = [ 'crates/cargo-platform', + 'crates/cargo-util', 'crates/crates-io', '.', ] @@ -32,17 +34,20 @@ version = re.search('^version = "([^"]+)"', content, re.M).group(1) if already_published(name, version): print('%s %s is already published, skipping' % (name, version)) - return + return False subprocess.check_call(['cargo', 'publish', '--no-verify'], cwd=path) + return True def main(): - print('Doing dry run first...') - for path in TO_PUBLISH: - subprocess.check_call(['cargo', 'publish', '--no-verify', '--dry-run'], cwd=path) print('Starting publish...') - for path in TO_PUBLISH: - maybe_publish(path) + for i, path in enumerate(TO_PUBLISH): + if maybe_publish(path): + if i < len(TO_PUBLISH)-1: + # Sleep to allow the index to update. This should probably + # check that the index is updated, or use a retry loop + # instead. + time.sleep(5) print('Publish complete!') diff -Nru cargo-mozilla-0.47.0/src/bin/cargo/cli.rs cargo-mozilla-0.57.0/src/bin/cargo/cli.rs --- cargo-mozilla-0.47.0/src/bin/cargo/cli.rs 2020-07-17 20:39:39.000000000 +0000 +++ cargo-mozilla-0.57.0/src/bin/cargo/cli.rs 2021-10-04 17:24:20.000000000 +0000 @@ -1,15 +1,34 @@ -use cargo::core::features; +use anyhow::anyhow; +use cargo::core::{features, CliUnstable}; use cargo::{self, drop_print, drop_println, CliResult, Config}; use clap::{AppSettings, Arg, ArgMatches}; +use itertools::Itertools; +use std::collections::HashMap; use super::commands; use super::list_commands; use crate::command_prelude::*; +use cargo::core::features::HIDDEN; + +lazy_static::lazy_static! { + // Maps from commonly known external commands (not builtin to cargo) to their + // description, for the help page. Reserved for external subcommands that are + // core within the rust ecosystem (esp ones that might become internal in the future). + static ref KNOWN_EXTERNAL_COMMAND_DESCRIPTIONS: HashMap<&'static str, &'static str> = vec![ + ("clippy", "Checks a package to catch common mistakes and improve your Rust code."), + ("fmt", "Formats all bin and lib files of the current crate using rustfmt."), + ].into_iter().collect(); +} pub fn main(config: &mut Config) -> CliResult { // CAUTION: Be careful with using `config` until it is configured below. // In general, try to avoid loading config values unless necessary (like // the [alias] table). + + if commands::help::handle_embedded_help(config) { + return Ok(()); + } + let args = match cli().get_matches_safe() { Ok(args) => args, Err(e) => { @@ -25,22 +44,40 @@ }; if args.value_of("unstable-features") == Some("help") { + let options = CliUnstable::help(); + let non_hidden_options: Vec<(String, String)> = options + .iter() + .filter(|(_, help_message)| *help_message != HIDDEN) + .map(|(name, help)| (name.to_string(), help.to_string())) + .collect(); + let longest_option = non_hidden_options + .iter() + .map(|(option_name, _)| option_name.len()) + .max() + .unwrap_or(0); + let help_lines: Vec = non_hidden_options + .iter() + .map(|(option_name, option_help_message)| { + let option_name_kebab_case = option_name.replace("_", "-"); + let padding = " ".repeat(longest_option - option_name.len()); // safe to substract + format!( + " -Z {}{} -- {}", + option_name_kebab_case, padding, option_help_message + ) + }) + .collect(); + let joined = help_lines.join("\n"); drop_println!( config, " Available unstable (nightly-only) flags: - -Z avoid-dev-deps -- Avoid installing dev-dependencies if possible - -Z minimal-versions -- Install minimal dependency versions instead of maximum - -Z no-index-update -- Do not update the registry, avoids a network request for benchmarking - -Z unstable-options -- Allow the usage of unstable options - -Z timings -- Display concurrency information - -Z doctest-xcompile -- Compile and run doctests for non-host target using runner config - -Z crate-versions -- Add crate versions to generated docs +{} -Run with 'cargo -Z [FLAG] [SUBCOMMAND]'" +Run with 'cargo -Z [FLAG] [SUBCOMMAND]'", + joined ); - if !features::nightly_features_allowed() { + if !config.nightly_features_allowed { drop_println!( config, "\nUnstable flags are only available on the nightly channel \ @@ -73,20 +110,31 @@ if args.is_present("list") { drop_println!(config, "Installed Commands:"); - for command in list_commands(config) { + for (name, command) in list_commands(config) { + let known_external_desc = KNOWN_EXTERNAL_COMMAND_DESCRIPTIONS.get(name.as_str()); match command { - CommandInfo::BuiltIn { name, about } => { + CommandInfo::BuiltIn { about } => { + assert!( + known_external_desc.is_none(), + "KNOWN_EXTERNAL_COMMANDS shouldn't contain builtin \"{}\"", + name + ); let summary = about.unwrap_or_default(); let summary = summary.lines().next().unwrap_or(&summary); // display only the first line drop_println!(config, " {:<20} {}", name, summary); } - CommandInfo::External { name, path } => { - if is_verbose { + CommandInfo::External { path } => { + if let Some(desc) = known_external_desc { + drop_println!(config, " {:<20} {}", name, desc); + } else if is_verbose { drop_println!(config, " {:<20} {}", name, path.display()); } else { drop_println!(config, " {}", name); } } + CommandInfo::Alias { target } => { + drop_println!(config, " {:<20} {}", name, target.iter().join(" ")); + } } } return Ok(()); @@ -95,7 +143,7 @@ // Global args need to be extracted before expanding aliases because the // clap code for extracting a subcommand discards global options // (appearing before the subcommand). - let (expanded_args, global_args) = expand_aliases(config, args)?; + let (expanded_args, global_args) = expand_aliases(config, args, vec![])?; let (cmd, subcommand_args) = match expanded_args.subcommand() { (cmd, Some(args)) => (cmd, args), _ => { @@ -112,8 +160,7 @@ pub fn get_version_string(is_verbose: bool) -> String { let version = cargo::version(); - let mut version_string = version.to_string(); - version_string.push_str("\n"); + let mut version_string = format!("cargo {}\n", version); if is_verbose { version_string.push_str(&format!( "release: {}.{}.{}\n", @@ -132,6 +179,7 @@ fn expand_aliases( config: &mut Config, args: ArgMatches<'static>, + mut already_expanded: Vec, ) -> Result<(ArgMatches<'static>, GlobalArgs), CliError> { if let (cmd, Some(args)) = args.subcommand() { match ( @@ -145,6 +193,17 @@ cmd, ))?; } + (Some(_), None) => { + // Command is built-in and is not conflicting with alias, but contains ignored values. + if let Some(mut values) = args.values_of("") { + config.shell().warn(format!( + "trailing arguments after built-in command `{}` are ignored: `{}`", + cmd, + values.join(" "), + ))?; + } + } + (None, None) => {} (_, Some(mut alias)) => { alias.extend( args.values_of("") @@ -159,10 +218,23 @@ let new_args = cli() .setting(AppSettings::NoBinaryName) .get_matches_from_safe(alias)?; - let (expanded_args, _) = expand_aliases(config, new_args)?; + + let (new_cmd, _) = new_args.subcommand(); + already_expanded.push(cmd.to_string()); + if already_expanded.contains(&new_cmd.to_string()) { + // Crash if the aliases are corecursive / unresolvable + return Err(anyhow!( + "alias {} has unresolvable recursive definition: {} -> {}", + already_expanded[0], + already_expanded.join(" -> "), + new_cmd, + ) + .into()); + } + + let (expanded_args, _) = expand_aliases(config, new_args, already_expanded)?; return Ok((expanded_args, global_args)); } - (_, None) => {} } }; @@ -284,7 +356,7 @@ build, b Compile the current package check, c Analyze the current package and report errors, but don't build object files clean Remove the target directory - doc Build this package's and its dependencies' documentation + doc, d Build this package's and its dependencies' documentation new Create a new cargo package init Create a new cargo package in an existing directory run, r Run a binary or example of the local package @@ -320,9 +392,12 @@ .arg(opt("locked", "Require Cargo.lock is up to date").global(true)) .arg(opt("offline", "Run without accessing the network").global(true)) .arg( - multi_opt("config", "KEY=VALUE", "Override a configuration value") - .global(true) - .hidden(true), + multi_opt( + "config", + "KEY=VALUE", + "Override a configuration value (unstable)", + ) + .global(true), ) .arg( Arg::with_name("unstable-features") diff -Nru cargo-mozilla-0.47.0/src/bin/cargo/commands/bench.rs cargo-mozilla-0.57.0/src/bin/cargo/commands/bench.rs --- cargo-mozilla-0.47.0/src/bin/cargo/commands/bench.rs 2020-07-17 20:39:39.000000000 +0000 +++ cargo-mozilla-0.57.0/src/bin/cargo/commands/bench.rs 2021-10-04 17:24:20.000000000 +0000 @@ -35,40 +35,19 @@ "Exclude packages from the benchmark", ) .arg_jobs() + .arg_profile("Build artifacts with the specified profile") .arg_features() .arg_target_triple("Build for the target triple") .arg_target_dir() .arg_manifest_path() + .arg_ignore_rust_version() .arg_message_format() .arg(opt( "no-fail-fast", "Run all benchmarks regardless of failure", )) .arg_unit_graph() - .after_help( - "\ -The benchmark filtering argument BENCHNAME and all the arguments following the -two dashes (`--`) are passed to the benchmark binaries and thus to libtest -(rustc's built in unit-test and micro-benchmarking framework). If you're -passing arguments to both Cargo and the binary, the ones after `--` go to the -binary, the ones before go to Cargo. For details about libtest's arguments see -the output of `cargo bench -- --help`. - -If the `--package` argument is given, then SPEC is a package ID specification -which indicates which package should be benchmarked. If it is not given, then -the current package is benchmarked. For more information on SPEC and its format, -see the `cargo help pkgid` command. - -All packages in the workspace are benchmarked if the `--workspace` flag is supplied. The -`--workspace` flag is automatically assumed for a virtual manifest. -Note that `--exclude` has to be specified in conjunction with the `--workspace` flag. - -The `--jobs` argument affects the building of the benchmark executable but does -not affect how many jobs are used when running the benchmarks. - -Compilation can be customized with the `bench` profile in the manifest. -", - ) + .after_help("Run `cargo help bench` for more detailed information.\n") } pub fn exec(config: &mut Config, args: &ArgMatches<'_>) -> CliResult { @@ -77,11 +56,11 @@ config, CompileMode::Bench, Some(&ws), - ProfileChecking::Checked, + ProfileChecking::Custom, )?; compile_opts.build_config.requested_profile = - args.get_profile_name(config, "bench", ProfileChecking::Checked)?; + args.get_profile_name(config, "bench", ProfileChecking::Custom)?; let ops = TestOptions { no_run: args.is_present("no-run"), @@ -96,7 +75,7 @@ let err = ops::run_benches(&ws, &ops, &bench_args)?; match err { None => Ok(()), - Some(err) => Err(match err.exit.as_ref().and_then(|e| e.code()) { + Some(err) => Err(match err.code { Some(i) => CliError::new(anyhow::format_err!("bench failed"), i), None => CliError::new(err.into(), 101), }), diff -Nru cargo-mozilla-0.47.0/src/bin/cargo/commands/build.rs cargo-mozilla-0.57.0/src/bin/cargo/commands/build.rs --- cargo-mozilla-0.47.0/src/bin/cargo/commands/build.rs 2020-07-17 20:39:39.000000000 +0000 +++ cargo-mozilla-0.57.0/src/bin/cargo/commands/build.rs 2021-10-04 17:24:20.000000000 +0000 @@ -39,20 +39,12 @@ .value_name("PATH"), ) .arg_manifest_path() + .arg_ignore_rust_version() .arg_message_format() .arg_build_plan() .arg_unit_graph() - .after_help( - "\ -All packages in the workspace are built if the `--workspace` flag is supplied. The -`--workspace` flag is automatically assumed for a virtual manifest. -Note that `--exclude` has to be specified in conjunction with the `--workspace` flag. - -Compilation can be configured via the use of profiles which are configured in -the manifest. The default profile for this command is `dev`, but passing -the --release flag will use the `release` profile instead. -", - ) + .arg_future_incompat_report() + .after_help("Run `cargo help build` for more detailed information.\n") } pub fn exec(config: &mut Config, args: &ArgMatches<'_>) -> CliResult { @@ -61,7 +53,7 @@ config, CompileMode::Build, Some(&ws), - ProfileChecking::Checked, + ProfileChecking::Custom, )?; if let Some(out_dir) = args.value_of_path("out-dir", config) { diff -Nru cargo-mozilla-0.47.0/src/bin/cargo/commands/check.rs cargo-mozilla-0.57.0/src/bin/cargo/commands/check.rs --- cargo-mozilla-0.47.0/src/bin/cargo/commands/check.rs 2020-07-17 20:39:39.000000000 +0000 +++ cargo-mozilla-0.57.0/src/bin/cargo/commands/check.rs 2021-10-04 17:24:20.000000000 +0000 @@ -32,45 +32,20 @@ .arg_target_triple("Check for the target triple") .arg_target_dir() .arg_manifest_path() + .arg_ignore_rust_version() .arg_message_format() .arg_unit_graph() - .after_help( - "\ -If the `--package` argument is given, then SPEC is a package ID specification -which indicates which package should be built. If it is not given, then the -current package is built. For more information on SPEC and its format, see the -`cargo help pkgid` command. - -All packages in the workspace are checked if the `--workspace` flag is supplied. The -`--workspace` flag is automatically assumed for a virtual manifest. -Note that `--exclude` has to be specified in conjunction with the `--workspace` flag. - -Compilation can be configured via the use of profiles which are configured in -the manifest. The default profile for this command is `dev`, but passing -the `--release` flag will use the `release` profile instead. - -The `--profile test` flag can be used to check unit tests with the -`#[cfg(test)]` attribute. -", - ) + .arg_future_incompat_report() + .after_help("Run `cargo help check` for more detailed information.\n") } pub fn exec(config: &mut Config, args: &ArgMatches<'_>) -> CliResult { let ws = args.workspace(config)?; - let test = match args.value_of("profile") { - Some("test") => true, - None => false, - Some(profile) => { - let err = anyhow::format_err!( - "unknown profile: `{}`, only `test` is \ - currently supported", - profile - ); - return Err(CliError::new(err, 101)); - } - }; + // This is a legacy behavior that causes `cargo check` to pass `--test`. + let test = matches!(args.value_of("profile"), Some("test")); let mode = CompileMode::Check { test }; - let compile_opts = args.compile_options(config, mode, Some(&ws), ProfileChecking::Unchecked)?; + let compile_opts = + args.compile_options(config, mode, Some(&ws), ProfileChecking::LegacyTestOnly)?; ops::compile(&ws, &compile_opts)?; Ok(()) diff -Nru cargo-mozilla-0.47.0/src/bin/cargo/commands/clean.rs cargo-mozilla-0.57.0/src/bin/cargo/commands/clean.rs --- cargo-mozilla-0.47.0/src/bin/cargo/commands/clean.rs 2020-07-17 20:39:39.000000000 +0000 +++ cargo-mozilla-0.57.0/src/bin/cargo/commands/clean.rs 2021-10-04 17:24:20.000000000 +0000 @@ -1,6 +1,7 @@ use crate::command_prelude::*; use cargo::ops::{self, CleanOptions}; +use cargo::util::print_available_packages; pub fn cli() -> App { subcommand("clean") @@ -13,23 +14,21 @@ .arg_release("Whether or not to clean release artifacts") .arg_profile("Clean artifacts of the specified profile") .arg_doc("Whether or not to clean just the documentation directory") - .after_help( - "\ -If the `--package` argument is given, then SPEC is a package ID specification -which indicates which package's artifacts should be cleaned out. If it is not -given, then all packages' artifacts are removed. For more information on SPEC -and its format, see the `cargo help pkgid` command. -", - ) + .after_help("Run `cargo help clean` for more detailed information.\n") } pub fn exec(config: &mut Config, args: &ArgMatches<'_>) -> CliResult { let ws = args.workspace(config)?; + + if args.is_present_with_zero_values("package") { + print_available_packages(&ws)?; + } + let opts = CleanOptions { config, spec: values(args, "package"), targets: args.targets(), - requested_profile: args.get_profile_name(config, "dev", ProfileChecking::Checked)?, + requested_profile: args.get_profile_name(config, "dev", ProfileChecking::Custom)?, profile_specified: args.is_present("profile") || args.is_present("release"), doc: args.is_present("doc"), }; diff -Nru cargo-mozilla-0.47.0/src/bin/cargo/commands/config.rs cargo-mozilla-0.57.0/src/bin/cargo/commands/config.rs --- cargo-mozilla-0.47.0/src/bin/cargo/commands/config.rs 1970-01-01 00:00:00.000000000 +0000 +++ cargo-mozilla-0.57.0/src/bin/cargo/commands/config.rs 2021-10-04 17:24:20.000000000 +0000 @@ -0,0 +1,48 @@ +use crate::command_prelude::*; +use cargo::ops::cargo_config; + +pub fn cli() -> App { + subcommand("config") + .about("Inspect configuration values") + .after_help("Run `cargo help config` for more detailed information.\n") + .setting(clap::AppSettings::SubcommandRequiredElseHelp) + .subcommand( + subcommand("get") + .arg(Arg::with_name("key").help("The config key to display")) + .arg( + opt("format", "Display format") + .possible_values(cargo_config::ConfigFormat::POSSIBLE_VALUES) + .default_value("toml"), + ) + .arg(opt( + "show-origin", + "Display where the config value is defined", + )) + .arg( + opt("merged", "Whether or not to merge config values") + .possible_values(&["yes", "no"]) + .default_value("yes"), + ), + ) +} + +pub fn exec(config: &mut Config, args: &ArgMatches<'_>) -> CliResult { + config + .cli_unstable() + .fail_if_stable_command(config, "config", 9301)?; + match args.subcommand() { + ("get", Some(args)) => { + let opts = cargo_config::GetOptions { + key: args.value_of("key"), + format: args.value_of("format").unwrap().parse()?, + show_origin: args.is_present("show-origin"), + merged: args.value_of("merged") == Some("yes"), + }; + cargo_config::get(config, &opts)?; + } + (cmd, _) => { + panic!("unexpected command `{}`", cmd) + } + } + Ok(()) +} diff -Nru cargo-mozilla-0.47.0/src/bin/cargo/commands/doc.rs cargo-mozilla-0.57.0/src/bin/cargo/commands/doc.rs --- cargo-mozilla-0.47.0/src/bin/cargo/commands/doc.rs 2020-07-17 20:39:39.000000000 +0000 +++ cargo-mozilla-0.57.0/src/bin/cargo/commands/doc.rs 2021-10-04 17:24:20.000000000 +0000 @@ -4,6 +4,8 @@ pub fn cli() -> App { subcommand("doc") + // subcommand aliases are handled in aliased_command() + // .alias("d") .about("Build a package's documentation") .arg(opt("quiet", "No output printed to stdout").short("q")) .arg(opt( @@ -18,10 +20,12 @@ .arg(opt("no-deps", "Don't build documentation for dependencies")) .arg(opt("document-private-items", "Document private items")) .arg_jobs() - .arg_targets_lib_bin( + .arg_targets_lib_bin_example( "Document only this package's library", "Document only the specified binary", "Document all binaries", + "Document only the specified example", + "Document all examples", ) .arg_release("Build artifacts in release mode, with optimizations") .arg_profile("Build artifacts with the specified profile") @@ -30,23 +34,9 @@ .arg_target_dir() .arg_manifest_path() .arg_message_format() + .arg_ignore_rust_version() .arg_unit_graph() - .after_help( - "\ -By default the documentation for the local package and all dependencies is -built. The output is all placed in `target/doc` in rustdoc's usual format. - -All packages in the workspace are documented if the `--workspace` flag is -supplied. The `--workspace` flag is automatically assumed for a virtual -manifest. Note that `--exclude` has to be specified in conjunction with the -`--workspace` flag. - -If the `--package` argument is given, then SPEC is a package ID specification -which indicates which package should be documented. If it is not given, then the -current package is documented. For more information on SPEC and its format, see -the `cargo help pkgid` command. -", - ) + .after_help("Run `cargo help doc` for more detailed information.\n") } pub fn exec(config: &mut Config, args: &ArgMatches<'_>) -> CliResult { @@ -55,7 +45,7 @@ deps: !args.is_present("no-deps"), }; let mut compile_opts = - args.compile_options(config, mode, Some(&ws), ProfileChecking::Checked)?; + args.compile_options(config, mode, Some(&ws), ProfileChecking::Custom)?; compile_opts.rustdoc_document_private_items = args.is_present("document-private-items"); let doc_opts = DocOptions { diff -Nru cargo-mozilla-0.47.0/src/bin/cargo/commands/fetch.rs cargo-mozilla-0.57.0/src/bin/cargo/commands/fetch.rs --- cargo-mozilla-0.47.0/src/bin/cargo/commands/fetch.rs 2020-07-17 20:39:39.000000000 +0000 +++ cargo-mozilla-0.57.0/src/bin/cargo/commands/fetch.rs 2021-10-04 17:24:20.000000000 +0000 @@ -9,18 +9,7 @@ .arg(opt("quiet", "No output printed to stdout").short("q")) .arg_manifest_path() .arg_target_triple("Fetch dependencies for the target triple") - .after_help( - "\ -If a lock file is available, this command will ensure that all of the Git -dependencies and/or registries dependencies are downloaded and locally -available. The network is never touched after a `cargo fetch` unless -the lock file changes. - -If the lock file is not available, then this is the equivalent of -`cargo generate-lockfile`. A lock file is generated and dependencies are also -all updated. -", - ) + .after_help("Run `cargo help fetch` for more detailed information.\n") } pub fn exec(config: &mut Config, args: &ArgMatches<'_>) -> CliResult { diff -Nru cargo-mozilla-0.47.0/src/bin/cargo/commands/fix.rs cargo-mozilla-0.57.0/src/bin/cargo/commands/fix.rs --- cargo-mozilla-0.47.0/src/bin/cargo/commands/fix.rs 2020-07-17 20:39:39.000000000 +0000 +++ cargo-mozilla-0.57.0/src/bin/cargo/commands/fix.rs 2021-10-04 17:24:20.000000000 +0000 @@ -42,17 +42,6 @@ .help("Fix in preparation for the next edition"), ) .arg( - // This is a deprecated argument, we'll want to phase it out - // eventually. - Arg::with_name("prepare-for") - .long("prepare-for") - .help("Fix warnings in preparation of an edition upgrade") - .takes_value(true) - .possible_values(&["2018"]) - .conflicts_with("edition") - .hidden(true), - ) - .arg( Arg::with_name("idioms") .long("edition-idioms") .help("Fix warnings to migrate to the idioms of an edition"), @@ -72,58 +61,20 @@ .long("allow-staged") .help("Fix code even if the working directory has staged changes"), ) - .after_help( - "\ -This Cargo subcommand will automatically take rustc's suggestions from -diagnostics like warnings and apply them to your source code. This is intended -to help automate tasks that rustc itself already knows how to tell you to fix! -The `cargo fix` subcommand is also being developed for the Rust 2018 edition -to provide code the ability to easily opt-in to the new edition without having -to worry about any breakage. - -Executing `cargo fix` will under the hood execute `cargo check`. Any warnings -applicable to your crate will be automatically fixed (if possible) and all -remaining warnings will be displayed when the check process is finished. For -example if you'd like to prepare for the 2018 edition, you can do so by -executing: - - cargo fix --edition - -which behaves the same as `cargo check --all-targets`. Similarly if you'd like -to fix code for different platforms you can do: - - cargo fix --edition --target x86_64-pc-windows-gnu - -or if your crate has optional features: - - cargo fix --edition --no-default-features --features foo - -If you encounter any problems with `cargo fix` or otherwise have any questions -or feature requests please don't hesitate to file an issue at -https://github.com/rust-lang/cargo -", - ) + .arg_ignore_rust_version() + .after_help("Run `cargo help fix` for more detailed information.\n") } pub fn exec(config: &mut Config, args: &ArgMatches<'_>) -> CliResult { let ws = args.workspace(config)?; - let test = match args.value_of("profile") { - Some("test") => true, - None => false, - Some(profile) => { - let err = anyhow::format_err!( - "unknown profile: `{}`, only `test` is \ - currently supported", - profile - ); - return Err(CliError::new(err, 101)); - } - }; + // This is a legacy behavior that causes `cargo fix` to pass `--test`. + let test = matches!(args.value_of("profile"), Some("test")); let mode = CompileMode::Check { test }; // Unlike other commands default `cargo fix` to all targets to fix as much // code as we can. - let mut opts = args.compile_options(config, mode, Some(&ws), ProfileChecking::Unchecked)?; + let mut opts = + args.compile_options(config, mode, Some(&ws), ProfileChecking::LegacyTestOnly)?; if let CompileFilter::Default { .. } = opts.filter { opts.filter = CompileFilter::Only { @@ -140,7 +91,6 @@ &ws, &mut ops::FixOptions { edition: args.is_present("edition"), - prepare_for: args.value_of("prepare-for"), idioms: args.is_present("idioms"), compile_opts: opts, allow_dirty: args.is_present("allow-dirty"), diff -Nru cargo-mozilla-0.47.0/src/bin/cargo/commands/generate_lockfile.rs cargo-mozilla-0.57.0/src/bin/cargo/commands/generate_lockfile.rs --- cargo-mozilla-0.47.0/src/bin/cargo/commands/generate_lockfile.rs 2020-07-17 20:39:39.000000000 +0000 +++ cargo-mozilla-0.57.0/src/bin/cargo/commands/generate_lockfile.rs 2021-10-04 17:24:20.000000000 +0000 @@ -7,6 +7,7 @@ .about("Generate the lockfile for a package") .arg(opt("quiet", "No output printed to stdout").short("q")) .arg_manifest_path() + .after_help("Run `cargo help generate-lockfile` for more detailed information.\n") } pub fn exec(config: &mut Config, args: &ArgMatches<'_>) -> CliResult { diff -Nru cargo-mozilla-0.47.0/src/bin/cargo/commands/help.rs cargo-mozilla-0.57.0/src/bin/cargo/commands/help.rs --- cargo-mozilla-0.47.0/src/bin/cargo/commands/help.rs 1970-01-01 00:00:00.000000000 +0000 +++ cargo-mozilla-0.57.0/src/bin/cargo/commands/help.rs 2021-10-04 17:24:20.000000000 +0000 @@ -0,0 +1,137 @@ +use crate::aliased_command; +use cargo::util::errors::CargoResult; +use cargo::Config; +use cargo_util::paths::resolve_executable; +use flate2::read::GzDecoder; +use std::ffi::OsString; +use std::io::Read; +use std::io::Write; +use std::path::Path; + +const COMPRESSED_MAN: &[u8] = include_bytes!(concat!(env!("OUT_DIR"), "/man.tgz")); + +/// Checks if the `help` command is being issued. +/// +/// This runs before clap processing, because it needs to intercept the `help` +/// command if a man page is available. +/// +/// Returns `true` if a man page was displayed. In this case, Cargo should +/// exit. +pub fn handle_embedded_help(config: &Config) -> bool { + match try_help(config) { + Ok(true) => true, + Ok(false) => false, + Err(e) => { + log::warn!("man failed: {:?}", e); + false + } + } +} + +fn try_help(config: &Config) -> CargoResult { + let mut args = std::env::args_os() + .skip(1) + .skip_while(|arg| arg.to_str().map_or(false, |s| s.starts_with('-'))); + if !args + .next() + .map_or(false, |arg| arg.to_str() == Some("help")) + { + return Ok(false); + } + let subcommand = match args.next() { + Some(arg) => arg, + None => return Ok(false), + }; + let subcommand = match subcommand.to_str() { + Some(s) => s, + None => return Ok(false), + }; + // Check if this is a built-in command (or alias); + let subcommand = match check_alias(config, subcommand) { + Some(s) => s, + None => return Ok(false), + }; + if resolve_executable(Path::new("man")).is_ok() { + let man = match extract_man(&subcommand, "1") { + Some(man) => man, + None => return Ok(false), + }; + write_and_spawn(&subcommand, &man, "man")?; + } else { + let txt = match extract_man(&subcommand, "txt") { + Some(txt) => txt, + None => return Ok(false), + }; + if resolve_executable(Path::new("less")).is_ok() { + write_and_spawn(&subcommand, &txt, "less")?; + } else if resolve_executable(Path::new("more")).is_ok() { + write_and_spawn(&subcommand, &txt, "more")?; + } else { + drop(std::io::stdout().write_all(&txt)); + } + } + Ok(true) +} + +/// Checks if the given subcommand is a built-in command (possibly via an alias). +/// +/// Returns None if it is not a built-in command. +fn check_alias(config: &Config, subcommand: &str) -> Option { + if super::builtin_exec(subcommand).is_some() { + return Some(subcommand.to_string()); + } + match aliased_command(config, subcommand) { + Ok(Some(alias)) => { + let alias = alias.into_iter().next()?; + if super::builtin_exec(&alias).is_some() { + Some(alias) + } else { + None + } + } + _ => None, + } +} + +/// Extracts the given man page from the compressed archive. +/// +/// Returns None if the command wasn't found. +fn extract_man(subcommand: &str, extension: &str) -> Option> { + let extract_name = OsString::from(format!("cargo-{}.{}", subcommand, extension)); + let gz = GzDecoder::new(COMPRESSED_MAN); + let mut ar = tar::Archive::new(gz); + // Unwraps should be safe here, since this is a static archive generated + // by our build script. It should never be an invalid format! + for entry in ar.entries().unwrap() { + let mut entry = entry.unwrap(); + let path = entry.path().unwrap(); + if path.file_name().unwrap() != extract_name { + continue; + } + let mut result = Vec::new(); + entry.read_to_end(&mut result).unwrap(); + return Some(result); + } + None +} + +/// Write the contents of a man page to disk and spawn the given command to +/// display it. +fn write_and_spawn(name: &str, contents: &[u8], command: &str) -> CargoResult<()> { + let prefix = format!("cargo-{}.", name); + let mut tmp = tempfile::Builder::new().prefix(&prefix).tempfile()?; + let f = tmp.as_file_mut(); + f.write_all(contents)?; + f.flush()?; + let path = tmp.path(); + // Use a path relative to the temp directory so that it can work on + // cygwin/msys systems which don't handle windows-style paths. + let mut relative_name = std::ffi::OsString::from("./"); + relative_name.push(path.file_name().unwrap()); + let mut cmd = std::process::Command::new(command) + .arg(relative_name) + .current_dir(path.parent().unwrap()) + .spawn()?; + drop(cmd.wait()); + Ok(()) +} diff -Nru cargo-mozilla-0.47.0/src/bin/cargo/commands/init.rs cargo-mozilla-0.57.0/src/bin/cargo/commands/init.rs --- cargo-mozilla-0.47.0/src/bin/cargo/commands/init.rs 2020-07-17 20:39:39.000000000 +0000 +++ cargo-mozilla-0.57.0/src/bin/cargo/commands/init.rs 2021-10-04 17:24:20.000000000 +0000 @@ -9,13 +9,14 @@ .arg(Arg::with_name("path").default_value(".")) .arg(opt("registry", "Registry to use").value_name("REGISTRY")) .arg_new_opts() + .after_help("Run `cargo help init` for more detailed information.\n") } pub fn exec(config: &mut Config, args: &ArgMatches<'_>) -> CliResult { let opts = args.new_options(config)?; - ops::init(&opts, config)?; + let project_kind = ops::init(&opts, config)?; config .shell() - .status("Created", format!("{} package", opts.kind))?; + .status("Created", format!("{} package", project_kind))?; Ok(()) } diff -Nru cargo-mozilla-0.47.0/src/bin/cargo/commands/install.rs cargo-mozilla-0.57.0/src/bin/cargo/commands/install.rs --- cargo-mozilla-0.47.0/src/bin/cargo/commands/install.rs 2020-07-17 20:39:39.000000000 +0000 +++ cargo-mozilla-0.57.0/src/bin/cargo/commands/install.rs 2021-10-04 17:24:20.000000000 +0000 @@ -71,59 +71,17 @@ .requires("crate") .conflicts_with_all(&["git", "path", "index"]), ) - .after_help( - "\ -This command manages Cargo's local set of installed binary crates. Only -packages which have executable [[bin]] or [[example]] targets can be -installed, and all executables are installed into the installation root's -`bin` folder. The installation root is determined, in order of precedence, by -`--root`, `$CARGO_INSTALL_ROOT`, the `install.root` configuration key, and -finally the home directory (which is either `$CARGO_HOME` if set or -`$HOME/.cargo` by default). - -There are multiple sources from which a crate can be installed. The default -location is crates.io but the `--git`, `--path`, and `--registry` flags can -change this source. If the source contains more than one package (such as -crates.io or a git repository with multiple crates) the `` argument is -required to indicate which crate should be installed. - -Crates from crates.io can optionally specify the version they wish to install -via the `--version` flags, and similarly packages from git repositories can -optionally specify the branch, tag, or revision that should be installed. If a -crate has multiple binaries, the `--bin` argument can selectively install only -one of them, and if you'd rather install examples the `--example` argument can -be used as well. - -If the package is already installed, Cargo will reinstall it if the installed -version does not appear to be up-to-date. Installing with `--path` will always -build and install, unless there are conflicting binaries from another package. - -If the source is crates.io or `--git` then by default the crate will be built -in a temporary target directory. To avoid this, the target directory can be -specified by setting the `CARGO_TARGET_DIR` environment variable to a relative -path. In particular, this can be useful for caching build artifacts on -continuous integration systems.", - ) + .after_help("Run `cargo help install` for more detailed information.\n") } pub fn exec(config: &mut Config, args: &ArgMatches<'_>) -> CliResult { if let Some(path) = args.value_of_path("path", config) { config.reload_rooted_at(path)?; } else { + // TODO: Consider calling set_search_stop_path(home). config.reload_rooted_at(config.home().clone().into_path_unlocked())?; } - let workspace = args.workspace(config).ok(); - let mut compile_opts = args.compile_options( - config, - CompileMode::Build, - workspace.as_ref(), - ProfileChecking::Checked, - )?; - - compile_opts.build_config.requested_profile = - args.get_profile_name(config, "release", ProfileChecking::Checked)?; - let krates = args .values_of("crate") .unwrap_or_default() @@ -140,7 +98,7 @@ } else if let Some(rev) = args.value_of("rev") { GitReference::Rev(rev.to_string()) } else { - GitReference::Branch("master".to_string()) + GitReference::DefaultBranch }; SourceId::for_git(&url, gitref)? } else if let Some(path) = args.value_of_path("path", config) { @@ -159,6 +117,26 @@ let version = args.value_of("version"); let root = args.value_of("root"); + // We only provide workspace information for local crate installation from + // one of the following sources: + // - From current working directory (only work for edition 2015). + // - From a specific local file path. + let workspace = if from_cwd || args.is_present("path") { + args.workspace(config).ok() + } else { + None + }; + + let mut compile_opts = args.compile_options( + config, + CompileMode::Build, + workspace.as_ref(), + ProfileChecking::Custom, + )?; + + compile_opts.build_config.requested_profile = + args.get_profile_name(config, "release", ProfileChecking::Custom)?; + if args.is_present("list") { ops::install_list(root, config)?; } else { diff -Nru cargo-mozilla-0.47.0/src/bin/cargo/commands/locate_project.rs cargo-mozilla-0.57.0/src/bin/cargo/commands/locate_project.rs --- cargo-mozilla-0.47.0/src/bin/cargo/commands/locate_project.rs 2020-07-17 20:39:39.000000000 +0000 +++ cargo-mozilla-0.57.0/src/bin/cargo/commands/locate_project.rs 2021-10-04 17:24:20.000000000 +0000 @@ -1,4 +1,6 @@ use crate::command_prelude::*; +use anyhow::bail; +use cargo::{drop_println, CargoResult}; use serde::Serialize; pub fn cli() -> App { @@ -6,6 +8,15 @@ .about("Print a JSON representation of a Cargo.toml file's location") .arg(opt("quiet", "No output printed to stdout").short("q")) .arg_manifest_path() + .arg( + opt( + "message-format", + "Output representation [possible values: json, plain]", + ) + .value_name("FMT"), + ) + .arg(opt("workspace", "Locate Cargo.toml of the workspace root")) + .after_help("Run `cargo help locate-project` for more detailed information.\n") } #[derive(Serialize)] @@ -14,7 +25,18 @@ } pub fn exec(config: &mut Config, args: &ArgMatches<'_>) -> CliResult { - let root = args.root_manifest(config)?; + let root_manifest; + let workspace; + let root = match WhatToFind::parse(args) { + WhatToFind::CurrentManifest => { + root_manifest = args.root_manifest(config)?; + &root_manifest + } + WhatToFind::Workspace => { + workspace = args.workspace(config)?; + workspace.root_manifest() + } + }; let root = root .to_str() @@ -28,6 +50,44 @@ let location = ProjectLocation { root }; - config.shell().print_json(&location); + match MessageFormat::parse(args)? { + MessageFormat::Json => config.shell().print_json(&location)?, + MessageFormat::Plain => drop_println!(config, "{}", location.root), + } + Ok(()) } + +enum WhatToFind { + CurrentManifest, + Workspace, +} + +impl WhatToFind { + fn parse(args: &ArgMatches<'_>) -> Self { + if args.is_present("workspace") { + WhatToFind::Workspace + } else { + WhatToFind::CurrentManifest + } + } +} + +enum MessageFormat { + Json, + Plain, +} + +impl MessageFormat { + fn parse(args: &ArgMatches<'_>) -> CargoResult { + let fmt = match args.value_of("message-format") { + Some(fmt) => fmt, + None => return Ok(MessageFormat::Json), + }; + match fmt.to_ascii_lowercase().as_str() { + "json" => Ok(MessageFormat::Json), + "plain" => Ok(MessageFormat::Plain), + s => bail!("invalid message format specifier: `{}`", s), + } + } +} diff -Nru cargo-mozilla-0.47.0/src/bin/cargo/commands/login.rs cargo-mozilla-0.57.0/src/bin/cargo/commands/login.rs --- cargo-mozilla-0.47.0/src/bin/cargo/commands/login.rs 2020-07-17 20:39:39.000000000 +0000 +++ cargo-mozilla-0.57.0/src/bin/cargo/commands/login.rs 2021-10-04 17:24:20.000000000 +0000 @@ -10,12 +10,14 @@ ) .arg(opt("quiet", "No output printed to stdout").short("q")) .arg(Arg::with_name("token")) + // --host is deprecated (use --registry instead) .arg( opt("host", "Host to set the token for") .value_name("HOST") .hidden(true), ) .arg(opt("registry", "Registry to use").value_name("REGISTRY")) + .after_help("Run `cargo help login` for more detailed information.\n") } pub fn exec(config: &mut Config, args: &ArgMatches<'_>) -> CliResult { diff -Nru cargo-mozilla-0.47.0/src/bin/cargo/commands/logout.rs cargo-mozilla-0.57.0/src/bin/cargo/commands/logout.rs --- cargo-mozilla-0.47.0/src/bin/cargo/commands/logout.rs 1970-01-01 00:00:00.000000000 +0000 +++ cargo-mozilla-0.57.0/src/bin/cargo/commands/logout.rs 2021-10-04 17:24:20.000000000 +0000 @@ -0,0 +1,21 @@ +use crate::command_prelude::*; +use cargo::ops; + +pub fn cli() -> App { + subcommand("logout") + .about("Remove an API token from the registry locally") + .arg(opt("quiet", "No output printed to stdout").short("q")) + .arg(opt("registry", "Registry to use").value_name("REGISTRY")) + .after_help("Run `cargo help logout` for more detailed information.\n") +} + +pub fn exec(config: &mut Config, args: &ArgMatches<'_>) -> CliResult { + if !config.cli_unstable().credential_process { + config + .cli_unstable() + .fail_if_stable_command(config, "logout", 8933)?; + } + config.load_credentials()?; + ops::registry_logout(config, args.value_of("registry").map(String::from))?; + Ok(()) +} diff -Nru cargo-mozilla-0.47.0/src/bin/cargo/commands/metadata.rs cargo-mozilla-0.57.0/src/bin/cargo/commands/metadata.rs --- cargo-mozilla-0.47.0/src/bin/cargo/commands/metadata.rs 2020-07-17 20:39:39.000000000 +0000 +++ cargo-mozilla-0.57.0/src/bin/cargo/commands/metadata.rs 2021-10-04 17:24:20.000000000 +0000 @@ -8,7 +8,7 @@ the concrete used versions including overrides, \ in machine-readable format", ) - .arg(opt("quiet", "No output printed to stdout").short("q")) + .arg(opt("quiet", "Do not print cargo log messages").short("q")) .arg_features() .arg(multi_opt( "filter-platform", @@ -26,6 +26,7 @@ .value_name("VERSION") .possible_value("1"), ) + .after_help("Run `cargo help metadata` for more detailed information.\n") } pub fn exec(config: &mut Config, args: &ArgMatches<'_>) -> CliResult { @@ -43,15 +44,13 @@ }; let options = OutputMetadataOptions { - features: values(args, "features"), - all_features: args.is_present("all-features"), - no_default_features: args.is_present("no-default-features"), + cli_features: args.cli_features()?, no_deps: args.is_present("no-deps"), filter_platforms: args._values_of("filter-platform"), version, }; let result = ops::output_metadata(&ws, &options)?; - config.shell().print_json(&result); + config.shell().print_json(&result)?; Ok(()) } diff -Nru cargo-mozilla-0.47.0/src/bin/cargo/commands/mod.rs cargo-mozilla-0.57.0/src/bin/cargo/commands/mod.rs --- cargo-mozilla-0.47.0/src/bin/cargo/commands/mod.rs 2020-07-17 20:39:39.000000000 +0000 +++ cargo-mozilla-0.57.0/src/bin/cargo/commands/mod.rs 2021-10-04 17:24:20.000000000 +0000 @@ -6,6 +6,7 @@ build::cli(), check::cli(), clean::cli(), + config::cli(), doc::cli(), fetch::cli(), fix::cli(), @@ -15,6 +16,7 @@ install::cli(), locate_project::cli(), login::cli(), + logout::cli(), metadata::cli(), new::cli(), owner::cli(), @@ -22,6 +24,7 @@ pkgid::cli(), publish::cli(), read_manifest::cli(), + report::cli(), run::cli(), rustc::cli(), rustdoc::cli(), @@ -43,6 +46,7 @@ "build" => build::exec, "check" => check::exec, "clean" => clean::exec, + "config" => config::exec, "doc" => doc::exec, "fetch" => fetch::exec, "fix" => fix::exec, @@ -52,6 +56,7 @@ "install" => install::exec, "locate-project" => locate_project::exec, "login" => login::exec, + "logout" => logout::exec, "metadata" => metadata::exec, "new" => new::exec, "owner" => owner::exec, @@ -59,6 +64,7 @@ "pkgid" => pkgid::exec, "publish" => publish::exec, "read-manifest" => read_manifest::exec, + "report" => report::exec, "run" => run::exec, "rustc" => rustc::exec, "rustdoc" => rustdoc::exec, @@ -80,15 +86,18 @@ pub mod build; pub mod check; pub mod clean; +pub mod config; pub mod doc; pub mod fetch; pub mod fix; pub mod generate_lockfile; pub mod git_checkout; +pub mod help; pub mod init; pub mod install; pub mod locate_project; pub mod login; +pub mod logout; pub mod metadata; pub mod new; pub mod owner; @@ -96,6 +105,7 @@ pub mod pkgid; pub mod publish; pub mod read_manifest; +pub mod report; pub mod run; pub mod rustc; pub mod rustdoc; diff -Nru cargo-mozilla-0.47.0/src/bin/cargo/commands/new.rs cargo-mozilla-0.57.0/src/bin/cargo/commands/new.rs --- cargo-mozilla-0.47.0/src/bin/cargo/commands/new.rs 2020-07-17 20:39:39.000000000 +0000 +++ cargo-mozilla-0.57.0/src/bin/cargo/commands/new.rs 2021-10-04 17:24:20.000000000 +0000 @@ -9,6 +9,7 @@ .arg(Arg::with_name("path").required(true)) .arg(opt("registry", "Registry to use").value_name("REGISTRY")) .arg_new_opts() + .after_help("Run `cargo help new` for more detailed information.\n") } pub fn exec(config: &mut Config, args: &ArgMatches<'_>) -> CliResult { diff -Nru cargo-mozilla-0.47.0/src/bin/cargo/commands/owner.rs cargo-mozilla-0.57.0/src/bin/cargo/commands/owner.rs --- cargo-mozilla-0.47.0/src/bin/cargo/commands/owner.rs 2020-07-17 20:39:39.000000000 +0000 +++ cargo-mozilla-0.57.0/src/bin/cargo/commands/owner.rs 2021-10-04 17:24:20.000000000 +0000 @@ -27,15 +27,7 @@ .arg(opt("index", "Registry index to modify owners for").value_name("INDEX")) .arg(opt("token", "API token to use when authenticating").value_name("TOKEN")) .arg(opt("registry", "Registry to use").value_name("REGISTRY")) - .after_help( - "\ -This command will modify the owners for a crate on the specified registry (or -default). Owners of a crate can upload new versions and yank old versions. -Explicitly named owners can also modify the set of owners, so take care! - - See https://doc.rust-lang.org/cargo/reference/publishing.html#cargo-owner - for detailed documentation and troubleshooting.", - ) + .after_help("Run `cargo help owner` for more detailed information.\n") } pub fn exec(config: &mut Config, args: &ArgMatches<'_>) -> CliResult { diff -Nru cargo-mozilla-0.47.0/src/bin/cargo/commands/package.rs cargo-mozilla-0.57.0/src/bin/cargo/commands/package.rs --- cargo-mozilla-0.47.0/src/bin/cargo/commands/package.rs 2020-07-17 20:39:39.000000000 +0000 +++ cargo-mozilla-0.57.0/src/bin/cargo/commands/package.rs 2021-10-04 17:24:20.000000000 +0000 @@ -28,12 +28,20 @@ .arg_target_triple("Build for the target triple") .arg_target_dir() .arg_features() + .arg_package_spec_no_all( + "Package(s) to assemble", + "Assemble all packages in the workspace", + "Don't assemble specified packages", + ) .arg_manifest_path() .arg_jobs() + .after_help("Run `cargo help package` for more detailed information.\n") } pub fn exec(config: &mut Config, args: &ArgMatches<'_>) -> CliResult { let ws = args.workspace(config)?; + let specs = args.packages_from_flags()?; + ops::package( &ws, &PackageOpts { @@ -42,12 +50,12 @@ list: args.is_present("list"), check_metadata: !args.is_present("no-metadata"), allow_dirty: args.is_present("allow-dirty"), + to_package: specs, targets: args.targets(), jobs: args.jobs()?, - features: args._values_of("features"), - all_features: args.is_present("all-features"), - no_default_features: args.is_present("no-default-features"), + cli_features: args.cli_features()?, }, )?; + Ok(()) } diff -Nru cargo-mozilla-0.47.0/src/bin/cargo/commands/pkgid.rs cargo-mozilla-0.57.0/src/bin/cargo/commands/pkgid.rs --- cargo-mozilla-0.47.0/src/bin/cargo/commands/pkgid.rs 2020-07-17 20:39:39.000000000 +0000 +++ cargo-mozilla-0.57.0/src/bin/cargo/commands/pkgid.rs 2021-10-04 17:24:20.000000000 +0000 @@ -1,6 +1,7 @@ use crate::command_prelude::*; use cargo::ops; +use cargo::util::print_available_packages; pub fn cli() -> App { subcommand("pkgid") @@ -9,32 +10,14 @@ .arg(Arg::with_name("spec")) .arg_package("Argument to get the package ID specifier for") .arg_manifest_path() - .after_help( - "\ -Given a argument, print out the fully qualified package ID specifier. -This command will generate an error if is ambiguous as to which package -it refers to in the dependency graph. If no is given, then the pkgid for -the local package is printed. - -This command requires that a lockfile is available and dependencies have been -fetched. - -Example Package IDs - - pkgid | name | version | url - |-----------------------------|--------|-----------|---------------------| - foo | foo | * | * - foo:1.2.3 | foo | 1.2.3 | * - crates.io/foo | foo | * | *://crates.io/foo - crates.io/foo#1.2.3 | foo | 1.2.3 | *://crates.io/foo - crates.io/bar#foo:1.2.3 | foo | 1.2.3 | *://crates.io/bar - https://crates.io/foo#1.2.3 | foo | 1.2.3 | https://crates.io/foo -", - ) + .after_help("Run `cargo help pkgid` for more detailed information.\n") } pub fn exec(config: &mut Config, args: &ArgMatches<'_>) -> CliResult { let ws = args.workspace(config)?; + if args.is_present_with_zero_values("package") { + print_available_packages(&ws)? + } let spec = args.value_of("spec").or_else(|| args.value_of("package")); let spec = ops::pkgid(&ws, spec)?; cargo::drop_println!(config, "{}", spec); diff -Nru cargo-mozilla-0.47.0/src/bin/cargo/commands/publish.rs cargo-mozilla-0.57.0/src/bin/cargo/commands/publish.rs --- cargo-mozilla-0.47.0/src/bin/cargo/commands/publish.rs 2020-07-17 20:39:39.000000000 +0000 +++ cargo-mozilla-0.57.0/src/bin/cargo/commands/publish.rs 2021-10-04 17:24:20.000000000 +0000 @@ -18,11 +18,13 @@ )) .arg_target_triple("Build for the target triple") .arg_target_dir() + .arg_package("Package to publish") .arg_manifest_path() .arg_features() .arg_jobs() .arg_dry_run("Perform all checks without uploading") .arg(opt("registry", "Registry to publish to").value_name("REGISTRY")) + .after_help("Run `cargo help publish` for more detailed information.\n") } pub fn exec(config: &mut Config, args: &ArgMatches<'_>) -> CliResult { @@ -40,13 +42,12 @@ index, verify: !args.is_present("no-verify"), allow_dirty: args.is_present("allow-dirty"), + to_publish: args.packages_from_flags()?, targets: args.targets(), jobs: args.jobs()?, dry_run: args.is_present("dry-run"), registry, - features: args._values_of("features"), - all_features: args.is_present("all-features"), - no_default_features: args.is_present("no-default-features"), + cli_features: args.cli_features()?, }, )?; Ok(()) diff -Nru cargo-mozilla-0.47.0/src/bin/cargo/commands/read_manifest.rs cargo-mozilla-0.57.0/src/bin/cargo/commands/read_manifest.rs --- cargo-mozilla-0.47.0/src/bin/cargo/commands/read_manifest.rs 2020-07-17 2