Skip to content

Commit

Permalink
General object storage interface for binary caching. (#456)
Browse files Browse the repository at this point in the history
* merge gcs + aws

* Prefer StringView/StringLiteral over std::string

Co-authored-by: Robert Schumacher <roschuma@microsoft.com>
  • Loading branch information
day253 and ras0219-msft authored Mar 30, 2022
1 parent ca80996 commit 934d827
Show file tree
Hide file tree
Showing 4 changed files with 140 additions and 244 deletions.
4 changes: 3 additions & 1 deletion include/vcpkg/base/messages.h
Original file line number Diff line number Diff line change
Expand Up @@ -264,10 +264,12 @@ namespace vcpkg::msg
DECLARE_MSG_ARG(row, "42");
DECLARE_MSG_ARG(spec, "zlib:x64-windows");
DECLARE_MSG_ARG(system_name, "Darwin");
DECLARE_MSG_ARG(tool_name, "aria2");
DECLARE_MSG_ARG(triplet, "x64-windows");
DECLARE_MSG_ARG(url, "https://github.com/microsoft/vcpkg");
DECLARE_MSG_ARG(version, "1.3.8");
DECLARE_MSG_ARG(vcpkg_line_info, "/a/b/foo.cpp(13)");
DECLARE_MSG_ARG(vendor, "Azure");
DECLARE_MSG_ARG(version, "1.3.8");
#undef DECLARE_MSG_ARG

// These are `...` instead of
Expand Down
8 changes: 4 additions & 4 deletions locales/messages.en.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,7 @@
"AddTripletExpressionNotAllowed": "Error: triplet expressions are not allowed here. You may want to change `{package_name}:{triplet}` to `{package_name}` instead.",
"AllFormatArgsRawArgument": "format string \"{value}\" contains a raw format argument",
"AllFormatArgsUnbalancedBraces": "unbalanced brace in format string \"{value}\"",
"AwsAttemptingToFetchPackages": "Attempting to fetch {count} packages from AWS",
"AwsFailedToDownload": "aws failed to download with exit code: {exit_code}",
"AwsRestoredPackages": "Restored {count} packages from AWS servers in {elapsed}",
"AwsUploadedPackages": "Uploaded binaries to {count} AWS servers",
"AttemptingToFetchPackagesFromVendor": "Attempting to fetch {count} package(s) from {vendor}",
"BothYesAndNoOptionSpecifiedError": "error: cannot specify both --no-{option} and --{option}.",
"BuildResultBuildFailed": "BUILD_FAILED",
"BuildResultCacheMissing": "CACHE_MISSING",
Expand Down Expand Up @@ -89,16 +86,19 @@
"MsiexecFailedToExtract": "msiexec failed while extracting '{path}' with launch or exit code {exit_code} and message:",
"NoLocalizationForMessages": "No localization for the following messages:",
"NoteMessage": "note: ",
"ObjectStorageToolFailed": "{tool_name} failed with exit code: {exit_code}",
"ProcessorArchitectureMalformed": "Failed to parse %PROCESSOR_ARCHITECTURE% ({arch}) as a valid CPU architecture.",
"ProcessorArchitectureMissing": "The required environment variable %PROCESSOR_ARCHITECTURE% is missing.",
"ProcessorArchitectureW6432Malformed": "Failed to parse %PROCESSOR_ARCHITEW6432% ({arch}) as a valid CPU architecture. Falling back to %PROCESSOR_ARCHITECTURE%.",
"RestoredPackagesFromVendor": "Restored {count} package(s) from {vendor} in {elapsed}",
"ResultsHeader": "RESULTS",
"ResultsLine": " {spec}: {build_result}: {elapsed}",
"SeeURL": "See {url} for more information.",
"SuggestNewVersionScheme": "Use the version scheme \"{new_scheme}\" instead of \"{old_scheme}\" in port \"{package_name}\".\nUse `--{option}` to disable this check.",
"UnknownBaselineFileContent": "unrecognizable baseline entry; expected 'port:triplet=(fail|skip)'",
"UnsupportedSystemName": "Error: Could not map VCPKG_CMAKE_SYSTEM_NAME '{system_name}' to a vcvarsall platform. Supported system names are '', 'Windows' and 'WindowsStore'.",
"UnsupportedToolchain": "Error: in triplet {triplet}: Unable to find a valid toolchain combination.\n The requested target architecture was {arch}\n The selected Visual Studio instance is at {path}\n The available toolchain combinations are {list}\n",
"UploadedPackagesToVendor": "Uploaded {count} package(s) to {vendor} in {elapsed}",
"UsingManifestAt": "Using manifest file at {path}.",
"Utf8DecoderDereferencedAtEof": "dereferenced Utf8Decoder at the end of a string.",
"VSExaminedInstances": "The following Visual Studio instances were considered:",
Expand Down
16 changes: 8 additions & 8 deletions locales/messages.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,14 +12,8 @@
"_AllFormatArgsRawArgument.comment": "example of {value} is 'foo {} bar'\n",
"AllFormatArgsUnbalancedBraces": "unbalanced brace in format string \"{value}\"",
"_AllFormatArgsUnbalancedBraces.comment": "example of {value} is 'foo bar {'\n",
"AwsAttemptingToFetchPackages": "Attempting to fetch {count} packages from AWS",
"_AwsAttemptingToFetchPackages.comment": "example of {count} is '42'.\n",
"AwsFailedToDownload": "aws failed to download with exit code: {exit_code}",
"_AwsFailedToDownload.comment": "example of {exit_code} is '127'.\n",
"AwsRestoredPackages": "Restored {count} packages from AWS servers in {elapsed}",
"_AwsRestoredPackages.comment": "example of {count} is '42'.\nexample of {elapsed} is '3.532 min'.\n",
"AwsUploadedPackages": "Uploaded binaries to {count} AWS servers",
"_AwsUploadedPackages.comment": "example of {count} is '42'.\n",
"AttemptingToFetchPackagesFromVendor": "Attempting to fetch {count} package(s) from {vendor}",
"_AttemptingToFetchPackagesFromVendor.comment": "example of {count} is '42'.\nexample of {vendor} is 'Azure'.\n",
"BothYesAndNoOptionSpecifiedError": "error: cannot specify both --no-{option} and --{option}.",
"_BothYesAndNoOptionSpecifiedError.comment": "example of {option} is 'editable'.\n",
"BuildResultBuildFailed": "BUILD_FAILED",
Expand Down Expand Up @@ -149,11 +143,15 @@
"_MsiexecFailedToExtract.comment": "example of {path} is '/foo/bar'.\nexample of {exit_code} is '127'.\n",
"NoLocalizationForMessages": "No localization for the following messages:",
"NoteMessage": "note: ",
"ObjectStorageToolFailed": "{tool_name} failed with exit code: {exit_code}",
"_ObjectStorageToolFailed.comment": "example of {exit_code} is '127'.\nexample of {tool_name} is 'aria2'.\n",
"ProcessorArchitectureMalformed": "Failed to parse %PROCESSOR_ARCHITECTURE% ({arch}) as a valid CPU architecture.",
"_ProcessorArchitectureMalformed.comment": "example of {arch} is 'x64'.\n",
"ProcessorArchitectureMissing": "The required environment variable %PROCESSOR_ARCHITECTURE% is missing.",
"ProcessorArchitectureW6432Malformed": "Failed to parse %PROCESSOR_ARCHITEW6432% ({arch}) as a valid CPU architecture. Falling back to %PROCESSOR_ARCHITECTURE%.",
"_ProcessorArchitectureW6432Malformed.comment": "example of {arch} is 'x64'.\n",
"RestoredPackagesFromVendor": "Restored {count} package(s) from {vendor} in {elapsed}",
"_RestoredPackagesFromVendor.comment": "example of {count} is '42'.\nexample of {elapsed} is '3.532 min'.\nexample of {vendor} is 'Azure'.\n",
"ResultsHeader": "RESULTS",
"_ResultsHeader.comment": "Displayed before a list of installation results.\n",
"ResultsLine": " {spec}: {build_result}: {elapsed}",
Expand All @@ -167,6 +165,8 @@
"_UnsupportedSystemName.comment": "example of {system_name} is 'Darwin'.\n",
"UnsupportedToolchain": "Error: in triplet {triplet}: Unable to find a valid toolchain combination.\n The requested target architecture was {arch}\n The selected Visual Studio instance is at {path}\n The available toolchain combinations are {list}\n",
"_UnsupportedToolchain.comment": "example for {list} is 'x86, arm64'\nexample of {triplet} is 'x64-windows'.\nexample of {arch} is 'x64'.\nexample of {path} is '/foo/bar'.\n",
"UploadedPackagesToVendor": "Uploaded {count} package(s) to {vendor} in {elapsed}",
"_UploadedPackagesToVendor.comment": "example of {count} is '42'.\nexample of {elapsed} is '3.532 min'.\nexample of {vendor} is 'Azure'.\n",
"UsingManifestAt": "Using manifest file at {path}.",
"_UsingManifestAt.comment": "example of {path} is '/foo/bar'.\n",
"Utf8DecoderDereferencedAtEof": "dereferenced Utf8Decoder at the end of a string.",
Expand Down
Loading

0 comments on commit 934d827

Please sign in to comment.