From 5460c89b3f6e710aa1698cb9f800a52a6422e0bf Mon Sep 17 00:00:00 2001 From: ptrcnull Date: Sat, 4 May 2024 13:31:17 +0200 Subject: [PATCH] community/cargo-edit: fix build with new rust --- community/cargo-edit/APKBUILD | 5 +- community/cargo-edit/fix-tests.patch | 255 +++++++++++++++++++++++++++ 2 files changed, 259 insertions(+), 1 deletion(-) create mode 100644 community/cargo-edit/fix-tests.patch diff --git a/community/cargo-edit/APKBUILD b/community/cargo-edit/APKBUILD index 6aec1f241fe..c5cff3c4d42 100644 --- a/community/cargo-edit/APKBUILD +++ b/community/cargo-edit/APKBUILD @@ -17,7 +17,9 @@ makedepends=" " subpackages="$pkgname-doc" options="net" -source="$pkgname-$pkgver.tar.gz::https://github.com/killercup/cargo-edit/archive/v$pkgver.tar.gz" +source="$pkgname-$pkgver.tar.gz::https://github.com/killercup/cargo-edit/archive/v$pkgver.tar.gz + fix-tests.patch + " export LIBSSH2_SYS_USE_PKG_CONFIG=1 # use system libssh2 @@ -60,4 +62,5 @@ package() { sha512sums=" 91750b1129eebbbc86d9eb1e3e3ed428039b4997975a7708acee60cd537b5daa4a1de0ed64462162fa82b73a15795c1e1603aaac2f7bcc1570ec83c147f0c207 cargo-edit-0.12.2.tar.gz +f34160f70cac4ce00801768f0e1ffbb1aac308ed9300d9ed10374e9f6c412fa2e6c2c2925116d3a932d05917aefc796038930e0ce9bfb4acfb0285b88902d5fe fix-tests.patch " diff --git a/community/cargo-edit/fix-tests.patch b/community/cargo-edit/fix-tests.patch new file mode 100644 index 00000000000..e8c5f5851c4 --- /dev/null +++ b/community/cargo-edit/fix-tests.patch @@ -0,0 +1,255 @@ +recreated the stdout/stderr snapshots with Rust 1.78.0-r0 +by running `SNAPSHOTS=overwrite cargo test` + +diff --git a/tests/cargo-upgrade/alt_registry/stderr.log b/tests/cargo-upgrade/alt_registry/stderr.log +index 34c0020..b285e5b 100644 +--- a/tests/cargo-upgrade/alt_registry/stderr.log ++++ b/tests/cargo-upgrade/alt_registry/stderr.log +@@ -4 +4,3 @@ + Upgrading recursive dependencies ++warning: `[ROOT]/home/.cargo/config` is deprecated in favor of `config.toml` ++note: if you need to support cargo 1.38 or earlier, you can symlink `config` to `config.toml` +diff --git a/tests/cargo-upgrade/cli_rust_version/stderr.log b/tests/cargo-upgrade/cli_rust_version/stderr.log +index 017c781..bb7bff6 100644 +--- a/tests/cargo-upgrade/cli_rust_version/stderr.log ++++ b/tests/cargo-upgrade/cli_rust_version/stderr.log +@@ -3 +3,3 @@ + Upgrading recursive dependencies ++warning: `[ROOT]/home/.cargo/config` is deprecated in favor of `config.toml` ++note: if you need to support cargo 1.38 or earlier, you can symlink `config` to `config.toml` +diff --git a/tests/cargo-upgrade/exclude_dep/stderr.log b/tests/cargo-upgrade/exclude_dep/stderr.log +index 2b8798d..dcb52a0 100644 +--- a/tests/cargo-upgrade/exclude_dep/stderr.log ++++ b/tests/cargo-upgrade/exclude_dep/stderr.log +@@ -3 +3,3 @@ + Upgrading recursive dependencies ++warning: `[ROOT]/home/.cargo/config` is deprecated in favor of `config.toml` ++note: if you need to support cargo 1.38 or earlier, you can symlink `config` to `config.toml` +diff --git a/tests/cargo-upgrade/ignore_rust_version/stderr.log b/tests/cargo-upgrade/ignore_rust_version/stderr.log +index 017c781..bb7bff6 100644 +--- a/tests/cargo-upgrade/ignore_rust_version/stderr.log ++++ b/tests/cargo-upgrade/ignore_rust_version/stderr.log +@@ -3 +3,3 @@ + Upgrading recursive dependencies ++warning: `[ROOT]/home/.cargo/config` is deprecated in favor of `config.toml` ++note: if you need to support cargo 1.38 or earlier, you can symlink `config` to `config.toml` +diff --git a/tests/cargo-upgrade/implicit_prerelease/stderr.log b/tests/cargo-upgrade/implicit_prerelease/stderr.log +index 017c781..bb7bff6 100644 +--- a/tests/cargo-upgrade/implicit_prerelease/stderr.log ++++ b/tests/cargo-upgrade/implicit_prerelease/stderr.log +@@ -3 +3,3 @@ + Upgrading recursive dependencies ++warning: `[ROOT]/home/.cargo/config` is deprecated in favor of `config.toml` ++note: if you need to support cargo 1.38 or earlier, you can symlink `config` to `config.toml` +diff --git a/tests/cargo-upgrade/invalid_manifest/stderr.log b/tests/cargo-upgrade/invalid_manifest/stderr.log +index 2520158..6eb2c57 100644 +--- a/tests/cargo-upgrade/invalid_manifest/stderr.log ++++ b/tests/cargo-upgrade/invalid_manifest/stderr.log +@@ -1,13 +1,10 @@ + Updating '[ROOTURL]/registry' index +-Error: `cargo metadata` exited with an error: error: failed to parse manifest at `[ROOT]/case/Cargo.toml` +- +-Caused by: +- could not parse input as TOML +- +-Caused by: +- TOML parse error at line 1, column 6 +- | +- 1 | This is clearly not a valid Cargo.toml. +- | ^ +- expected `.`, `=` ++Error: `cargo metadata` exited with an error: warning: `[ROOT]/home/.cargo/config` is deprecated in favor of `config.toml` ++note: if you need to support cargo 1.38 or earlier, you can symlink `config` to `config.toml` ++error: expected `.`, `=` ++ --> Cargo.toml:1:6 ++ | ++1 | This is clearly not a valid Cargo.toml. ++ | ^ ++ | + +diff --git a/tests/cargo-upgrade/invalid_workspace_root_manifest/stderr.log b/tests/cargo-upgrade/invalid_workspace_root_manifest/stderr.log +index ff297b6..0af116d 100644 +--- a/tests/cargo-upgrade/invalid_workspace_root_manifest/stderr.log ++++ b/tests/cargo-upgrade/invalid_workspace_root_manifest/stderr.log +@@ -1,6 +1,3 @@ + Updating '[ROOTURL]/registry' index +-Error: `cargo metadata` exited with an error: error: failed to parse manifest at `[ROOT]/case/Cargo.toml` +- +-Caused by: +- could not parse input as TOML ++Error: `cargo metadata` exited with an error: warning: `[ROOT]/home/.cargo/config` is deprecated in favor of `config.toml` + ... +diff --git a/tests/cargo-upgrade/lockfile/stderr.log b/tests/cargo-upgrade/lockfile/stderr.log +index d3d7b1e..4b8fa20 100644 +--- a/tests/cargo-upgrade/lockfile/stderr.log ++++ b/tests/cargo-upgrade/lockfile/stderr.log +@@ -7 +7,3 @@ + Upgrading recursive dependencies ++warning: `[ROOT]/home/.cargo/config` is deprecated in favor of `config.toml` ++note: if you need to support cargo 1.38 or earlier, you can symlink `config` to `config.toml` +diff --git a/tests/cargo-upgrade/optional_dep/stderr.log b/tests/cargo-upgrade/optional_dep/stderr.log +index 017c781..bb7bff6 100644 +--- a/tests/cargo-upgrade/optional_dep/stderr.log ++++ b/tests/cargo-upgrade/optional_dep/stderr.log +@@ -3 +3,3 @@ + Upgrading recursive dependencies ++warning: `[ROOT]/home/.cargo/config` is deprecated in favor of `config.toml` ++note: if you need to support cargo 1.38 or earlier, you can symlink `config` to `config.toml` +diff --git a/tests/cargo-upgrade/package_rust_version/stderr.log b/tests/cargo-upgrade/package_rust_version/stderr.log +index 017c781..bb7bff6 100644 +--- a/tests/cargo-upgrade/package_rust_version/stderr.log ++++ b/tests/cargo-upgrade/package_rust_version/stderr.log +@@ -3 +3,3 @@ + Upgrading recursive dependencies ++warning: `[ROOT]/home/.cargo/config` is deprecated in favor of `config.toml` ++note: if you need to support cargo 1.38 or earlier, you can symlink `config` to `config.toml` +diff --git a/tests/cargo-upgrade/pinned/stderr.log b/tests/cargo-upgrade/pinned/stderr.log +index 6b39caf..7604656 100644 +--- a/tests/cargo-upgrade/pinned/stderr.log ++++ b/tests/cargo-upgrade/pinned/stderr.log +@@ -3,2 +3,4 @@ + Upgrading recursive dependencies ++warning: `[ROOT]/home/.cargo/config` is deprecated in favor of `config.toml` ++note: if you need to support cargo 1.38 or earlier, you can symlink `config` to `config.toml` + note: Re-run with `--pinned` to upgrade pinned version requirements +diff --git a/tests/cargo-upgrade/preserve_op/stderr.log b/tests/cargo-upgrade/preserve_op/stderr.log +index 017c781..bb7bff6 100644 +--- a/tests/cargo-upgrade/preserve_op/stderr.log ++++ b/tests/cargo-upgrade/preserve_op/stderr.log +@@ -3 +3,3 @@ + Upgrading recursive dependencies ++warning: `[ROOT]/home/.cargo/config` is deprecated in favor of `config.toml` ++note: if you need to support cargo 1.38 or earlier, you can symlink `config` to `config.toml` +diff --git a/tests/cargo-upgrade/preserve_precision_major/stderr.log b/tests/cargo-upgrade/preserve_precision_major/stderr.log +index 017c781..bb7bff6 100644 +--- a/tests/cargo-upgrade/preserve_precision_major/stderr.log ++++ b/tests/cargo-upgrade/preserve_precision_major/stderr.log +@@ -3 +3,3 @@ + Upgrading recursive dependencies ++warning: `[ROOT]/home/.cargo/config` is deprecated in favor of `config.toml` ++note: if you need to support cargo 1.38 or earlier, you can symlink `config` to `config.toml` +diff --git a/tests/cargo-upgrade/preserve_precision_minor/stderr.log b/tests/cargo-upgrade/preserve_precision_minor/stderr.log +index 017c781..bb7bff6 100644 +--- a/tests/cargo-upgrade/preserve_precision_minor/stderr.log ++++ b/tests/cargo-upgrade/preserve_precision_minor/stderr.log +@@ -3 +3,3 @@ + Upgrading recursive dependencies ++warning: `[ROOT]/home/.cargo/config` is deprecated in favor of `config.toml` ++note: if you need to support cargo 1.38 or earlier, you can symlink `config` to `config.toml` +diff --git a/tests/cargo-upgrade/preserve_precision_patch/stderr.log b/tests/cargo-upgrade/preserve_precision_patch/stderr.log +index 017c781..bb7bff6 100644 +--- a/tests/cargo-upgrade/preserve_precision_patch/stderr.log ++++ b/tests/cargo-upgrade/preserve_precision_patch/stderr.log +@@ -3 +3,3 @@ + Upgrading recursive dependencies ++warning: `[ROOT]/home/.cargo/config` is deprecated in favor of `config.toml` ++note: if you need to support cargo 1.38 or earlier, you can symlink `config` to `config.toml` +diff --git a/tests/cargo-upgrade/preserves_inline_table/stderr.log b/tests/cargo-upgrade/preserves_inline_table/stderr.log +index 017c781..bb7bff6 100644 +--- a/tests/cargo-upgrade/preserves_inline_table/stderr.log ++++ b/tests/cargo-upgrade/preserves_inline_table/stderr.log +@@ -3 +3,3 @@ + Upgrading recursive dependencies ++warning: `[ROOT]/home/.cargo/config` is deprecated in favor of `config.toml` ++note: if you need to support cargo 1.38 or earlier, you can symlink `config` to `config.toml` +diff --git a/tests/cargo-upgrade/preserves_std_table/stderr.log b/tests/cargo-upgrade/preserves_std_table/stderr.log +index 017c781..bb7bff6 100644 +--- a/tests/cargo-upgrade/preserves_std_table/stderr.log ++++ b/tests/cargo-upgrade/preserves_std_table/stderr.log +@@ -3 +3,3 @@ + Upgrading recursive dependencies ++warning: `[ROOT]/home/.cargo/config` is deprecated in favor of `config.toml` ++note: if you need to support cargo 1.38 or earlier, you can symlink `config` to `config.toml` +diff --git a/tests/cargo-upgrade/single_dep/stderr.log b/tests/cargo-upgrade/single_dep/stderr.log +index 017c781..bb7bff6 100644 +--- a/tests/cargo-upgrade/single_dep/stderr.log ++++ b/tests/cargo-upgrade/single_dep/stderr.log +@@ -3 +3,3 @@ + Upgrading recursive dependencies ++warning: `[ROOT]/home/.cargo/config` is deprecated in favor of `config.toml` ++note: if you need to support cargo 1.38 or earlier, you can symlink `config` to `config.toml` +diff --git a/tests/cargo-upgrade/specified/stderr.log b/tests/cargo-upgrade/specified/stderr.log +index c21d3da..2878527 100644 +--- a/tests/cargo-upgrade/specified/stderr.log ++++ b/tests/cargo-upgrade/specified/stderr.log +@@ -3,2 +3,4 @@ + Upgrading recursive dependencies ++warning: `[ROOT]/home/.cargo/config` is deprecated in favor of `config.toml` ++note: if you need to support cargo 1.38 or earlier, you can symlink `config` to `config.toml` + note: Re-run with `--verbose` to show more dependencies +diff --git a/tests/cargo-upgrade/upgrade_all/stderr.log b/tests/cargo-upgrade/upgrade_all/stderr.log +index d3d7b1e..4b8fa20 100644 +--- a/tests/cargo-upgrade/upgrade_all/stderr.log ++++ b/tests/cargo-upgrade/upgrade_all/stderr.log +@@ -7 +7,3 @@ + Upgrading recursive dependencies ++warning: `[ROOT]/home/.cargo/config` is deprecated in favor of `config.toml` ++note: if you need to support cargo 1.38 or earlier, you can symlink `config` to `config.toml` +diff --git a/tests/cargo-upgrade/upgrade_everything/stderr.log b/tests/cargo-upgrade/upgrade_everything/stderr.log +index 7070c4f..bcf2ce0 100644 +--- a/tests/cargo-upgrade/upgrade_everything/stderr.log ++++ b/tests/cargo-upgrade/upgrade_everything/stderr.log +@@ -3,2 +3,4 @@ + Upgrading recursive dependencies ++warning: `[ROOT]/home/.cargo/config` is deprecated in favor of `config.toml` ++note: if you need to support cargo 1.38 or earlier, you can symlink `config` to `config.toml` + note: Re-run with `--verbose` to show more dependencies +diff --git a/tests/cargo-upgrade/upgrade_renamed/stderr.log b/tests/cargo-upgrade/upgrade_renamed/stderr.log +index 017c781..bb7bff6 100644 +--- a/tests/cargo-upgrade/upgrade_renamed/stderr.log ++++ b/tests/cargo-upgrade/upgrade_renamed/stderr.log +@@ -3 +3,3 @@ + Upgrading recursive dependencies ++warning: `[ROOT]/home/.cargo/config` is deprecated in favor of `config.toml` ++note: if you need to support cargo 1.38 or earlier, you can symlink `config` to `config.toml` +diff --git a/tests/cargo-upgrade/upgrade_verbose/stderr.log b/tests/cargo-upgrade/upgrade_verbose/stderr.log +index 2b8798d..dcb52a0 100644 +--- a/tests/cargo-upgrade/upgrade_verbose/stderr.log ++++ b/tests/cargo-upgrade/upgrade_verbose/stderr.log +@@ -3 +3,3 @@ + Upgrading recursive dependencies ++warning: `[ROOT]/home/.cargo/config` is deprecated in favor of `config.toml` ++note: if you need to support cargo 1.38 or earlier, you can symlink `config` to `config.toml` +diff --git a/tests/cargo-upgrade/upgrade_workspace/stderr.log b/tests/cargo-upgrade/upgrade_workspace/stderr.log +index d3d7b1e..4b8fa20 100644 +--- a/tests/cargo-upgrade/upgrade_workspace/stderr.log ++++ b/tests/cargo-upgrade/upgrade_workspace/stderr.log +@@ -7 +7,3 @@ + Upgrading recursive dependencies ++warning: `[ROOT]/home/.cargo/config` is deprecated in favor of `config.toml` ++note: if you need to support cargo 1.38 or earlier, you can symlink `config` to `config.toml` +diff --git a/tests/cargo-upgrade/virtual_manifest/stderr.log b/tests/cargo-upgrade/virtual_manifest/stderr.log +index d3d7b1e..4b8fa20 100644 +--- a/tests/cargo-upgrade/virtual_manifest/stderr.log ++++ b/tests/cargo-upgrade/virtual_manifest/stderr.log +@@ -7 +7,3 @@ + Upgrading recursive dependencies ++warning: `[ROOT]/home/.cargo/config` is deprecated in favor of `config.toml` ++note: if you need to support cargo 1.38 or earlier, you can symlink `config` to `config.toml` +diff --git a/tests/cargo-upgrade/workspace_inheritance/stderr.log b/tests/cargo-upgrade/workspace_inheritance/stderr.log +index cf5cb03..6214f4d 100644 +--- a/tests/cargo-upgrade/workspace_inheritance/stderr.log ++++ b/tests/cargo-upgrade/workspace_inheritance/stderr.log +@@ -7,2 +7,4 @@ + Upgrading recursive dependencies ++warning: `[ROOT]/home/.cargo/config` is deprecated in favor of `config.toml` ++note: if you need to support cargo 1.38 or earlier, you can symlink `config` to `config.toml` + note: Re-run with `--verbose` to show more dependencies +diff --git a/tests/cargo-upgrade/workspace_member_cwd/stderr.log b/tests/cargo-upgrade/workspace_member_cwd/stderr.log +index 7f9c051..6f3d82d 100644 +--- a/tests/cargo-upgrade/workspace_member_cwd/stderr.log ++++ b/tests/cargo-upgrade/workspace_member_cwd/stderr.log +@@ -7,2 +7,4 @@ + Upgrading recursive dependencies ++warning: `[ROOT]/home/.cargo/config` is deprecated in favor of `config.toml` ++note: if you need to support cargo 1.38 or earlier, you can symlink `config` to `config.toml` + note: Re-run with `--verbose` to show more dependencies +diff --git a/tests/cargo-upgrade/workspace_member_manifest_path/stderr.log b/tests/cargo-upgrade/workspace_member_manifest_path/stderr.log +index 7f9c051..6f3d82d 100644 +--- a/tests/cargo-upgrade/workspace_member_manifest_path/stderr.log ++++ b/tests/cargo-upgrade/workspace_member_manifest_path/stderr.log +@@ -7,2 +7,4 @@ + Upgrading recursive dependencies ++warning: `[ROOT]/home/.cargo/config` is deprecated in favor of `config.toml` ++note: if you need to support cargo 1.38 or earlier, you can symlink `config` to `config.toml` + note: Re-run with `--verbose` to show more dependencies