From 3871d733493142a6d31f4f4755fffee5fa8c469c Mon Sep 17 00:00:00 2001 From: nicole mazzuca Date: Thu, 9 Jul 2020 12:32:31 -0700 Subject: [vcpkg manifests] fix some issues (#12227) Fixes #12190 Fixes #12208 Fixes #12234 Fixes #12286 Fixes #12315 Fixes #12186 Fixes #12331 Fixes googleapis/google-cloud-cpp#4487 --- toolsrc/include/vcpkg/base/files.h | 3 +++ toolsrc/include/vcpkg/vcpkgcmdarguments.h | 4 ++++ toolsrc/include/vcpkg/versiont.h | 13 +++++++------ 3 files changed, 14 insertions(+), 6 deletions(-) (limited to 'toolsrc/include') diff --git a/toolsrc/include/vcpkg/base/files.h b/toolsrc/include/vcpkg/base/files.h index 68ef2dbcd..a202bfdef 100644 --- a/toolsrc/include/vcpkg/base/files.h +++ b/toolsrc/include/vcpkg/base/files.h @@ -190,6 +190,9 @@ namespace vcpkg::Files virtual void current_path(const fs::path& path, std::error_code&) = 0; void current_path(const fs::path& path, LineInfo li); + // waits forever for the file lock + virtual fs::SystemHandle take_exclusive_file_lock(const fs::path& path, std::error_code&) = 0; + // waits, at most, 1.5 seconds, for the file lock virtual fs::SystemHandle try_take_exclusive_file_lock(const fs::path& path, std::error_code&) = 0; virtual void unlock_file_lock(fs::SystemHandle handle, std::error_code&) = 0; diff --git a/toolsrc/include/vcpkg/vcpkgcmdarguments.h b/toolsrc/include/vcpkg/vcpkgcmdarguments.h index 0ab5917b5..bcbf10619 100644 --- a/toolsrc/include/vcpkg/vcpkgcmdarguments.h +++ b/toolsrc/include/vcpkg/vcpkgcmdarguments.h @@ -149,6 +149,9 @@ namespace vcpkg constexpr static StringLiteral PRINT_METRICS_SWITCH = "printmetrics"; Optional print_metrics = nullopt; + constexpr static StringLiteral WAIT_FOR_LOCK_SWITCH = "x-wait-for-lock"; + Optional wait_for_lock = nullopt; + // feature flags constexpr static StringLiteral FEATURE_FLAGS_ENV = "VCPKG_FEATURE_FLAGS"; constexpr static StringLiteral FEATURE_FLAGS_ARG = "feature-flags"; @@ -175,6 +178,7 @@ namespace vcpkg void check_feature_flag_consistency() const; + void debug_print_feature_flags() const; void track_feature_flag_metrics() const; private: diff --git a/toolsrc/include/vcpkg/versiont.h b/toolsrc/include/vcpkg/versiont.h index e893f1abc..768ca0c47 100644 --- a/toolsrc/include/vcpkg/versiont.h +++ b/toolsrc/include/vcpkg/versiont.h @@ -6,18 +6,19 @@ namespace vcpkg struct VersionT { VersionT() noexcept; - VersionT(std::string&& value); - VersionT(const std::string& value); + VersionT(std::string&& value, int port_version); + VersionT(const std::string& value, int port_version); - const std::string& to_string() const; + std::string to_string() const; + + friend bool operator==(const VersionT& left, const VersionT& right); + friend bool operator!=(const VersionT& left, const VersionT& right); private: std::string value; + int port_version; }; - bool operator==(const VersionT& left, const VersionT& right); - bool operator!=(const VersionT& left, const VersionT& right); - struct VersionDiff { VersionT left; -- cgit v1.2.3