Skip to content

Commit

Permalink
Merge pull request #1547 from microsoft/master
Browse files Browse the repository at this point in the history
Merge from microsoft-master
  • Loading branch information
Jimmy-Hu authored Jan 5, 2024
2 parents ba79c0c + ce46ba8 commit 9125d57
Show file tree
Hide file tree
Showing 37 changed files with 375 additions and 70 deletions.
2 changes: 1 addition & 1 deletion ports/fbthrift/portfile.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ vcpkg_from_github(
OUT_SOURCE_PATH SOURCE_PATH
REPO facebook/fbthrift
REF "v${VERSION}"
SHA512 8730c2ecfeccf221e746df9f8e449d31934fd7e6f7861631d4c38e891cfc7b5ab07ffb48b56048031820f771966d6435bee2996738934bca9324548aeba5b30d
SHA512 9138917c622eb1254043520708d49391196412ef5a4c309e82c25eacfcc680a41b3a0b81cde9c777a1893015da5751bac1a627633ef917f9e94b39771a981a07
HEAD_REF master
PATCHES
fix-glog.patch
Expand Down
2 changes: 1 addition & 1 deletion ports/fbthrift/vcpkg.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "fbthrift",
"version-string": "2023.10.02.00",
"version-string": "2024.01.01.00",
"description": "Facebook's branch of Apache Thrift, including a new C++ server.",
"homepage": "https://github.com/facebook/fbthrift",
"license": "Apache-2.0",
Expand Down
2 changes: 1 addition & 1 deletion ports/fizz/portfile.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ vcpkg_from_github(
OUT_SOURCE_PATH SOURCE_PATH
REPO facebookincubator/fizz
REF "v${VERSION}"
SHA512 ff0dfe95640a24568a2950442576fbf4acd9a1dd354b7f7687cb1946cc2f896664e6e54b29ec051eccddb765bab276cb94c9920c724c4b4a5b1fc5f29c26e649
SHA512 e940aacb6dd08163f292a6e3e07e5782ccaa7658c638791a75604ba4a05da6a827a383d1727e56c85823da99a678a60ae67207f64b64c274786ad85793fd04bb
HEAD_REF master
PATCHES
0001-fix-libsodium.patch
Expand Down
2 changes: 1 addition & 1 deletion ports/fizz/vcpkg.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "fizz",
"version-string": "2023.10.02.00",
"version-string": "2024.01.01.00",
"description": "a TLS 1.3 implementation by Facebook",
"homepage": "https://github.com/facebookincubator/fizz",
"license": "BSD-3-Clause",
Expand Down
2 changes: 1 addition & 1 deletion ports/folly/portfile.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ vcpkg_from_github(
OUT_SOURCE_PATH SOURCE_PATH
REPO facebook/folly
REF "v${VERSION}"
SHA512 406dbbd5a61a5b0713e7e6c7677be76392c21a5d702b051e72158513436ea9605afe616c5bc1405cb9455be1d1993990c9f2608284204210f41ffc2055e7831b
SHA512 c563aa64efa3098235db5f6354cdbc96d829f8bfc24e24464e0cae65279d00f1bba722c7060c2e76c89723ef66ef94225a02d6fb65e24fa6125adb619fc1d74b
HEAD_REF main
PATCHES
reorder-glog-gflags.patch
Expand Down
3 changes: 1 addition & 2 deletions ports/folly/vcpkg.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
{
"name": "folly",
"version-string": "2023.10.02.00",
"port-version": 1,
"version-string": "2024.01.01.00",
"description": "An open-source C++ library developed and used at Facebook. The library is UNSTABLE on Windows",
"homepage": "https://github.com/facebook/folly",
"license": "Apache-2.0",
Expand Down
2 changes: 1 addition & 1 deletion ports/google-cloud-cpp/portfile.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ vcpkg_from_github(
OUT_SOURCE_PATH SOURCE_PATH
REPO googleapis/google-cloud-cpp
REF "v${VERSION}"
SHA512 a392da19ac353409ecbf30e390803b2e34670552fd54466a08ee554a77c893d447289b30d5841c7f79b2a23244a269d8ecac8f7fbd8a34dda45ce2d8b1d46817
SHA512 f017252b3fbccd5b91088a00c98a610606c5e98b920bf6c0889b6bf0f33f923c38a6116df7d9784381fd6b81ff4c303f55a609fde2e7182958a3c9cbab1f9f47
HEAD_REF main
PATCHES
support_absl_cxx17.patch
Expand Down
15 changes: 13 additions & 2 deletions ports/google-cloud-cpp/vcpkg.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
{
"name": "google-cloud-cpp",
"version": "2.19.0",
"port-version": 1,
"version": "2.20.0",
"description": "C++ Client Libraries for Google Cloud Platform APIs.",
"homepage": "https://github.com/googleapis/google-cloud-cpp",
"license": "Apache-2.0",
Expand Down Expand Up @@ -296,6 +295,18 @@
}
]
},
"cloudquotas": {
"description": "Cloud Quotas API C++ Client Library",
"dependencies": [
{
"name": "google-cloud-cpp",
"default-features": false,
"features": [
"grpc-common"
]
}
]
},
"commerce": {
"description": "Cloud Commerce C++ Client Library",
"dependencies": [
Expand Down
2 changes: 1 addition & 1 deletion ports/mvfst/portfile.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ vcpkg_from_github(
OUT_SOURCE_PATH SOURCE_PATH
REPO facebook/mvfst
REF "v${VERSION}"
SHA512 074ad8201e2c35b51bde0f8eaeb22bfe87af80fd9f3dc6c3de343b19d4b3d7738780a208d4719ee4fbd9d3f2f8a1a95b4858e8dc3fad16c26e4a859ecab75eca
SHA512 6bcc4df79b42bafb06ee69f253733dd5136ef329b8009fc5677f62c3476d205f5f0cdcca242d0bde15914bf487a37aeeab1adb4ad555d2edd5e6b3935e84dd37
HEAD_REF main
)

Expand Down
2 changes: 1 addition & 1 deletion ports/mvfst/vcpkg.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "mvfst",
"version-string": "2023.10.02.00",
"version-string": "2024.01.01.00",
"description": "mvfst (Pronounced move fast) is a client and server implementation of IETF QUIC protocol in C++ by Facebook.",
"homepage": "https://github.com/facebook/mvfst",
"license": "MIT",
Expand Down
15 changes: 0 additions & 15 deletions ports/opentelemetry-cpp/add-missing-dependencies.patch

This file was deleted.

224 changes: 224 additions & 0 deletions ports/opentelemetry-cpp/fix-nominmax-problems.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,224 @@
diff --git a/api/include/opentelemetry/std/span.h b/api/include/opentelemetry/std/span.h
index 2a3dc12a84..1160d54fbe 100644
--- a/api/include/opentelemetry/std/span.h
+++ b/api/include/opentelemetry/std/span.h
@@ -60,7 +60,7 @@ OPENTELEMETRY_END_NAMESPACE
OPENTELEMETRY_BEGIN_NAMESPACE
namespace nostd
{
-constexpr std::size_t dynamic_extent = (std::numeric_limits<std::size_t>::max());
+constexpr std::size_t dynamic_extent = (std::numeric_limits<std::size_t>::max)();

template <class ElementType, std::size_t Extent = nostd::dynamic_extent>
using span = std::span<ElementType, Extent>;
index 7deb369ab3..6da8bdd032 100644
--- a/docs/cpp-ostream-exporter-design.md
+++ b/docs/cpp-ostream-exporter-design.md
@@ -154,7 +154,7 @@ public:
return sdktrace::ExportResult::kSuccess;
}

- bool Shutdown(std::chrono::microseconds timeout = std::chrono::microseconds::max()) noexcept
+ bool Shutdown(std::chrono::microseconds timeout = (std::chrono::microseconds::max)()) noexcept
{
isShutdown = true;
return true;
diff --git a/exporters/elasticsearch/include/opentelemetry/exporters/elasticsearch/es_log_record_exporter.h b/exporters/elasticsearch/include/opentelemetry/exporters/elasticsearch/es_log_record_exporter.h
index 8579c99138..b72ff4f917 100644
--- a/exporters/elasticsearch/include/opentelemetry/exporters/elasticsearch/es_log_record_exporter.h
+++ b/exporters/elasticsearch/include/opentelemetry/exporters/elasticsearch/es_log_record_exporter.h
@@ -100,14 +100,14 @@ class ElasticsearchLogRecordExporter final : public opentelemetry::sdk::logs::Lo
* @return return true when all data are exported, and false when timeout
*/
bool ForceFlush(
- std::chrono::microseconds timeout = std::chrono::microseconds::max()) noexcept override;
+ std::chrono::microseconds timeout = (std::chrono::microseconds::max)()) noexcept override;

/**
* Shutdown this exporter.
* @param timeout The maximum time to wait for the shutdown method to return
*/
bool Shutdown(
- std::chrono::microseconds timeout = std::chrono::microseconds::max()) noexcept override;
+ std::chrono::microseconds timeout = (std::chrono::microseconds::max)()) noexcept override;

private:
// Stores if this exporter had its Shutdown() method called
diff --git a/exporters/elasticsearch/src/es_log_record_exporter.cc b/exporters/elasticsearch/src/es_log_record_exporter.cc
index c90072e4e4..e167faf3d9 100644
--- a/exporters/elasticsearch/src/es_log_record_exporter.cc
+++ b/exporters/elasticsearch/src/es_log_record_exporter.cc
@@ -430,7 +430,7 @@ bool ElasticsearchLogRecordExporter::ForceFlush(
std::chrono::duration_cast<std::chrono::steady_clock::duration>(timeout);
if (timeout_steady <= std::chrono::steady_clock::duration::zero())
{
- timeout_steady = std::chrono::steady_clock::duration::max();
+ timeout_steady = (std::chrono::steady_clock::duration::max)();
}

std::unique_lock<std::mutex> lk_cv(synchronization_data_->force_flush_cv_m);
diff --git a/exporters/otlp/include/opentelemetry/exporters/otlp/otlp_grpc_exporter.h b/exporters/otlp/include/opentelemetry/exporters/otlp/otlp_grpc_exporter.h
index 7aff1e24a5..870e5a043a 100644
--- a/exporters/otlp/include/opentelemetry/exporters/otlp/otlp_grpc_exporter.h
+++ b/exporters/otlp/include/opentelemetry/exporters/otlp/otlp_grpc_exporter.h
@@ -58,7 +58,7 @@ class OtlpGrpcExporter final : public opentelemetry::sdk::trace::SpanExporter
* @return return true when all data are exported, and false when timeout
*/
bool ForceFlush(
- std::chrono::microseconds timeout = std::chrono::microseconds::max()) noexcept override;
+ std::chrono::microseconds timeout = (std::chrono::microseconds::max)()) noexcept override;

/**
* Shut down the exporter.
@@ -67,7 +67,7 @@ class OtlpGrpcExporter final : public opentelemetry::sdk::trace::SpanExporter
* @return return the status of this operation
*/
bool Shutdown(
- std::chrono::microseconds timeout = std::chrono::microseconds::max()) noexcept override;
+ std::chrono::microseconds timeout = (std::chrono::microseconds::max)()) noexcept override;

private:
// The configuration options associated with this exporter.
diff --git a/exporters/otlp/include/opentelemetry/exporters/otlp/otlp_grpc_log_record_exporter.h b/exporters/otlp/include/opentelemetry/exporters/otlp/otlp_grpc_log_record_exporter.h
index 29333703b1..f1cd96888c 100644
--- a/exporters/otlp/include/opentelemetry/exporters/otlp/otlp_grpc_log_record_exporter.h
+++ b/exporters/otlp/include/opentelemetry/exporters/otlp/otlp_grpc_log_record_exporter.h
@@ -60,14 +60,14 @@ class OtlpGrpcLogRecordExporter : public opentelemetry::sdk::logs::LogRecordExpo
* @return return true when all data are exported, and false when timeout
*/
bool ForceFlush(
- std::chrono::microseconds timeout = std::chrono::microseconds::max()) noexcept override;
+ std::chrono::microseconds timeout = (std::chrono::microseconds::max)()) noexcept override;

/**
* Shutdown this exporter.
* @param timeout The maximum time to wait for the shutdown method to return.
*/
bool Shutdown(
- std::chrono::microseconds timeout = std::chrono::microseconds::max()) noexcept override;
+ std::chrono::microseconds timeout = (std::chrono::microseconds::max)()) noexcept override;

private:
// Configuration options for the exporter
diff --git a/exporters/otlp/include/opentelemetry/exporters/otlp/otlp_http_exporter.h b/exporters/otlp/include/opentelemetry/exporters/otlp/otlp_http_exporter.h
index 1adbbc70b9..b5faf1a9b8 100644
--- a/exporters/otlp/include/opentelemetry/exporters/otlp/otlp_http_exporter.h
+++ b/exporters/otlp/include/opentelemetry/exporters/otlp/otlp_http_exporter.h
@@ -59,7 +59,7 @@ class OPENTELEMETRY_EXPORT OtlpHttpExporter final : public opentelemetry::sdk::t
* @return return true when all data are exported, and false when timeout
*/
bool ForceFlush(
- std::chrono::microseconds timeout = std::chrono::microseconds::max()) noexcept override;
+ std::chrono::microseconds timeout = (std::chrono::microseconds::max)()) noexcept override;

/**
* Shut down the exporter.
@@ -68,7 +68,7 @@ class OPENTELEMETRY_EXPORT OtlpHttpExporter final : public opentelemetry::sdk::t
* @return return the status of this operation
*/
bool Shutdown(
- std::chrono::microseconds timeout = std::chrono::microseconds::max()) noexcept override;
+ std::chrono::microseconds timeout = (std::chrono::microseconds::max)()) noexcept override;

private:
// The configuration options associated with this exporter.
diff --git a/exporters/otlp/include/opentelemetry/exporters/otlp/otlp_http_log_record_exporter.h b/exporters/otlp/include/opentelemetry/exporters/otlp/otlp_http_log_record_exporter.h
index 4393345dfd..f481fdab0b 100644
--- a/exporters/otlp/include/opentelemetry/exporters/otlp/otlp_http_log_record_exporter.h
+++ b/exporters/otlp/include/opentelemetry/exporters/otlp/otlp_http_log_record_exporter.h
@@ -58,14 +58,14 @@ class OtlpHttpLogRecordExporter final : public opentelemetry::sdk::logs::LogReco
* @return return true when all data are exported, and false when timeout
*/
bool ForceFlush(
- std::chrono::microseconds timeout = std::chrono::microseconds::max()) noexcept override;
+ std::chrono::microseconds timeout = (std::chrono::microseconds::max)()) noexcept override;

/**
* Shutdown this exporter.
* @param timeout The maximum time to wait for the shutdown method to return
*/
bool Shutdown(
- std::chrono::microseconds timeout = std::chrono::microseconds::max()) noexcept override;
+ std::chrono::microseconds timeout = (std::chrono::microseconds::max)()) noexcept override;

private:
// Configuration options for the exporter
diff --git a/exporters/otlp/src/otlp_http_client.cc b/exporters/otlp/src/otlp_http_client.cc
index 9c57a9bd83..7814199ef2 100644
--- a/exporters/otlp/src/otlp_http_client.cc
+++ b/exporters/otlp/src/otlp_http_client.cc
@@ -782,7 +782,7 @@ bool OtlpHttpClient::ForceFlush(std::chrono::microseconds timeout) noexcept
std::chrono::duration_cast<std::chrono::steady_clock::duration>(timeout);
if (timeout_steady <= std::chrono::steady_clock::duration::zero())
{
- timeout_steady = std::chrono::steady_clock::duration::max();
+ timeout_steady = (std::chrono::steady_clock::duration::max)();
}

while (timeout_steady > std::chrono::steady_clock::duration::zero())
diff --git a/sdk/include/opentelemetry/sdk/logs/batch_log_record_processor.h b/sdk/include/opentelemetry/sdk/logs/batch_log_record_processor.h
index e93ebf3d6b..d6a44df142 100644
--- a/sdk/include/opentelemetry/sdk/logs/batch_log_record_processor.h
+++ b/sdk/include/opentelemetry/sdk/logs/batch_log_record_processor.h
@@ -72,7 +72,7 @@ class BatchLogRecordProcessor : public LogRecordProcessor
* NOTE: Timeout functionality not supported yet.
*/
bool ForceFlush(
- std::chrono::microseconds timeout = std::chrono::microseconds::max()) noexcept override;
+ std::chrono::microseconds timeout = (std::chrono::microseconds::max)()) noexcept override;

/**
* Shuts down the processor and does any cleanup required. Completely drains the buffer/queue of
@@ -82,7 +82,7 @@ class BatchLogRecordProcessor : public LogRecordProcessor
* NOTE: Timeout functionality not supported yet.
*/
bool Shutdown(
- std::chrono::microseconds timeout = std::chrono::microseconds::max()) noexcept override;
+ std::chrono::microseconds timeout = (std::chrono::microseconds::max)()) noexcept override;

/**
* Class destructor which invokes the Shutdown() method.
diff --git a/sdk/include/opentelemetry/sdk/logs/multi_log_record_processor.h b/sdk/include/opentelemetry/sdk/logs/multi_log_record_processor.h
index 335da7f668..8ca5cffcca 100644
--- a/sdk/include/opentelemetry/sdk/logs/multi_log_record_processor.h
+++ b/sdk/include/opentelemetry/sdk/logs/multi_log_record_processor.h
@@ -45,7 +45,7 @@ class MultiLogRecordProcessor : public LogRecordProcessor
* @return a result code indicating whether it succeeded, failed or timed out
*/
bool ForceFlush(
- std::chrono::microseconds timeout = std::chrono::microseconds::max()) noexcept override;
+ std::chrono::microseconds timeout = (std::chrono::microseconds::max)()) noexcept override;

/**
* Shuts down the processor and does any cleanup required.
@@ -55,7 +55,7 @@ class MultiLogRecordProcessor : public LogRecordProcessor
* @return true if the shutdown succeeded, false otherwise
*/
bool Shutdown(
- std::chrono::microseconds timeout = std::chrono::microseconds::max()) noexcept override;
+ std::chrono::microseconds timeout = (std::chrono::microseconds::max)()) noexcept override;

private:
std::vector<std::unique_ptr<LogRecordProcessor>> processors_;
diff --git a/sdk/include/opentelemetry/sdk/trace/batch_span_processor.h b/sdk/include/opentelemetry/sdk/trace/batch_span_processor.h
index a748b06361..afbf4486b0 100644
--- a/sdk/include/opentelemetry/sdk/trace/batch_span_processor.h
+++ b/sdk/include/opentelemetry/sdk/trace/batch_span_processor.h
@@ -69,7 +69,7 @@ class BatchSpanProcessor : public SpanProcessor
* NOTE: Timeout functionality not supported yet.
*/
bool ForceFlush(
- std::chrono::microseconds timeout = std::chrono::microseconds::max()) noexcept override;
+ std::chrono::microseconds timeout = (std::chrono::microseconds::max)()) noexcept override;

/**
* Shuts down the processor and does any cleanup required. Completely drains the buffer/queue of
@@ -79,7 +79,7 @@ class BatchSpanProcessor : public SpanProcessor
* NOTE: Timeout functionality not supported yet.
*/
bool Shutdown(
- std::chrono::microseconds timeout = std::chrono::microseconds::max()) noexcept override;
+ std::chrono::microseconds timeout = (std::chrono::microseconds::max)()) noexcept override;

/**
* Class destructor which invokes the Shutdown() method. The Shutdown() method is supposed to be
12 changes: 5 additions & 7 deletions ports/opentelemetry-cpp/portfile.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -6,14 +6,13 @@ vcpkg_from_github(
OUT_SOURCE_PATH SOURCE_PATH
REPO open-telemetry/opentelemetry-cpp
REF "v${VERSION}"
SHA512 55553e3695adbc446264a4589fe8e3b2a284c0aac50ce2a09f76913bc8c0196b8ec8f79a32366c4473196332d4bff058793fe54ad2e95350fc046e3d148c8abb
SHA512 38a3796a5f4c28fd54cc2a5475b3a024e2e73594acbc635fccc6358bf4d93ae897fc0ce55a93d27736a08622869ccc9fe9a9ee62e3884adadb3f135c27d378ec
HEAD_REF main
PATCHES
# When compiling code generated by gRPC we need to link the gRPC library
# too.
add-missing-dependencies.patch
# Missing find_dependency for Abseil
add-missing-find-dependency.patch
# Fix problems from removing NOMINMAX on Windows. Fixed in 1.14.0
fix-nominmax-problems.patch
)

vcpkg_check_features(OUT_FEATURE_OPTIONS FEATURE_OPTIONS
Expand All @@ -24,7 +23,6 @@ vcpkg_check_features(OUT_FEATURE_OPTIONS FEATURE_OPTIONS
elasticsearch WITH_ELASTICSEARCH
jaeger WITH_JAEGER
otlp-http WITH_OTLP_HTTP
zpages WITH_ZPAGES
otlp-grpc WITH_OTLP_GRPC
)

Expand All @@ -43,7 +41,7 @@ if(WITH_OTLP_GRPC)
# Create empty .git directory to prevent opentelemetry from cloning it during build time
file(MAKE_DIRECTORY "${SOURCE_PATH}/third_party/opentelemetry-proto/.git")
list(APPEND FEATURE_OPTIONS -DCMAKE_CXX_STANDARD=14)
list(APPEND FEATURE_OPTIONS -DgRPC_CPP_PLUGIN_EXECUTABLE=${CURRENT_HOST_INSTALLED_DIR}/tools/grpc/grpc_cpp_plugin${VCPKG_HOST_EXECUTABLE_SUFFIX})
list(APPEND FEATURE_OPTIONS "-DgRPC_CPP_PLUGIN_EXECUTABLE=${CURRENT_HOST_INSTALLED_DIR}/tools/grpc/grpc_cpp_plugin${VCPKG_HOST_EXECUTABLE_SUFFIX}")
endif()

vcpkg_cmake_configure(
Expand All @@ -62,7 +60,7 @@ vcpkg_cmake_configure(
)

vcpkg_cmake_install()
vcpkg_cmake_config_fixup(CONFIG_PATH lib/cmake/${PORT})
vcpkg_cmake_config_fixup(CONFIG_PATH "lib/cmake/${PORT}")
vcpkg_copy_pdbs()

file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/include")
Expand Down
Loading

0 comments on commit 9125d57

Please sign in to comment.