diff --git a/include/vcpkg/base/messages.h b/include/vcpkg/base/messages.h index f8bf9eebcc..fab2f203eb 100644 --- a/include/vcpkg/base/messages.h +++ b/include/vcpkg/base/messages.h @@ -580,6 +580,8 @@ namespace vcpkg "An example of env_var is \"HTTP(S)_PROXY\"" "'--' at the beginning must be preserved", "-- Automatically setting {env_var} environment variables to \"{url}\"."); + DECLARE_MESSAGE(AvailableArchitectureTriplets, (), "", "Available architecture triplets:"); + DECLARE_MESSAGE(AvailableHelpTopics, (), "", "Available help topics:"); DECLARE_MESSAGE(BinarySourcesArg, (), "", "Add sources for binary caching. See 'vcpkg help binarycaching'."); DECLARE_MESSAGE(BuildAlreadyInstalled, (msg::spec), @@ -678,6 +680,7 @@ namespace vcpkg "Fourth optional part of build troubleshooting message, printed after the version" "information about vcpkg itself.", "Please use the prefilled template from {path} when reporting your issue."); + DECLARE_MESSAGE(BuiltInTriplets, (), "", "vcpkg built-in triplets:"); DECLARE_MESSAGE(ChecksFailedCheck, (), "", "vcpkg has crashed; no additional details are available."); DECLARE_MESSAGE(ChecksUnreachableCode, (), "", "unreachable code was reached"); DECLARE_MESSAGE(ChecksUpdateVcpkg, (), "", "updating vcpkg by rerunning bootstrap-vcpkg may resolve this failure."); @@ -722,6 +725,7 @@ namespace vcpkg "command:\n" "{command_line}\n" "failed with the following results:"); + DECLARE_MESSAGE(CommunityTriplets, (), "", "VCPKG community triplets:"); DECLARE_MESSAGE(ComparingUtf8Decoders, (), "", @@ -945,6 +949,7 @@ namespace vcpkg "on how to provide credentials."); DECLARE_MESSAGE(FeedbackAppreciated, (), "", "Thank you for your feedback!"); DECLARE_MESSAGE(FileNotFound, (msg::path), "", "{path}: file not found"); + DECLARE_MESSAGE(FileSystemOperationFailed, (), "", "Filesystem operation failed:"); DECLARE_MESSAGE(FishCompletion, (msg::path), "", "vcpkg fish completion is already added at \"{path}\"."); DECLARE_MESSAGE(FollowingPackagesMissingControl, (), @@ -996,6 +1001,14 @@ namespace vcpkg (msg::package_name), "'header' refers to C/C++ .h files", "{package_name} is header-only and can be used from CMake via:"); + DECLARE_MESSAGE( + HelpBuiltinBase, + (), + "", + "The baseline references a commit within the vcpkg repository that establishes a minimum version on " + "every dependency in the graph. For example, if no other constraints are specified (directly or " + "transitively), then the version will resolve to the baseline of the top level manifest. Baselines " + "of transitive dependencies are ignored."); DECLARE_MESSAGE(HelpContactCommand, (), "", "Display contact information to send feedback."); DECLARE_MESSAGE(HelpCreateCommand, (), "", "Create a new port."); DECLARE_MESSAGE(HelpDependInfoCommand, (), "", "Display a list of dependencies for ports."); @@ -1009,6 +1022,7 @@ namespace vcpkg (), "", "For more help (including examples) see the accompanying README.md and docs folder."); + DECLARE_MESSAGE(HelpExampleManifest, (), "", "Example manifest:"); DECLARE_MESSAGE(HelpExportCommand, (), "", "Exports a package."); DECLARE_MESSAGE(HelpFormatManifestCommand, (), @@ -1018,16 +1032,74 @@ namespace vcpkg DECLARE_MESSAGE(HelpInitializeRegistryCommand, (), "", "Initializes a registry in the directory ."); DECLARE_MESSAGE(HelpInstallCommand, (), "", "Install a package."); DECLARE_MESSAGE(HelpListCommand, (), "", "List installed packages."); + DECLARE_MESSAGE(HelpManifestConstraints, + (), + "", + "Manifests can place three kinds of constraints upon the versions used"); + DECLARE_MESSAGE( + HelpMinVersion, + (), + "", + "Vcpkg will select the minimum version found that matches all applicable constraints, including the " + "version from the baseline specified at top-level as well as any \"version>=\" constraints in the graph."); + DECLARE_MESSAGE( + HelpOverrides, + (), + "", + "When used as the top-level manifest (such as when running `vcpkg install` in the directory), overrides " + "allow a manifest to short-circuit dependency resolution and specify exactly the version to use. These can " + "be used to handle version conflicts, such as with `version-string` dependencies. They will not be " + "considered when transitively depended upon."); DECLARE_MESSAGE(HelpOwnsCommand, (), "", "Search for files in installed packages."); + DECLARE_MESSAGE( + HelpPackagePublisher, + (), + "", + "Additionally, package publishers can use \"version>=\" constraints to ensure that consumers are using at " + "least a certain minimum version of a given dependency. For example, if a library needs an API added " + "to boost-asio in 1.70, a \"version>=\" constraint will ensure transitive users use a sufficient version " + "even in the face of individual version overrides or cross-registry references."); + DECLARE_MESSAGE( + HelpPortVersionScheme, + (), + "", + "Each version additionally has a \"port-version\" which is a nonnegative integer. When rendered as " + "text, the port version (if nonzero) is added as a suffix to the primary version text separated by a " + "hash (#). Port-versions are sorted lexographically after the primary version text, for example:\n1.0.0 < " + "1.0.0#1 < 1.0.1 < 1.0.1#5 < 2.0.0"); DECLARE_MESSAGE(HelpRemoveCommand, (), "", "Uninstall a package."); DECLARE_MESSAGE(HelpRemoveOutdatedCommand, (), "", "Uninstall all out-of-date packages."); DECLARE_MESSAGE(HelpResponseFileCommand, (), "", "Specify a response file to provide additional parameters."); DECLARE_MESSAGE(HelpSearchCommand, (), "", "Search for packages available to be built."); DECLARE_MESSAGE(HelpTopicCommand, (), "", "Display help for a specific topic."); DECLARE_MESSAGE(HelpTopicsCommand, (), "", "Display the list of help topics."); + DECLARE_MESSAGE( + HelpUpdateBaseline, + (), + "", + "The best approach to keep your libraries up to date, the best approach is to update your baseline reference. " + "This will " + "ensure all packages, including transitive ones, are updated. However if you need to update a package " + "independently, you can use a \"version>=\" constraint."); DECLARE_MESSAGE(HelpUpdateCommand, (), "", "List packages that can be updated."); DECLARE_MESSAGE(HelpUpgradeCommand, (), "", "Rebuild all outdated packages."); DECLARE_MESSAGE(HelpVersionCommand, (), "", "Display version information."); + DECLARE_MESSAGE(HelpVersionDateScheme, (), "", "A date (2021-01-01.5)"); + DECLARE_MESSAGE(HelpVersionGreater, + (), + "", + "Within the \"dependencies\" field, each dependency can have a minimum constraint listed. These " + "minimum constraints will be used when transitively depending upon this library. A minimum " + "port-version can additionally be specified with a '#' suffix."); + DECLARE_MESSAGE(HelpVersioning, + (), + "", + "Versioning allows you to deterministically control the precise revisions of dependencies used by " + "your project from within your manifest file."); + DECLARE_MESSAGE(HelpVersionScheme, (), "", "A dot-separated sequence of numbers (1.2.3.4)"); + DECLARE_MESSAGE(HelpVersionSchemes, (), "", "The following versioning schemes are accepted."); + DECLARE_MESSAGE(HelpVersionSemverScheme, (), "", "A Semantic Version 2.0 (2.1.0-rc2)"); + DECLARE_MESSAGE(HelpVersionStringScheme, (), "", "An exact, incomparable version (Vista)"); DECLARE_MESSAGE(IllegalFeatures, (), "", "List of features is not allowed in this context"); DECLARE_MESSAGE(IllegalPlatformSpec, (), "", "Platform qualifier is not allowed in this context"); DECLARE_MESSAGE(ImproperShaLength, @@ -1309,6 +1381,10 @@ namespace vcpkg "", "msiexec failed while extracting \"{path}\" with launch or exit code {exit_code} and message:"); DECLARE_MESSAGE(MultiArch, (msg::option), "", "Multi-Arch must be 'same' but was {option}"); + DECLARE_MESSAGE(MutuallyExclusiveOption, + (msg::value, msg::option), + "{value} is a second {option} switch", + "--{value} can not be used with --{option}."); DECLARE_MESSAGE(NavigateToNPS, (msg::url), "", "Please navigate to {url} in your preferred browser."); DECLARE_MESSAGE(NewConfigurationAlreadyExists, (msg::path), @@ -1348,6 +1424,7 @@ namespace vcpkg "--{value} requires --{option}"); DECLARE_MESSAGE(OriginalBinParagraphHeader, (), "", "\nOriginal Binary Paragraph"); DECLARE_MESSAGE(OverlayPatchDir, (msg::path), "", "Overlay path \"{path}\" must exist and must be a directory."); + DECLARE_MESSAGE(OverlayTriplets, (msg::path), "", "Overlay triplets from {path} :"); DECLARE_MESSAGE(OverwritingFile, (msg::path), "", "File {path} was already present and will be overwritten"); DECLARE_MESSAGE(PackageAlreadyRemoved, (msg::spec), "", "unable to remove package {spec}: already removed"); DECLARE_MESSAGE(PackageFailedtWhileExtracting, @@ -1421,10 +1498,6 @@ namespace vcpkg (msg::tool_name, msg::exit_code), "The program's console output is appended after this.", "{tool_name} failed with exit code: ({exit_code})."); - DECLARE_MESSAGE(MutuallyExclusiveOption, - (msg::value, msg::option), - "{value} is a second {option} switch", - "--{value} can not be used with --{option}."); DECLARE_MESSAGE(PushingVendorFailed, (msg::vendor, msg::path), "", @@ -1564,6 +1637,10 @@ namespace vcpkg "", "Unknown setting for VCPKG_BUILD_TYPE {option}. Valid settings are '', 'debug', and 'release'."); DECLARE_MESSAGE(UnknownTool, (), "", "vcpkg does not have a definition of this tool for this platform."); + DECLARE_MESSAGE(UnknownTopic, + (msg::value), + "{value} the value a user passed to `vcpkg help` that we don't understand", + "unknown topic {value}"); DECLARE_MESSAGE( UnknownVariablesInTemplate, (msg::value, msg::list), @@ -1740,5 +1817,4 @@ namespace vcpkg DECLARE_MESSAGE(WhileLookingForSpec, (msg::spec), "", "while looking for {spec}:"); DECLARE_MESSAGE(WindowsOnlyCommand, (), "", "This command only supports Windows."); DECLARE_MESSAGE(WroteNuGetPkgConfInfo, (msg::path), "", "Wrote NuGet package config information to {path}."); - DECLARE_MESSAGE(FileSystemOperationFailed, (), "", "Filesystem operation failed:"); } diff --git a/locales/messages.en.json b/locales/messages.en.json index eb2f037fb9..1b41e0a23a 100644 --- a/locales/messages.en.json +++ b/locales/messages.en.json @@ -47,6 +47,8 @@ "AuthenticationMayRequireManualAction": "One or more {vendor} credential providers requested manual action. Add the binary source 'interactive' to allow interactivity.", "AutoSettingEnvVar": "-- Automatically setting {env_var} environment variables to \"{url}\".", "AutomaticLinkingForMSBuildProjects": "All MSBuild C++ projects can now #include any installed libraries. Linking will be handled automatically. Installing new libraries will make them instantly available.", + "AvailableArchitectureTriplets": "Available architecture triplets:", + "AvailableHelpTopics": "Available help topics:", "BinarySourcesArg": "Add sources for binary caching. See 'vcpkg help binarycaching'.", "BothYesAndNoOptionSpecifiedError": "cannot specify both --no-{option} and --{option}.", "BuildAlreadyInstalled": "{spec} is already installed; please remove {spec} before attempting to build it.", @@ -71,6 +73,7 @@ "BuildingPackage": "Building {spec}...", "BuildingPackageFailed": "building {spec} failed with: {build_result}", "BuildingPackageFailedDueToMissingDeps": "due to the following missing dependencies:", + "BuiltInTriplets": "vcpkg built-in triplets:", "CMakeTargetsUsage": "{package_name} provides CMake targets:", "CMakeTargetsUsageHeuristicMessage": "# this is heuristically generated, and may not be correct", "CMakeToolChainFile": "CMake projects should use: \"-DCMAKE_TOOLCHAIN_FILE={path}\"", @@ -85,6 +88,7 @@ "ClearingContents": "Clearing contents of {path}", "CmakeTargetsExcluded": "note: {count} additional targets are not displayed.", "CommandFailed": "command:\n{command_line}\nfailed with the following results:", + "CommunityTriplets": "VCPKG community triplets:", "ComparingUtf8Decoders": "Comparing Utf8Decoders with different provenance; this is always an error", "CompressFolderFailed": "Failed to compress folder \"{path}\":", "ComputingInstallPlan": "Computing installation plan...", @@ -204,28 +208,43 @@ "GraphCycleDetected": "Cycle detected within graph at {package_name}:", "HashFileFailureToRead": "failed to read file \"{path}\" for hashing: ", "HeaderOnlyUsage": "{package_name} is header-only and can be used from CMake via:", + "HelpBuiltinBase": "The baseline references a commit within the vcpkg repository that establishes a minimum version on every dependency in the graph. For example, if no other constraints are specified (directly or transitively), then the version will resolve to the baseline of the top level manifest. Baselines of transitive dependencies are ignored.", "HelpContactCommand": "Display contact information to send feedback.", "HelpCreateCommand": "Create a new port.", "HelpDependInfoCommand": "Display a list of dependencies for ports.", "HelpEditCommand": "Open a port for editing (use the environment variable '{env_var}' to set an editor program, defaults to 'code').", "HelpEnvCommand": "Creates a clean shell environment for development or compiling.", "HelpExampleCommand": "For more help (including examples) see the accompanying README.md and docs folder.", + "HelpExampleManifest": "Example manifest:", "HelpExportCommand": "Exports a package.", "HelpFormatManifestCommand": "Formats all vcpkg.json files. Run this before committing to vcpkg.", "HelpHashCommand": "Hash a file by specific algorithm, default SHA512.", "HelpInitializeRegistryCommand": "Initializes a registry in the directory .", "HelpInstallCommand": "Install a package.", "HelpListCommand": "List installed packages.", + "HelpManifestConstraints": "Manifests can place three kinds of constraints upon the versions used", + "HelpMinVersion": "Vcpkg will select the minimum version found that matches all applicable constraints, including the version from the baseline specified at top-level as well as any \"version>=\" constraints in the graph.", + "HelpOverrides": "When used as the top-level manifest (such as when running `vcpkg install` in the directory), overrides allow a manifest to short-circuit dependency resolution and specify exactly the version to use. These can be used to handle version conflicts, such as with `version-string` dependencies. They will not be considered when transitively depended upon.", "HelpOwnsCommand": "Search for files in installed packages.", + "HelpPackagePublisher": "Additionally, package publishers can use \"version>=\" constraints to ensure that consumers are using at least a certain minimum version of a given dependency. For example, if a library needs an API added to boost-asio in 1.70, a \"version>=\" constraint will ensure transitive users use a sufficient version even in the face of individual version overrides or cross-registry references.", + "HelpPortVersionScheme": "Each version additionally has a \"port-version\" which is a nonnegative integer. When rendered as text, the port version (if nonzero) is added as a suffix to the primary version text separated by a hash (#). Port-versions are sorted lexographically after the primary version text, for example:\n1.0.0 < 1.0.0#1 < 1.0.1 < 1.0.1#5 < 2.0.0", "HelpRemoveCommand": "Uninstall a package.", "HelpRemoveOutdatedCommand": "Uninstall all out-of-date packages.", "HelpResponseFileCommand": "Specify a response file to provide additional parameters.", "HelpSearchCommand": "Search for packages available to be built.", "HelpTopicCommand": "Display help for a specific topic.", "HelpTopicsCommand": "Display the list of help topics.", + "HelpUpdateBaseline": "The best approach to keep your libraries up to date, the best approach is to update your baseline reference. This will ensure all packages, including transitive ones, are updated. However if you need to update a package independently, you can use a \"version>=\" constraint.", "HelpUpdateCommand": "List packages that can be updated.", "HelpUpgradeCommand": "Rebuild all outdated packages.", "HelpVersionCommand": "Display version information.", + "HelpVersionDateScheme": "A date (2021-01-01.5)", + "HelpVersionGreater": "Within the \"dependencies\" field, each dependency can have a minimum constraint listed. These minimum constraints will be used when transitively depending upon this library. A minimum port-version can additionally be specified with a '#' suffix.", + "HelpVersionScheme": "A dot-separated sequence of numbers (1.2.3.4)", + "HelpVersionSchemes": "The following versioning schemes are accepted.", + "HelpVersionSemverScheme": "A Semantic Version 2.0 (2.1.0-rc2)", + "HelpVersionStringScheme": "An exact, incomparable version (Vista)", + "HelpVersioning": "Versioning allows you to deterministically control the precise revisions of dependencies used by your project from within your manifest file.", "IllegalFeatures": "List of features is not allowed in this context", "IllegalPlatformSpec": "Platform qualifier is not allowed in this context", "ImproperShaLength": "SHA512's must be 128 hex characters: {value}", @@ -337,6 +356,7 @@ "OptionRequiresOption": "--{value} requires --{option}", "OriginalBinParagraphHeader": "\nOriginal Binary Paragraph", "OverlayPatchDir": "Overlay path \"{path}\" must exist and must be a directory.", + "OverlayTriplets": "Overlay triplets from {path} :", "OverwritingFile": "File {path} was already present and will be overwritten", "PackageAlreadyRemoved": "unable to remove package {spec}: already removed", "PackageFailedtWhileExtracting": "'{value}' failed while extracting {path}.", @@ -413,6 +433,7 @@ "UnknownPolicySetting": "Unknown setting for policy '{value}': {option}", "UnknownSettingForBuildType": "Unknown setting for VCPKG_BUILD_TYPE {option}. Valid settings are '', 'debug', and 'release'.", "UnknownTool": "vcpkg does not have a definition of this tool for this platform.", + "UnknownTopic": "unknown topic {value}", "UnknownVariablesInTemplate": "invalid argument: url template '{value}' contains unknown variables: {list}", "UnrecognizedConfigField": "configuration contains the following unrecognized fields:", "UnrecognizedIdentifier": "Unrecognized identifer name {value}. Add to override list in triplet file.", diff --git a/locales/messages.json b/locales/messages.json index 29e866c94e..423589e4c7 100644 --- a/locales/messages.json +++ b/locales/messages.json @@ -80,6 +80,8 @@ "AutoSettingEnvVar": "-- Automatically setting {env_var} environment variables to \"{url}\".", "_AutoSettingEnvVar.comment": "An example of env_var is \"HTTP(S)_PROXY\"'--' at the beginning must be preserved An example of {env_var} is VCPKG_DEFAULT_TRIPLET. An example of {url} is https://github.com/microsoft/vcpkg.", "AutomaticLinkingForMSBuildProjects": "All MSBuild C++ projects can now #include any installed libraries. Linking will be handled automatically. Installing new libraries will make them instantly available.", + "AvailableArchitectureTriplets": "Available architecture triplets:", + "AvailableHelpTopics": "Available help topics:", "BinarySourcesArg": "Add sources for binary caching. See 'vcpkg help binarycaching'.", "BothYesAndNoOptionSpecifiedError": "cannot specify both --no-{option} and --{option}.", "_BothYesAndNoOptionSpecifiedError.comment": "An example of {option} is editable.", @@ -125,6 +127,7 @@ "_BuildingPackageFailed.comment": "An example of {spec} is zlib:x64-windows. An example of {build_result} is One of the BuildResultXxx messages (such as BuildResultSucceeded/SUCCEEDED).", "BuildingPackageFailedDueToMissingDeps": "due to the following missing dependencies:", "_BuildingPackageFailedDueToMissingDeps.comment": "Printed after BuildingPackageFailed, and followed by a list of dependencies that were missing.", + "BuiltInTriplets": "vcpkg built-in triplets:", "CMakeTargetsUsage": "{package_name} provides CMake targets:", "_CMakeTargetsUsage.comment": "'targets' are a CMake and Makefile concept An example of {package_name} is zlib.", "CMakeTargetsUsageHeuristicMessage": "# this is heuristically generated, and may not be correct", @@ -149,6 +152,7 @@ "_CmakeTargetsExcluded.comment": "An example of {count} is 42.", "CommandFailed": "command:\n{command_line}\nfailed with the following results:", "_CommandFailed.comment": "An example of {command_line} is vcpkg install zlib.", + "CommunityTriplets": "VCPKG community triplets:", "ComparingUtf8Decoders": "Comparing Utf8Decoders with different provenance; this is always an error", "CompressFolderFailed": "Failed to compress folder \"{path}\":", "_CompressFolderFailed.comment": "An example of {path} is /foo/bar.", @@ -345,6 +349,7 @@ "_HashFileFailureToRead.comment": "Printed after ErrorMessage and before the specific failing filesystem operation (like file not found) An example of {path} is /foo/bar.", "HeaderOnlyUsage": "{package_name} is header-only and can be used from CMake via:", "_HeaderOnlyUsage.comment": "'header' refers to C/C++ .h files An example of {package_name} is zlib.", + "HelpBuiltinBase": "The baseline references a commit within the vcpkg repository that establishes a minimum version on every dependency in the graph. For example, if no other constraints are specified (directly or transitively), then the version will resolve to the baseline of the top level manifest. Baselines of transitive dependencies are ignored.", "HelpContactCommand": "Display contact information to send feedback.", "HelpCreateCommand": "Create a new port.", "HelpDependInfoCommand": "Display a list of dependencies for ports.", @@ -352,22 +357,36 @@ "_HelpEditCommand.comment": "An example of {env_var} is VCPKG_DEFAULT_TRIPLET.", "HelpEnvCommand": "Creates a clean shell environment for development or compiling.", "HelpExampleCommand": "For more help (including examples) see the accompanying README.md and docs folder.", + "HelpExampleManifest": "Example manifest:", "HelpExportCommand": "Exports a package.", "HelpFormatManifestCommand": "Formats all vcpkg.json files. Run this before committing to vcpkg.", "HelpHashCommand": "Hash a file by specific algorithm, default SHA512.", "HelpInitializeRegistryCommand": "Initializes a registry in the directory .", "HelpInstallCommand": "Install a package.", "HelpListCommand": "List installed packages.", + "HelpManifestConstraints": "Manifests can place three kinds of constraints upon the versions used", + "HelpMinVersion": "Vcpkg will select the minimum version found that matches all applicable constraints, including the version from the baseline specified at top-level as well as any \"version>=\" constraints in the graph.", + "HelpOverrides": "When used as the top-level manifest (such as when running `vcpkg install` in the directory), overrides allow a manifest to short-circuit dependency resolution and specify exactly the version to use. These can be used to handle version conflicts, such as with `version-string` dependencies. They will not be considered when transitively depended upon.", "HelpOwnsCommand": "Search for files in installed packages.", + "HelpPackagePublisher": "Additionally, package publishers can use \"version>=\" constraints to ensure that consumers are using at least a certain minimum version of a given dependency. For example, if a library needs an API added to boost-asio in 1.70, a \"version>=\" constraint will ensure transitive users use a sufficient version even in the face of individual version overrides or cross-registry references.", + "HelpPortVersionScheme": "Each version additionally has a \"port-version\" which is a nonnegative integer. When rendered as text, the port version (if nonzero) is added as a suffix to the primary version text separated by a hash (#). Port-versions are sorted lexographically after the primary version text, for example:\n1.0.0 < 1.0.0#1 < 1.0.1 < 1.0.1#5 < 2.0.0", "HelpRemoveCommand": "Uninstall a package.", "HelpRemoveOutdatedCommand": "Uninstall all out-of-date packages.", "HelpResponseFileCommand": "Specify a response file to provide additional parameters.", "HelpSearchCommand": "Search for packages available to be built.", "HelpTopicCommand": "Display help for a specific topic.", "HelpTopicsCommand": "Display the list of help topics.", + "HelpUpdateBaseline": "The best approach to keep your libraries up to date, the best approach is to update your baseline reference. This will ensure all packages, including transitive ones, are updated. However if you need to update a package independently, you can use a \"version>=\" constraint.", "HelpUpdateCommand": "List packages that can be updated.", "HelpUpgradeCommand": "Rebuild all outdated packages.", "HelpVersionCommand": "Display version information.", + "HelpVersionDateScheme": "A date (2021-01-01.5)", + "HelpVersionGreater": "Within the \"dependencies\" field, each dependency can have a minimum constraint listed. These minimum constraints will be used when transitively depending upon this library. A minimum port-version can additionally be specified with a '#' suffix.", + "HelpVersionScheme": "A dot-separated sequence of numbers (1.2.3.4)", + "HelpVersionSchemes": "The following versioning schemes are accepted.", + "HelpVersionSemverScheme": "A Semantic Version 2.0 (2.1.0-rc2)", + "HelpVersionStringScheme": "An exact, incomparable version (Vista)", + "HelpVersioning": "Versioning allows you to deterministically control the precise revisions of dependencies used by your project from within your manifest file.", "IllegalFeatures": "List of features is not allowed in this context", "IllegalPlatformSpec": "Platform qualifier is not allowed in this context", "ImproperShaLength": "SHA512's must be 128 hex characters: {value}", @@ -548,6 +567,8 @@ "OriginalBinParagraphHeader": "\nOriginal Binary Paragraph", "OverlayPatchDir": "Overlay path \"{path}\" must exist and must be a directory.", "_OverlayPatchDir.comment": "An example of {path} is /foo/bar.", + "OverlayTriplets": "Overlay triplets from {path} :", + "_OverlayTriplets.comment": "An example of {path} is /foo/bar.", "OverwritingFile": "File {path} was already present and will be overwritten", "_OverwritingFile.comment": "An example of {path} is /foo/bar.", "PackageAlreadyRemoved": "unable to remove package {spec}: already removed", @@ -673,6 +694,8 @@ "UnknownSettingForBuildType": "Unknown setting for VCPKG_BUILD_TYPE {option}. Valid settings are '', 'debug', and 'release'.", "_UnknownSettingForBuildType.comment": "An example of {option} is editable.", "UnknownTool": "vcpkg does not have a definition of this tool for this platform.", + "UnknownTopic": "unknown topic {value}", + "_UnknownTopic.comment": "{value} the value a user passed to `vcpkg help` that we don't understand", "UnknownVariablesInTemplate": "invalid argument: url template '{value}' contains unknown variables: {list}", "_UnknownVariablesInTemplate.comment": "{value} is the value provided by the user and {list} a list of unknown variables seperated by comma", "UnrecognizedConfigField": "configuration contains the following unrecognized fields:", diff --git a/src/vcpkg/base/messages.cpp b/src/vcpkg/base/messages.cpp index 4f39bafb4f..aa399fc89c 100644 --- a/src/vcpkg/base/messages.cpp +++ b/src/vcpkg/base/messages.cpp @@ -430,6 +430,8 @@ namespace vcpkg REGISTER_MESSAGE(AuthenticationMayRequireManualAction); REGISTER_MESSAGE(AutomaticLinkingForMSBuildProjects); REGISTER_MESSAGE(AutoSettingEnvVar); + REGISTER_MESSAGE(AvailableArchitectureTriplets); + REGISTER_MESSAGE(AvailableHelpTopics); REGISTER_MESSAGE(BinarySourcesArg); REGISTER_MESSAGE(BuildAlreadyInstalled); REGISTER_MESSAGE(BuildDependenciesMissing); @@ -453,6 +455,7 @@ namespace vcpkg REGISTER_MESSAGE(BuildTroubleshootingMessage2); REGISTER_MESSAGE(BuildTroubleshootingMessage3); REGISTER_MESSAGE(BuildTroubleshootingMessage4); + REGISTER_MESSAGE(BuiltInTriplets); REGISTER_MESSAGE(ChecksFailedCheck); REGISTER_MESSAGE(ChecksUnreachableCode); REGISTER_MESSAGE(ChecksUpdateVcpkg); @@ -467,6 +470,7 @@ namespace vcpkg REGISTER_MESSAGE(CMakeTargetsUsageHeuristicMessage); REGISTER_MESSAGE(CMakeToolChainFile); REGISTER_MESSAGE(CommandFailed); + REGISTER_MESSAGE(CommunityTriplets); REGISTER_MESSAGE(ComparingUtf8Decoders); REGISTER_MESSAGE(CompressFolderFailed); REGISTER_MESSAGE(ComputingInstallPlan); @@ -563,6 +567,7 @@ namespace vcpkg REGISTER_MESSAGE(FailedVendorAuthentication); REGISTER_MESSAGE(FeedbackAppreciated); REGISTER_MESSAGE(FileNotFound); + REGISTER_MESSAGE(FileSystemOperationFailed); REGISTER_MESSAGE(FishCompletion); REGISTER_MESSAGE(FollowingPackagesMissingControl); REGISTER_MESSAGE(FollowingPackagesNotInstalled); @@ -582,28 +587,43 @@ namespace vcpkg REGISTER_MESSAGE(GitUnexpectedCommandOutput); REGISTER_MESSAGE(HashFileFailureToRead); REGISTER_MESSAGE(HeaderOnlyUsage); + REGISTER_MESSAGE(HelpBuiltinBase); REGISTER_MESSAGE(HelpContactCommand); REGISTER_MESSAGE(HelpCreateCommand); REGISTER_MESSAGE(HelpDependInfoCommand); REGISTER_MESSAGE(HelpEditCommand); REGISTER_MESSAGE(HelpEnvCommand); REGISTER_MESSAGE(HelpExampleCommand); + REGISTER_MESSAGE(HelpExampleManifest); REGISTER_MESSAGE(HelpExportCommand); REGISTER_MESSAGE(HelpFormatManifestCommand); REGISTER_MESSAGE(HelpHashCommand); REGISTER_MESSAGE(HelpInitializeRegistryCommand); REGISTER_MESSAGE(HelpInstallCommand); REGISTER_MESSAGE(HelpListCommand); + REGISTER_MESSAGE(HelpManifestConstraints); + REGISTER_MESSAGE(HelpMinVersion); + REGISTER_MESSAGE(HelpOverrides); REGISTER_MESSAGE(HelpOwnsCommand); + REGISTER_MESSAGE(HelpPackagePublisher); + REGISTER_MESSAGE(HelpPortVersionScheme); REGISTER_MESSAGE(HelpRemoveCommand); REGISTER_MESSAGE(HelpRemoveOutdatedCommand); REGISTER_MESSAGE(HelpResponseFileCommand); REGISTER_MESSAGE(HelpSearchCommand); REGISTER_MESSAGE(HelpTopicCommand); REGISTER_MESSAGE(HelpTopicsCommand); + REGISTER_MESSAGE(HelpUpdateBaseline); REGISTER_MESSAGE(HelpUpdateCommand); REGISTER_MESSAGE(HelpUpgradeCommand); REGISTER_MESSAGE(HelpVersionCommand); + REGISTER_MESSAGE(HelpVersionDateScheme); + REGISTER_MESSAGE(HelpVersionGreater); + REGISTER_MESSAGE(HelpVersioning); + REGISTER_MESSAGE(HelpVersionScheme); + REGISTER_MESSAGE(HelpVersionSchemes); + REGISTER_MESSAGE(HelpVersionSemverScheme); + REGISTER_MESSAGE(HelpVersionStringScheme); REGISTER_MESSAGE(IllegalFeatures); REGISTER_MESSAGE(IllegalPlatformSpec); REGISTER_MESSAGE(ImproperShaLength); @@ -691,6 +711,7 @@ namespace vcpkg REGISTER_MESSAGE(MonoInstructions); REGISTER_MESSAGE(MsiexecFailedToExtract); REGISTER_MESSAGE(MultiArch); + REGISTER_MESSAGE(MutuallyExclusiveOption); REGISTER_MESSAGE(NavigateToNPS); REGISTER_MESSAGE(NewConfigurationAlreadyExists); REGISTER_MESSAGE(NewManifestAlreadyExists); @@ -711,6 +732,7 @@ namespace vcpkg REGISTER_MESSAGE(OptionRequiresOption); REGISTER_MESSAGE(OriginalBinParagraphHeader); REGISTER_MESSAGE(OverlayPatchDir); + REGISTER_MESSAGE(OverlayTriplets); REGISTER_MESSAGE(OverwritingFile); REGISTER_MESSAGE(PackageAlreadyRemoved); REGISTER_MESSAGE(PackageFailedtWhileExtracting); @@ -741,7 +763,6 @@ namespace vcpkg REGISTER_MESSAGE(ProcessorArchitectureMissing); REGISTER_MESSAGE(ProcessorArchitectureW6432Malformed); REGISTER_MESSAGE(ProgramReturnedNonzeroExitCode); - REGISTER_MESSAGE(MutuallyExclusiveOption); REGISTER_MESSAGE(PushingVendorFailed); REGISTER_MESSAGE(RegistryCreated); REGISTER_MESSAGE(RemoveDependencies); @@ -786,6 +807,7 @@ namespace vcpkg REGISTER_MESSAGE(UnknownPolicySetting); REGISTER_MESSAGE(UnknownSettingForBuildType); REGISTER_MESSAGE(UnknownTool); + REGISTER_MESSAGE(UnknownTopic); REGISTER_MESSAGE(UnknownVariablesInTemplate); REGISTER_MESSAGE(UnrecognizedConfigField); REGISTER_MESSAGE(UnrecognizedIdentifier); @@ -843,5 +865,4 @@ namespace vcpkg REGISTER_MESSAGE(WhileLookingForSpec); REGISTER_MESSAGE(WindowsOnlyCommand); REGISTER_MESSAGE(WroteNuGetPkgConfInfo); - REGISTER_MESSAGE(FileSystemOperationFailed); } diff --git a/src/vcpkg/help.cpp b/src/vcpkg/help.cpp index d35d6ad02f..95b3433024 100644 --- a/src/vcpkg/help.cpp +++ b/src/vcpkg/help.cpp @@ -34,7 +34,10 @@ namespace vcpkg::Help print_usage(S); } - static void integrate_topic_fn(const VcpkgPaths&) { print2("Commands:\n", Commands::Integrate::get_helpstring()); } + static void integrate_topic_fn(const VcpkgPaths&) + { + msg::write_unlocalized_text_to_stdout(Color::none, "Commands:\n" + Commands::Integrate::get_helpstring()); + } static void help_topics(const VcpkgPaths&); @@ -49,58 +52,32 @@ namespace vcpkg::Help static void help_topic_versioning(const VcpkgPaths&) { HelpTableFormatter tbl; - tbl.text("Versioning allows you to deterministically control the precise revisions of dependencies used by " - "your project from within your manifest file."); - tbl.blank(); + tbl.text(msg::format(msgHelpVersioning)); tbl.blank(); - tbl.header("Versions in vcpkg come in four primary flavors"); - tbl.format("version", "A dot-separated sequence of numbers (1.2.3.4)"); - tbl.format("version-date", "A date (2021-01-01.5)"); - tbl.format("version-semver", "A Semantic Version 2.0 (2.1.0-rc2)"); - tbl.format("version-string", "An exact, incomparable version (Vista)"); tbl.blank(); - tbl.text("Each version additionally has a \"port-version\" which is a nonnegative integer. When rendered as " - "text, the port version (if nonzero) is added as a suffix to the primary version text separated by a " - "hash (#). Port-versions are sorted lexographically after the primary version text, for example:"); + tbl.header(msg::format(msgHelpVersionSchemes)); + tbl.format("version", msg::format(msgHelpVersionScheme)); + tbl.format("version-date", msg::format(msgHelpVersionDateScheme)); + tbl.format("version-semver", msg::format(msgHelpVersionSemverScheme)); + tbl.format("version-string", msg::format(msgHelpVersionStringScheme)); tbl.blank(); + tbl.text(msg::format(msgHelpPortVersionScheme)); tbl.blank(); - tbl.text(" 1.0.0 < 1.0.0#1 < 1.0.1 < 1.0.1#5 < 2.0.0"); tbl.blank(); + tbl.header(msg::format(msgHelpManifestConstraints)); + tbl.format("builtin-baseline", msg::format(msgHelpBuiltinBase)); tbl.blank(); - tbl.header("Manifests can place three kinds of constraints upon the versions used"); - tbl.format("builtin-baseline", - "The baseline references a commit within the vcpkg repository that establishes a minimum version on " - "every dependency in the graph. For example, if no other constraints are specified (directly or " - "transitively), then the version will resolve to the baseline of the top level manifest. Baselines " - "of transitive dependencies are ignored."); + tbl.format("version>=", msg::format(msgHelpVersionGreater)); tbl.blank(); - tbl.format("version>=", - "Within the \"dependencies\" field, each dependency can have a minimum constraint listed. These " - "minimum constraints will be used when transitively depending upon this library. A minimum " - "port-version can additionally be specified with a '#' suffix."); + tbl.format("overrides", msg::format(msgHelpOverrides)); tbl.blank(); - tbl.format( - "overrides", - "When used as the top-level manifest (such as when running `vcpkg install` in the directory), overrides " - "allow a manifest to short-circuit dependency resolution and specify exactly the version to use. These can " - "be used to handle version conflicts, such as with `version-string` dependencies. They will not be " - "considered when transitively depended upon."); + tbl.text(msg::format(msgHelpMinVersion)); tbl.blank(); - tbl.text( - "Vcpkg will select the minimum version found that matches all applicable constraints, including the " - "version from the baseline specified at top-level as well as any \"version>=\" constraints in the graph."); + tbl.text(msg::format(msgHelpUpdateBaseline)); tbl.blank(); - tbl.text("To keep your libraries up to date, the best approach is to update your baseline reference. This will " - "ensure all packages, including transitive ones, are updated. However if you need to update a package " - "independently, you can use a \"version>=\" constraint."); + tbl.text(msg::format(msgHelpPackagePublisher)); tbl.blank(); - tbl.text( - "Additionally, package publishers can use \"version>=\" constraints to ensure that consumers are using at " - "least a certain minimum version of a given dependency. For example, if a library needs an API added " - "to boost-asio in 1.70, a \"version>=\" constraint will ensure transitive users use a sufficient version " - "even in the face of individual version overrides or cross-registry references."); - tbl.blank(); - tbl.text("Example manifest:"); + tbl.text(msg::format(msgHelpExampleManifest)); tbl.blank(); tbl.text(R"({ "name": "example", @@ -114,7 +91,8 @@ namespace vcpkg::Help { "name": "rapidjson", "version": "2020-09-14" } ] })"); - print2(tbl.m_str, "\nExtended documentation is available at ", docs::versioning_url, "\n"); + msg::write_unlocalized_text_to_stdout(Color::none, tbl.m_str); + msg::println(msgExtendedDocumentationAtUrl, msg::url = docs::versioning_url); } static constexpr std::array topics = {{ @@ -139,9 +117,12 @@ namespace vcpkg::Help static void help_topics(const VcpkgPaths&) { - print2("Available help topics:", - Strings::join("", topics, [](const Topic& topic) { return std::string("\n ") + topic.name; }), - "\n"); + auto msg = msg::format(msgAvailableHelpTopics); + for (auto topic : topics) + { + msg.append_raw(fmt::format("\n {}", topic.name)); + } + msg::println(msg); } void help_topic_valid_triplet(const VcpkgPaths& paths) @@ -152,27 +133,27 @@ namespace vcpkg::Help &triplets_per_location, [](const VcpkgPaths::TripletFile& triplet_file) -> StringView { return triplet_file.location; }); - print2("Available architecture triplets\n"); - print2("VCPKG built-in triplets:\n"); + msg::println(msgAvailableArchitectureTriplets); + msg::println(msgBuiltInTriplets); for (auto* triplet : triplets_per_location[paths.triplets]) { - print2(" ", triplet->name, '\n'); + msg::write_unlocalized_text_to_stdout(Color::none, fmt::format(" {}\n", triplet->name)); } triplets_per_location.erase(paths.triplets); - print2("\nVCPKG community triplets:\n"); + msg::println(msgCommunityTriplets); for (auto* triplet : triplets_per_location[paths.community_triplets]) { - print2(" ", triplet->name, '\n'); + msg::write_unlocalized_text_to_stdout(Color::none, fmt::format(" {}\n", triplet->name)); } triplets_per_location.erase(paths.community_triplets); for (auto&& kv_pair : triplets_per_location) { - print2("\nOverlay triplets from ", kv_pair.first, ":\n"); + msg::println(msgOverlayTriplets, msg::path = kv_pair.first); for (auto* triplet : kv_pair.second) { - print2(" ", triplet->name, '\n'); + msg::write_unlocalized_text_to_stdout(Color::none, fmt::format(" {}\n", triplet->name)); } } } @@ -200,7 +181,7 @@ namespace vcpkg::Help Checks::exit_success(VCPKG_LINE_INFO); } - print2(Color::error, "Error: unknown topic ", topic, '\n'); + msg::println_error(msgUnknownTopic, msg::value = topic); help_topics(paths); Checks::exit_fail(VCPKG_LINE_INFO); } diff --git a/src/vcpkg/input.cpp b/src/vcpkg/input.cpp index 052b9fddae..9414a21266 100644 --- a/src/vcpkg/input.cpp +++ b/src/vcpkg/input.cpp @@ -25,8 +25,8 @@ namespace vcpkg } // Intentionally show the lowercased string - print2(Color::error, expected_spec.error()); - print2(example_text); + msg::write_unlocalized_text_to_stdout(Color::error, expected_spec.error()); + msg::write_unlocalized_text_to_stdout(Color::none, example_text); Checks::exit_fail(VCPKG_LINE_INFO); }