diff --git a/include/vcpkg/base/message-args.inc.h b/include/vcpkg/base/message-args.inc.h index 317f19853..aaa7fbe31 100644 --- a/include/vcpkg/base/message-args.inc.h +++ b/include/vcpkg/base/message-args.inc.h @@ -29,6 +29,7 @@ DECLARE_MSG_ARG(exit_code, "127") DECLARE_MSG_ARG(expected_version, "1.3.8") DECLARE_MSG_ARG(extension, ".exe") DECLARE_MSG_ARG(feature, "avisynthplus") +DECLARE_MSG_ARG(git_tree_sha, "7cfad47ae9f68b183983090afd6337cd60fd4949") DECLARE_MSG_ARG(json_field, "identifer") DECLARE_MSG_ARG(json_type, "an array of identifiers") DECLARE_MSG_ARG(lower, "42") diff --git a/include/vcpkg/base/message-data.inc.h b/include/vcpkg/base/message-data.inc.h index f4aa6f8cd..b880ca22e 100644 --- a/include/vcpkg/base/message-data.inc.h +++ b/include/vcpkg/base/message-data.inc.h @@ -3087,7 +3087,10 @@ DECLARE_MESSAGE(VersionSpecMismatch, "Failed to load port because versions are inconsistent. The file \"{path}\" contains the version " "{actual_version}, but the version database indicates that it should be {expected_version}.") DECLARE_MESSAGE(VersionTableHeader, (), "", "Version") -DECLARE_MESSAGE(VersionVerifiedOK, (msg::version_spec, msg::commit_sha), "", "OK: {version_spec} -> {commit_sha}") +DECLARE_MESSAGE(VersionVerifiedOK, + (msg::version_spec, msg::git_tree_sha), + "", + "{version_spec} is correctly in the version database ({git_tree_sha})") DECLARE_MESSAGE(VSExaminedInstances, (), "", "The following Visual Studio instances were considered:") DECLARE_MESSAGE(VSExaminedPaths, (), "", "The following paths were examined for Visual Studio instances:") DECLARE_MESSAGE(VSNoInstances, (), "", "Could not locate a complete Visual Studio instance") @@ -3097,9 +3100,9 @@ DECLARE_MESSAGE(WarningsTreatedAsErrors, (), "", "previous warnings being interp DECLARE_MESSAGE(WarnOnParseConfig, (msg::path), "", "Found the following warnings in configuration {path}:") DECLARE_MESSAGE(WhileCheckingOutBaseline, (msg::commit_sha), "", "while checking out baseline {commit_sha}") DECLARE_MESSAGE(WhileCheckingOutPortTreeIsh, - (msg::package_name, msg::commit_sha), + (msg::package_name, msg::git_tree_sha), "", - "while checking out port {package_name} with git tree {commit_sha}") + "while checking out port {package_name} with git tree {git_tree_sha}") DECLARE_MESSAGE(WhileGettingLocalTreeIshObjectsForPorts, (), "", "while getting local treeish objects for ports") DECLARE_MESSAGE(WhileLoadingLocalPort, (msg::package_name), "", "while attempting to load local port {package_name}") DECLARE_MESSAGE(WhileLoadingPortFromGitTree, (msg::commit_sha), "", "while trying to load port from: {commit_sha}") diff --git a/include/vcpkg/base/messages.h b/include/vcpkg/base/messages.h index 20f8ddf31..0d75a69e0 100644 --- a/include/vcpkg/base/messages.h +++ b/include/vcpkg/base/messages.h @@ -147,6 +147,8 @@ namespace vcpkg LocalizedString error_prefix(); inline constexpr StringLiteral InternalErrorPrefix = "internal error: "; LocalizedString internal_error_prefix(); + inline constexpr StringLiteral MessagePrefix = "message: "; + LocalizedString message_prefix(); inline constexpr StringLiteral NotePrefix = "note: "; LocalizedString note_prefix(); inline constexpr StringLiteral WarningPrefix = "warning: "; diff --git a/locales/messages.json b/locales/messages.json index 1903ea83d..fcd45373d 100644 --- a/locales/messages.json +++ b/locales/messages.json @@ -1699,8 +1699,8 @@ "VersionSpecMismatch": "Failed to load port because versions are inconsistent. The file \"{path}\" contains the version {actual_version}, but the version database indicates that it should be {expected_version}.", "_VersionSpecMismatch.comment": "An example of {path} is /foo/bar. An example of {expected_version} is 1.3.8. An example of {actual_version} is 1.3.8.", "VersionTableHeader": "Version", - "VersionVerifiedOK": "OK: {version_spec} -> {commit_sha}", - "_VersionVerifiedOK.comment": "An example of {version_spec} is zlib:x64-windows@1.0.0. An example of {commit_sha} is 7cfad47ae9f68b183983090afd6337cd60fd4949.", + "VersionVerifiedOK": "{version_spec} is correctly in the version database ({git_tree_sha})", + "_VersionVerifiedOK.comment": "An example of {version_spec} is zlib:x64-windows@1.0.0. An example of {git_tree_sha} is 7cfad47ae9f68b183983090afd6337cd60fd4949.", "WaitingForChildrenToExit": "Waiting for child processes to exit...", "WaitingToTakeFilesystemLock": "waiting to take filesystem lock on {path}...", "_WaitingToTakeFilesystemLock.comment": "An example of {path} is /foo/bar.", @@ -1709,8 +1709,8 @@ "WarningsTreatedAsErrors": "previous warnings being interpreted as errors", "WhileCheckingOutBaseline": "while checking out baseline {commit_sha}", "_WhileCheckingOutBaseline.comment": "An example of {commit_sha} is 7cfad47ae9f68b183983090afd6337cd60fd4949.", - "WhileCheckingOutPortTreeIsh": "while checking out port {package_name} with git tree {commit_sha}", - "_WhileCheckingOutPortTreeIsh.comment": "An example of {package_name} is zlib. An example of {commit_sha} is 7cfad47ae9f68b183983090afd6337cd60fd4949.", + "WhileCheckingOutPortTreeIsh": "while checking out port {package_name} with git tree {git_tree_sha}", + "_WhileCheckingOutPortTreeIsh.comment": "An example of {package_name} is zlib. An example of {git_tree_sha} is 7cfad47ae9f68b183983090afd6337cd60fd4949.", "WhileGettingLocalTreeIshObjectsForPorts": "while getting local treeish objects for ports", "WhileLoadingLocalPort": "while attempting to load local port {package_name}", "_WhileLoadingLocalPort.comment": "An example of {package_name} is zlib.", diff --git a/src/vcpkg/base/messages.cpp b/src/vcpkg/base/messages.cpp index b930c5d3e..7091ec6d7 100644 --- a/src/vcpkg/base/messages.cpp +++ b/src/vcpkg/base/messages.cpp @@ -124,6 +124,7 @@ namespace vcpkg LocalizedString error_prefix() { return LocalizedString::from_raw(ErrorPrefix); } LocalizedString internal_error_prefix() { return LocalizedString::from_raw(InternalErrorPrefix); } + LocalizedString message_prefix() { return LocalizedString::from_raw(MessagePrefix); } LocalizedString note_prefix() { return LocalizedString::from_raw(NotePrefix); } LocalizedString warning_prefix() { return LocalizedString::from_raw(WarningPrefix); } } diff --git a/src/vcpkg/commands.ci-verify-versions.cpp b/src/vcpkg/commands.ci-verify-versions.cpp index d508f80dc..8f5171346 100644 --- a/src/vcpkg/commands.ci-verify-versions.cpp +++ b/src/vcpkg/commands.ci-verify-versions.cpp @@ -205,9 +205,9 @@ namespace } return { - msg::format(msgVersionVerifiedOK, - msg::version_spec = Strings::concat(port_name, '@', entry.version.version), - msg::commit_sha = entry.git_tree), + message_prefix().append(msgVersionVerifiedOK, + msg::version_spec = Strings::concat(port_name, '@', entry.version.version), + msg::git_tree_sha = entry.git_tree), expected_left_tag, }; } diff --git a/src/vcpkg/commands.z-generate-message-map.cpp b/src/vcpkg/commands.z-generate-message-map.cpp index 8c8d47f2e..f3cb71060 100644 --- a/src/vcpkg/commands.z-generate-message-map.cpp +++ b/src/vcpkg/commands.z-generate-message-map.cpp @@ -153,6 +153,7 @@ namespace vcpkg std::vector tests{ {"error:", "ErrorPrefix"}, {"internal error:", "InternalErrorPrefix"}, + {"message:", "MessagePrefix"}, {"note:", "NotePrefix"}, {"warning:", "WarningPrefix"}, }; diff --git a/src/vcpkg/vcpkgpaths.cpp b/src/vcpkg/vcpkgpaths.cpp index 8cb5fedb0..dc8cba2bb 100644 --- a/src/vcpkg/vcpkgpaths.cpp +++ b/src/vcpkg/vcpkgpaths.cpp @@ -945,7 +945,7 @@ namespace vcpkg return std::move(maybe_tree) .error() .append_raw(NotePrefix) - .append(msgWhileCheckingOutPortTreeIsh, msg::package_name = port_name, msg::commit_sha = git_tree); + .append(msgWhileCheckingOutPortTreeIsh, msg::package_name = port_name, msg::git_tree_sha = git_tree); } ExpectedL VcpkgPaths::git_show(StringView treeish, const Path& dot_git_dir) const